Skip to main content

Module environment

Module environment 

Source
Expand description

Environment ports and the resolved sample.

Magnetic model, current atlas, wind forecast and deviation table all answer a question for a place and time. The choice of model (WMM or IGRF, tidal atlas or GRIB, swung table or Smith coefficients) is not the kernel’s; the kernel defines the ports (MagneticModel, CurrentModel, WindModel, TideModel, LeewayModel, CompassModel) and the answer types (MagneticField, Current, Wind, height of tide as a Distance above chart datum).

An EnvironmentSample holds the answers resolved for one point and instant, for calculations that must not know the source. No port is implemented here; implementations live in kinavis or in satellite crates with the model data.

The compass model sits here because it is used together with the magnetic one: variation from the field, deviation from the ship’s magnetism, together converting compass to true.

Structs§

Current
Current: set and drift.
EnvironmentSample
Environment resolved for one point and instant.
MagneticField
Earth’s magnetic field at a point: north, east, down components in nT.
VesselMotion
Motion through the water, as input to a leeway model.
Wind
True wind: direction from and speed.

Constants§

MAX_FIELD_NANOTESLA
Maximum magnitude of a field component, nT.

Traits§

CompassModel
Ship’s magnetism as compass deviation.
CurrentModel
Current: constant, tidal, GRIB, ocean model.
LeewayModel
Leeway model for a hull.
MagneticModel
Earth’s magnetic field: WMM, IGRF, compass rose, constant.
TideModel
Tide: tables, harmonic prediction, gauge.
WindModel
True wind: forecast, observation, constant.