NodePosition
The one current position of a node: where it is, where it points, and when that was measured.
| Inherits | QObject |
| Group | node |
Declared in src/libs/libnode/node/NodePosition.hpp.
Detailed description
A node keeps one NodePosition (owner ruling, 2026-10-18: one position per node). Node::position() gives it. The platform position source writes it. The path follower reads it. The Agent copies each change into the AgentStateCourier and the SensorsCourier of every paired client.
The heading
Two sources give the heading. A fix gives a course over ground, but only while the node moves: below kMovingSpeedMps a GPS direction is noise, and many sources give no direction at all. The compass gives an azimuth also while the node stands still. headingRadians() is the course while the node moves, else the compass. headingSource() tells which. With neither, the heading is NaN and the path follower stays idle.
The compass azimuth is relative to magnetic north, and the course to true north. The difference is the magnetic declination of the place, a few degrees in most places. The node does not correct it.
The timestamp is the time of the update, from the clock of setClock(). It is not the time of the fix in the source. A source and the system clock can disagree, and the staleness rule of the path follower compares the timestamp with the same clock.
See also PathFollower, AgentStateRouter.