Archive for the 'GPS' Category

Create Your Own GPS Applications Using C# (5)

Sunday, February 4th, 2007

Continuing with our GPS program, we now need to add a method to read from the GPS device. This step will grab the NMEA information, parse it, and store it in the classes provided in from the Coding 4 Fun project.

public bool ReadData()
{
  byte[] bData = new byte[256];
  try
  {
    _port.Read(bData, 0, 256);
    _protocol.ParseBuffer(bData);
    _validData = true;
    return true;
  }
  catch
  {
    _validData = false;
    return false;
  }
}

(more…)

Create Your Own GPS Applications Using C# (4)

Monday, January 29th, 2007

Using the information in the previous 3 posts, we can now build our own GPS solution based on the Coding 4 Fun project. Our objective is to create a DLL that can be used in future projects that need to read from GPS devices. The DLL will serve as the interface between the program and a GPS device.
(more…)

Create Your Own GPS Applications Using C# (3)

Sunday, January 21st, 2007

As I mentioned before, Microsoft’s Coding 4 Fun GPS project contains a math error when calculating latitude and longitude. I’ll first provide a brief review of the NMEA protocol to better understand the error and how to correct it.

GPS receivers communicate using the NMEA protocol. Another device, such as a computer, receives the data in the form of NMEA sentences. There are several different types of NMEA sentences that allow for information on location (GPGGA), accuracy (GPGSA), satellite reception (GPGSV), etc. to be transmitted.
(more…)

Create Your Own GPS Applications Using C# (2)

Thursday, January 11th, 2007

Before reading, be sure to review part 1 and download the Coding 4 Fun GPS Program.

After opening the GPS program in Visual C# Express Edition, you will note that the Coding for Fun project is actually composed of two solutions named GPS and GPSClient. The GPS solution contains 4 files where all the C# code needed to connect and read from a GPS is stored. The second solution is named GPSClient and is just a GUI for displaying the information being transmitted from the GPS device.

(more…)

Create Your Own GPS Application Using C# (1)

Monday, December 18th, 2006

Have you ever wanted to connect to a GPS device within your own custom application? In the past, this was a difficult task for the average programmer using languages like C++. Fortunately, Microsoft’s .NET framework along with the C# programming language has made this task much easier.

(more…)