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.
This condition seems to be the only time I see negative values for ground_course (CRS). All other values seem reliable.