GPS Car Tracker With Intel Edison

Introduction: GPS Car Tracker With Intel Edison

Going to the next project using the Intel Edison Transportation and Safety Kit I created a very basic application to track a car using the Grove GPS. This project took me a little more work because of the complexity of handling GPS data and the need to have the GPS connected with as many sattelites possible. I'll describe each challenge in this project in the next steps.

Step 1: Materials

• Intel Edison for Arduino
• Grove Base Shield
• Grove GPS

Step 2: Wiring

Grove GPS uses Serial communication to send data to the Intel Edison. In case of the Grove GPS I have (which uses SIM28 GPS Module), the Baud Rate can be from 9600 up to 115200, which brings fast communication so it is possible to get updated data instantly. The Grove GPS must be connected in the UART port of the Grove Base Shield.

Step 3: Challenges

• Power Consumption
Since Grove GPS needs high current power source, I realized that a USB Cable in Intel Edison as a power source is not enough, specially when you have other sensors in it (just plug Alcohol sensor and GPS and you'll see). Because of it, I used an external power source from the power plug I received to have enough power. If you want to use

• Handling GPS Data
GPS uses a specific format called NMEA(National Marine Electronics Association), which consists in some sentences which each of them describes one specific information that GPS captures (like the location and altitude data, Satellite data, etc.). One note: I found this information in the Seedstudio wiki ( that describes this info about the sensor. Also, this format is not used by Google Maps to show location so I needed to look for a way to convert this location data and I found an article written by Thomas Tingsted Mathiesen ( that describes a simple way to convert (thank you so much Thomas!).

Step 4: Source

Below the simple code I wrote that does the following:

  • Capture GPS info
  • Look for the $GPGGA record (more information about NMEA in
  • Collect Latitude and Longitude / Convert from NMEA to Dec
  • Generate a Google Maps link with the GPS info

Since Google Maps API requires a key, I created one but I ommited mine in the code. Make sure to create an API key for you by following

/*jslint node:true, vars:true, bitwise:true, unparam:true */
/*jshint unused:true */
// Leave the above lines for propper jshinting
var GPSSensor = require('jsupm_ublox6');
var myGPSSensor  = new GPSSensor.Ublox6(0);
setTimeout(getGPSInfo(), 1000);

if (!myGPSSensor.setupTty(GPSSensor.int_B9600)) {
	console.log("Failed to setup tty port parameters");

bufferLength = 256;
var nmeaBuffer  = new GPSSensor.charArray(bufferLength);

function getGPSInfo() {
	if (myGPSSensor.dataAvailable()) {
		var rv = myGPSSensor.readData(nmeaBuffer, bufferLength);
		var GPSData, dataCharCode, isNewLine, lastNewLine;
		var numlines= 0;
		if (rv > 0) {
			GPSData = "";
			// read only the number of characters
			// specified by myGPSSensor.readData
			for (var x = 0; x < rv; x++) {
				var data = nmeaBuffer.getitem(x);
                    		GPSData += data;
		if (rv < 0) { // some sort of read error occured
			console.log("Port read error.");

function processData(rawData) {
    var data = rawData.split(",");
    var index = data.indexOf("$GPGGA");
    var lat = data[index+2];
    var lon = data[index+4];
    var latDec = convertNmeaToDec(lat);
    var lonDec = convertNmeaToDec(lon);
    if(data[index+3] == "S") latDec = latDec * -1;
    if(data[index+4] == "W") lonDec = lonDec * -1;
    var url = "";
    url += -latDec;
    url += ",";
    url += -lonDec;
    url += "&zoom=14&size=600x300&key=*** API KEY OMMITED! PLACE YOU OWN KEY HERE ***";
    return url;
}</p><p>// Function to convert the NMEA format from GPS to Decimal
// This function is needed to show in Google Maps.
// Thanks to
function convertNmeaToDec(nmea) {
    var deg = (nmea / 100);
    var decPos = deg + ((nmea - (deg * 100)) / 60);
    return decPos;

// Print message when exiting
process.on('SIGINT', function() {

Step 5: Conclusion

The code is pretty simple but there are lots of information required to use the GPS data and how to convert to known formats (like the one that google Maps use). I hope that this instructable might help everyone use Intel Edison and Location data.

Intel® IoT Invitational

Participated in the
Intel® IoT Invitational

Be the First to Share


    • Big and Small Contest

      Big and Small Contest
    • Game Design: Student Design Challenge

      Game Design: Student Design Challenge
    • For the Home Contest

      For the Home Contest


    Joseph W.H
    Joseph W.H

    Question 4 years ago on Step 1

    What is it that Intel Edison brings to this GPS Car Tracker that less expensive (Arduino ?) designs do not?


    Question 5 years ago on Step 4

    how to create an api key please tell step by step


    7 years ago

    I had to do a similar thing wih my project (car tracker/vehicle data to a web dashboard the middle of writing the instructable for it now.). The UPM library for the gps module doesnt work.

    Did you figure out how to tell the sim28 to only output some of the sentences and to do it a greater rate? The documentation seems to suggest this is possible.