Navigation¶
struct nmeasim::core::model::Navigation · Library API
Position, motion and heading of the vessel.
#include <nmeasim/core/model/vessel_state.hpp>
Declared in src/core/include/nmeasim/core/model/vessel_state.hpp (line 75)
Magnetic quantities are derived, not stored: true = magnetic + variation for the heading and the course over ground, and magnetic = compass + deviation for the heading read from the ship's compass.
Summary¶
Public member functions
| Name | Description |
|---|---|
heading_magnetic_deg() |
Returns the heading referenced to magnetic north, as HDM, VHW and Signal K send it. |
heading_compass_deg() |
Returns the heading as the ship's compass reports it, as HDG sends it. |
course_over_ground_magnetic_deg() |
Returns the course over ground referenced to magnetic north. |
Public data members
| Name | Description |
|---|---|
position |
Position of the GNSS antenna, the reference point of the AIS dimensions. |
altitude_m |
Antenna altitude above mean sea level, sent in GGA and Signal K; negative below it. |
course_over_ground_deg |
Course over ground in degrees true, in [0, 360); sent in RMC, VTG, VBW and AIS. |
speed_over_ground_kn |
Speed over ground, not negative; sent in RMC, VTG, VBW and the AIS position report. |
heading_true_deg |
Heading of the bow in degrees true, in [0, 360); sent in HDT, VHW and AIS. |
magnetic_variation_deg |
Magnetic variation of the chart position, positive east, sent in RMC and HDG. |
magnetic_deviation_deg |
Deviation of the ship's compass, positive east, sent in HDG; it applies to the compass heading only. |
speed_through_water_kn |
Speed through the water along the heading, not negative; sent in VHW and VBW. |
rate_of_turn_deg_per_min |
Rate of turn, positive to starboard (heading increasing), sent in ROT and AIS. |
Public member functions¶
heading_magnetic_deg()¶
double heading_magnetic_deg() const noexcept
Returns the heading referenced to magnetic north, as HDM, VHW and Signal K send it.
Deviation does not apply: it is an error of the ship's compass, which heading_compass_deg() includes.
Returns double: heading_true_deg - magnetic_variation_deg, normalised to [0, 360).
Declared in src/core/include/nmeasim/core/model/vessel_state.hpp:102 · defined in src/core/src/model/vessel_state.cpp:10
heading_compass_deg()¶
double heading_compass_deg() const noexcept
Returns the heading as the ship's compass reports it, as HDG sends it.
Returns double: heading_true_deg - magnetic_variation_deg - magnetic_deviation_deg, normalised to [0, 360).
Declared in src/core/include/nmeasim/core/model/vessel_state.hpp:108 · defined in src/core/src/model/vessel_state.cpp:14
course_over_ground_magnetic_deg()¶
double course_over_ground_magnetic_deg() const noexcept
Returns the course over ground referenced to magnetic north.
Deviation does not apply: the course comes from the GNSS receiver, not the compass.
Returns double: course_over_ground_deg - magnetic_variation_deg, normalised to [0, 360).
Declared in src/core/include/nmeasim/core/model/vessel_state.hpp:115 · defined in src/core/src/model/vessel_state.cpp:19
Public data members¶
position¶
geo::Position position
Position of the GNSS antenna, the reference point of the AIS dimensions.
Declared in src/core/include/nmeasim/core/model/vessel_state.hpp:77
altitude_m¶
double altitude_m{0.0}
Antenna altitude above mean sea level, sent in GGA and Signal K; negative below it.
Declared in src/core/include/nmeasim/core/model/vessel_state.hpp:79
course_over_ground_deg¶
double course_over_ground_deg{0.0}
Course over ground in degrees true, in [0, 360); sent in RMC, VTG, VBW and AIS.
Declared in src/core/include/nmeasim/core/model/vessel_state.hpp:81
speed_over_ground_kn¶
double speed_over_ground_kn{0.0}
Speed over ground, not negative; sent in RMC, VTG, VBW and the AIS position report.
Declared in src/core/include/nmeasim/core/model/vessel_state.hpp:83
heading_true_deg¶
double heading_true_deg{0.0}
Heading of the bow in degrees true, in [0, 360); sent in HDT, VHW and AIS.
Declared in src/core/include/nmeasim/core/model/vessel_state.hpp:85
magnetic_variation_deg¶
double magnetic_variation_deg{0.0}
Magnetic variation of the chart position, positive east, sent in RMC and HDG.
Declared in src/core/include/nmeasim/core/model/vessel_state.hpp:87
magnetic_deviation_deg¶
double magnetic_deviation_deg{0.0}
Deviation of the ship's compass, positive east, sent in HDG; it applies to the compass heading only.
Declared in src/core/include/nmeasim/core/model/vessel_state.hpp:90
speed_through_water_kn¶
double speed_through_water_kn{0.0}
Speed through the water along the heading, not negative; sent in VHW and VBW.
Declared in src/core/include/nmeasim/core/model/vessel_state.hpp:92
rate_of_turn_deg_per_min¶
double rate_of_turn_deg_per_min{0.0}
Rate of turn, positive to starboard (heading increasing), sent in ROT and AIS.
Declared in src/core/include/nmeasim/core/model/vessel_state.hpp:94