1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 21:05:35 +03:00
betaflight/lib/main
Bruce Luckcuck 37dbbd0755 Add GPS coordinates OSD elements display variants; add support for Open Location Code display
Adds variations in GPS coordinate OSD element display:
1. Fractional degrees with 7 digits (default) - 000.0000000
2. Fractional degrees with 4 digits - 000.0000
3. Degrees, minutes, seconds - 000^00'00.0"E
4. Open Location Code (sometimed called Google Plus Code) - 23ABC4R8+M37

Uses Open Location Code library from:
https://github.com/google/open-location-code

Added support for `STATE(GPS_FIX_EVER)` to differentiate from having a fix now (`STATE(GPS_FIX)`) vs. ever having a fix.

Logic change to only display coordinates from the GPS module once a fix has been initially established. This prevents displaying interim coordinates supplied by the GPS while the fix is still being establised as these coordinates can be inaccurate by hundreds of miles. Once a fix is established initially then the coordinates will continue to be displayed even if the fix is lost or degrades in quality.

Add logic to "blink" the coordinates if the 3D fix is lost after initially being established. Alerts the user that the coordinate display may be inaccurate or no longer being updated. We want to keep the coordinates displayed to aid recovery if the user loses the fix (like crashing upside down).

Replace GPS defines `LAT` and `LON` used throughout the code with the enumeration:
```
typedef enum {
    GPS_LATITUDE,
    GPS_LONGITUDE
} gpsCoordinateType_e;
```

The Open Location Code option is bounded with `USE_GPS_PLUS_CODE` to allow it to be excluded if needed for targets with limited flash space. It currently fits for F411 but we may have to remove it in the future.
2021-04-26 23:43:11 +12:00
..
BoschSensortec/BMI270-Sensor-API Cleaned up the inclusion of the microcode for BMI270. 2020-03-11 20:47:43 +13:00
CMSIS CF/BF - Update DSP_Lib and STM32F7/Drivers/CMSIS to CMSIS 5.3.0. (#5431) 2018-03-12 09:34:43 +13:00
dyad Fixed build for gcc 8 (SITL). 2019-02-25 15:34:34 +13:00
google/olc Add GPS coordinates OSD elements display variants; add support for Open Location Code display 2021-04-26 23:43:11 +12:00
MAVLink Ignore warnings about access to packed struct in MAVlink as the accessed member is actually aligned. 2019-11-28 12:42:39 +13:00
STM32_USB-FS-Device_Driver Further improvements to serial const correctness 2016-10-04 09:01:28 +01:00
STM32_USB_Device_Library Fixes from review + new PR 2020-08-31 16:40:38 +02:00
STM32_USB_OTG_Driver Fixed warnings in STM libraries about ignored attributes. 2019-11-26 07:27:59 +13:00
STM32F1 Register changes fired by modified EOL code for html files 2019-10-03 03:18:37 +09:00
STM32F3 Register changes fired by modified EOL code for html files 2019-10-03 03:18:37 +09:00
STM32F4 Register changes fired by modified EOL code for html files 2019-10-03 03:18:37 +09:00
STM32F7 Fixes from review + new PR 2020-08-31 16:40:38 +02:00
STM32G4 Fixes from review + new PR 2020-08-31 16:40:38 +02:00
STM32H7 [H7][LIB] Remove duplicate definition of assert_param from LL spi 2021-04-03 14:03:54 +01:00