Skip to content

Library internals

The implementation files and private headers of core and io, with the helpers that are local to them. None of this is part of the library interface.

Namespaces

Namespace Description
nmeasim::core::track::xml Helpers on top of pugixml shared by the GPX and KML readers of nmeasim::core::track; private to the core library.

Types

Type Description
nmeasim::core::log::(anonymous namespace){log_file.cpp}::RawEntry A valid sentence line as read by the first pass of parse_log, before offsets are assigned.
nmeasim::core::nmea0183::(anonymous namespace){encoders.cpp}::AutopilotView Values shared by the autopilot sentences APB, RMB and XTE for the current destination.
nmeasim::core::nmea0183::(anonymous namespace){encoders.cpp}::SatelliteView Synthetic but stable elevation, azimuth and signal strength of one satellite, as GSV reports them.
nmeasim::core::simulation::(anonymous namespace){custom_sentence.cpp}::Normalised Outcome of normalise: the parts of an acceptable body, or the reason it was refused.
nmeasim::core::track::(anonymous namespace){kml.cpp}::Reader Depth-first traversal of a KML document that concatenates its track geometries.

Files

File Description
src/core/src/ais/messages.cpp Packing of the own-vessel AIS messages 1 to 3 and 5, and their framing into sentences.
src/core/src/ais/sixbit.cpp Bit packing, six-bit text codes and payload armouring for AIS messages.
src/core/src/geo/geodesic.cpp Geodesic calculations on the WGS 84 ellipsoid, delegated to GeographicLib.
src/core/src/geo/route.cpp Leg geometry: geodesic bearings and distances with spherical cross-track and along-track distances.
src/core/src/log/log_file.cpp Log parsing with its timing rules, log loading, and formatting of recorder lines.
src/core/src/model/vessel_state.cpp Derived quantities of the vessel state: magnetic and compass heading, magnetic course, relative true wind.
src/core/src/nmea0183/checksum.cpp Computation, formatting and verification of NMEA 0183 checksums.
src/core/src/nmea0183/decoder.cpp Implementation of the NMEA 0183 decoder declared in decoder.hpp.
src/core/src/nmea0183/encoders.cpp Implementation of the NMEA 0183 sentence encoders declared in encoders.hpp.
src/core/src/nmea0183/fields.cpp Formatting of NMEA 0183 numbers, coordinates, times and dates.
src/core/src/nmea0183/registry.cpp The standard sentence catalogue and the encoding within the NMEA 0183 length limit.
src/core/src/nmea0183/sentence_builder.cpp Field-by-field assembly and framing of NMEA 0183 sentences.
src/core/src/nmea0183/tag_block.cpp Formatting of IEC 61162-450 TAG blocks and sanitising of their source identifier.
src/core/src/physics/wind.cpp Apparent wind from the true wind and the vessel's velocity, by vector subtraction.
src/core/src/signalk/delta.cpp Signal K delta and hello messages rendered as JSON text from the vessel state.
src/core/src/simulation/custom_sentence.cpp Validation and framing of operator-defined sentence bodies.
src/core/src/simulation/delta_source.cpp Implementation of DeltaSource: bounded random drift, overrides, rudder steering and geodesic dead reckoning.
src/core/src/simulation/replay_source.cpp Implementation of ReplaySource: the replay clock, its end and loop handling, stepping and seeking.
src/core/src/simulation/sentence_scheduler.cpp Implementation of the sentence schedule and of the next_due_after cadence rule.
src/core/src/simulation/simulation.cpp Implementation of Simulation, which advances a source and dispatches to the recorded sentences or the sentence schedule.
src/core/src/simulation/track_source.cpp Implementation of TrackSource: the leg table, geodesic interpolation along a leg, and the end, seek and jump behaviour.
src/core/src/time/iso8601.cpp Hand-written ISO 8601 date-time parser and formatter on std::chrono calendar types.
src/core/src/track/gpx.cpp GPX 1.0 and 1.1 reader: parse_gpx and the reading of single track and route points.
src/core/src/track/kml.cpp KML 2.2 track reader: parse_kml and the traversal that collects <gx:Track> and <LineString> geometries.
src/core/src/track/track.cpp Display names of track kinds and the timing and length queries of Track.
src/core/src/track/track_file.cpp Choice of the track reader from the file extension, and reading track files from disk.
src/core/src/track/xml_helpers.cpp Locale-independent number parsing, trimming and document loading for the track readers.
src/core/src/track/xml_helpers.hpp XML helpers shared by the GPX and KML readers, a private header of the core library.
src/core/src/version.cpp.in Definition of version_description, filled in with the git description at build time.
src/core/src/viewsync/viewsync.cpp Formatting of ViewSync camera packets from the vessel state.
src/io/src/network_interfaces.cpp Implementation of the IPv4 interface enumeration on top of QNetworkInterface.
src/io/src/profile/profile.cpp Reading, writing, validation and schema migration of simulator profiles.
src/io/src/serial_ports.cpp Implementation of available_serial_ports on top of QSerialPortInfo.
src/io/src/simulation_runner.cpp Implementation of SimulationRunner and OutputChannel: building the source and the transports from a profile, the tick loop and the encoding of each output.
src/io/src/transport.cpp Implementation of the Transport base class: state changes, failure reporting, byte counting and the names of the states.
src/io/src/transports/file_transport.cpp Implementation of FileTransport: opening the file in append or truncate mode and writing flushed lines unchanged.
src/io/src/transports/log_transport.cpp Implementation of LogTransport: writing the header of a new log and timestamping every sentence with the wall clock.
src/io/src/transports/serial_transport.cpp Implementation of SerialTransport on QSerialPort: opening and configuring the port and detecting an unplugged device.
src/io/src/transports/stdout_transport.cpp Implementation of StdoutTransport on std::cout.
src/io/src/transports/tcp_client_transport.cpp Implementation of TcpClientTransport on QTcpSocket, with a single-shot timer driving reconnection.
src/io/src/transports/tcp_server_transport.cpp Implementation of TcpServerTransport on QTcpServer: accepting, tracking and dropping clients.
src/io/src/transports/udp_transport.cpp Implementation of UdpTransport on QUdpSocket: resolving the destination, binding to the chosen interface and sending datagrams.
src/io/src/transports/websocket_server_transport.cpp Implementation of WebSocketServerTransport on QWebSocketServer: accepting and greeting clients and sending text frames.