Library tutorials & articles

Writing Your Own GPS Applications: Part 2

Introduction

In part one of this article, I described how to write an interpreter for raw GPS NMEA data. The article included source code in VB.NET which harnessed the power of GPS satellites to determine the current location, synchronize the computer clock to atomic time, and point to a satellite on a cloudy day. The interpreter also works with hand-held devices and supports international developers. Yet, the interpreter was really not suitable for commercial use because it did not monitor precision. Without precision, an application could end up making unintelligent business decisions such as accidentally telling a driver to turn left into an alley, or worse. In this second part, I'll cover precision in detail and talk about what it takes to make GPS applications smart enough for in-car navigation and reliable enough for commercial use.

Comments

  1. 06 Oct 2008 at 02:06

    quite good and worth a read. confirmed what i needed to know for my research

  2. 03 Aug 2007 at 10:11

    schappi wrote:

    Great paper.



    Thx very much.

  3. 22 Mar 2007 at 01:59


    Hello,
    I do not understand what you mean by writing your own GPS application, the most GPS receivers gives
    navigation data in real time as  UTC, Lat/Lon, SOG, TrueCourse, Magvar,Tracks,constellation sat.
    What we can get more with this application ?
     
     Best regards
     Maritime








  4. 02 May 2006 at 20:11

    Great paper.

     

    Thx very much.

  5. 23 Mar 2006 at 09:27

    If you require Ordnance Survey Grid References, I have written an article on how to do so using NMEA data derived from Jon Person's excellent NMEAinterpreter class.


    GPS- Deriving British Ordnance Survey Grid Referece from NMEA data

    AlexE


  6. 14 Mar 2006 at 12:59

    I spotted this slight error too and made the same correction as cprogrammingguru.
    However this led to a new error as the final word in the string contained the checksum.
    ie in the example sentence

    $GPGSV, 3, 1, 10, 24, 82, 023, 40, 05, 62, 285, 32, 01, 62, 123, 00, 17, 59, 229, 2870

    the final word would be 28
    70
    this caused an error when trying to convert this to an int32 in the line

    SignalToNoiseRatio = Convert.ToInt32(Words[Count * 4 + 3]);

    My solution was to remove the checksum part of the sentence in GetWords, before splitting the sentence
     
        public string[] GetWords(string sentence)
        {
            //remove the final * + checksum
            sentence = sentence.Substring(0, sentence.IndexOf("*"));
            //now split it up
            return sentence.Split(',');
        }


    Assuming that I'm not talking out of my rear, I hope this proves useful
    Alex
     

























  7. 13 May 2005 at 19:49

    This update may help save many lives!


    I love this product. Excellent Job on this product, Jon Person !. I'm really excited infact I am going to go buy and support
    your product 360%!... I just have to correct 1 minor error. I feel you should be aware or maybe your are already....don't know
    might have been a typo,... I'm not much of a C# coder but, I believe during the ParseGPGSV() function, which is suppose to
    parse the "Satellites in View" $GPGSV sentence.... If you look closesly. During the...  public bool ParseGPGSV(string sentence)


    Original Article: http://www.developerfusion.com/show/4652/4/
    Example Sentence: $GPGSV, 3, 1, 10, 24, 82, 023, 40, 05, 62, 285, 32, 01, 62, 123, 00, 17, 59, 229, 28*70


    Each Block consist of 4 words.. "24, 82, 023, 40"  ==  "PseudoRandomCode, Elevation, Azimuth, SignalToNoiseRatio"
    According to your Article... SNR values range from 0-50...where 50 means "Excellent Signal"...though SNR can go as high as  99,
    like you've stated.





    // Interprets a "Satellites in View" NMEA sentence -- section.
    //ERROR suspect


        Azimuth = Convert.ToInt32(Words[Count * 4 + 2]);
        SignalToNoiseRatio = Convert.ToInt32(Words[Count * 4 + 2]);
                                                                             // ^--- Logical Bug, I believe it should be ....


    //CORRECTION
        SignalToNoiseRatio = Convert.ToInt32(Words[Count * 4 + 3]);
                                                                             // ^--- This would be correct.



    Otherwise I believe it would return the same value from the Azimuth extraction. So you wouldn't get any SNR information to
    be able to base precision correctly. For the future of dependability and reliability of code production, I post this correction. As
    far as the Signal Strength of the satellites, within the Notification, of the Event call to,...


             SatelliteReceived ( PseudoRandomCode,  Azimuth,  Elevation, SignalToNoiseRatio );


    I believe it would generate incorrect results...to what ever is going to be done with the SNR variable.
    Please feel free to e-mail me at deciphered_scripturez@yahoo.com for additional details...I really Thank you, Jon Person, for
    your hard work and time put into this and I really would LOVE to help as much as possible...I believe in your product. !


    P.S. This update may save many lives! ... Can you imagine lets say for example, the next block of words over you had,
    "05, 62, 285, 32" in the example above, lets say you passed the third Word of 285 as the value I know 99 would be the highest possible value, but imagine the reliability of the signal being factored in the calculation based on the strength for precision. I assume maybe this would throw off a calculation significantly.


                                                                                                                                                                  Thank You,
                                                                                                                                                                   -- cprogrammingguru

  8. 01 Jan 1999 at 00:00

    This thread is for discussions of Writing Your Own GPS Applications: Part 2.

Leave a comment

Sign in or Join us (it's free).

AddThis

Related podcasts

  • CodeCast Episode 4: State of .NET, IE8, ASP.NET MVC, and O'Reilly Media

    CodeCast Episode 4: State of .NET, IE8, ASP.NET MVC, and O'Reilly MediaHosts Ken Levy and Markus Egger discuss the new State of .NET events, IE8, ASP.NET MVC, followed by an interview from PDC with two editors from O'Reilly Media. More on ASP.NET MVC can be found at http://asp.net/mvc. Interview...

Events coming up

  • Dec 6

    Developing AJAX Web Applications with Castle Monorail

    London, United Kingdom

    Monorail is the model-view-controller engine of the Castle Project, bringing many of the best ideas of Ruby on Rails to the .NET world. In this talk, David De Florinier and Gojko Adzic show how Monorail makes it easy to develop .NET based AJAX applications, and how to use the Castle Project to build Web 2.0 applications effectively. Come to this session if you are a .NET web developer. Everyone is welcome!