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 c_programming_guru.
    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, 28*70

    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).

Jon Person Jon Person is the author of the award-winning “GPS.NET” software now in use in over two thousand GPS applications in all industries, from geocaching to disease outbreak prevention. Jon runs his com...

Related podcasts

  • More jQuery in ASP.NET

    In this episode Chris Brandsma, Rick Strahl, Dave Ward, Bertrand Le Roy, and Scott Koon conclude their discussion of Microsoft's jQuery in ASP.NET announcement1.This episode of the Alt.NET Podcast is brought to you by LLBLGen Pro, the most mature O/R mapper and code generator out there.Are ...

Events coming up

  • Dec 9

    GL.net Group Meeting - December 2009

    Gloucester, United Kingdom

    The beginning of this year holiday season will belong to mocks. Ronnie and Stephen will take us for a tour around exciting world of unit testing.

Want to stay in touch with what's going on? Follow us on twitter!