OpenRoadCode
Public API reference for OpenRoadCode
Loading...
Searching...
No Matches
navigation.navigation_controller_if.NavigationControllerIf Class Reference

Provide vehicle orientation, motion, and optional GPS state. More...

Inheritance diagram for navigation.navigation_controller_if.NavigationControllerIf:
navigation.navigation_controller_stub.NavigationControllerStub navigation.unconfigured_navigation_controller.UnconfiguredNavigationController

Public Member Functions

bool is_started (self)
 Return whether the controller is ready to read state.
 
bool is_available (self)
 Return whether navigation support is configured and available.
 
str|None status_message (self)
 Return an availability message, if one applies.
 
MotionCalibration|None calibration (self)
 Return the active stationary calibration, if any.
 
None start (self)
 Start the controller and its configured sources.
 
None stop (self)
 Stop the controller and its configured sources.
 
None reset_heading (self, float heading_deg=0.0)
 Reset relative heading to the requested number of degrees.
 
MotionCalibration calibrate_stationary (self, int sample_count=100, float sample_interval_s=0.01)
 Measure motion-sensor biases while stationary.
 
None update_gps_state (self, GpsState gps_state)
 Accept the latest normalized GPS report.
 
NavigationState read_state (self)
 Read and return the current navigation state.
 

Detailed Description

Provide vehicle orientation, motion, and optional GPS state.

Member Function Documentation

◆ calibrate_stationary()

MotionCalibration navigation.navigation_controller_if.NavigationControllerIf.calibrate_stationary (   self,
int   sample_count = 100,
float   sample_interval_s = 0.01 
)

Measure motion-sensor biases while stationary.

Parameters
sample_countNumber of stationary samples to collect.
sample_interval_sDelay between samples in seconds.
Returns
Measured stationary motion calibration.

Reimplemented in navigation.navigation_controller_stub.NavigationControllerStub, and navigation.unconfigured_navigation_controller.UnconfiguredNavigationController.

◆ calibration()

MotionCalibration | None navigation.navigation_controller_if.NavigationControllerIf.calibration (   self)

Return the active stationary calibration, if any.

Returns
Active calibration, or None before calibration.

Reimplemented in navigation.navigation_controller_stub.NavigationControllerStub, and navigation.unconfigured_navigation_controller.UnconfiguredNavigationController.

◆ is_available()

bool navigation.navigation_controller_if.NavigationControllerIf.is_available (   self)

Return whether navigation support is configured and available.

Return values
TrueNavigation support is available.
FalseNavigation support is unavailable.

Reimplemented in navigation.navigation_controller_stub.NavigationControllerStub, and navigation.unconfigured_navigation_controller.UnconfiguredNavigationController.

◆ is_started()

bool navigation.navigation_controller_if.NavigationControllerIf.is_started (   self)

Return whether the controller is ready to read state.

Return values
TrueThe controller has been started.
FalseThe controller has not been started.

Reimplemented in navigation.navigation_controller_stub.NavigationControllerStub, and navigation.unconfigured_navigation_controller.UnconfiguredNavigationController.

◆ read_state()

NavigationState navigation.navigation_controller_if.NavigationControllerIf.read_state (   self)

Read and return the current navigation state.

Returns
Current orientation, motion, and optional GPS state.

Reimplemented in navigation.navigation_controller_stub.NavigationControllerStub, and navigation.unconfigured_navigation_controller.UnconfiguredNavigationController.

◆ reset_heading()

None navigation.navigation_controller_if.NavigationControllerIf.reset_heading (   self,
float   heading_deg = 0.0 
)

Reset relative heading to the requested number of degrees.

Parameters
heading_degDesired heading after resetting, in degrees.

Reimplemented in navigation.navigation_controller_stub.NavigationControllerStub, and navigation.unconfigured_navigation_controller.UnconfiguredNavigationController.

◆ status_message()

str | None navigation.navigation_controller_if.NavigationControllerIf.status_message (   self)

Return an availability message, if one applies.

Returns
Human-readable status, or None when no message applies.

Reimplemented in navigation.navigation_controller_stub.NavigationControllerStub, and navigation.unconfigured_navigation_controller.UnconfiguredNavigationController.

◆ update_gps_state()

None navigation.navigation_controller_if.NavigationControllerIf.update_gps_state (   self,
GpsState  gps_state 
)

Accept the latest normalized GPS report.

Parameters
gps_stateLatest normalized GPS state.

Reimplemented in navigation.unconfigured_navigation_controller.UnconfiguredNavigationController, and navigation.navigation_controller_stub.NavigationControllerStub.


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