barnaclebill - If a plugin like signalk-derived...
If a plugin like signalk-derived-data doesn't have all of the source data specified in "derivedFrom", will the calculation not happen? Asking because I modified the trueWind calc to still calculate TWA even if headTrue is null, but still not getting TWA (when SK has no heading but has AWA, AWS, and STW).
10 Replies
It probably makes sense to split these into two different calcs. One for TWA and another for TWD.
I did it, but it still feels kind of messy...I think TWS will be calculated twice every "cycle".
https://github.com/SignalK/signalk-derived-data/pull/156
So make the TWD calc depend on TWA? So then it’s only calculated once.
Good point...I will try that. I'm already at the limit of my coding ability though :- )
Get an Ai to write it for you. Doesn't nail it first time every time. But often does😊 Gemini in VScode seems reliable. Will tell you what does what as well if you ask. Or perplexity.ai. copy n paste the code in from github, seems it can't get in to github
HTH
I would appreciate it if someone else could try it...code is on Github in the above PR.
I am not near my boat, so I used the SK sample data file, but I also extracted all the heading PGNs from the file to test both TWA and TWD.
I will test it before I merge, hopefully tomorrow morning….
"dir = null", line 18, does this do anything?
Nope!