altitude limitation without GPS
Posted: Sun Sep 14, 2014 5:12 am
Hello !
I want to implante an altitude limitation, working like this : if quad reach ALTITUDE_MAX, fail_safe procedure is activated.
Actual failsafe routine:
I think about something like this :
ALTITUDE_MAX defined in config.h
Do you think it can work ?
A better idea
? may be i'm wrong
Thank .
I want to implante an altitude limitation, working like this : if quad reach ALTITUDE_MAX, fail_safe procedure is activated.
Actual failsafe routine:
Code: Select all
// Failsafe routine - added by MIS
#if defined(FAILSAFE)
if ( failsafeCnt > (5*FAILSAFE_DELAY) && f.ARMED) { // Stabilize, and set Throttle to specified level
for(i=0; i<3; i++) rcData[i] = MIDRC; // after specified guard time after RC signal is lost (in 0.1sec)
rcData[THROTTLE] = conf.failsafe_throttle;
I think about something like this :
Code: Select all
if ( failsafeCnt > (5*FAILSAFE_DELAY) && f.ARMED || baroPressure > ALTITUDE_MAX)
ALTITUDE_MAX defined in config.h
Do you think it can work ?
A better idea

Thank .