Skip to content

TrackSource::Leg

struct nmeasim::core::simulation::TrackSource::Leg ยท Library API

One leg of the track, between two consecutive points.

Declared in src/core/include/nmeasim/core/simulation/track_source.hpp (line 163)

Summary

Public data members

Name Description
from Position of the start point.
to Position of the end point.
length_m Geodesic length of the leg, in metres.
bearing_deg Initial bearing from from to to, degrees true.
start_s Offset of the leg's start from the start of the track, in seconds.
duration_s Time it takes to sail the leg, in seconds; zero for a timed leg whose points share a timestamp.
speed_kn Speed over ground shown along the leg, in knots.
course_deg Recorded course of the start point, degrees true, when the file has one.
elevation_m Recorded elevation of the start point, in metres, when the file has one.
point_index Index of the start point in the track's points.

Public data members

from

geo::Position from

Position of the start point.

Declared in src/core/include/nmeasim/core/simulation/track_source.hpp:165

to

geo::Position to

Position of the end point.

Declared in src/core/include/nmeasim/core/simulation/track_source.hpp:167

length_m

double length_m{0.0}

Geodesic length of the leg, in metres.

Declared in src/core/include/nmeasim/core/simulation/track_source.hpp:169

bearing_deg

double bearing_deg{0.0}

Initial bearing from from to to, degrees true.

A leg shorter than a millimetre has no bearing of its own and takes the previous leg's, or for the first leg the first point's recorded course or zero, so that a stop does not turn the bow.

Declared in src/core/include/nmeasim/core/simulation/track_source.hpp:175

start_s

double start_s{0.0}

Offset of the leg's start from the start of the track, in seconds.

Declared in src/core/include/nmeasim/core/simulation/track_source.hpp:177

duration_s

double duration_s{0.0}

Time it takes to sail the leg, in seconds; zero for a timed leg whose points share a timestamp.

Declared in src/core/include/nmeasim/core/simulation/track_source.hpp:180

speed_kn

double speed_kn{0.0}

Speed over ground shown along the leg, in knots.

Declared in src/core/include/nmeasim/core/simulation/track_source.hpp:182

course_deg

std::optional<double> course_deg

Recorded course of the start point, degrees true, when the file has one.

Declared in src/core/include/nmeasim/core/simulation/track_source.hpp:184

elevation_m

std::optional<double> elevation_m

Recorded elevation of the start point, in metres, when the file has one.

Declared in src/core/include/nmeasim/core/simulation/track_source.hpp:186

point_index

std::size_t point_index{0}

Index of the start point in the track's points.

Declared in src/core/include/nmeasim/core/simulation/track_source.hpp:188