From EXAMPLE1.BAS progarm for GPS010/UBLOX6 GPS unit...
...but it was showing a perfect latitude for my position but longitude was about 200m wrong
Finally realised the error (by Saleae'ing exactly what was coming from the UBLOX)...if the decimal fractions of minutes (w2 and w4) are over 65535 they don't fit into word variables and the latter sertxd's to the Terminal are incorrect. This also had a knock to my subsequent conversions to decimal degrees for, say, Google mapping.
So, are there any code gurus out there that want to take the challenge:
- read the GPGLL sentence correctly interpreting it for display on the Terminal
- converting the degrees, minutes, (decimal) fractions of a minute in the sentence to decimal degrees (degrees in one word variable, fractional degrees in another will be fine )
Code:
; $GPGLL,4916.45114,N,12311.12437,W,225444.00,A,A*xx
; `--' `---' | `---' `---' |`-----' -- \
; #w1 #w2 w3 #w4 #w5 w6 w7-w13 #w14 w15
serin [2000,mainloop], B.6, T4800, ( "$GPGLL," ), #w1,#w2,w3, #w4,#w5,w6, w7,w8,w9,w10,w11,w12,w13, #w14,w15
Finally realised the error (by Saleae'ing exactly what was coming from the UBLOX)...if the decimal fractions of minutes (w2 and w4) are over 65535 they don't fit into word variables and the latter sertxd's to the Terminal are incorrect. This also had a knock to my subsequent conversions to decimal degrees for, say, Google mapping.
So, are there any code gurus out there that want to take the challenge:
- read the GPGLL sentence correctly interpreting it for display on the Terminal
- converting the degrees, minutes, (decimal) fractions of a minute in the sentence to decimal degrees (degrees in one word variable, fractional degrees in another will be fine )