Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

True Wind Direction (based on AWA and headingTrue) is wrong, should be removed #75

Open
marcobergman opened this issue Feb 1, 2021 · 7 comments

Comments

@marcobergman
Copy link

True Wind Direction cannot possibly be calculated from AWA and headingTrue. The idea is wrong, the calculation is wrong. It should be removed from the code and from the Derived Data Plugin Config.

@sbender9
Copy link
Member

sbender9 commented Feb 1, 2021

Please explain.

@marcobergman
Copy link
Author

Scott so sorry for being unclear, and a bit rude. It cannot be done by definition, because you lack boat and wind speed in the equation. The script trueWind.js shows the correct calculation, and that one works. If you follow that script, and especially how the angle in there is calculated, you'll see what I mean.

@sbender9
Copy link
Member

sbender9 commented Feb 1, 2021

Boat and wind speed are included in the calculation.

@sbender9
Copy link
Member

sbender9 commented Feb 1, 2021

Oh. There are two calculations for this and maybe some confusion about the definition.

@marcobergman
Copy link
Author

marcobergman commented Feb 1, 2021

Boat and wind speed are included in the calculation.

Not in this one https://github.com/SignalK/signalk-derived-data/blob/master/calcs/windDirection.js

@chris0348
Copy link
Contributor

Just had a look: I see it as marcobergmann, directionTrue and directionMagnetic are wrong if calculated via the implementation in windDirection.js, it lacks speedThroughWater.
The file trueWind.js also provides directionTrue, this time the implementation includes speedThroughWater.
Furthermore there is windDirectionMagnetic.js which calculated directionMagnetic from directionTrue.

To wrap it up: In my opinion only one implementation for directionTrue should be provided and furthermore windDirection.js contains a calculation that is wrong. windDirection.js should be deleted.

(I use trueWind.js since > a year and it gives reliable results)

@mgrouch
Copy link

mgrouch commented Jan 30, 2022

It also depends on leeway. Speed sensor only measures speed over water in the direction of heading.
It doesn't give you velocity vector for movement over water. It's a vector algebra formula.

TrueWindVector + SpeedOverWaterVector = ApparentWindVector

To figure out SpeedOverWaterVector you need to know heading vector, speed from (speed sensor) and leeway
(or actually speed over water in direction perpendicular to heading)

leeway doesn't get measured by boat sensors. It has to be estimated and there is an empirical formula for leeway
which depends on the heel :) which is measured from the boat sensor (autopilot IMU)

Leeway = -1 * k * Heel / BSP^2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants