unified_frameworks.sensor_array.gps_compass package
Submodules
unified_frameworks.sensor_array.gps_compass.actual_gps_compass module
- class unified_frameworks.sensor_array.gps_compass.actual_gps_compass.ActualGPSCompass(port: str | None = None)
Bases:
_GPSCompass
- get_cur_angle() float
Returns the latest known heading, relative to North
- get_cur_gps() Tuple[int, int]
Returns latest GPS coordinates, in the format (longitude, latitude)
- read() None
On thread for reading gps coordinates This way we can continously retrieve the latest data
- start_service() None
Should be called to start the service.
- stop_service() None
Should be called when we disconnect
unified_frameworks.sensor_array.gps_compass.fake_gps_compass module
- class unified_frameworks.sensor_array.gps_compass.fake_gps_compass.FakeGPSCompass
Bases:
_GPSCompass
- geographic_coordinates_to_relative_coordinates(target_latitude: float, target_longitude: float)
Convert the target latitude/longitude into polar form of (theta, r) where theta is in radians
- get_cur_angle() int
Returns the current angle from north, in degrees
- get_cur_gps() Tuple[int, int]
Returns the current GPS position in the form (latitude, longitude)
- start_service()
- stop_service()
unified_frameworks.sensor_array.gps_compass.gps_compass module
unified_frameworks.sensor_array.gps_compass.gps_compass_class module
- class unified_frameworks.sensor_array.gps_compass.gps_compass_class.Util
Bases:
object
Methods were taken from AutoHelp
- get_bearing(target_GPS)
Returns the angle between two GPS coordinates
- PARAMS:
current_GPS (tuple): (latitude, longitude) target_GPS (tuple): (latitude, longitude)
- RETURNS:
float. angle between the two coordinates
- get_distance(target_GPS: Tuple[float, float]) Tuple[float, float] | None
Returns a tuple containing the distance between current_GPS and target_GPS The tuple is of the following format: (distanceInKM, distanceInMiles)