Plane: extend support of SET_POSITION_TARGET_GLOBAL_INT #25754
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR extends support for the mavlink handler of SET_POSITION_TARGET_GLOBAL_INT to handle position (lat, lon) setpoints as well as altitude changes. If velocity and acceleration data is provided it is used to calculate the path curvature expressed as a loiter radius and direction.
See Also
Motivation
Detail
The following control methods from
Plane
are used:plane.control_mode->handle_guided_request()
is passed the position setpoint.plane.mode_guided.set_radius_and_direction()
is passed the radius and direction calculated from setpoint velocity and acceleration.plane.adjust_altitude_target
is called to force update the altitude, otherwise the current altitude set inset_guided_WP
is used if the setpoint update rate is greater than the scheduled update rate ofadjust_altitude_target
, and the plane will not achieve the desired altitude.Testing
Tasks
type_mask
andcoordinate_frame
fields ofSET_POSITION_TARGET_GLOBAL_INT
.