Odd navigation behaviour...

Hi,

I am attempting to put in a closed loop entry for T3 round 6 based around ArduPilot 2.6 code and FlightGear.
The model currently navigates directly to all waypoints, except those lying to the North of the previous waypoint. Here it seems to fly on a heading of around 333 degrees - whichcauses it to fly past waypoints to the East before swinging back West topick them up. See the attached .kml file for an example of this behaviour. This makes my sky-script worse than my handwriting... not good at all.
In all other cases navigation seems ok (given limited tuning).

I am sure that the problem will be in my code somewhere but I am hoping someone who is more familiar with 2.6 might be able to point me towards my mistake. Any ideas would be appreciated.

Supporting information -  I am running virtually stock 2.6 software from early April on Arduino Mega hardware not ArduPilot. Air starts only in AUTO mode so the ground start initialisation is missed.
The value of 333 degrees above is returned as -322 for ground_course by AP. The heading data supplied by flightgear is 33320 for the AP packet below. This is typical of the problem. 
!!!LAT:51172327,LON:-4677193,SPD:21,CRT:0,ALT:255,ALH:250,CRS:-322,BER:8,WPN:2,DST:228,BTV:0,RSP:0,TOW:468361700,***
This condition seems to be the only time I see negative values for ground_course (CRS). All other values seem reliable.

navtest.kml

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Sorted...

    I was supplying ArduPilot heading data with values 0-36000 ( 0-360 x100). ArduPilot treats IMU heading input as 16 bit signed integers so values from 32769 to 36000 were translated as -1 to -3232. D'oh!

    Attached .kml shows corrected behaviour. Gains still need some tweaking :)

    navtest3.kml

This reply was deleted.

Activity

DIY Robocars via Twitter
RT @TinkerGen_: "The Tinkergen MARK ($199) is my new favorite starter robocar. It’s got everything — computer vision, deep learning, sensor…
Monday
DIY Robocars via Twitter
Monday
DIY Robocars via Twitter
RT @roboton_io: Join our FREE Sumo Competition 🤖🏆 👉 https://roboton.io/ranking/vsc2020 #sumo #robot #edtech #competition #games4ed https://t.co/WOx…
Nov 16
DIY Drones via Twitter
First impressions of Tinkergen MARK robocar https://ift.tt/36IeZHc
Nov 16
DIY Robocars via Twitter
Our review of the @TinkerGen_ MARK robocar, which is the best on the market right now https://diyrobocars.com/2020/11/15/first-impressions-of-tinkergen-mark-robocar/ https://t.co/ENIlU5SfZ2
Nov 15
DIY Robocars via Twitter
RT @Ingmar_Stapel: I have now explained the OpenBot project in great detail on my blog with 12 articles step by step. I hope you enjoy read…
Nov 15
DIY Robocars via Twitter
RT @DAVGtech: This is a must attend. Click the link, follow link to read the story, sign up. #chaos2020 #digitalconnection #digitalworld ht…
Nov 15
DIY Robocars via Twitter
RT @a1k0n: Got a new chassis for outdoor races (hobbyking Quantum Vandal) but I totally didn't expect that it might cause problems for my g…
Nov 11
DIY Drones via Twitter
First impressions of the Intel OpenBot https://ift.tt/36qkVV4
Nov 10
DIY Robocars via Twitter
Nov 9
DIY Robocars via Twitter
Excellent use of cardboard instead of 3D printing! https://twitter.com/Ingmar_Stapel/status/1324960595318333441
Nov 7
DIY Robocars via Twitter
RT @chr1sa: We've got a record 50 teams competing in this month's @DIYRobocars @donkey_car virtual AI car race. Starting today at 10:00am…
Nov 7
DIY Robocars via Twitter
Nov 6
DIY Robocars via Twitter
RT @a1k0n: Car's view, using a fisheye camera. The ceiling light tracking algorithm gave me some ideas to improve ConeSLAM, and having grou…
Nov 5
DIY Robocars via Twitter
RT @a1k0n: To get ground truth I measured the rug, found the pixel coordinates of its corners, calibrated my phone camera with my standard…
Nov 5
DIY Robocars via Twitter
RT @a1k0n: @DIYRobocars is back in December, but outside. Time to reinvestigate ConeSLAM! I rigged up a quick and dirty ground-truth captur…
Nov 5
More…