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

additonals for energy ctrl #497

Closed
wants to merge 2 commits into from
Closed

Conversation

TobiasMue
Copy link
Contributor

better handling for engine out and max_acc can be set in airframe

@@ -345,7 +353,7 @@ void v_ctl_climb_loop( void )
float vdot_err = low_pass_vdot( v_ctl_desired_acceleration - vdot );

// Flight Path Outerloop: positive means needs to climb more: needs extra energy
float gamma_err = (v_ctl_climb_setpoint - stateGetSpeedEnu_f()->z) / v_ctl_auto_airspeed_setpoint;
float gamma_err = (v_ctl_climb_setpoint - stateGetSpeedEnu_f()->z) / (*stateGetAirspeed_f());
Copy link
Member

Choose a reason for hiding this comment

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

Why divide by current airspeed?
Also needs protection against division by zero!

@flixr flixr closed this in e8dbf9b Aug 9, 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

2 participants