Compass: Modifies current Generic NMEA parser to accept a standard HDM sentence and display true magnetic heading in an info box.
To correct the magnetic heading for local variation the RMC parser has been extended to read the variation field. Detailed comments have been added to the 10 affected files where changes have been made.
To enable the new info box for heading to be displayed the spare Experimental1 was modified after reading the instuctions in Factory.cpp.
The code has been bench tested with a CMPS10 tilt-compensated compass, GPS simulator and IOIO MS5611 pressure transducers for TAS. It is stable and accurate to 2-3 degrees.
The aim of this work is to enable xcsoar to display local wind speed and direction in cruise mode only when TAS is available (either from a connected vario or IOIO pressure transducers). The existing code has contained references to magnetic heading (heading_available) for some time, presumably for when it became available. The current wind calculation allows for manual and GPS/TAS calculation methods. Further work is needed to enable the instantaneous wind calculation, which may exist already to be displayed. The new work to show a wind arrow (just merged from Håkan Lindqvist) in the Wind Info box will be very helpful IMO.