1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 00:35:39 +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

@ -1020,7 +1020,6 @@ const clivalue_t valueTable[] = {
{ PARAM_NAME_GPS_RESCUE_INITIAL_ALT, VAR_UINT8 | MASTER_VALUE, .config.minmaxUnsigned = { 2, 100 }, PG_GPS_RESCUE, offsetof(gpsRescueConfig_t, initialAltitudeM) },
{ PARAM_NAME_GPS_RESCUE_DESCENT_DIST, VAR_UINT16 | MASTER_VALUE, .config.minmaxUnsigned = { 10, 500 }, PG_GPS_RESCUE, offsetof(gpsRescueConfig_t, descentDistanceM) },
{ PARAM_NAME_GPS_RESCUE_LANDING_ALT, VAR_UINT8 | MASTER_VALUE, .config.minmaxUnsigned = { 3, 15 }, PG_GPS_RESCUE, offsetof(gpsRescueConfig_t, targetLandingAltitudeM) },
{ PARAM_NAME_GPS_RESCUE_LANDING_DIST, VAR_UINT8 | MASTER_VALUE, .config.minmaxUnsigned = { 3, 15 }, PG_GPS_RESCUE, offsetof(gpsRescueConfig_t, targetLandingDistanceM) },
{ PARAM_NAME_GPS_RESCUE_GROUND_SPEED, VAR_UINT16 | MASTER_VALUE, .config.minmaxUnsigned = { 250, 3000 }, PG_GPS_RESCUE, offsetof(gpsRescueConfig_t, rescueGroundspeed) },
{ PARAM_NAME_GPS_RESCUE_THROTTLE_P, VAR_UINT8 | MASTER_VALUE, .config.minmaxUnsigned = { 0, 255 }, PG_GPS_RESCUE, offsetof(gpsRescueConfig_t, throttleP) },
{ PARAM_NAME_GPS_RESCUE_THROTTLE_I, VAR_UINT8 | MASTER_VALUE, .config.minmaxUnsigned = { 0, 255 }, PG_GPS_RESCUE, offsetof(gpsRescueConfig_t, throttleI) },