You might want to give kst [1] a try, which includes a plugin for
weighted least-squares data fitting [2].
imho, kst is the easiest way to plot data in real time (with or
without filters), and works very good with flightgear csv output (with
a little bit of javascript).

Wim

[1] http://kst.kde.org
[2] 
http://www.cita.utoronto.ca/~mamd/kst/handbook/#plugin-kstfit_linear_weighted


On Sat, Oct 17, 2009 at 7:47 PM, Curtis Olson <curtol...@gmail.com> wrote:
> 2009/10/17 Mathias Fröhlich <mathias.froehl...@gmx.net>
>>
>> As always, tell the exact problem.
>>
>> Depending on your problem and requirements the solution ranges from a few
>> lines of code to - 'better use an implementation that already exists is
>> tested
>> and is numerically stable'.
>
> Hi Mathias,
>
> I will be receiving a sequence of 2d data points in "real time".  I will
> start by assuming a linear relationship/fit which I know in advance is a
> reasonable assumption.  I would like to find a way to incrementally compute
> a simple straight line least squares fit of the data I have received so
> far.  I know incremental approaches exist.  Isaias sent me a simple
> approach, but this maintains sums of all the data received so far and as
> Alex pointed out, that will be subject to increasing round off errors as the
> data accumulates (this code could be receiving hundreds of data points per
> second over the course of hours, days, even weeks.)
>
> So yes, a numerically stable approach is important.  I suspect the code will
> just be a few lines, so if I can find an approach that is laid out
> algorithmically or in terms of some sort of pseudo-code, I'm pretty sure I
> can create and test my own implementation.
>
> Maybe I'm only imagining that such a thing exists, I googled for quite a
> while yesterday on a variety of search terms that are directly or loosely
> related and wasn't able to turn up what I was hoping to find.  (Thus my cry
> for help) :-)
>
> A method that "forgets" the oldest data and weights newer data more heavily
> might also be interesting (versus an approach that sums up the entire
> history of the data ... although that would be ok too.)  I'm happy to start
> simple and get fancier later on if I need to.
>
> Thanks,
>
> Curt.
> --
> Curtis Olson: http://baron.flightgear.org/~curt/
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Flightgear-devel mailing list
> Flightgear-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel
>
>



-- 
Avoid hangovers - stay drunk!

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to