SignalK / signalk-derived-data

Generates deltas for values derived from signalk values
Apache License 2.0
18 stars 30 forks source link

Lost own calculations #135

Closed Fgonzalez22 closed 1 month ago

Fgonzalez22 commented 1 month ago

Have Just Lost All My lown calculations after todays update. is that possible can I recover them?

tkurki commented 1 month ago

How had you added your calculations? I think they are probably lost, as the directory that contained them has probably been overwritten.

Fgonzalez22 commented 1 month ago

I added my own calculation files directly to the directory that contained them all. Should I proceed differently in the future?

tkurki commented 1 month ago

This plugin does not really support that use case and updates will recreate that directory. One way to implement your own calculations is to do them in Node-RED, where the flows are separate from the plugin.

Or if the calculations are of general interest you could contribute them to be included in the plugin, for everybody.

If you want to juggle things yourself you could keep your own calculations separate and only (sym)link to the calcs directory. Then if an update makes them disappear it is easy to re add them.

Fgonzalez22 commented 1 month ago

Got it, I´ll try both alternatives and share any calculation that seem useful.

The one I developed that I find most useful for me is a calculation that allows STW from my instrument (Raymarine i40 with paddlewheel) to be adjusted to a more real STW. Raymarine instrument can be calibrated by a factor, but this is the same for all speeds which is not the case. Usually the higher the STW, the smaller the factor, and the difference can be considerable at speeds below 4knts. I calculated a 3rd degree polynomial function that does a better job. Not sure if this could be useful to others.

Thanks for your help!

tkurki commented 1 month ago

Have you looked at calibration plugin? You give it a set of (input,expectedOutput) data and it interpolates linearly.

Fgonzalez22 commented 1 month ago

Didnt know about it. I will try it! It seems very useful for my needs, thanks for the tip!!!