From 67195d178ffd0d3b921de31bf63025a15673bc1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Izzo?= Date: Sat, 6 Feb 2021 15:37:14 +0100 Subject: [PATCH] Add GPS data structures in radio state --- openrtx/include/state.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/openrtx/include/state.h b/openrtx/include/state.h index 47a28055..233d986b 100644 --- a/openrtx/include/state.h +++ b/openrtx/include/state.h @@ -26,6 +26,33 @@ #include #include +/** + * Data structure representing a single satellite as part of a GPS fix. + */ +typedef struct +{ + uint8_t id; + uint8_t elevation; + uint16_t azimuth; + uint8_t snr; +} +sat_t; + +/** + * Data structure representing the last state received from the GPS module. + */ +typedef struct +{ + uint8_t fix_quality; + curTime_t timestamp; + sat_t satellites[12]; + float latitude; + float longitude; + float speed; + float tmg; +} +gps_t; + /** * Part of this structure has been commented because the corresponding * functionality is not yet implemented. @@ -60,6 +87,7 @@ typedef struct uint8_t voxLevel; bool emergency; + gps_t gps_data; } state_t;