1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 17:25:20 +03:00

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
This commit is contained in:
ctzsnooze 2022-07-22 11:12:21 +10:00
parent 2a827d594f
commit a6507c02d9
7 changed files with 116 additions and 159 deletions

View file

@ -276,7 +276,7 @@ gpsData_t gpsData;
PG_REGISTER_WITH_RESET_TEMPLATE(gpsConfig_t, gpsConfig, PG_GPS_CONFIG, 0);
PG_RESET_TEMPLATE(gpsConfig_t, gpsConfig,
.provider = GPS_NMEA,
.provider = GPS_UBLOX,
.sbasMode = SBAS_NONE,
.autoConfig = GPS_AUTOCONFIG_ON,
.autoBaud = GPS_AUTOBAUD_OFF,
@ -681,7 +681,7 @@ void gpsInitUblox(void)
}
break;
case 12:
ubloxSetNavRate(0xC8, 1, 1); // set rate to 5Hz (measurement period: 200ms, navigation rate: 1 cycle)
ubloxSetNavRate(0x64, 1, 1); // set rate to 10Hz (measurement period: 100ms, navigation rate: 1 cycle) (for 5Hz use 0xC8)
break;
case 13:
ubloxSetSbas();