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: added glider pullup support #27985

Merged
merged 5 commits into from
Sep 10, 2024
Merged

Conversation

tridge
Copy link
Contributor

@tridge tridge commented Sep 2, 2024

This brings in a pullup system for gliders developed by @priseborough and myself. It is used for the NOAA hight altitude glider drops
This feature is not compiled in by default except on SITL to minimise flash costs for most users. It is expected that users doing high altitude glider drops will use the custom build server or a custom hwdef.dat. Note that doing this with a lua script was looked at and it would require quite a few new binding extensions which I didn't think was worth doing, and would cost more flash for most users.
The feature is enabled with the PUP_ENABLE parameter. When enabled it adds a new stage to the NAV_ALTITUDE_WAIT mission item, controlled by the PUP_* parameters. This stage controls the pullup manoeuvrer where we do a g-force limited pullup out of a dive, bring the aircraft to a normal flight regime where normal mission commands can take over

ArduPlane/Attitude.cpp Outdated Show resolved Hide resolved
ArduPlane/navigation.cpp Outdated Show resolved Hide resolved
ArduPlane/ArduPlane.cpp Show resolved Hide resolved
ArduPlane/Plane.h Outdated Show resolved Hide resolved
ArduPlane/commands_logic.cpp Outdated Show resolved Hide resolved
ArduPlane/commands_logic.cpp Outdated Show resolved Hide resolved
ArduPlane/commands_logic.cpp Show resolved Hide resolved
ArduPlane/pullup.cpp Show resolved Hide resolved
ArduPlane/pullup.cpp Outdated Show resolved Hide resolved
ArduPlane/pullup.cpp Show resolved Hide resolved
ArduPlane/pullup.cpp Outdated Show resolved Hide resolved
Comment on lines +143 to 144
case k_lift_release:
set_range(100);
Copy link
Member

@IamPete1 IamPete1 Sep 3, 2024

Choose a reason for hiding this comment

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

I would like to start setting range/angle of 1 for new things.

Suggested change
case k_lift_release:
set_range(100);
set_range(100);
case k_lift_release:
set_range(1);

Eventually we can get rid of all the * 4500

Copy link
Contributor Author

Choose a reason for hiding this comment

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

there are no set_range(1) calls in master right now, and while the range is a uint16_t I don't think 1 is a good choice as a default as it means it can only be binary. That is OK for this case, but not a good pattern

Copy link
Member

Choose a reason for hiding this comment

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

@tridge tridge force-pushed the pr-glider-pullup branch 2 times, most recently from 3d51dd0 to 1a0e53c Compare September 6, 2024 23:28
Copy link
Member

@IamPete1 IamPete1 left a comment

Choose a reason for hiding this comment

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

Looks good, nice new functionality.

@@ -515,6 +519,11 @@ class Plane : public AP_Vehicle {
// have we checked for an auto-land?
bool checked_for_autoland;

// Altitude threshold to complete a takeoff command in autonomous modes. Centimeters
Copy link
Contributor

Choose a reason for hiding this comment

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

Incorrect comment?

@@ -27,6 +27,9 @@ bool Plane::start_command(const AP_Mission::Mission_Command& cmd)

nav_controller->set_data_is_stale();

// start non-idle
Copy link
Contributor

Choose a reason for hiding this comment

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

Bad comment?

@tridge tridge merged commit 65e15f2 into ArduPilot:master Sep 10, 2024
94 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Plane WikiNeeded needs wiki update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants