Basic Usage

  1. Declare an instance of a BaseSentence object.
  2. Declare a new instance of the required parser.
  3. Use the parser to check if a string is a valid sentence or not.
  4. If the sentence is valid, set the BaseSentence object equal to the parsed string.

using NMEAParser.NMEA0183;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string demo = "$GPRMC,132336.000,A,5152.4256,N,00832.4759,W,2.02,45.86,170111,,*2F";
            BaseSentence sentence = null;
            GPRMCParser parser = new GPRMCParser();

            if (parser.IsSentence(demo))
            {
                sentence = parser.ParseSentence(demo);
            }
        }

    }
}

Last edited Feb 6, 2011 at 8:38 PM by DamienDennehy, version 6

Comments

No comments yet.