README
True Wind Calculator
Calculate true wind direction speed from vessel speed, apparent wind direction and speed.
truewind(options)
The first argument is an options object. {speed: 6.5, heading: 200, awd: 350, aws: 5, awa: 150}
speed
- Vessel Speedheading
- Vessel True Headingawd
- Apparent Wind Direction (0-360) (relative to true north)awa
- Apparent Wind Angle (0-360) (relative to bow) Overridesawd
andheading
options.aws
- Apparent Wind Speed (relative to the boat). Units must matchspeed
option.
Returns {}
Each value is rounded to nearest hundredth.
twa
- True Wind Angletwd
- True Wind Direction (Requiresheading
andawd
input.)twsr
- True Wind Speed as a ratio tospeed
input.tws
- True Wind Speed in units as sent to function.
var truewind = require('truewind');
var ops = {
speed: 6.5, heading: 200, awd: 350, aws: 5
};
var res = truewind(ops); // { twa: 167, twd: 367, twsr: 1.71, tws: 11.11 }