# Boat Data 101

## Headings, HDG, HDM, HDC, Declination, deviation, Variation

The boat heading is given by the compass, that gives the Compass Heading (HDC).
The magnetic masses of the boat influence the compass, which is a magnetic device. This influence is called the compass deviation, noted d. It depends on the boat and on its heading. Your compass has to be calibrated, the output of this calibration is a deviation curve, that gives the value of the deviation for any given heading.
The deviation is between the Compass Heading (HDC) and the Magnetic Heading (HDM).
Between the Magnetic Heading (HDM) and the True Heading (HDG) is the Magnetic Declination (noted D). It depends on your location, and on the date (it changes over time for a given location). The Magnetic Declination is given on the charts, and sometimes returned by the RMC sentence of the GPS.
The algebraic sum of the Declination and the deviation is called the Compass' Variation (noted W).
D d (from dev curve)
° ' ° '
 HDC: 351 Graph Zoom: Style: One Two

## Leeway

This one is hard to normalize... It takes some intuition from the navigator. This intuition can be influenced by many factors, like the sea state, the weather situation, the skills of the driver..., etc.
It depends on the Apparent Wind Angle (AWA), and a MaxLeeway value.
The formula we use here is `Leeway = MaxLeeway × cos(AWA)`, when `AWA ∈ [-90, 90]`, 0 otherwise.
 AWA: 100
 Max Leeway Graph Zoom: Style: One Two

## True Wind

The True wind is to be calculated with the GPS data.
Picture that (and draw a sketch if needed):
You are "sailing" in no wind at all (like in the San Francisco Bay in winter), and a 5 knot current is taking you out of the Bay (or inside, or wherever).
BSP is zero, True Wind Speed (TWS) is zero too, and in this case, AWS would be the speed of the current (5 knots), the AWA will depend on (but be equivalent to) the direction the current is taking you to.
If you calculate the TWS based on BSP, CMG, AWA and AWS, you will find a TWS equal to AWS - which is wrong because there is no wind, and a wrong TWA (and True Wind Direction (TWD) as well, no wind has no direction).
But, if you replace BSP with Speed Over Ground (SOG), and CMG with Course Over Ground (COG), you are back in business; COG is the current direction, SOG is the current speed.

This obviously requires the knowledge of SOG & COG, returned by a GPS.

When the boat is moving, that eventually means that an accurate TWA and TWS (and TWD) is elaborated by a accurate knowledge of
• COG
• SOG
• AWA
• AWS
• CMG
In short: this is not trivial. At all, by far, mostly because of CMG (see above for details).
 AWA: 100 AWS: 15 COG: 350 SOG: 8.2 Max Leeway Graph Zoom: Style: One Two

## Current, VMG

The full picture.
 AWA: 100 AWS: 15 COG: 350 SOG: 8.2 Max Leeway Graph Zoom: Style: One Two