leads.data#
Module Contents#
Classes#
Functions#
Calculate the distance between two locations on the Earth. :param lat_0: the latitude of the first location :param lon_0: the longitude of the first location :param lat: the latitude of the second location :param lon: the longitude of the second location :return: |
|
Wrap the duration into a formatted string. :param duration: the duration in seconds :return: the formatted string |
API#
- class leads.data.DataContainer(voltage: float = 0, speed: float = 0, front_wheel_speed: float = 0, rear_wheel_speed: float = 0, yaw: float = 0, pitch: float = 0, roll: float = 0, forward_acceleration: float = 0, lateral_acceleration: float = 0, vertical_acceleration: float = 0, front_proximity: float = -1, left_proximity: float = -1, right_proximity: float = -1, rear_proximity: float = -1, mileage: float = 0, gps_valid: bool = False, gps_ground_speed: float = 0, latitude: float = 0, longitude: float = 0, steering_position: float = 0, throttle: float = 0, brake: float = 0, **kwargs)[source]#
Bases:
leads.data.SerializableInitialization
- class leads.data.VisualDataContainer(voltage: float = 0, speed: float = 0, front_wheel_speed: float = 0, rear_wheel_speed: float = 0, yaw: float = 0, pitch: float = 0, roll: float = 0, forward_acceleration: float = 0, lateral_acceleration: float = 0, vertical_acceleration: float = 0, front_proximity: float = -1, left_proximity: float = -1, right_proximity: float = -1, rear_proximity: float = -1, mileage: float = 0, gps_valid: bool = False, gps_ground_speed: float = 0, latitude: float = 0, longitude: float = 0, steering_position: float = 0, throttle: float = 0, brake: float = 0, front_view_base64: str = '', front_view_latency: int = 0, left_view_base64: str = '', left_view_latency: int = 0, right_view_base64: str = '', right_view_latency: int = 0, rear_view_base64: str = '', rear_view_latency: int = 0, **kwargs)[source]#
Bases:
leads.data.DataContainerInitialization
- leads.data.distance_between(lat_0: float, lon_0: float, lat: float, lon: float) float[source]#
Calculate the distance between two locations on the Earth. :param lat_0: the latitude of the first location :param lon_0: the longitude of the first location :param lat: the latitude of the second location :param lon: the longitude of the second location :return: