OpenRoadCode
Public API reference for OpenRoadCode
Loading...
Searching...
No Matches
automotive.trip_if.TripIf Class Reference

Accumulate vehicle and navigation observations into trip state. More...

Public Member Functions

None observe_vehicle_state (self, VehicleState state)
 Consume one normalized vehicle telemetry snapshot.
None observe_position_state (self, PositionState state)
 Consume one normalized geographic position snapshot.
None observe_ground_motion_state (self, GroundMotionState state)
 Consume one normalized ground-motion snapshot.
TripState snapshot (self)
 Return the current immutable trip snapshot.
TripState finish (self, datetime|None ended_at=None)
 Finish the current trip and return its final snapshot.
None reset (self)
 Discard current trip state and return to idle.

Detailed Description

Accumulate vehicle and navigation observations into trip state.

Implementations own trip lifecycle policy and derived calculations. Messaging, persistence, and presentation remain outside this contract.

Member Function Documentation

◆ finish()

TripState automotive.trip_if.TripIf.finish ( self,
datetime | None ended_at = None )

Finish the current trip and return its final snapshot.

Parameters
ended_atExplicit trip end time, or None to use the implementation's current time.
Returns
Final immutable trip state.

◆ observe_ground_motion_state()

None automotive.trip_if.TripIf.observe_ground_motion_state ( self,
GroundMotionState state )

Consume one normalized ground-motion snapshot.

Parameters
stateNormalized ground-motion snapshot.

◆ observe_position_state()

None automotive.trip_if.TripIf.observe_position_state ( self,
PositionState state )

Consume one normalized geographic position snapshot.

Parameters
stateNormalized geographic position snapshot.

◆ observe_vehicle_state()

None automotive.trip_if.TripIf.observe_vehicle_state ( self,
VehicleState state )

Consume one normalized vehicle telemetry snapshot.

Parameters
stateSI-normalized vehicle telemetry snapshot.

◆ snapshot()

TripState automotive.trip_if.TripIf.snapshot ( self)

Return the current immutable trip snapshot.

Returns
Current immutable trip state.

The documentation for this class was generated from the following file:
  • controllers/automotive/trip_if.py