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

In flight routine update #468

Closed
wants to merge 1 commit into from
Closed

Conversation

softsr
Copy link
Contributor

@softsr softsr commented Jun 30, 2013

No description provided.

static inline void autopilot_check_in_flight( bool_t motors_on ) {
static int32_t accel_filter;
Copy link
Member

Choose a reason for hiding this comment

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

this variable is never set anywhere....

@flixr
Copy link
Member

flixr commented Jul 2, 2013

Also this should probably be better integrated with the new autopilot_check_in_flight_no_rc

Or we make a proper state machine for this right away.... but probably better to merge something that improves the situation if no one will work on a state machine for this soonish...

if (autopilot_in_flight_counter > 0) {
if (THROTTLE_STICK_DOWN()) {
if (THROTTLE_STICK_DOWN() && ((autopilot_mode == AP_MODE_HOVER_Z_HOLD
&& (abs(ins_ltp_speed.z) < AP_IN_FLIGHT_MIN_SPEED)
Copy link
Member

Choose a reason for hiding this comment

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

maybe it is better to use the state interface rather than ins

@gautierhattenberger
Copy link
Member

do you continue to look only at the RC, or should be take the throttle command instead ?
this could also help in merging this with the no_rc in_flight detection

@flixr
Copy link
Member

flixr commented Jul 2, 2013

I guess it would make sense only look at the final throttle command and not the RC throttle.
At least I can't think of a case right now where you'd really want the RC throttle instead of actual throttle command.

But I'm not quite sure how often this check should be called... I don't think it should be called from autopilot_periodic, as that runs with the main freq. I guess the failsafe_check task with 20Hz would be a sensible choice.

@gautierhattenberger
Copy link
Member

I agree that failsafe task is a good choice for this

flixr added a commit to flixr/paparazzi that referenced this pull request Jul 2, 2013
Simply checks if thrust, speed and acceleration are above a threshold.
Does not rely on RC thrust command anymore, but only on actual thrust command.
Not tested on real vehicle at all so far...

Attempt to improve issue paparazzi#201 and replaces paparazzi#468
@flixr
Copy link
Member

flixr commented Jul 16, 2013

closing in favour of #469, please test that one and propose improvements if not satisfactory

@flixr flixr closed this Jul 16, 2013
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.

None yet

3 participants