GPS
In order to guarantee full compatibility with the PX4 navigation system, the projection from local to global coordinate system, i.e., latitude and longitude is performed by transforming the vehicle position, to the geographic coordinate system using the azymuthal equidistant projection in accordance with the World Geodetic System (WGS84) [Mat23], [Sny87].
Classes:
The class that implements a GPS sensor. |
- class pegasus.simulator.logic.sensors.gps.GPS
Bases:
Sensor
The class that implements a GPS sensor. This class inherits the base class Sensor.
Methods:
__init__
([config])Initialize the GPS class.
update
(state, dt)Method that should be implemented by the class that inherits Sensor.
Attributes:
(dict) The 'state' of the sensor, i.e. the data produced by the sensor at any given point in time.
- __init__(config={})
Initialize the GPS class.
- Parameters:
config (dict) – A Dictionary that contains all the parameters for configuring the GPS - it can be empty or only have some of the parameters used by the GPS.
Examples
The dictionary default parameters are
>>> {"fix_type": 3, >>> "eph": 1.0, >>> "epv": 1.0, >>> "sattelites_visible": 10, >>> "gps_xy_random_walk": 2.0, # (m/s) / sqrt(hz) >>> "gps_z_random_walk": 4.0, # (m/s) / sqrt(hz) >>> "gps_xy_noise_density": 2.0e-4, # (m) / sqrt(hz) >>> "gps_z_noise_density": 4.0e-4, # (m) / sqrt(hz) >>> "gps_vxy_noise_density": 0.2, # (m/s) / sqrt(hz) >>> "gps_vz_noise_density": 0.4, # (m/s) / sqrt(hz) >>> "gps_correlation_time": 60, # s >>> "update_rate": 1.0 # Hz >>> }
- update(state, dt)
Method that should be implemented by the class that inherits Sensor. This is where the actual implementation of the sensor should be performed.
- property state
(dict) The ‘state’ of the sensor, i.e. the data produced by the sensor at any given point in time