MahatmaX / YADrone

Yet Another Drone Framework (for the AR.Drone 2)
39 stars 40 forks source link

altitude is always zero #7

Closed juanchorevolution closed 10 years ago

juanchorevolution commented 10 years ago
public recepcionAltura(IARDrone drone)
{   drone.getNavDataManager().addAltitudeListener(new AltitudeListener(){       
    public void receivedAltitude(int altitude) {
        System.out.println("altitud cm  "+altitude);

    }
    public void receivedExtendedAltitude(Altitude d) {

        System.out.println("altitud x"+d);

    }       
MahatmaX commented 10 years ago

receivedExtendedAltitude is only called when an altitude-TAG is found in the Navdata (that's not the case when in Demo mode). receivedAltitude is called even in Demo mode. Altitude is > 0 only if the drone is actually flying. When it is not flying (e.g. if you hold it in your hands), altitude is always 0.

A new plugin has been added to the Control Center to demonstrate altitude.