Skip to content

Commit

Permalink
Update src/mavsdk/plugins/action/action_impl.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasVautherin authored Sep 11, 2023
1 parent 6c360f5 commit f1e6dbf
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/mavsdk/plugins/action/action_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,11 +450,7 @@ void ActionImpl::goto_location_async(

command.command = MAV_CMD_DO_REPOSITION;
command.target_component_id = _system_impl->get_autopilot_id();
// When ArduPilot we need to set frame to Global i.e. positive altitude over mean sea
// level (MSL)
if (_system_impl->autopilot() != SystemImpl::Autopilot::Px4) {
command.frame = MAV_FRAME_GLOBAL;
}
command.frame = MAV_FRAME_GLOBAL_INT;
command.params.maybe_param4 = static_cast<float>(to_rad_from_deg(yaw_deg));
command.params.x = int32_t(std::round(latitude_deg * 1e7));
command.params.y = int32_t(std::round(longitude_deg * 1e7));
Expand Down

0 comments on commit f1e6dbf

Please sign in to comment.