Navigation - DesiredHeading?

General discussions on the Gluon-project that don't fit elsewhere. If required, I will create more subforums.

Moderator: lukasz

Navigation - DesiredHeading?

Postby daedalus » Tue Apr 12, 2011 8:30 pm

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.
Attachments
12.4.11.zip
(44.83 KiB) Downloaded 543 times
daedalus
 
Posts: 38
Joined: Tue Apr 05, 2011 4:50 pm
Location: Romania

Re: Navigation - DesiredHeading?

Postby Tom » Wed Apr 13, 2011 10:49 am

Could you also send me your navigation commands?

Which firmware version do you use?
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Re: Navigation - DesiredHeading?

Postby daedalus » Wed Apr 13, 2011 1:58 pm

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
daedalus
 
Posts: 38
Joined: Tue Apr 05, 2011 4:50 pm
Location: Romania

Re: Navigation - DesiredHeading?

Postby Tom » Wed Apr 13, 2011 2:01 pm

Could you check at startup whether you have version 0.5.2 or 0.5.2DEV?
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Re: Navigation - DesiredHeading?

Postby daedalus » Wed Apr 13, 2011 3:45 pm

0.5.2
daedalus
 
Posts: 38
Joined: Tue Apr 05, 2011 4:50 pm
Location: Romania

Re: Navigation - DesiredHeading?

Postby Tom » Wed Apr 13, 2011 8:55 pm

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?
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Re: Navigation - DesiredHeading?

Postby daedalus » Thu Apr 14, 2011 4:58 pm

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.
daedalus
 
Posts: 38
Joined: Tue Apr 05, 2011 4:50 pm
Location: Romania

Re: Navigation - DesiredHeading?

Postby Tom » Fri Apr 15, 2011 8:39 am

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?
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Re: Navigation - DesiredHeading?

Postby daedalus » Mon Apr 18, 2011 5:10 am

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 10096 times
Attachments
16.4.11.zip
(63.89 KiB) Downloaded 533 times
daedalus
 
Posts: 38
Joined: Tue Apr 05, 2011 4:50 pm
Location: Romania

Re: Navigation - DesiredHeading?

Postby Tom » Mon Apr 18, 2011 8:27 am

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.
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium


Return to General

Who is online

Users browsing this forum: No registered users and 14 guests

cron