-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
Implement assisted autorotation for Heli’s #22871
Open
bnsgeyer
wants to merge
61
commits into
ArduPilot:master
Choose a base branch
from
bnsgeyer:pr-autorotation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+851
−388
Open
Changes from all commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
99adf3e
AC_Autorotation: Assisted Autorotation Implementation
Ferruccio1984 18df15c
Copter: Assisted Autorotation Implementation
Ferruccio1984 9147f2f
AP_Motors: Support for Assisted Autorotation
Ferruccio1984 9b09716
AC_Autorotation: fix error for autotest
bnsgeyer 4c9e076
AC_Autorotation: fix parameter naming
bnsgeyer e31ea19
Copter: fix style on mode_autorotate.cpp
bnsgeyer 4053ff8
AC_Autorotation: fix style on AC_Autorotation.cpp
bnsgeyer 079c189
Heli: Simplify passing rangefinder measurement to autorotation
MattKear 321bb44
AP_Motors_Heli: Add helper to get hover col angle
MattKear 9dcec13
AC_Autorotation: Create Init function and directly access AP_Motors_H…
MattKear 006a3b6
Copter: Pass motors ptr to autorotation object
MattKear 3959534
Copter: Remove now unused function calls to Autorotate object
MattKear e7887eb
AC_Autorotation: White space changes and minor formatting
MattKear a9e2c26
AC_Autorotation: Fix and rename average z accel function
MattKear ed8d1aa
Copter: Update average z accel function name in autorotation
MattKear 6cfd4bb
AC_Autorotation: tidy up logging
MattKear aa3d54a
AC_Autorotation: Consolidate controller inits
MattKear af175b9
Copter: Autorotation: Consolidate controller inits
MattKear 4ce4e2c
AC_Autorotation
Ferruccio1984 5549244
AC_Autorotation: update name of altitude estimation function
Ferruccio1984 1aba9ad
AC_Autorotation: squared gravitational acc const
Ferruccio1984 b61eee3
AC_Autorotation: remove array zeroing of sink rate derivative
Ferruccio1984 b2fe6a3
Copter: move time_to_impact to local float
bnsgeyer ee2dff7
Copter: Autorotation mode: simplify time_to_impact
MattKear 71c92af
AC_Autorotation: Tidy up time to impact calculation
MattKear 651e3f7
AC_Autorotation: Add helper functions to move phase init functionaili…
MattKear 9aece05
Copter: autorotation mode: Move phase init functions down into autoro…
MattKear e314f5c
Copter: autorotation mode: remove unused variables
MattKear e3fa52d
Copter: autorotation mode: simplify hover autorotation check
MattKear 26659ad
Copter: Autorotation Mode: rename get_flare_status to is_flare_comple…
MattKear 93ddcc4
AC_Autorotation: Rename get_flare_status to is_flare_complete to impr…
MattKear e153490
AC_Autorotation: Add flare height helper
MattKear ea61936
Copter: remove land detector in mode autorotate and fix for disarm delay
Ferruccio1984 afff5a1
AC_Autorotation: add touchdown complete check and subsequent lowering…
Ferruccio1984 0887aff
AC_Autorotation: Remove touch down complete bool and just use the tim…
MattKear ee06b79
AC_Autorotation: Let copter do all of the height above ground estimat…
MattKear 9214267
Copter: Use copters inertial navigation interpolation of the rangefin…
MattKear c2b8589
Copter: Autorotation Mode: Make the hover autorotation it's own fligh…
MattKear ee7b895
AC_Autorotation: Add helpers for state machine logic tidy up and remo…
MattKear a42288d
Copter: Autorotation Mode: Rework logic machine to make it easier to …
MattKear 29c2d35
AC_Autorotation: Make param defaults numeric values if the defines ar…
MattKear ad64639
AC_Autorotation: Added Comments and whitespace fixups
MattKear f101a21
AC_Autorotation: Fix data type for time_on_ground
MattKear 61c6e60
Copter: Autorotation Mode: Whitespace changes, comments updated, and …
MattKear 0798ca6
Copter: Autorotation Mode: Use standard earth_to_body2D velocity rota…
MattKear ba3fbaf
AC_Autorotation: Add options param and give roll-yaw control scheme o…
MattKear a1b0725
Copter: Autorotation mode: Make control schemes for roll and yaw opti…
MattKear 3384684
AC_Autorotation: Remove sink derivative and only use filtered accel.
MattKear 64829ac
Copter: Autorotation Mode: Remove calls to update derive sink rate
MattKear 72553f7
Copter: Autorotation mode: Simplify rpm warning message code structur…
MattKear 7fddf29
Copter: Autorotation Mode: Update comments and white space change
MattKear bbebd62
AC_Autorotation: update comments
MattKear a895d15
AC_Autorotation: Remove unused variables
MattKear aaee063
AC_Autorotation: fix options param index
MattKear 9e110c9
Copter: Always update the ground distance in the autorotation library…
MattKear 7fd07b4
AP_Motors: Heli: Add helper to calculated norm collective from a giv…
MattKear 533e202
AC_Autorotation: Simplify bad RPM handling, leaving to RPM lib to det…
MattKear 6547e24
Copter: Autorotation mode: remove bad rpm handling
MattKear 6f3eff1
AP_Motors: temporary fix to prevent I-term decay during autorotations
Ferruccio1984 2cde571
AP_Motors: return collective land position
Ferruccio1984 241959e
AC_Autorotation: fix for post touchdown disarming
Ferruccio1984 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,7 +152,7 @@ class Mode { | |
virtual bool set_speed_up(float speed_xy_cms) {return false;} | ||
virtual bool set_speed_down(float speed_xy_cms) {return false;} | ||
|
||
int32_t get_alt_above_ground_cm(void); | ||
int32_t get_alt_above_ground_cm(bool use_psc_case=true); | ||
|
||
// pilot input processing | ||
void get_pilot_desired_lean_angles(float &roll_out_cd, float &pitch_out_cd, float angle_max_cd, float angle_limit_cd) const; | ||
|
@@ -1934,39 +1934,29 @@ class ModeAutorotate : public Mode { | |
uint32_t _bail_time_start_ms; // Time at start of bail out | ||
float _target_climb_rate_adjust;// Target vertical acceleration used during bail out phase | ||
float _target_pitch_adjust; // Target pitch rate used during bail out phase | ||
uint32_t _touchdown_time_ms; | ||
bool _hover_autorotation; // bool to determine if we should enter the hover autorotation or not | ||
|
||
enum class Autorotation_Phase { | ||
ENTRY, | ||
HOVER_ENTRY, | ||
SS_GLIDE, | ||
FLARE, | ||
TOUCH_DOWN, | ||
BAIL_OUT } phase_switch; | ||
|
||
enum class Navigation_Decision { | ||
USER_CONTROL_STABILISED, | ||
STRAIGHT_AHEAD, | ||
INTO_WIND, | ||
NEAREST_RALLY} nav_pos_switch; | ||
|
||
// --- Internal flags --- | ||
struct controller_flags { | ||
bool entry_initial : 1; | ||
bool ss_glide_initial : 1; | ||
bool flare_initial : 1; | ||
bool touch_down_initial : 1; | ||
bool straight_ahead_initial : 1; | ||
bool level_initial : 1; | ||
bool break_initial : 1; | ||
bool bail_out_initial : 1; | ||
bool bad_rpm : 1; | ||
bool entry_init : 1; | ||
bool hover_entry_init : 1; | ||
bool ss_glide_init : 1; | ||
bool flare_init : 1; | ||
bool touch_down_init : 1; | ||
bool bail_out_init : 1; | ||
bool bad_rpm : 1; | ||
} _flags; | ||
|
||
struct message_flags { | ||
bool bad_rpm : 1; | ||
} _msg_flags; | ||
|
||
//--- Internal functions --- | ||
void warning_message(uint8_t message_n); //Handles output messages to the terminal | ||
uint32_t _last_bad_rpm_ms; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Its a little odd having this bad rpm time stamp in a different structure to the
|
||
|
||
}; | ||
#endif |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect we can just remove this whole section. I don't understand why it would just return current loc rather than trying to get the terrain value. As far as I can tell the only user that is not in position control is landing gear.
In anycase, removing this section means you can also remove the new bool.