Hi Ulisse and everybody else,
I am not a coder, so I can barely understand what that c code says :P
Not a problem, I included it mainly for all the other guys reading this
list... ;)
Are you planning to implement something like that in Height?
Yes, but unfortunately it's not that easy. :(
In the NMEA-0183 standard, which is a standardized way for the GPS-chip
to provide all the needed data and more (in plain text using a
character device under /dev/), like the actual position, height, speed,
heading and so on, the height sits in the GPGGA-sentence, and there in
two fields, actually. (See
http://www.gpsinformation.org/dale/nmea.htm#GGA )
One field contains the altitude above mean sea level in meters (field
10), and the other (field 12) contains the difference between the
height of the geoid and the WGS84 ellipsoid.
Theoretically, to get the "real" height, you just need to add both fields.
If it would reliably work that way, you wouldn't even need a special
routine for calculating geoid separations, just add the two fields and
you'd be good.
The problem is that, as far as I see, all GPS-chips used in TomTom PNAs
don't do it right, they either don't provide a value in field 12 but
just nothing, and only the data in field 10, or, even worse, add the
value in field 12 to field 10 internally, and then provide an empty
field 12, without an easy way to be aware of what they really do.
Solutions could be, as far as I can think of 'em:
* Make a list of all the chips that are in use and check out which way
they work. -> Nothing to do for the end-user but difficult to collect
the data for the list, and not very future-oriented.
* Provide a preferences page where the users could choose if they'd
like to add the two fields, use only field 10, use field 10 and add the
value from the said routine or add a manual value to field 10. -> Easy
to code, but only medium user-friendly.
* My biggest hope would be that someone knows a way to determine which
way the chip actually works, I myself haven't found one yet. Maybe
using not text-mode but binary? If that'd work it would be the best
way, does anybody have an idea?
Best Regards and a Happy New Year!
Stephan aka Joghurt