Commit Graph

10 Commits

Author SHA1 Message Date
Daniel Agar
de59d6c788 flight_tasks: pass previous setpoint as const reference
- perform setpoint checks in place to simplify and avoid copy
2020-08-05 10:50:15 -04:00
Mathieu Bresciani
be2bb4a479 FlightTask: Fix ekf2 reset race condition during task switch (#14692)
* FlightTask: Fix ekf2 reset race condition during task switch

During a loss of GPS data when using GPS as primary height source,
the height is reset to baro and the local position gets invalid at the
same time. This triggers a switch to altitude flight task and a setpoint
reset.
This combination of events had the effect to ignore the height reset,
the large sudden height error could create an abrupt change of altitude
or even a crash.
The ekf2 reset is now done at the beginning of each update call.
2020-04-22 13:18:35 +02:00
Matthias Grob
809b45eac8 FlightTasks: do not adjust tilt limit of the position control
Adjusting the tilt limit can lead to diverging position control
and should only be used by setting a sanity limit for the controller
and not to adjust during the descent phase of a Land or RTL.
Otherwise it leads to flyaways in important failsafe modes when
there's stronger disturbance e.g. wind.
2020-04-21 09:35:52 +02:00
Matthias Grob
b79b095ce7 FlightTasks: adapt to acceleration based control 2020-03-30 09:58:39 +02:00
Daniel Agar
4b96eb569d flight_tasks: getPositionSetpoint() initialize entire vehicle_local_position_setpoint_s
- this isn't strictly necessary (all used fields are set), but doesn't hurt
 - fixes Coverity CID 268659
2020-01-05 22:59:49 -05:00
Matthias Grob
1a5b06d0cf FlightTasks: refactor NAN initializations, spacing 2019-12-18 15:57:48 +01:00
Matthias Grob
a3d30fc970 mc_pos_control/FlightTask: apply nit-pick review findings 2019-12-11 14:03:16 +01:00
bresch
4d0786d5b4 FlightTask: use centralized _dist_to_ground computed in FlightTask instead of
recomputing it in AutoMapper, AutoMapper2 and AutoLine
2019-12-11 14:03:16 +01:00
bresch
4ba672a7ba ManualPosition: Limit horizontal speed during landing 2019-12-11 14:03:16 +01:00
Daniel Agar
7996ee496c lib: name folders consistently 2019-11-13 09:29:21 -05:00