stamp code for GPS decoding
Archiver
Posts: 46,084
I have been posting on and off about a GPS project I am working on in robotics at eastern illinois university. I am not the great programmer that I need to be and therefore need some help with the code. What I need it do is read a sentance, say $GPRMC and enter each part into an array. This array will be updated every second as new information comes in and is processed, from there I can handle it but my problem is that the GPS sends out all of this information with commas seperating the info. How do I count the commas? The info is coming SERIN via serial port and I also have my computer hooked up at this point to debug the system.
Thanks in advance,
Matthew Klarich
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Do You Yahoo!?
Yahoo! Mail Personal Address - Get email at your own domain with Yahoo! Mail.
Thanks in advance,
Matthew Klarich
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Do You Yahoo!?
Yahoo! Mail Personal Address - Get email at your own domain with Yahoo! Mail.
Comments
Your question has just given me a thought. Rather then use the BS as
the "Brain" to control a robot. Why not use a PocketPC as the
"Brain"
and the Stamp as a hardware extension to gather telemetry and input
from sensors and operate the motors. A single "Standard"
program
could be used for all stamps used in robot projects. The Stamp
program would have all the common robot functions and a few auxiliary
functions which could be "Called" from a PPC. Development
time of
extremely sophisticated robot projects could be greatly reduced and
you would have a sleek, sharp and powerful, color touch screen
display to control your robot. It also somewhat simplifies using a
robot for data acquisition
But I digress……..
--- In basicstamps@y..., Matthew K <m_klarich@y...> wrote:
>
> I have been posting on and off about a GPS project I am working on
in robotics at eastern illinois university. I am not the great
programmer that I need to be and therefore need some help with the
code. What I need it do is read a sentance, say $GPRMC and enter each
part into an array. This array will be updated every second as new
information comes in and is processed, from there I can handle it but
my problem is that the GPS sends out all of this information with
commas seperating the info. How do I count the commas? The info is
coming SERIN via serial port and I also have my
>
> Thanks in advance,
> Matthew Klarich
>
>
>
>
> Do You Yahoo!?
> Yahoo! Mail Personal Address - Get email at your own domain with
Yahoo! Mail.computer hooked up at this point to debug the system.
As I was saying a new color palm pilot with some on screen instructions would be great, they are lightweight, they don't care much about vibration and their batteries would last just as long as the GPS batteries. I need to find some webpages about unmanned vehicles such as this, I know people make them. I wonder how big I could make a plane and how high/far it could go. The possiblities are endless, I know of one guy that sent one across the atlantic. Unfortunately the money is not endless, darn it.
Thanks for all the input, I will put some pictures up on my website in the next couple weeks. Don't expect them soon though I have some nasty exams and papers coming up and finals are in 3 weeks. Yeah remember those damn things,·I hate them already. I love learning, hate the tests. Website is at www.stoneflyers.com , you can check out my aerials pictures·from my plane. They are pretty cool along with a couple movies at the same place. No a stamp was no involved with it but it is still cool.
Matt Klarich
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Do You Yahoo!?
Yahoo! Mail Personal Address - Get email at your own domain with Yahoo! Mail.
the Comm ActiveX control for PPC's. This example is from the help
file that comes with the VB tool kit for WindowsCE and should work
with the free Microsoft® eMbedded Visual Tools 3.0 for PocketPC's at
http://www.microsoft.com/mobile/downloads/emvt30.asp
First connect the RS-232 output from your GPS to the RS-232 input of
the PPC and ground the two devices togeather. Using eMbedded, add a
text box and a Comm control to a form and in the Form_Load event set
the comm's settings like this
Private Sub Form_Load()
'Set input to text mode
Comm1.InputMode = comInputModeText
'Read whole buffer
Comm1.InputLen = 0
'Set com port
Comm1.CommPort = 1
'configure comm port settings
Comm1.Settings = "9600,8,N,1"
'every character is received one at a time from the input buffer
Comm1.RThreshold = 1
'every character is sent one at a time to the remote machine
Comm1.SThreshold = 1
`Open the comm port
Comm1.PortOpen = True
End Sub
With the comm port open, every time data comes in on the RS-232 line
the Comm1_OnComm() event is fired. Use this event to read the
comm1.input buffer.
Private Sub Comm1_OnComm()
Select Case Comm1.CommEvent
Case comEvReceive 'data inbound
'add all text in the input buffer to a receive text box
txtReceive.Text = txtReceive.Text & Comm1.Input
Case comEvEOF 'end of file
`Call the GetDelimitedText function
Call GetDelimitedText
End Select
End Sub
This example just displays the output from the GPS in a text box on
the PPC but it illustrates how easy it is to use the PPC for data
acquisition. The Comm example that comes with eMbedded also contains
many other useful functions like error checking and handshaking that
can be used as is or with very little modifications.