paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] Course desired issues


From: Gautier Hattenberger
Subject: Re: [Paparazzi-devel] Course desired issues
Date: Fri, 13 Jun 2008 13:40:02 +0200
User-agent: Thunderbird 2.0.0.14 (X11/20080505)

Hi,

Haiyang, you're absolutely right. The course setpoint is between -pi/2 and 3*pi/2 while the gps course is between 0 and 2*pi. And it's not a problem because in fw_h_ctl.c:174 the difference between the two angles is normalized between -pi and pi before being used by the controller.

Daniel, if you want to have a nice display in your plotter, you can add :
if (h_ctl_course_setpoint<0) h_ctl_course_setpoint += 2*M_PI;
after the line 309 in nav.c, but that won't change your navigation.

GH

Haiyang Chao a écrit :
Just a few details to add for this question. Any comment is welcomed.

In nav.c, line 309, desired course is calculated as: h_ctl_course_setpoint = M_PI/2.-atan2(y - estimator_y, x - estimator_x); The function atan2() can return values between [-pi, pi]. So the desired course is just between [-pi/2,pi*3/2].

But for GPS course, based on my observation, moving north is roughly 0 or 2*pi, moving south is around pi, moving east is pi/2, moving west is pi*3/2.

So I guess there must be some difference between real course and desired one unless there are some limitations on estimator_x and estimator_y, which I have not take a detail look in the code. Really busy recently for some hardware problems.

Thanks
Haiyang

On Thu, Jun 12, 2008 at 10:57 PM, Daniel Morgan <address@hidden <mailto:address@hidden>> wrote:

    I have been talking to poine and anton about this issue for a
    couple of days and they both concluded it should not be
    happening... What is happening on this plot is the course
    desired's range is -90 to 270 and and the acutal is 0 to 360...
    Now i talked to anton today and he said that he talked to poine
    and they thought it was a issue with my code being messed up or
    something.. So on his advice i changed my old paparazzi's folder
    name and did a completely new cvs... When i did this it did not
    aleviate the issues. So i thought maybe it was something with my
    pc or my config, because of this i decided to try out a completely
    clean system. What i did was i booted of a ubunut 8.04 live cd and
    installed pprz from this last nights tarball(cvs command was
    having issues for some reason)and used only the files in the cvs
    and still got the same issue. The screenshot is from that (you may
    notice the time is off but don't let that fool ya)... Needless to
    say i am hoping someone who knows the code better can fix this or
    at least shed some more light on it...

    here is that screenshot
    http://img127.imageshack.us/img127/1593/screenshot1vh4.png

    _______________________________________________
    Paparazzi-devel mailing list
    address@hidden <mailto:address@hidden>
    http://lists.nongnu.org/mailman/listinfo/paparazzi-devel


------------------------------------------------------------------------

_______________________________________________
Paparazzi-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/paparazzi-devel




reply via email to

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