1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 00:35:39 +03:00
Commit graph

164 commits

Author SHA1 Message Date
ctzsnooze
341d65becf remove gps_required and gps_minimum sats and revert to gps_rescue_min_sats 2022-10-20 21:44:01 +11:00
ctzsnooze
73bd40a670 make READY_BEEP when home fix is first achieved 2022-10-16 19:18:04 +11:00
haslinghuis
7e441b5f4f
Merge pull request #11887 from KarateBrot/styledef
Remove old style definitions
2022-10-16 00:22:02 +02:00
KarateBrot
ddf1d46549 Remove old style definitions 2022-10-13 03:33:54 +02:00
Jan Post
5ca47fed6d
Merge pull request #11190 from mathiasvr/pr-arraylen
Use ARRAYLEN macro where applicable
2022-10-12 19:55:46 +02:00
Mathias Rasmussen
9957ceb275 Fix function brace style 2022-10-12 16:31:55 +02:00
Mathias Rasmussen
90e792e243 Use ARRAYLEN macro where applicable 2022-10-12 13:14:51 +02:00
ctzsnooze
09ee27cd97 Refactor sat count checks and GPS trust code
single minimum GPS satellite setting
single required GPS satellite setting
CLI Baro vs GPS trust user interface
GPS trust refactoring
allow arming with GPS_FIX even if not enough sats
required sats must be present to arm
set required sat count to 8
add blackbox headers
2022-09-07 09:55:35 +10:00
ctzsnooze
a6507c02d9 GPS Rescue refactoring and landing improvements
- run Ublox GPS units at 10Hz
- Bugfix for level mode offset after a rescue (force gpsRescueAngle[] to zero while idle)
- Bugfix for entering landing mode too high, (ignore landing distance, enter landing mode only on height criteria)
- Remove landing distance.
- Default GPS mode to UBlox, not NMEA
- refactor idle tasks
- don't keep setting targetVelocityCmS to current velocity since it will be set to zero when rotating anyway
- remove unused velocityToHomeCmS
- remove unused max distance to home value
- log current altitude at 100hz in throttle_pid debug
- share the sanity timer code
- fix bug where yaw error should have been absolute
- remove unused code
- refactor rescue phases so intent values are not repeatedly set
- refactor the rescue modes
- fix bug that could fail to set velocity target on fly_home
- refactor to simplify pitch limits
- refactor to MAX and constrainf
- set 2m descent region to improve landing
- fade roll and pitch to zero at 2m from home
2022-08-25 19:37:13 +10:00
J Blackman
00cd0e52e6
Merge pull request #11126 from mathiasvr/pr-int-exp
Use macros for power with integer exponents
2022-06-28 15:28:35 +10:00
ctzsnooze
5989d7b067 Put execution time at the end 2022-06-13 21:48:02 +10:00
ctzsnooze
f7c645bfcd update GPS code 2022-06-13 09:43:52 +10:00
Hans Christian Olaussen
0bb5bca5a7 Fix READY_BEEP 2022-04-15 18:19:37 +02:00
Steve Evans
cc67b2e87c Naming changes suggested by Hydra 2022-01-28 20:31:47 +00:00
haslinghuis
d593f08eff
Merge pull request #11211 from TonyBlit/fix_gps_motion
wrong variable for heading
2022-01-03 14:15:49 +01:00
Tony Cabello
a511eef8aa wrong variable for heading 2022-01-01 10:00:12 +01:00
Tony Cabello
a253fe414e fix for gps time 2021-12-31 17:45:44 +01:00
Tony Cabello
dedb2a115b fix for gps coordinates not shown on OSD 2021-12-26 16:32:31 +01:00
J Blackman
cfa5df3eea
Merge pull request #10921 from TonyBlit/m9n_support
Added m9n support
2021-12-21 10:34:57 +11:00
Steve Evans
7f147479fc If GPS serial data remains, reschedule task to run again after 1ms 2021-12-20 07:48:06 +00:00
Tony Cabello
2f89cf3cc4 m9n support 2021-12-20 07:55:41 +01:00
Steve Evans
ab1baccc66 Track state execution time for OSD, baro, rx and GPS tasks and inform scheduler of next state execution time 2021-12-17 15:40:01 +00:00
Mathias Rasmussen
1b95e3c20f Use macros for power with integer exponents 2021-12-14 11:53:09 +01:00
Steve Evans
d5f62be013 Trigger gyro SPI DMA reads in EXTI handler if supported and lock gyroTask loop to gyro to eliminate missed updates and jitter 2021-09-28 01:38:18 +13:00
Michael Keller
e9b77e9f30
Merge branch 'master' into gps_task_time 2021-05-17 22:44:18 +12:00
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
Steve Evans
5795b959c2 Handle timing for gpsUpdate task 2021-04-12 20:35:27 +01:00
Steve Evans
a309bea8d7 Handle timing for gpsUpdate task 2021-04-12 19:39:29 +01:00
Tony Cabello
8bfa2cc769 Added timeout for Ublox commands 2020-05-25 17:41:26 +02:00
Tony Cabello
d6ae1984a7 SBAS_NONE part 2 2020-03-24 14:24:16 +01:00
Michael Keller
a4f9e42104
Merge pull request #9617 from TonyBlit/sbas_none
SBAS_NONE, gps_sbas_integrity
2020-03-24 08:43:39 +13:00
Tony Cabello
ba335635ac cleanup 2020-03-23 15:45:24 +01:00
Tony Cabello
5932b01e6b SBAS_NONE, gps_sbas_integrity 2020-03-22 18:54:03 +01:00
Tony Cabello
720d994a90 minor fix: missing ifdef and autoconfig check 2020-03-21 16:27:02 +01:00
jflyper
ff16686893 White space tidy 2020-02-17 23:54:57 +13:00
Tony Cabello
924058c371 renamed AUTO to DYNAMIC 2020-01-19 15:50:24 +01:00
Tony Cabello
c19dc26055 Ublox mode selectable with an option 2020-01-19 12:23:54 +01:00
Michael Keller
ba7b66080f
Merge pull request #9309 from TonyBlit/fix_sat_list
Clear sat list to avoid showing old data
2019-12-25 00:18:55 +13:00
Tony Cabello
c08acd3eb4 Revert "BugFix: time to first fix was sometimes abnormally high due to improper configuration of Ublox GPS"
This reverts commit 751e1ae444.
2019-12-23 23:07:10 +01:00
Tony Cabello
46c0d2da7e Clear sat list to avoid showing old data 2019-12-23 12:19:56 +01:00
mikeller
99f77fa88d Moved configuration validation into 'config.c'. 2019-11-24 21:19:26 +13:00
mikeller
4a7904695e Moved 'config.[ch]' into the 'config/' directory. 2019-10-28 11:17:25 +13:00
Tony Cabello
1406b068e2 Bugfix: Vario GPS and 3D Total Distance overflow 2019-09-05 09:33:01 +02:00
Michael Keller
c33cc100ec
Merge pull request #8759 from TonyBlit/3d_speed
Feature: show 3d speed on the OSD
2019-09-01 01:19:03 +12:00
Tony Cabello
0ddcfc097c Feature: show 3d speed on OSD 2019-08-30 08:21:19 +02:00
Tony Cabello
751e1ae444 BugFix: time to first fix was sometimes abnormally high due to improper configuration of Ublox GPS 2019-08-29 15:41:36 +02:00
Bruce Luckcuck
9d2cda0b97 Remove unused nav_mode and related from GPS code
Eliminates some unused and unnecessary averaging calculations as well.
2019-06-11 13:35:40 -04:00
Bruce Luckcuck
3d671c7134 Use fabsf() instead of ABS() for floats
The ABS() macro doesn't handle -0 floats correctly. Also fabsf() is more efficient.
2019-01-19 14:15:54 -05:00
Tony Cabello
75a014eb1e Parameter for updating GPS Home point once 2019-01-11 04:38:11 +01:00
Tony Cabello
007e14f348 GPS Rescue: allow arming without GPS fix (refactor) 2019-01-07 14:27:33 +01:00