OpenRoadCode
Public API reference for OpenRoadCode
Loading...
Searching...
No Matches
navigation.position_snapshot_cache.PositionSnapshotCache Class Reference

Persist and restore the most recent valid position fix. More...

Public Member Functions

PositionState|None load (self)
 Load the cached fix and mark it as cached.
 
None store (self, PositionState state)
 Persist a valid live position fix.
 

Detailed Description

Persist and restore the most recent valid position fix.

Member Function Documentation

◆ load()

PositionState | None navigation.position_snapshot_cache.PositionSnapshotCache.load (   self)

Load the cached fix and mark it as cached.

Returns
Cached position or None when absent or invalid.

◆ store()

None navigation.position_snapshot_cache.PositionSnapshotCache.store (   self,
PositionState  state 
)

Persist a valid live position fix.

Parameters
stateLive position containing a usable fix and coordinates.
Exceptions
ValueErrorif state is cached or lacks a usable fix.

The documentation for this class was generated from the following file: