Page 1 of 1

altitude limitation without GPS

Posted: Sun Sep 14, 2014 5:12 am
by tft67
Hello !
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 ;) ? may be i'm wrong
Thank .

Re: altitude limitation without GPS

Posted: Sat Oct 11, 2014 9:16 am
by haydent
try it out, thats what its all about :)