Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plane: Allow for Guided mode to support Terrain following #27909

Closed
wants to merge 3 commits into from

Conversation

timtuxworth
Copy link
Contributor

@timtuxworth timtuxworth commented Aug 23, 2024

Starting with support for MAVLink CMD_GUIDED_CHANGE_ALTITUDE and CMD_DO_REPOSITION to support MAV_FRAME_GLOBAL_ALT, this adds translation from the MAVlink frame to Location::AltFrame:ABOVE_TERRAIN.

To make this easier to understand and maintain, I also changed the plane.guided_state.target_alt_frame variable directly support Location::AltFrame directly (it was a uint8_t)

Then lower level changes required to support the functionality were required in mode_guided.cpp.

The example script "works around" the current lack of the ability of GCS such as Mission Planner or QGroundControl to send altitude request messages with terrain. The script will convert non-terrain guided terrain targets into terrain targets. There is a parameter ZGT_MODE which allows choosing how the script will do this:
1: reset the requested terrain altitude to the current plane terrain altitude
2: reset to the requested altitude above/below home as a terrain altitude to target
3: reset to the current altitude + the above/below home altitude as the terrain altitude to target

@timtuxworth
Copy link
Contributor Author

tagging @Ryanf55 I think it's the right Ryan

--[[

example script to show interrupting a mission and then
reseting the crosstracking to the correct line when
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: resetting

@timtuxworth
Copy link
Contributor Author

Closed in favour of #27921

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants