Commit 7dc9ca8 1 parent b2b02d7 commit 7dc9ca8 Copy full SHA for 7dc9ca8
File tree 1 file changed +9
-1
lines changed
src/modules/land_detector
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -189,7 +189,15 @@ bool MulticopterLandDetector::_get_ground_contact_state()
189
189
190
190
// if we have a valid velocity setpoint and the vehicle is demanded to go down but no vertical movement present,
191
191
// we then can assume that the vehicle hit ground
192
- _in_descend = _is_climb_rate_enabled () && (_vehicle_local_position_setpoint.vz >= land_speed_threshold);
192
+ if (_is_climb_rate_enabled ()) {
193
+ if (PX4_ISFINITE (_vehicle_local_position_setpoint.vz )) {
194
+ _in_descend = (_vehicle_local_position_setpoint.vz >= land_speed_threshold);
195
+ }
196
+
197
+ } else {
198
+ _in_descend = false ;
199
+ }
200
+
193
201
bool hit_ground = _in_descend && !vertical_movement;
194
202
195
203
bool ground_contact = false ;
You can’t perform that action at this time.
0 commit comments