Shop OBEX P1 Docs P2 Docs Learn Events
Initializing a Tripmate with a BS2 — Parallax Forums

Initializing a Tripmate with a BS2

ArchiverArchiver Posts: 46,084
edited 2002-01-05 00:32 in General Discussion
For more details on commands, see
http://www.asahi-net.or.jp/~KN6Y-GTU/tripmate/trmfaqe.html

This page is rather dated and hard to follow in places, but you can get the
essentials. Doing a web search on PRWIINIT may give you better docs.

Here is the code fragment I used to initialize my Tripmate:

Gps_init:
output GPS_TXD
input GPS_RXD

' send ASTRAL to get it to start, do it twice to be sure

serout GPS_TXD,B4800N,[noparse][[/noparse]"ASTRAL",CR]
pause 2000
serout GPS_TXD,B4800N,[noparse][[/noparse]"ASTRAL",CR]

' turn off ZCH and GSV sentences - useless for tracking position
' can leave out if desired

serout GPS_TXD,B4800N,[noparse][[/noparse]"$PRWIILOG,ZCH,V,,,",13,10]
serout GPS_TXD,B4800N,[noparse][[/noparse]"$PRWIILOG,GSV,V,,,",13,10]

' initialize lat/lon (dddmm.mm), time (hhmmss in UTC), date (ddmmyy), end
with CR/LF.
' Lat/lon can be to nearest degree or worse, but date/time needs
' to be close in order for GPS to scan for correct sats - the farther
' date/time is off, the longer time-to-first-fix

serout
GPS_TXD,B4800N,[noparse][[/noparse]"$PRWIINIT,V,,,3842.00,N,9500.00,W,0,0,M,0,T,120000,220400",
13,10]
debug "GPS initialized",CR

serin GPS_RXD,B4800N,20000,NoGpsInitData,[noparse][[/noparse]WAIT ("$GPRMC")]
debug "RMC detected",CR

goto EndGpsInit

NoGpsInitData:
serout TNC_TXD,B4800N,[noparse][[/noparse]"No GPS input",CR]
debug "No GPS input",CR

EndGpsInit:
return


Mark D. Conner
E-mail: n9xtn@a...
Homepage: http://members.home.net/mconner1
"Arrogance and stupidity, all in the same package.....how efficient
of you!" - Ambassador Londo Mollari, Babylon 5
Sign In or Register to comment.