This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get True Wind Direction instead of apparent using Signal K.
#18
(2022-04-12, 09:47 PM)Techstyle Wrote:
(2022-04-12, 06:53 PM)dreeas Wrote: Checked out the KIP addon. Looks like this is just for display of data and not creating a new datapoint that can be sent to Influx with Signal K.
But even Kip outputs the wind angle in +/- 180 degrees and not 0-360.

I guess the "Derived Data" addon is not creating any new datapoints in wind angles since I don't have data on Heading or Speed of a vessel and this is used in the calculations.
But even "Derived Data" would maybe just output it in degrees +/- 180 instead of 0-360?

Starting to give up on Signal K for this project, at least for wind direction.

your sensor is outputting +/-180.  to get it to output 0-360 you would need to add 3.14 (Pi), and then divide by 2xPi to get it into degrees.

if you are up to doing a little bit of coding, you could just write your own <filename>.js and put it in the derived data directory with the rest of them and use it to calculate what ever you wanted.  it would look something like this:

Code:
module.exports = function (app, plugin) {
 return [
   {
     group: 'wind',
     optionKey: 'directionTrueDeg',
     title: 'Stationary True Wind Direction in Degrees (based on AWA)',
     derivedFrom: ['environment.wind.angleApparent'],
     calculator: function (awa) {
       let windHeadingDeg = (awa + Math.PI) / (2 * Math.PI)

       return [{ path: 'environment.wind.directionTrueDeg', value: windHeadingDeg }]
     }
   }
 ]
}
   
then restart signal K and go into the derived data page and look for "Stationary True Wind Direction in Degrees (based on AWA)" and turn it on

this is cheating but should work (although my code may be a little wrong!)

Thank you so much for this, I will try that out tomorrow. 
My windsensor is already outputting wind angle 0-359 degrees in to Signal K, I just thought it would be possible to just forward that, or prevent the recalculation to Apparent wind angle.
I realiize Signal K is used for boating and that's why my problem is probably not relevant for this software.
Reply


Messages In This Thread
RE: How to get True Wind Direction instead of apparent using Signal K. - by dreeas - 2022-04-12, 09:58 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)