paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] Another day at the flying field...


From: Felix Ruess
Subject: Re: [Paparazzi-devel] Another day at the flying field...
Date: Wed, 27 Feb 2013 22:32:58 +0100

Hi Gerard,

which ./paparazzi_version were you using when you had problems with kill?

3. The GPS course for the skytraq is still off. I'm again investigating this. The course at 90 deg. east seems to be 0 and when actually moving
    counterclockwise has the course increasing. Unfortunately I can't see what values come out of the ned_of_ecef_vect_i   calculation.
    I may have to debug this on my spare lisa and walk around the block here to see this in more detail.

I think I got to the bottom of it. It's confusion about which parameter in the NED structure is north. I assumed this would've been Y
and X would be east, but apparently x/y/z is just the order of parameters n/e/d.  Confirmed?

Yes.

The current code used for testing was  (x assumed east, y assumed north ):

      gps.course = (atan2f( (float)gps.ned_vel.x, (float)gps.ned_vel.y )) * 1e7;

So just switching them around should do the trick. I tested this in python and for a couple of test vectors it produced correct results.

      gps.course = (atan2f( (float)gps.ned_vel.y, (float)gps.ned_vel.x )) * 1e7;

As I already wrote in the answer to your previous mail about this, I think it should be:
gps.course = atan2f((float)gps.ned_vel.x, -(float)gps.ned_vel.y) * 1e7; 

1. Is the course 0-360 deg (in rad *1e7), or is this [-180,180]?

It should be [-pi,pi], but if it doesn't handle [0,2*pi] then there is some code that doesn't wrap the value to be sure it takes what it expects.
In any case that needs to be added to the doxygen comment...

2. The plane in the GCS also points in a very strange direction and not even close to the erroneous direction.
    How is the rotation of the plane in the GCS determined?

From the heading angle (psi) of the aircraft, or what do you mean?
Same that is displayed in the attitude message.

Hope that helps.
Cheers, Felix

reply via email to

[Prev in Thread] Current Thread [Next in Thread]