Advanced Serial Data Logger

Trust In Confidence!

For Windows 2000 - Windows 10 (2016) (incl. Server, x86 and x64). Latest version: 4.2.1 build 131. .

Receiving and parsing data from Garmin Geko301 GPS receiver


I am trying to receive TEXT data from the Garmin Geko301 GPS receiver. Gekos are the small and light waterproof GPS units with simple operating systems. I want to put a position data in to Microsoft Excel. The GPS data logger simple text (ASCII) output contains time, position, and velocity data in the fixed width fields (not delimited) defined in the following table:

    ----------------------- ------- ------------------------
    Sentence start          1       Always '@'
    ----------------------- ------- ------------------------
   /Year                    2       Last two digits of UTC year
  | ----------------------- ------- ------------------------
  | Month                   2       UTC month, "01".."12"
T | ----------------------- ------- ------------------------
i | Day                     2       UTC day of month, "01".."31"
m | ----------------------- ------- ------------------------
e | Hour                    2       UTC hour, "00".."23"
  | ----------------------- ------- ------------------------
  | Minute                  2       UTC minute, "00".."59"
  | ----------------------- ------- ------------------------
   \Second                  2       UTC second, "00".."59"
    ----------------------- ------- ------------------------
   /Latitude hemisphere     1       'N' or 'S'
  | ----------------------- ------- ------------------------
  | Latitude position       7       WGS84 ddmmmmm, with an implied
  |                                 decimal after the 4th digit
  | ----------------------- ------- ------------------------
  | Longitude hemishpere    1       'E' or 'W'
  | ----------------------- ------- ------------------------
  | Longitude position      8       WGS84 dddmmmmm with an implied
P |                                 decimal after the 5th digit
o | ----------------------- ------- ------------------------
s | Position status         1       'd' if current 2D differential GPS position
i |                                 'D' if current 3D differential GPS position
t |                                 'g' if current 2D GPS position
i |                                 'G' if current 3D GPS position
o |                                 'S' if simulated position
n |                                 '_' if invalid position
  | ----------------------- ------- ------------------------
  | Horizontal posn error   3       EPH in meters
  | ----------------------- ------- ------------------------
  | Altitude sign           1       '+' or '-'
  | ----------------------- ------- ------------------------
  | Altitude                5       Height above or below mean
   \                                sea level in meters
    ----------------------- ------- ------------------------
   /East/West velocity      1       'E' or 'W'
  |     direction
  | ----------------------- ------- ------------------------
  | East/West velocity      4       Meters per second in tenths,
  |     magnitude                   ("1234" = 123.4 m/s)
V | ----------------------- ------- ------------------------
e | North/South velocity    1       'N' or 'S'
l |     direction
o | ----------------------- ------- ------------------------
c | North/South velocity    4       Meters per second in tenths,
i |     magnitude                   ("1234" = 123.4 m/s)
t | ----------------------- ------- ------------------------
y | Vertical velocity       1       'U' (up) or 'D' (down)
  |     direction
  | ----------------------- ------- ------------------------
  | Vertical velocity       4       Meters per second in hundredths,
   \    magnitude                   ("1234" = 12.34 m/s)
    ----------------------- ------- ------------------------
    Sentence end            2       Carriage return, '0x0D', and
                                    line feed, '0x0A'
    ----------------------- ------- ------------------------

If a numeric value does not fill its entire field width, the field is padded with leading '0's (e.g. an altitude of 50 meters above MSL will be output as "+00050"). Any or all of the data in the text sentence (except for the sentence start and sentence end fields) may be replaced with underscores to indicate invalid data.

Fig.1. GPS data captured by the data logger software


  • Advanced Serial Data Logger Professional, Enterprise or Trial version
  • ASCII Data Query and Parser, DDE Server, Local database

It is assumed that:

You've configured communication parameters (baud rate, number of data bits, flow control etc) in the data logger and can receive any data without communication errors.


The image above shows, that the data flow is very simple, where each record has a fixed length and a fixed position of each item, but doesn't contain non-printable characters and doesn't show ending characters of a data packet. We need to recognize ending characters of an each data record. Please, enable display output for non-printable characters with a character code below than 0x20h. You need to create a port configuration. Please, click the "Plus" button in the main window if you didn't make it before and set the following options.

Serial data view setup

Fig.2. Serial data view setup

Then click the "OK" button and try to receive the data from a port. You should receive the data like on the figure below.

GPS data logger. Data received.

Fig.3. GPS data logger. Data received.

It's another view of the received data. All non-printable characters have been replaced with their code like #1B. Now, it is clear, that a single data packet (in a green rectangle) begins with "@" and ends with "#0D" (underlined by red).

Now, we are ready for configuring modules. First, please, select the "ASCII data parser and query" plug-in (fig.4a, pos.1) from a drop-down list. Then, enable a parsing option for data received (fig. 4a, pos. 2) and select necessary data export plug-ins. The DDE server (fig.4b, pos.3) will help us to check that the data packet is parsed and exported. The "Local database" plug-in will create Microsoft Access (MDB) files.

GPS data logger. Data parser plug-in

Fig.4a. GPS data logger. Data parser plug-in.

GPS data logger. Data export plug-ins

Fig.4b. GPS data logger. Data export plug-ins.

Now, please, open the ASCII parser and query configuration window by clicking the "Setup" button near a drop-down box (fig.4a, pos.1). The dialog window below will appear on the desktop (fig.5).

GPS data logger. The configuration window of the parser plug-in

Fig.5. GPS data logger. The configuration window of the parser plug-in.

The configuration process should be very simple if you have examined your data flow in the data logger window (Fig.3). You should type in the same as in the data logger window in fields 1 and 2. Field #1 marks the beginning of the data block and the field #2 marks the end. The field #1 is the start marker of the data packet ("@" in this example) and the field #2 is the end of the data packet ("#0D" in this example). Values, which you should type, are underlined by red color on the fig.3. In the field #3 you should specify a timeout value, which will be used if the module will not receive ending characters in the specified interval.

The next page is a very important part of the parser configuration. The data parser uses this information for data extraction from the data packet. The data packet from this example contains 3 data items, which should be placed to different variables. Later, these variables (we need 2 variables only: first character and a weight) will be used in a data export module and will be placed to different columns of the Microsoft Access database.

GPS data logger. Parser items

Fig.6. GPS data logger. Parser items.

Any new items may be added by clicking the "Add item" button (pic.6, pos. 7). Before adding an item the program will ask you about an item description. You can type any characters here, which will help you to remember a variable's content. We had added all 7 variables with corresponding descriptions.

Each parser item has a number of properties:

  1. Item name - this name will be bound to a column in the data export plug-in. It is a limited text description and cannot contain spaces and a few other characters;
  2. Parser's type -is a method, which the program will use for data extraction. Our parser has a few methods from simple to most powerful. In this example, where data is being placed in random place, we can use the simple method - fixed position. This method allows to extract any number of characters from any fixed position of the data packet;
  3. Data type - is the data type of the characters extracted. If you'll specify a data type other than the "STRING" data type, then the module will try to convert the string value to the specified data type. The module allows configuring several options that will be used at the conversion (see the "Data format" tab). In this example several items have the "Integer" data type, the "iDate" item has the "Datetime" data type and all other items have the "String" data type. Therefore we'll use all options from the "Data formats" page;
  4. Default value - the value specified here is to be used when data cannot be extracted from a data packet;
  5. Fixed position - is the position of the first variable's character in our data block. The minimum value is 1;
  6. Fixed length - is the number of characters, which will be transferred to a variable. The minimum value is 1.

All other items have the same parameters, a position, a length and a data type of other.

In the next tab, you can specify basic format options as per (fig.7). If you had specified the data type "String" in the item's parameters, then the first two options allow you to remove blank spaces from a value. Our called and caller number contain blank spaces at the start of a value. The second option allows you to convert the date time string to a field with the date time data type. We specified YYDDMMHHNNSS here, according to the specification above. For a detailed description of formatting characters, please, see the help file.

GPS data logger. Format of items

Fig.7. GPS data logger. Format of items.

Other options are unnecessary in our case, because all our items do not have the date or time data type.

Click the "OK" button and close the parser configuration window. Then click the "OK" button in the options window.

Now that our parser is ready it is time for testing it. Connect your device and power it on if necessary. Check to see if you are able to receive a data block from the specified serial port. If the parser had been correctly set up, then you should see all parser items names and their values (fig.8) in the DDE server window below.

GPS data logger. The DDE server window

Fig.8. GPS data logger. The DDE server window.

All parser items are now ready for export to the access database.

Related articles: