Expand description
What a board does with a GNSS fix, shared by every board that has one.
[umsh_gnss] gets a receiver talking and turns its sentences into a
Fix. This turns a Fix into the three things UMSH
actually wants from one:
- the ULCP positioning properties a host reads and the device announces,
- the wall clock, when the receiver’s time is trusted,
- the advertised node identity’s location, when that is switched on.
It lives here rather than in umsh-gnss because all three are
protocol concerns, and here rather than in each firmware because both
cargo workspaces would otherwise write it twice. A board contributes
its pins; this contributes the meaning.
§Reading versus announcing
The last fix is cached here and nowhere else. The ULCP session
deliberately never caches a reading — a CMD_PROP_GET samples — so
“the most recent thing the receiver said” has to live somewhere the
sampler can reach, and this is it.
A position is never announced. Where the device is, how high, how well it knows, and off how many satellites are all poll-only: a host that wants them asks, and asks no more often than it has something to do with the answer. Announcing them instead would put this board on the air continuously for no one — a receiver reports about a fix a second, and at the precision the cache keeps, ordinary noise from a receiver that has not moved is enough to make consecutive readings differ. Every one of those would have cost a BLE notification and a wakeup at both ends.
The fix indicator is the exception, and the reason it is one is that it is not a measurement: it changes when the receiver acquires or loses a solution, which is a handful of times a session, and it is how a host knows whether asking is worth anything at all.
Structs§
- Enable
Source - The pump’s view of the enable switch.
- FixSink
- The pump’s sink: folds each cycle into the property surface, the clock, and the advertised identity under the current policy.
- Outcome
- What folding a fix in changed, for a caller that has to act on it.
- Policy
- The policy a fix is folded in under: everything the device domain says about what to do with one.
Enums§
- Announce
- Something the device should publish unasked.
Functions§
- absorb
- Fold one fix into the property surface, the clock, and the identity.
- advertised_
altitude_ m - The altitude to advertise alongside it.
- advertised_
location - The location to advertise, at the precision it is advertised at, or
Nonewhen there is nothing to advertise. - announcer
- Take the publication receiver.
- clear
- Forget everything the receiver said.
- configure
- Apply the device domain’s positioning settings.
- enabled
PROP_GNSS_ENABLED.- identity_
updates - Take the identity-update receiver.
- policy
- The positioning policy currently in effect.
- snapshot
- The receiver’s current view, for a
CMD_PROP_GET. - stamp_
identity - Write the advertised position into a node identity profile.
- to_
snapshot - The ULCP view of one fix.
- wait_
configured - Complete once
configurehas run at least once.
Type Aliases§
- Announcer
- A handle on the publication stream, held by whatever drives the ULCP session’s announcement arm.
- Identity
Updates - A handle on the advertised position, held by whatever owns the node’s identity profile.