BS2P and GPS
Archiver
Posts: 46,084
Someone, a few months ago, gave the command for reading an entire GPS
sentence into the scratch pad of the BS2P. I read up on the SERIN
command, but didn't see how this was done. Can someone send that
command again? also, is there a way to send the contents of the
scratch pad in a SEROUT command?
I'd like to be able to read the GGA sentence of my GPS into the
scratch pad, parse it for altitude data, then send the entire GGA
sentence to a modem connected to a different I/O pin.
Thanks,
Paul
sentence into the scratch pad of the BS2P. I read up on the SERIN
command, but didn't see how this was done. Can someone send that
command again? also, is there a way to send the contents of the
scratch pad in a SEROUT command?
I'd like to be able to read the GGA sentence of my GPS into the
scratch pad, parse it for altitude data, then send the entire GGA
sentence to a modem connected to a different I/O pin.
Thanks,
Paul
Comments
>sentence into the scratch pad of the BS2P. I read up on the SERIN
>command, but didn't see how this was done. Can someone send that
>command again? also, is there a way to send the contents of the
>scratch pad in a SEROUT command?
>
Hi Paul,
SERIN dpin,baudmode,timeout,timeoutaddress,[noparse][[/noparse]wait("RMC,"),serstr\N]
where N is the number of characters you want to put in the scratchpad
RAM. The timeout allows it to bail out if something goes wrong. Put
the start key for your sequence in the wait modifier.
There is no equivalent statement for SEROUT. You have to get the
bytes and send them out one by one.
-- regards,
Tracy Allen
electronically monitored ecosystems
mailto:tracy@e...
http://www.emesystems.com
I got my syntax wrong for the capture to the scratchpad. It is
[noparse][[/noparse]spstr N] not [noparse][[/noparse]serstr\N]
_not_
> SERIN dpin,baudmode,timeout,timeoutaddress,[noparse][[/noparse]wait("RMC,"),serstr\N]
it should be
SERIN dpin,baudmode,timeout,timeoutaddress,[noparse][[/noparse]wait("RMC,"),spstr N]
This is for the BS2P only, not the BS2, BS2e nor BS2sx. N is the
number of characters you want to capture in the scratchpad RAM (up to
127).
-- regards,
Tracy Allen
electronically monitored ecosystems
mailto:tracy@e...
http://www.emesystems.com
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
available for the SEROUT statement only for the SERIN statement.
'Setup for TRIPMATE GPS system @4800 baud and BS2p24
'reads 61 bytes of data each time via the $GPRMC mode
'data display on a Scott Edwards serial lcd
'places data in ram memory
'4/1/01
r var byte(16)
x var byte
t var byte
serout 15,17405,[noparse][[/noparse]254,1]
serout 15,17405,[noparse][[/noparse]"Starting Data"]
start:
'read GPS and place 61 characters in ram memory
serin 8,16884,10000,nodata,[noparse][[/noparse]wait("$GPRMC"),spstr 61]
for t=0 to 6
get t,r(t)
next
debug str r\7,cr
serout 15,17405,[noparse][[/noparse]254,148,"Time ",r(1),r(2),":",r(3),r(4),":",r(5),r(6)]
for t=0 to 11
get t+9,r(t)
next
debug str r\12,cr
serout 15,17405,[noparse][[/noparse]254,128,"Latitude ",r(1),r(2),223,r(3),r(4),39,r(11)]
for t=0 to 12
get t+21,r(t)
next
debug str r\13,cr
serout 15,17405,[noparse][[/noparse]254,192,"Longitude ",r(1),r(2),r(3),223,r(4),r(5),39,r(12)]
for t=0 to 6
get t+44,r(t)
next
debug str r\7,cr
serout 15,17405,[noparse][[/noparse]254,212,"Date ",r(3),r(4),"/",r(1),r(2),"/",r(5),r(6)]
goto start
nodata:
debug "bad connection?",cr
goto start
[noparse][[/noparse]Non-text portions of this message have been removed]
Any way you can think of to make this line of code talk with the new
parallax Quadravox modules instead of going on the LCD displays? Need help
on this if anyone has any ideas.
thanks guys
mike mocenter
Original Message
From: <CHIPKEN@a...>
To: <basicstamps@yahoogroups.com>
Sent: Sunday, August 05, 2001 11:54 PM
Subject: Re: [noparse][[/noparse]basicstamps] BS2P and GPS
> Here is the GPS pbasic code with the SPSTR L command. This command is not
> available for the SEROUT statement only for the SERIN statement.
>
> 'Setup for TRIPMATE GPS system @4800 baud and BS2p24
> 'reads 61 bytes of data each time via the $GPRMC mode
> 'data display on a Scott Edwards serial lcd
> 'places data in ram memory
> '4/1/01
>
> r var byte(16)
> x var byte
> t var byte
>
> serout 15,17405,[noparse][[/noparse]254,1]
> serout 15,17405,[noparse][[/noparse]"Starting Data"]
> start:
> 'read GPS and place 61 characters in ram memory
> serin 8,16884,10000,nodata,[noparse][[/noparse]wait("$GPRMC"),spstr 61]
> for t=0 to 6
> get t,r(t)
> next
> debug str r\7,cr
> serout 15,17405,[noparse][[/noparse]254,148,"Time ",r(1),r(2),":",r(3),r(4),":",r(5),r(6)]
> for t=0 to 11
> get t+9,r(t)
> next
> debug str r\12,cr
> serout 15,17405,[noparse][[/noparse]254,128,"Latitude ",r(1),r(2),223,r(3),r(4),39,r(11)]
> for t=0 to 12
> get t+21,r(t)
> next
> debug str r\13,cr
> serout 15,17405,[noparse][[/noparse]254,192,"Longitude
",r(1),r(2),r(3),223,r(4),r(5),39,r(12)]
> for t=0 to 6
> get t+44,r(t)
> next
> debug str r\7,cr
> serout 15,17405,[noparse][[/noparse]254,212,"Date ",r(3),r(4),"/",r(1),r(2),"/",r(5),r(6)]
> goto start
> nodata:
> debug "bad connection?",cr
> goto start
>
>
>
> [noparse][[/noparse]Non-text portions of this message have been removed]
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
the my program from my GPS guided truck at
www.stoneflyers.com . It was for a robotics project
continuing into a GPS guided airplane this semester, I
just recently purchased the airplane from a friend and
have a brand new motor for it. All the details of my
project are at www.stoneflyers.com and you just need
to move a couple commas around on my code to receive
the altitude data rather then bearing. Good luck, keep
me posted.
Matt Klarich
PS. What data modem and radio system are you using,
you can reply in the newsgroup or
mklarich@s.... Thanks much. Matt
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
Paul
> Hi Paul,
>
> I got my syntax wrong for the capture to the scratchpad. It is
> [noparse][[/noparse]spstr N] not [noparse][[/noparse]serstr\N]
>
> _not_
> > SERIN dpin,baudmode,timeout,timeoutaddress,[noparse][[/noparse]wait("RMC,"),serstr\N]
>
> it should be
> SERIN dpin,baudmode,timeout,timeoutaddress,[noparse][[/noparse]wait("RMC,"),spstr N]
>
> This is for the BS2P only, not the BS2, BS2e nor BS2sx. N is the
> number of characters you want to capture in the scratchpad RAM (up to
> 127).
>
> -- regards,
> Tracy Allen
> electronically monitored ecosystems
> mailto:tracy@e...
> http://www.emesystems.com
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject
> and Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and Body
of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
> you can reply in the newsgroup or
> mklarich@s.... Thanks much. Matt
I'm building a balloon controller. As a hobby, I launch high altitude
weather balloons. we track and recover them with amateur radio.
A GPS connects to the BS-2P on the controller. The GPS uses
the GGA sentence to operate experiments. The same GPS
sentence needs to be sent to ground stations afterwards. We use
a TNC (modem for radio) and a handheld radio to send the
telemetry down.
I have a website at www.the-one.com/tvnsp
Paul