Data gps logger
Receiving and parsing data from Garmin Geko301 GPS receiver
For Windows 2000 - Windows 10 (2016) (incl. Server, x86 and x64). Latest version: 4.2.8 build 1020. December 19, 2017.
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:FIELD DESCRIPTION: WIDTH: NOTES: ----------------------- ------- ------------------------ 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.
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.
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.
Fig.4a. GPS data logger. Data parser plug-in.
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).
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.
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:
- 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;
- 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;
- 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;
- Default value - the value specified here is to be used when data cannot be extracted from a data packet;
- Fixed position - is the position of the first variable's character in our data block. The minimum value is 1;
- 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.
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.
Fig.8. GPS data logger. The DDE server window.
All parser items are now ready for export to the access database.
Portable GPS Data LoggerPortable GPS Data Logger
I have built a GPS Logger and it works very well to trace the drove route for two years. By the way, the navigation solution computed by GPS receiver itself has an excellent accuracy without DGPS because an intentional offset added by US goverment has been stopped several years ago. The position error seems to be some meters under clear sky. It is a suffcient accuracy to trace the movement of walk. However that GPS logger was designed for only car use so that I re-designed a portable one.
The impotant freatures needed for the portable equipment is: Small Size and Long Battery Life. The portable GPS logger must be designed in consideration of these requirements.
Modern GPS receiver modules are very small in size but most is still large for this project. I looked for a small one at some shops and found NaviSys Technology GM-316 at Aitendo. Its dimensions 13x16x9[mm] is not bad and the power consumption is only 3V/26mA.
Jan. 29, 2012: The GPS receiver module is replaced with PA6C. Also the firmware files have been updated.
The battery occupis the most space inside the case. To acheve required operating time, the energy density of the battery should be high as possible. The Li-Ion battery is suitable for such purpose, and also its high output voltage eliminates the step-up DC-DC converter that affects receiver sensitibity. However the Li-Ion battery has risk of fire and explosion if used it under incorrect charge/discharge condition. The control circuit and software must be properly designed to control it strictly. I used a AAA size 3.6V/500mAh Li-Ion cell for the purpose of high power flashlight.
A MicroSD card is used to record the navigation solution data with ATmega328P microcontroller. To use memory cards with a microcontroller, certain program space to implement a FAT file system is required. It depends on the microcontroller family and at least 16-32K bytes will be required for the AVRs. This controller does not have a mechanical power switch and the power is always supplied to the AVR. To reduce OFF state current, the power consumption of the regurator IC must be samll as possible. The Torex XC62FP3002 CMOS regurator used in this project is only 2μA in supply current. Right image shows the built circuit board and its circuit diagram.
Takachi SW-53 ABS case is ideal in size for this project. However it is a little small to built the all components in it. Because the size of the Li-Ion cell is 10mm in diameter but inner height of the case is only 8.5mm, I machined the both side of the case for the battery and for GPS receiver as well. The Li-Ion cell does not have soldering tabs but it must not be soldered directly or the Li-Ion cell can explode. I glued the Li-Ion cell to the case and put gold plated phosphor-bronze springs to contact the Li-Ion cell.
The function of the firmware is quite simple. It receives the data in format of NMEA-0183 that sent from GPS receiver continuously, stores it to the MicroSD card and nothing else. When power is on, initialize the GPS receiver and SDC, wait for a valid RMC sentence. When a valid RMC sentence is detected, get current time from it, open a log file named in current date in JST (YYMMDD.LOG) and start to logging. The received RMC sentence is always checked. If it indicates 'invalid' due to any reason, stop logging and re-start on it goes 'valid' again.
The Li-Ion cell is damaged easy by over charge/discharge. It must be strictly controlled in range of 2.750 to 4.200 volts to avoid risk of fire. The control program always checks while power is on and turn off automaticaly if it drops below 3.5 volts. The charge operation is done by a charge control IC (LTC4054L).
Using GPS Logger
Because the GPS receiver recives the navigation signals from GPS satellites, its antenna must be mounted at a place where can see the sky. For portable use, the best place is on the head :-) and there are some placees that easy to mount, such as cap, backpack, shoulder strap and etc.
To turn on the power, hold down SW1 for a second and the GPS logger start to receive the GPS signals with a short beep. After the first fix, it start logging with two short beeps. The monitor LED indicates that if the data is being logged to the memory card or not. Blinking light indicates that data is invalid and not logged. Continuous light indicates that data is valid and being logged.
GPS Logger for Android -
Download our free software using the Google Play™ store app:
Find in this link the GitHub repository, free source available.
In this link application notes and tutorials by our users.
Video tutorial on youtube.
In this page we are going to describe the Basicairdata GPS Logger For Android, focusing on the main features and exposing some background technical aspects.
Figure 1 – The GPS Logger interface
GPS Logger is a simple App for taking track of your position and your path. You can record your trips, annotate your placemarks along the way, view your position, speed, altitude, direction, and many statistics about your trips. You can access anytime to your recorded tracks using the in-app Tracklist, view them with Google Earth (if installed) in one click, save and share them in GPX, KML, and TXT format.
BasicAirData GPS Logger features:
- A new and revamped interface, using the new Toolbar and the modern Material concept, with a low battery consumption dark theme and a comfortable tabbed interface
- Tracks recording, focused on accuracy, with an eye to power saving
- Recording also in background
- Placemarks creation, also meanwhile recording; You can add a description to each one
- Visualization of current GPS information: position, altitude, speed, direction
- Real time track statistics: duration, distance, maximum and average speed, altitude gap, and overall direction
- In-app tracklist showing recorded tracks, with a little thumbnail and the statistics of each recorded track
- Visualization of your tracks using Google Earth (if installed) directly from the Tracklist
- Exportation (in the /GPSLogger folder of your device)
- Direct sharing of the tracks in KML (Google Earth format), TXT (comma-separated values), and/or GPX (OpenStreetMap format), via E-mail, Dropbox, FTP, Telegram and so on, depending on the software installed on your smartphone
- You can load the recorded tracks in Google Earth, in OpenStreetMap editor and in much other software or online services (like UTracks)
- Compatible with Android 2.2+
- Battery friendly (it can record continuously for hours)
In the app settings you can anytime:
We want now to take focus on two of those features:
Automatic EGM96 Altitude Correction
The main and most interesting feature on which we focused is the correction of GPS altitude error. The main altitude measurement errors are due to the difference between the earth mean ellipsoid (the zero-reference of the GPS) and the real earth geoid. That difference depends on Latitude and Longitude.There are many models that describe that geoid; the chosen one is the NGA/NASA EGM96, N=M=360 Earth Gravitational Model, described by the binary geoid height file hosted on the National Geospatial-Intelligence Agency site.
There are newer and more detailed geoid models than EGM96, but this one is accurate enough for smartphones; it contains a reasonable amount of freely loadable data, so this is the best suitable for Smartphone usage.
When The Binary EGM96 Automatic Correction is selected for the first time into the Setting Screen (See Figure 2) the geoid Heights binary file is downloaded from the NGA/NASA website. The size of that file is about 2 MB.
The GPS Logger software code is tailored for the format of this file. The file you downloaded is an unformatted direct access file.
The data is arranged in 721 arrays of 1440 records each. Arrays are ordered from north to south. Records are disposed from west to east starting at the prime meridian (0 E) and ending 15 arc-minutes west of the prime meridian (359.75 E). Data unit of measurement is the centimeter. The grid of 721 x 1440 values represents the distance from Ellipsoid and Earth Geoid, or geoid deviation, every 15 arc-minutes .
At every position fix, by means of a bi-linear interpolation, the application recalculates the correction value for the actual position.
To have a general idea of the correction dynamic we did some basic analysis of geoid heights file. The graph in figure 3 shows the output of this Scilab script (a parser that calculates the maximum gradient value of the whole grid) WW15MGH_max_grad.sce, that represents the area with the maximum gradient of the EGM96 grid.
That place (approx. 30 N, 80 E, situated on Himalaya Mountains) has a gradient value of:
Figure 3 – Area of maximum gradient of EGM96 grid
Let’s pretend that we’re logging with GPS Logger at 1 Hz on a car running at 90 km/h. Considering the previous gradient data then we should expect that our EGM96 correction value might change 1 m every 100 GPS samples (100 seconds).
The application applies a fine-grained correction value (calculated with the maximum precision), even if a coarsely discretized GPS measurement is used. In such a way the overall measurement uncertainty is minimized in a wide set of operating conditions.
Manual Altitude Correction
A lot of factors may influence the GPS signal; some of those are related to a single fix, or to a little group of them, whilst others might influence the entire track.
Typical sources of error are Ionospheric Delay Compensation, Tropospheric Delay Compensation, Receiver Noise and Resolution, Multipath, and Other User Segment Errors  (Pag.B-6).
A GPS signal, traveling from the satellite to a receiver, passes through the atmosphere, where different layers refract that signal in various ways. The first layer it encounters is the ionosphere. Then it undergoes a different kind of delay in the neutral atmosphere. Termed nondispersive because it is not frequency-dependent and thus cannot be easily eliminated, this neutral delay is caused by both the stratosphere and troposphere. Weather fronts are an important meteorological phenomenon that not only brings a change in weather but can also significantly disturb GPS signal. Because they occur in the troposphere, they leave their mark in the tropospheric propagation delay .
Furthermore, due to the nature of the GPS signal, cliffs, tall buildings, and trees may block the satellite signal. Rain, fog, and snow may also affect the signal quality.
Here at page 15 is reported in a very generalized and simplified way the influence of some GPS error sources.
The GPS Logger Manual Altitude Correction would be an additional (but non-fully comprehensive) instrument to try to manually compensate the overall altitude errors of your tracks due to weather conditions, building occlusions and all the unpredictable sources of overall delays.
You can find and change the Manual Correction in “Altitude Corrections” section of your app settings.
A final information about all the corrections described above:
All the altitude corrections are applied “on the fly” when the track is showed (in the GPS FIX and the TRACK tabs), exported, viewed or shared. The recording process only saves the raw altitude reads. Therefore you can freely activate/deactivate the EGM correction, or change the manual offset value, without disturbing the recording process or changing any stored value. You can besides check your track viewing it in Google Earth using different offsets and apply the right altitude correction before sharing and exporting your track.
You can install GPS Logger in many ways:
Figure 4 – QR-Code for GPS Logger installation
The application is available through Google Play™ store, use the QR-CODE here in Figure 4 to browse the store. If you enjoy using this app, please take a moment to rate and review it in the Google Store!
Alternatively, you can install the apk package by yourself.
At a glance, the installation consists of three steps:
- Download the package here
- Copy the latest apk file on your smartphone and
- Install it
The app has been developed using Android Studio under Linux Fedora.
It’s 100% free and Open Source. So you can freely download and install it, share it with your friends, and also view and download the source code here or contribute on GitHub.
The code is written in Java and commented by the author. If any doubt arises just ask.
How to contribute to improve GPS Logger
- Contribute to develop the software, sending us your code proposal via GitHub
- Join Us on Crowdin and help Us to translate the app in your Language
- Send us a useful review, a bug reporting, or simply your suggestions and ideas
- Rate and review this app on Google Play
- Review it on your blog, share and Like on Social Medias
- Talk about the application to your friends, contributing to enlarge the users base
Figure 5 – A city route. GPS Logger track shown in Google Earth
ELM - GPS Data LoggerELM - GPS Data Logger
I have purchase a GPS receiver at junk market. The GPS receiver continuously outputs the fix data in NMEA-0183 format. When record the fix data into a storage media, it enables many interesting applications of GPS. For example, convert the log file with a GPS tool into an HTML form and display what route we followed. I designed and built a GPS data logger for automotive. Also pocket sized GPS data logger is documented here.
Right image shows the inside of the built GPS data logger. The GPS data is stored into the MMC/SD card. The external antenna connector was used by the old GPS receiver but it has been replaced by new one and the antenna connector is no longer used.
Power Supply Circuit
There are some considerations different from generic electronics equipments on designing of power supply circuit of automotive equipment. It is what the power source from the battery is painful to the power supply circuit. The supply voltage at 12/24V system is not that kept to 12/24 volts. Because the battery is continuously charged while the engine is in work, the supply voltage rise to around 14/28 volts, and the voltage dips down to 5 volts on cranking the engine due to high current discharge by the starter. If the equipment uses the ACC power, it is swiched off while cranking the engine but this is not a simply switch off. Because many loads are attached to the ACC line, it should be considerd that the input line is shorted to the ground at ACC switch off. As the result, voltage regurator ICs without immunity of Vi<Vo will easily fail. In this circuit, D2 at the input stage blocks the instant discharge by the voltage dip.
Right image shows an example of the wave form of the load dump test for 12V system. This is called load dump surge that generated by failure of wiring. D1 in this circuit is a zenner diode rated 36V/5W to absorb the load dump surge. The GPS data logger is designed for 12/24V system. For 12V system, D1 can be changed to 18V/5W zenner diode and rated voltage of C1 can be changed to 16V.
For easy installation, the GPS data logger is powered by only ACC line. No power switch is supported and start/stop the logging by ACC on/off. The energy for file close process after black out is held in C1. Of course it should be not only proof against painful input but also avoid incorrect operation due to unstable supply voltage. This requires also some considerations on software design.
Power Control of MMC/SDC
When a short time dip of input voltage occured, Vcc may rise again before it reaches to 0 volt. In this situation, the power sequence may not meet the requirement of the MMC/SDC. As the result, the reset sequence of MMC/SDC is not work and some MMC/SDC cards get wrong state and no command is accepted. Once the card gets the wrong state, no way to exit this state except applying a correct power sequence to the card. To support this procedure to always reinitialize the MMC/SDC, a power control circuit to the card socket is required.
First, MMC/SD card is initialized after the supply voltage stabled. If a memory card is not present in the socket, it waits until a card is inserted. When the file system on the card is successfully recoginized, a short beep is sounded and go to next step. At this time, power supply to the GPS receiver is enabled and initialized to the proper operating mode if needed.
Next, GPS logger watches the GPS sentence received from the GPS receiver. This is to get current time from the GPS sentence because the system has no RTC. When the receiver acquired the position and RMC sentence goes valid, the data logging process is started. The log file is named YYMMDD.LOG with the current local date gotten from the RMC sentence. If a file with the same name is existing, it start to log at end of the file. Two short beeps is sounded on file creation/open.
Right LED indicates that the MMC/SD is being accessed. Green LED indicates the current status (off: card is not initialized, on: fix data is valid, blink: fix data is invalid) of the GPS data logger.
The data logging process is terminated by ACC switch off, so that the black out occures asynchronously. When a black out is detected, the file being written must be closed as soon as possible by capacitor C1 is discharged. The data logger detects a bloack out and start the shutdown process when input voltage is below 9V for 100 miliseconds. After the shutdown process succeeded, a long beep is sounded. To minimize risk of data loss due to unintentional card removal or failur of the shutdown process, f_sync function is performed every 3 minutes.