legras / uav3i

HMI for Interreg IV A program 3i
0 stars 1 forks source link

Incoherent UAVDataPoint constructors? #47

Closed legras closed 9 years ago

legras commented 9 years ago

Les différents constructeurs de UAVDataPoint traitent alt et course différemment.

    altitude  = (double) alt / 1000.;
    course    = (double) c / 10.;

et

    altitude  = (double) alt / 100.;
    course    = (double) c;
phtanguy commented 9 years ago

Je regarde en début d'après-midi, je suis pris ce matin.

phtanguy commented 9 years ago

There is 3 different constructors for the class UAVDataPoint which reflect 2 different ways for obtaining the UAV position. This two ways don't use the same unit for course an altitude. (?)

public UAVDataPoint(int utm_east, int utm_north, int utm_zone, int c, int alt, long t)

The first one is used with the microjet simulator (3i project) and uses the GPS message catched on the Ivy bus.

@Deprecated
public UAVDataPoint(int lat, int lon, int c, int alt, long t)
public UAVDataPoint(int lat, int lon, int c, int alt, long t, double camTargetLat, double camTargetLong)

The other ones are used with the rotorcarft simulator (berisuas project) and use the GPS_INT message (and the NAV_STATUS message for the course value). These two constructors are nearly the same: the first one is now deprecated and the second one transmits the camera target position.

phtanguy commented 9 years ago

I thought there was no problem but actually is!

phtanguy commented 9 years ago

Fixed, see 69d79fdde5603b64117bd973fa97b7531585f9ca