altitude limitation without GPS

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
tft67
Posts: 1
Joined: Fri Nov 22, 2013 11:06 am
Contact:

altitude limitation without GPS

Post 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 .

User avatar
haydent
Posts: 583
Joined: Sun Jun 17, 2012 1:35 am
Location: NSW, AU

Re: altitude limitation without GPS

Post by haydent »

try it out, thats what its all about :)

Post Reply