Posts: 9
Threads: 2
Joined: Feb 2022
Reputation:
0
I have the wind angle apparent with the raymarine st60 and the signalk-avg-paths give a smooth value.
I want to use the smooth values as my first apparent wind angle. how can i make it?
environment.wind.angleApparent
2.2349
rad 04/26 19:31:16 can0.115 (130306)
environment.wind.angleApparent_smooth
2.1680968144369617
rad 04/26 19:31:16 signalk-avg-paths
if signalk uses the smooth values the kravio polars plugin and all the values that uses apparent wind angle in the derived data plugin would have better values.
Anybody knows how to make that change?
Posts: 328
Threads: 34
Joined: Oct 2019
Reputation:
30
2023-04-27, 03:45 AM
(This post was last modified: 2023-04-27, 03:46 AM by Techstyle.)
if you locate the location of the Derived data plugin, you can find the subdirectory called 'calcs' and do some testing, for instance, you could copy "truewind.js" and rename it and then edit the file (a text editor is fine). Change the Optionkey, Title to something that references that this uses smoothed data, and then change the references to:
'environment.wind.speedApparent',
'environment.wind.angleApparent'
to the smoothed version,
and then the outputs:
return [
{ path: 'environment.wind.directionTrue', value: dir },
{ path: 'environment.wind.angleTrueWater', value: angle },
{ path: 'environment.wind.speedTrue', value: speed }
]
to smoothed versions and at this point in the Plugin config, you should be able to turn it on and see if it works the way you think it should work
once you have tested it, you could talk to some of the signal K guys and get it added to the Derived data plugin.
Posts: 9
Threads: 2
Joined: Feb 2022
Reputation:
0
2023-05-02, 09:16 PM
(This post was last modified: 2023-05-02, 09:37 PM by pestsicola.)
Ok, i can try to change the trueWind.js file but i Have to change al the files where
'environment.wind.speedApparent',
'environment.wind.angleApparent'
are use and change for smooth angle and smooth speed.
I want to change the name of the path 'environment.wind.speedApparent' with a new name 'environment.wind.speedApparent-NON-AVERAGE' create the average value with node red and the name of the new path must be 'environment.wind.speedApparent'
and the same with 'environment.wind.angleApparent'
I wat to make that change because when I use the polar speed ratio and polar speed I have very bad values and I have to make a polar speed of 7 knots in one second and in the next second of 3 knots.
And the same with true wind I have a value of 60 degrees and in the next second a value of 20 degrees.
In that case I have to change all the plugins and al the calcs in all the program with the smooth values
if i could substitute the 'environment.wind.speedApparent' path with the new 'environment.wind.speedApparent.smooth' all the signalk must be more smooth.