mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-21 13:02:25 +08:00
RTL fast reverse: enable precision landing
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -483,7 +483,8 @@ private:
|
||||
mission_item_s _last_camera_trigger_item {};
|
||||
mission_item_s _last_speed_change_item {};
|
||||
|
||||
DEFINE_PARAMETERS(
|
||||
DEFINE_PARAMETERS_CUSTOM_PARENT(
|
||||
ModuleParams,
|
||||
(ParamFloat<px4::params::MIS_DIST_1WP>) _param_mis_dist_1wp,
|
||||
(ParamInt<px4::params::MIS_MNT_YAW_CTL>) _param_mis_mnt_yaw_ctl
|
||||
)
|
||||
|
||||
@@ -269,6 +269,13 @@ void RtlMissionFastReverse::handleLanding(WorkItemType &new_work_item_type)
|
||||
_mission_item.altitude = _home_pos_sub.get().alt;
|
||||
_mission_item.altitude_is_relative = false;
|
||||
_navigator->reset_position_setpoint(pos_sp_triplet->previous);
|
||||
|
||||
_mission_item.land_precision = _param_rtl_pld_md.get();
|
||||
|
||||
if (_mission_item.land_precision > 0) {
|
||||
startPrecLand(_mission_item.land_precision);
|
||||
new_work_item_type = WorkItemType::WORK_ITEM_TYPE_PRECISION_LAND;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,4 +74,8 @@ private:
|
||||
bool _in_landing_phase{false};
|
||||
|
||||
uORB::SubscriptionData<home_position_s> _home_pos_sub{ORB_ID(home_position)}; /**< home position subscription */
|
||||
DEFINE_PARAMETERS_CUSTOM_PARENT(
|
||||
RtlBase,
|
||||
(ParamInt<px4::params::RTL_PLD_MD>) _param_rtl_pld_md
|
||||
)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user