GPS

Use prerecorded data

The GPS sensor can be configured to use prerecorded data to simulate different scenarios:

  • xxx_quality: scenario where GPS data are of xxx quality where xxx can be good, medium, or bad

  • xxx_quality_with_fix: same as xxx quality but preceded by xxx quality fix search

  • smartphone: scenario where GPS data contain errors typical from a smartphone

To deactivate the use of prerecorded data, set empirical_error_mode to an empty string. By default, empirical_error_mode is set to good_quality, except for ANAFI for which it is set to an empty string.

Note

Some GPS parameters are expressions that are expected to modify the corresponding perfect output accessible via the val variable. These are:

  • position_east_m_expr

  • position_north_m_expr

  • position_up_m_expr

  • velocity_east_expr

  • velocity_north_expr

  • velocity_up_expr

Others are expressions that directly set arbitrary values:

  • pos_accuracy_m_expr

  • speed_accuracy_mps_expr

  • pdop_expr

  • hdop_expr

  • vdop_expr

  • range_rms_expr

  • std_lat_expr

  • std_long_expr

  • std_alt_expr

  • num_sv_expr

All parameters

Name

Description

Expected type

Read-only

delay_ms

Delay of the GPS in milliseconds.

integer

N

delta_position

Relative position of the GPS sensor in body frame in meters.

3-component vector

N

empirical_error_mode

Empirical Error Mode. If set to a mode name supported by the simulated drone, replays predefined errors over several GPS variables.

[_, good_quality, medium_quality, bad_quality, good_quality_with_fix, medium_quality_with_fix, bad_quality_with_fix, smartphone]

N

faa_mode_indicator

(FAA) Mode indicator. Possible values are: N (No Fix), A (Autonomous GNSS Fix), D (Differential GNSS Fix), E (Estimated/Dead Reckoning Fix).

string

N

fix_mode

Current fix mode. Possible values are: 1 (Fix not available) 2 (2D mode selected) 3 (3D mode selected).

[1, 2, 3]

N

hdop_expr

Arbitrary value of the horizontal dilution of precision (HDOP). Expression supported.

string

N

num_sv_expr

Arbitrary value of the number of satellites. Expression supported.

string

N

number_delay_samples

DEPRECATED. Delay of the GPS as a number of samples.

integer

N

out_of_order

If true, put the sensor out of service.

boolean

N

pdop_expr

Arbitrary value of the position dilution of precision. Expression supported.

string

N

pos_accuracy_m_expr

Arbitrary value of the position accuracy estimate [meters]. Expression supported.

string

N

pos_mode

Positioning mode. Composed of two character, the first character is for GPS and second character is for GLONASS. The signification of each character is as follows: N (Constellation not in use, or no valid fix), A (Autonomous (non-differential)), D (Differential mode), P (Precise (no degradation, like Selective Availability)), R (Real Time Kinematic), F (Float RTK), E (Estimated (dead reckoning) Mode), M (Manual Input Mode), S (Simulator Mode).

string

N

position_east_m_expr

Expression of drone position in Gazebo system coordinates - East direction [meters].

string

N

position_north_m_expr

Expression of drone position in Gazebo system coordinates - North direction [meters].

string

N

position_up_m_expr

Expression of drone AMSL altitude [meters].

string

N

quality

Quality indicator for position fix. Possible values are: 0 (No Fix), 1 (Autonomous GNSS Fix), 2 (Differential GNSS Fix), 6 (Estimated/Dead Reckoning Fix).

[0, 1, 2, 6]

N

range_rms_expr

Arbitrary value of the RMS value of the standard deviation of ranges. Expression supported.

string

N

rtk_fix_status

RTK fix status. Possible values are: none (No fix), float (Floating ambiguities), fix (Fixed)

[none, float, fix]

N

selection_mode

Selection mode for the fix. Possible values are: M (Manual (forced to operate in 2D or 3D)) A (Automatic (2D or 3D)).

[M, A]

N

speed_accuracy_mps_expr

Arbitrary value of the speed accuracy estimate [m/s]. Expression supported.

string

N

status

Navigation receiver status. Possible values are: A (Valid) or V (Navigation receiver warning).

[A, V]

N

std_alt_expr

Arbitrary value of the standard deviation for the altitude error. Expression supported.

string

N

std_lat_expr

Arbitrary value of the standard deviation for the latitude error. Expression supported.

string

N

std_long_expr

Arbitrary value of the standard deviation for the longitude error. Expression supported.

string

N

update_rate

Sensor frequency [Hz].

floating-point number

N

vdop_expr

Arbitrary value of the vertical dilution of precision (VDOP). Expression supported.

string

N

velocity_east_expr

Expression defining drone velocity along East direction [m/s].

string

N

velocity_north_expr

Expression defining drone velocity along North direction [m/s].

string

N

velocity_up_expr

Expression defining drone vertical velocity [m/s].

string

N

constellations/

Name

Description

Expected type

Read-only

beidou

Set to true if BeiDou is enabled.

boolean

Y

galileo

Set to true if Galileo is enabled.

boolean

Y

glonass

Set to true if GLONASS is enabled.

boolean

Y

gps

Set to true if GPS is enabled.

boolean

Y