Right, the following is supposed to extract just the speed numerics from the VTG string. It is supposed to extract the tens, units and tenths and then output just this via serout. Decimal point is omitted.
It isn't working but & I'm not sure why.
Any thoughts anybody??
----------------------------------
'speed extractor
'extracts speed (knts) from VTG string, checksum is not used.
'31/01/2007
'$GPVTG,000.0,T,000.0,M,111.1,N,2222.2,K,A*hh<CR><LF>
main:
setfreq m8 ' run at 8MHz to allow reading serial data at 4800bps
nmea: serin 3,t2400,("$GPVTG,000.0,T,000.0,M,1",b1,b2,b0,b3
' read speed value x10 into b1, b2, b3
sertxd(#b1,#b2,#b3,13,10) 'output numerics as serial string
pause 500
goto nmea
--------------------------------------------
Â
It isn't working but & I'm not sure why.
Any thoughts anybody??
----------------------------------
'speed extractor
'extracts speed (knts) from VTG string, checksum is not used.
'31/01/2007
'$GPVTG,000.0,T,000.0,M,111.1,N,2222.2,K,A*hh<CR><LF>
main:
setfreq m8 ' run at 8MHz to allow reading serial data at 4800bps
nmea: serin 3,t2400,("$GPVTG,000.0,T,000.0,M,1",b1,b2,b0,b3
' read speed value x10 into b1, b2, b3
sertxd(#b1,#b2,#b3,13,10) 'output numerics as serial string
pause 500
goto nmea
--------------------------------------------
Â