From 0c33e2880363899729d834ec90be8960f4a20b55 Mon Sep 17 00:00:00 2001 From: a-f-G-U-C <65810997+a-f-G-U-C@users.noreply.github.com> Date: Thu, 7 Oct 2021 13:14:23 +0000 Subject: [PATCH] user setting to control POSITION optional fields --- radioconfig.proto | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/radioconfig.proto b/radioconfig.proto index ffc45fa..7be2507 100644 --- a/radioconfig.proto +++ b/radioconfig.proto @@ -177,6 +177,46 @@ enum LocationSharing { LocDisabled = 2; } +/* + * Bit field of boolean configuration options, indicating which optional + * fields to include when assembling POSITION messages + * Longitude and latitude are always included (also time if GPS-synced) + * + * NOTE: the more fields are included, the larger the message will be - + * leading to longer airtime and a higher risk of packet loss + */ +enum PositionFlags { + /* Required for compilation */ + POS_UNDEFINED = 0x0000; + + /* Include an altitude value (if available) */ + POS_ALTITUDE = 0x0001; + + /* Altitude value is MSL */ + POS_ALT_MSL = 0x0002; + + /* Include geoidal separation */ + POS_GEO_SEP = 0x0004; + + /* Include the DOP value ; PDOP used by default, see below */ + POS_DOP = 0x0008; + + /* If POS_DOP set, send separate HDOP / VDOP values instead of PDOP */ + POS_HVDOP = 0x0010; + + /* Include battery level */ + POS_BATTERY = 0x0020; + + /* Include number of "satellites in view" */ + POS_SATINVIEW = 0x0040; + + /* Include a sequence number incremented per packet */ + POS_SEQ_NOS = 0x0080; + + /* Include positional timestamp (from GPS solution) */ + POS_TIMESTAMP = 0x0100; +} + /* * The entire set of user settable/readable settings for our radio device. * Includes both the current channel settings and any preferences the user has @@ -485,6 +525,11 @@ message RadioConfig { */ uint32 environmental_measurement_plugin_sensor_pin = 147; + /* + * Bit field of boolean configuration options for POSITION messages + * (bitwise OR of PositionFlags) + */ + uint32 position_flags = 150; }