Where the Heck am I? Connecting .NET 2.0 to a GPS

Sign in to queue

The Discussion

  • User profile image
    shah

    It's great if you could convert this into .Net CF (VB)

  • User profile image
    Troy Brown

    Great read. I found this while looking for ways to port my current NMEA embedded C code into a windows app. Thanks for doing a lot of the work for me!

  • User profile image
    This is also freezing for me when I am using a

    This application is freezing with my Garmin eTrex at line 692, any ideas? I can be emailed at michael.dance(@)gmail.com

  • User profile image
    imomin

    Try my gps string parser http://www.gpsxml.com/gpsxml/service.asmx?op=GPS2XML

    I need somebody to test my mobile APP. You can download the cab file from http://gps.gpsxml.com/viewtopic.php?t=4">http://gps.gpsxml.com/viewtopic.php?t=4

    http://gps.gpsxml.com/tracker.cfm?userId=1">http://gps.gpsxml.com/tracker.cfm?userId=1

    Please feel free to give any comments, suggestions or ideas

    Thanks

    Imtiyaz Momin

    http://gps.gpsxml.com/

    imtu80@hotmail.com

  • User profile image
    Clint

    Do have a GPS receiver laying around? Do you travel? Do you blog? If you answered yes to these questions,

  • User profile image
    roni

    i developped a similar class to these but i am not getting exact positions....same procedure as in here...am i missing something?

  • User profile image
    james

    Nice sample.  I found two bugs in NMEAProtocol.cs as an FYI -

    ParseBuffer - You need to check the byte for '\0' and break inside the foreach.  If not, then you will insert nulls from end of serial buffer into the data buffer.

    This results in corrupt data.

    ProcessGPGSV - not critical, but there aren't always 4 sats.  I used (int)((fields.Length - 3) / 4) instead.  Otherwise you loose the last couple of sats if there is less than 4 in that packet (throws out entire packet).

  • User profile image
    Gurdev Singh

    Can we run SmartPhone version of this application on Windows Mobile and access the GPS information without any additional/external GPS device?

  • User profile image
    Smartymobile

    Uno de los parámetros mas usados en lectura de GPS s bajo protocola NMEA puede ser el GPGGA Hoy estoy

  • User profile image
    Jochen

    What SignalQuality is neccessary, so that the satelite can be used?

    How can I calculate a the signal quality of all data? I want to show my users a value between 0 - 5 (0 == bad quality; 5 == awesome quality), but how can I calculate such a value?

  • User profile image
    Frank

    I think you can't feed the azimuth directly into the Math.Cos function! Azimuth goes from 0° top-mid to 90° right-mid in a circle.. So to convert the azimuth to be used with cosine function you need to use (-90 - azimuth) instead. However I see you nicely hacked that up by using the sine function for the X coordinate and cosine for Y coordinate Smiley

  • User profile image
    jimezam

    Very interesting.  This is exactly what I need.  But I have a problem.  I have an eTrex Summit HC and it is working fine but its driver doesn't install the virtual COM port that the tutorial shows, just an USB.

    Can you help me with this ?

    Thank you for your help.

  • User profile image
    Rachid Kacel

    It seems that the convert.ToDouble(String s) needs a formatprovider for my computer (Vista english in France) , otherwise the decimal point (a comma is expected) generates a formatException

  • User profile image
    Clint

    something like this will fix that issue: x.ToString(CultureInfo.InvariantCulture);

  • User profile image
    trent

    When I try to start the app I get a "System.IO.IOException" when it trys to port.Open(); (line 658 in MainForm.cs). I haven't modifyed any code. MS Visual C# 2008 Express Edition running on Windows 7 RC

  • User profile image
    Clint

    this uses the GPS that came with Streets and Trips a few years back and mounts as a serial port device.  Are you sure you have the GPS hooked in and it is set to the proper port?  Is there another program that is currently using the GPS when you're attempting to run this program?

  • User profile image
    Clint

    @trent:  email us via the contact button, we'll take this offline.

  • User profile image
    trent

    I'm absolutely positiv that it mounts as a serial port device and that there are no other programs trying to read data from it. I will post a more detailed description of the error when I get home from work Smiley  

  • User profile image
    Luis

    Hi,

    thanks for your example Smiley

    You have a little bug in C# code when ProcessGPGGA:

    //Longitude

    GPGGA.Longitude = Convert.ToDouble(fields[3])/100;

    if(fields[4]=="E")

    GPGGA.LongitudeHemisphere = Cardinal.East;

    else

                       GPGGA.LongitudeHemisphere = Cardinal.West;

    Originally you set East/West to Latitude Hemisphere (copy/paste bug ;P)

    Regards.

  • User profile image
    Clint

    @milindu, I think there are mapping apps out there that can do that.  

  • User profile image
    Milindu

    how does this work ?? i really dunt understand im a new bie ... can i conneect this to my GPS through GPRS and then pass the values on to google maps .. ??

  • User profile image
    Clint

    @Djogi Does your GPS give you the same lat / long in a different application?

  • User profile image
    Djogi

    Belgrade's position is 44.79, 20:47, but the program finds 44.47, 20:28

    What is the problem

  • User profile image
    Shahzad

    This is really awesome link, I thank you for this big help for those who really want to learn.

Add Your 2 Cents