Teppo Kurki - anybody interested in creating a ...
aggregates plugin: anybody interested in creating a generic aggregates plugin what would calculate for starters
- moving averages
- average angular quantities (where the average between -170 and 170 degrees is not zero)
17 Replies
I have this on my list for Kip to create a good chart indicator. It would definitely be better in a plugin. What KIP has for now is really basic.
I have not thought everything trough yet but, with the goal to support racing type widgets, we have derived-data and polar performance plugins. One challenge we need to think about is how to map all this data together as a single dataset from a single point in time.
It’s a challenge to build a time chart when the data comes at different times from different paths.
For exemple: if you want to build a realtime chart that display: current heading, heading SMA, and polar recommended heading, you need to get those numbers all the same interval and same times. Else, your time scale is hard to build, especially in realtime.
Why? You can not synchronize the sensors that produce the different values
What do you mean? Or rather, how can this be done?
You have one sensor that produces data every 500 ms, another every 700ms. You will never get them at the same time
And why would you need to?
Or: I don’t understand what the problem you talk abouy is 😀
Also i don’t think this is related to moving averages, but that does not matter
Well I'm not 100% sure either. And your are right... maybe not related. But when I found this topic, I was thinking that in KIP, I'll need a bunch of statistical and performance data. For exemple, moving averages for: heading, wind angles, VMG, SOW, SOG...
also Exponential Moving Average (EMA) and Double Exponential Moving Average (DEMA) for optimal heading.
I built those in KIP datasets but would be better in a plugin... anyway, back to the subject....
To make a real good performance plugin, we should include polar reference data.
follow me so far?
Then when you get to building a time scale based chart to draw all those elements, it's hard if they are not all based a single datapoint timestamp. Do you see what I mean?
It would make life easier and the data much simpler to exploit if we had a plugin that grabbed and calculated all this data (source values, stats output, polar targets, etc), dealt with how to account for different value emition rates, and send them as a single object with the same timestamp
Then you simply grab the datapoint and snap it on a chart. Else apps have to handle this on their own
If this is out of scope in this conversation, disregard. I'll open a specification thread when I get to it so we can determine the right approach. But maybe, if we are going to build a SMA plugin, it's worth figuring it now...
in some cases there are two jumps. one of 0 and 360 values and the other for values of -170 and 170.
same strategy fixes them: calculate vector sum
a plugin for create moving averages for aparent wind angle and direction magnetic resolves a lot of problems of bad calcs. I was trying the mxtommy kip data chart and it gives jumps of 35 degrees
I create a node red with chat gpt and it works fine
It was figured out or needs to be?
Did not understand your question. To average angles you need to treat them as vectors, that will treat cases like average of 5 and 355 deg and 170 and -170 correctly
Thanks! My question was to know if we have a plugin that already solves this calculation.
That the moment KIP’s datasets does not look at meta units to check for averaging rules. It just applies the same for any numeric, just like before. There are probably other units that needs special rule. I’ve not looked at it. With time, it will come.
Not afaik, thus my original post
found the solution for wrap around and moving average!
Or just plain @petsi what to test the new release and tell me if it’s any better? V2.9.1
I'm testing the version.
@petsi one of the challenge, I think, is directional angles are not well suited to the Data charts design. Especially when it comes to wrap-around cases. This widget has a fixed Scale top to bottom. Wrap-around jumps from top to bottom. We need a new chart widget tracking values against the scale so that the scale mid range moves with the value and show variations against that mid line. That way it will be circular. Follow me?
@petsi at least I fixed the calculation 😁 I’ll do DEMA calc later when I build this new wrap around directional widget.
ok, sorry.... 😉 now I see what you want to do 😉