Skip to content

Commit

Permalink
gps: add status and integrity information (#2110)
Browse files Browse the repository at this point in the history
* gps: add status and resilience information

Add fields to report resilience and status information from GNSS
receivers back to ground control stations for representation in the user
interface.

* gps: separate GNSS integrity information

Move the changes to the `GPS_RAW_INT` message into a separate message
that supports multiple GNSS receivers. Update the enum values to better
support all GNSS receivers.

* gps(integrity): add RAIM info to `GNSS_INTEGRITY` message

* gps(integrity): change `GNSS_INTEGRITY` message `id` field to instanced

Change the `id` field on the `GNSS_INTEGRITY` message to make use of the
instance support in the MAVLink schema.

* gps(integrity): move integrity message to `development.xml`

* gps(integrity): add jamming mitigated and spoofing critical

Change the enums for jamming and spoofing so jamming includes a state
for mitigated interference and spoofing no longer includes a message for
critical spoofing.

* gps(integrity): add units to `GNSS_INTEGRITY` RAIM fields

* gps(integrity): add qualitative indicators to `GNSS_INTEGRITY` message

Add qualitative fields for GNSS signal quality, incoming corrections
quality and overall system status. GNSS receivers or drivers can compute
these based on other data. They can be useful before takeoff and during
flight as a reliable overview of important GNSS components.

* gps(integrity): update quality indicators for unsupported drivers

Add support for drivers that can't or don't want to provide the quality
indicator information

* gps(integrity): use invalid attribute to indicate invalid values

Instead of having implicit invalid values, use the `invalid` attributes.
Also add invalid values to the RAIM data as it may not always be
supplied or available from receivers.

* code review - invalid value for uint8 is 255

* Apply suggestions from code review

* Update message_definitions/v1.0/development.xml

---------

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
  • Loading branch information
flyingthingsintothings and hamishwillee committed Jun 12, 2024
1 parent 9e0d01d commit da3223f
Showing 1 changed file with 102 additions and 0 deletions.
102 changes: 102 additions & 0 deletions message_definitions/v1.0/development.xml
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,93 @@
<description>A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s).</description>
</entry>
</enum>
<enum name="GPS_SYSTEM_ERROR_FLAGS" bitmask="true">
<description>Flags indicating errors in a GPS receiver.</description>
<entry value="1" name="GPS_SYSTEM_ERROR_INCOMING_CORRECTIONS">
<description>There are problems with incoming correction streams.</description>
</entry>
<entry value="2" name="GPS_SYSTEM_ERROR_CONFIGURATION">
<description>There are problems with the configuration.</description>
</entry>
<entry value="4" name="GPS_SYSTEM_ERROR_SOFTWARE">
<description>There are problems with the software on the GPS receiver.</description>
</entry>
<entry value="8" name="GPS_SYSTEM_ERROR_ANTENNA">
<description>There are problems with an antenna connected to the GPS receiver.</description>
</entry>
<entry value="16" name="GPS_SYSTEM_ERROR_EVENT_CONGESTION">
<description>There are problems handling all incoming events.</description>
</entry>
<entry value="32" name="GPS_SYSTEM_ERROR_CPU_OVERLOAD">
<description>The GPS receiver CPU is overloaded.</description>
</entry>
<entry value="64" name="GPS_SYSTEM_ERROR_OUTPUT_CONGESTION">
<description>The GPS receiver is experiencing output congestion.</description>
</entry>
</enum>
<enum name="GPS_AUTHENTICATION_STATE">
<description>Signal authentication state in a GPS receiver.</description>
<entry value="0" name="GPS_AUTHENTICATION_STATE_UNKNOWN">
<description>The GPS receiver does not provide GPS signal authentication info.</description>
</entry>
<entry value="1" name="GPS_AUTHENTICATION_STATE_INITIALIZING">
<description>The GPS receiver is initializing signal authentication.</description>
</entry>
<entry value="2" name="GPS_AUTHENTICATION_STATE_ERROR">
<description>The GPS receiver encountered an error while initializing signal authentication.</description>
</entry>
<entry value="3" name="GPS_AUTHENTICATION_STATE_OK">
<description>The GPS receiver has correctly authenticated all signals.</description>
</entry>
<entry value="4" name="GPS_AUTHENTICATION_STATE_DISABLED">
<description>GPS signal authentication is disabled on the receiver.</description>
</entry>
</enum>
<enum name="GPS_JAMMING_STATE">
<description>Signal jamming state in a GPS receiver.</description>
<entry value="0" name="GPS_JAMMING_STATE_UNKNOWN">
<description>The GPS receiver does not provide GPS signal jamming info.</description>
</entry>
<entry value="1" name="GPS_JAMMING_STATE_OK">
<description>The GPS receiver detected no signal jamming.</description>
</entry>
<entry value="2" name="GPS_JAMMING_STATE_MITIGATED">
<description>The GPS receiver detected and mitigated signal jamming.</description>
</entry>
<entry value="3" name="GPS_JAMMING_STATE_DETECTED">
<description>The GPS receiver detected signal jamming.</description>
</entry>
</enum>
<enum name="GPS_SPOOFING_STATE">
<description>Signal spoofing state in a GPS receiver.</description>
<entry value="0" name="GPS_SPOOFING_STATE_UNKNOWN">
<description>The GPS receiver does not provide GPS signal spoofing info.</description>
</entry>
<entry value="1" name="GPS_SPOOFING_STATE_OK">
<description>The GPS receiver detected no signal spoofing.</description>
</entry>
<entry value="2" name="GPS_SPOOFING_STATE_MITIGATED">
<description>The GPS receiver detected and mitigated signal spoofing.</description>
</entry>
<entry value="3" name="GPS_SPOOFING_STATE_DETECTED">
<description>The GPS receiver detected signal spoofing but still has a fix.</description>
</entry>
</enum>
<enum name="GPS_RAIM_STATE">
<description>State of RAIM processing.</description>
<entry value="0" name="GPS_RAIM_STATE_UNKNOWN">
<description>RAIM capability is unknown.</description>
</entry>
<entry value="1" name="GPS_RAIM_STATE_DISABLED">
<description>RAIM is disabled.</description>
</entry>
<entry value="2" name="GPS_RAIM_STATE_OK">
<description>RAIM integrity check was successful.</description>
</entry>
<entry value="3" name="GPS_RAIM_STATE_FAILED">
<description>RAIM integrity check failed.</description>
</entry>
</enum>
</enums>
<messages>
<!-- Transactions for parameter protocol -->
Expand Down Expand Up @@ -594,6 +681,21 @@
</description>
<field type="uint8_t" name="seq">Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically).</field>
</message>
<message id="441" name="GNSS_INTEGRITY">
<description>Information about key components of GNSS receivers, like signal authentication, interference and system errors.</description>
<field type="uint8_t" name="id" instance="true">GNSS receiver id. Must match instance ids of other messages from same receiver.</field>
<field type="uint32_t" name="system_errors" enum="GPS_SYSTEM_ERROR_FLAGS" display="bitmask">Errors in the GPS system.</field>
<field type="uint8_t" name="authentication_state" enum="GPS_AUTHENTICATION_STATE">Signal authentication state of the GPS system.</field>
<field type="uint8_t" name="jamming_state" enum="GPS_JAMMING_STATE">Signal jamming state of the GPS system.</field>
<field type="uint8_t" name="spoofing_state" enum="GPS_SPOOFING_STATE">Signal spoofing state of the GPS system.</field>
<field type="uint8_t" name="raim_state" enum="GPS_RAIM_STATE">The state of the RAIM processing.</field>
<field type="uint16_t" name="raim_hfom" units="cm" invalid="UINT16_MAX">Horizontal expected accuracy using satellites successfully validated using RAIM.</field>
<field type="uint16_t" name="raim_vfom" units="cm" invalid="UINT16_MAX">Vertical expected accuracy using satellites successfully validated using RAIM.</field>
<field type="uint8_t" name="corrections_quality" minValue="0" maxValue="10" invalid="UINT8_MAX">An abstract value representing the estimated quality of incoming corrections, or 255 if not available.</field>
<field type="uint8_t" name="system_status_summary" minValue="0" maxValue="10" invalid="UINT8_MAX">An abstract value representing the overall status of the receiver, or 255 if not available.</field>
<field type="uint8_t" name="gnss_signal_quality" minValue="0" maxValue="10" invalid="UINT8_MAX">An abstract value representing the quality of incoming GNSS signals, or 255 if not available.</field>
<field type="uint8_t" name="post_processing_quality" minValue="0" maxValue="10" invalid="UINT8_MAX">An abstract value representing the estimated PPK quality, or 255 if not available.</field>
</message>
<!-- Target info from a sensor on the target -->
<message id="510" name="TARGET_ABSOLUTE">
<description>Current motion information from sensors on a target</description>
Expand Down

0 comments on commit da3223f

Please sign in to comment.