Go to Post Like his father, John V-Neun will soon have the advantage of his head resembling a game object. - Eric O [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 15-12-2008, 17:02
C222's Avatar
C222 C222 is offline
Computer Science Major
FRC #0852 (Athenian Robotics Collective)
Team Role: Alumni
 
Join Date: Mar 2007
Rookie Year: 2007
Location: California
Posts: 22
C222 is on a distinguished road
Decoding GPS with C#

I have a fairly old GPS receiver that communicates with my desktop through COM1.

I found some code on the internet to decode the strings i get from the receiver which look something like:
Code:
$GPGSA,A,1,,,,,,,,,,,,,1.27,0.75,1.03*04
$GPRMC,215606,V,3511.1990,N,12904.2725,W,0.000,0.0,151208,15.0,E*45
$PRWIZCH,29,6,12,0,12,0,31,0,24,6,31,0,16,0,31,0,31,0,31,0,31,0,12,0*44
$GPGGA,,,,,,0,00,,,,,,,*66
$GPGSA,A,1,,,,,,,,,,,,,1.27,0.75,1.03*04
$GPGSV,3,1,12,29,70,024,34,24,70,006,39,30,50,190,,21,48,264,*79
$GPGSV,3,2,12,10,34,052,,05,28,173,,18,21,194,,12,20,163,*73
$GPGSV,3,3,12,16,11,321,,31,11,268,,15,09,124,,26,07,108,*73
$GPRMC,215607,V,3511.1990,N,12904.2725,W,0.000,0.0,151208,15.0,E*44
$PRWIZCH,29,6,12,0,12,0,31,0,24,6,31,0,16,0,31,0,31,0,31,0,31,0,12,0*44
$GPGGA,,,,,,0,00,,,,,,,*66
The code if found here.
Using a resource I found on the internet i can tell that the GPS is working and giving me a fairly accurate location (once i get a fix).
However, this is over a terminal application called Tera Term and my GPS requires me to broadcast the command "ASTRAL" before any useful data is sent. The problem is, the code from the link above has no command to submit the command "ASTRAL". I tried:
Code:
private void button3_Click(object sender, EventArgs e)
        {
            if (comport.IsOpen)
            {
                //byte astral;
                //astral = Convert.ToByte("ASTRAL");
                comport.Write("ASTRAL");
                comport.WriteLine("ASTRAL");
            }
            else
            {
            }
        }
But that didn't work. Any suggestions?
__________________
--=====|-----====|-------====|-------====|----
--=|--------------==|----------==|---------==|---
--=|---------------==|----------==|---------==|--
--=|------------==|----------==|---------==|-----
--=====|-----======|-----======|----======|-
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
GPS chuckmerja Programming 12 27-03-2008 09:28
GPS michelita2607 Rules/Strategy 7 16-01-2008 11:07
GPS with VEX dasmoenator Technical Discussion 29 28-10-2007 23:56
Victor 884 output decoding / General question theshadow27 Electrical 7 01-03-2007 02:05
InfraRed = gps ? nzj1 General Forum 17 11-01-2004 16:58


All times are GMT -5. The time now is 00:08.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi