Page 1 of 1

Navigation - DesiredHeading?

PostPosted: Tue Apr 12, 2011 8:30 pm
by daedalus
Hi Tom,

We are having trouble in navigation mode. Several flights now and each time the model is flying away, north or south (one day DesiredHeading was 0 and today 179).
The navigation area has been formatted. Is it normal to see only 37 lines on the navigation area? Also on the 37-th line there is an question mark even if I'm writing there an "empty" command.
I'm attaching the xml data from one of those flights together with the configuration and navigation files.

Re: Navigation - DesiredHeading?

PostPosted: Wed Apr 13, 2011 10:49 am
by Tom
Could you also send me your navigation commands?

Which firmware version do you use?

Re: Navigation - DesiredHeading?

PostPosted: Wed Apr 13, 2011 1:58 pm
by daedalus
I have the board number 52 which came with the latest firmware preloaded - v0.5.2. Decided not to change this until I have a working configuration.

The navigation commands are:
1.CIRCLE_REL(0, 0, 70, 100)
2.GOTO 1

Re: Navigation - DesiredHeading?

PostPosted: Wed Apr 13, 2011 2:01 pm
by Tom
Could you check at startup whether you have version 0.5.2 or 0.5.2DEV?

Re: Navigation - DesiredHeading?

PostPosted: Wed Apr 13, 2011 3:45 pm
by daedalus
0.5.2

Re: Navigation - DesiredHeading?

PostPosted: Wed Apr 13, 2011 8:55 pm
by Tom
Very strange... Desiredheading is indeed not correct. Maybe you have a bad firmware version which doesn't set home correctly (Although this was named 0.5.2DEV).

Could you try 2 things?

(1) Upgrade the firmware to version 0.5.2: http://code.google.com/p/gluonpilot/downloads/list (you never know)

(2) Fly a square instead of a circle (easier to debug): http://gluonpilot.com/wiki/Autonomous_flight


PS: altitude -> pitch PID seems very high?

Re: Navigation - DesiredHeading?

PostPosted: Thu Apr 14, 2011 4:58 pm
by daedalus
I re-flashed using 0.5.2 and modified the navigation commands (to fly a rectangle) and I did a small "flight" with the gluonpilot in the car ;) . The DesiredHeading parameter is now changing all the time :D .
Thank you Tom!

Hopefully tomorrow I will have the time to make the real flight.

With altitude->pitch PID 0.7 I've seen strong pitch oscillations in autopilot mode (but not in stabilized mode). Now with 0.3 it was much better. Is it too much? The PID parameters are almost copied from your FunJet example.

Re: Navigation - DesiredHeading?

PostPosted: Fri Apr 15, 2011 8:39 am
by Tom
Ok, stabilized mode and autopilot mode don't use the same loop (one does pitch hold, the other does altitude hold).
I thought in my funjet example the altitude->pitch was 0.03?

Re: Navigation - DesiredHeading?

PostPosted: Mon Apr 18, 2011 5:10 am
by daedalus
Oops! Of course you are right, it is 0.03. Maybe it worth mentioning in the wiki that the P value for the altitude->pitch is one order of magnitude smaller than the other P values.

I've had few good flights :D , but on one of them (see the attached picture) after switching to AP it did not fly the correct path (although DesiredHeading appears to be good), switched to manual to bring it closer and then again to AP and then it followed the path.
I am attaching the classic kml and the xml files.

16.4.11-3.jpg
16.4.11-3.jpg (73.63 KiB) Viewed 10219 times

Re: Navigation - DesiredHeading?

PostPosted: Mon Apr 18, 2011 8:27 am
by Tom
I think it was OK. The first time the plane was flying at a heading of 270, and the target heading was 90° to fly to the waypoint. So it needed to make a very large turn (270°) to get to the correct heading. The turning rate was very slow because you were flying downwind.
Maybe you want to increase the max roll angle a bit to make shorter turns.