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: Gerard Toonstra
Subject: Re: [Paparazzi-devel] Another day at the flying field...
Date: Thu, 28 Feb 2013 00:12:42 -0300


Hi Felix,

The throttle kill happened because I never actioned the takeoff in the flight plan, so this is intended behavior.
What caught me offguard was the behavior of switching to HOME on a radio glitch, thereby switching to AUTO2
and thus killing the throttle. I think it happens because my radio has slight variable ppm frame timing and in particular
situations seems to still cause issues.

I did some test cases in python to come up with my suggested implementation, which seems to put all quadrants in the
right place. Your implementation seems to invert north/south?

Ok re: psi used for the aircraft heading. I'll keep an eye on that for the next run.

G>


On Feb 27, 2013, at 6:32 PM, Felix Ruess <address@hidden> wrote:

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
_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


reply via email to

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