Code covered by the BSD License  

Highlights from
Serial Object GPS Example Code

3.625

3.6 | 9 ratings Rate this file 33 Downloads (last 30 days) File Size: 18.47 KB File ID: #3223

Serial Object GPS Example Code

by Peter Webb

 

01 Apr 2003 (Updated 17 Nov 2010)

Read tracklog data from Garmin eTrex GPS devices.

| Watch this File

File Information
Description

This file contains the example code for the May 2003 News and Notes article "Importing Data via the Serial Object in MATLAB". The included M-code will read track log data from a Garmin eTrex GPS (Global Positioning Satellite) device and produce an analysis and visualization of that data. See the readme file (and the News and Notes article, posted on the MathWorks web site) for further details.

MATLAB release MATLAB 6.5 (R13)
Other requirements Other than MATLAB 6.5, with Java enabled, to fully exercise the example, you need two pieces of hardware: a COM port and a Garmin eTrex GPS device.
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (12)
21 Jul 2003 Mike Roberts

Was using eTrex Legend and Matlab 6.1 - are the differences between 6.1 and 6.5 sufficient to prevent this from working ?

Looks like a very useful application base, if I could get it to work.

22 Jul 2003 Mike Roberts

Works great, with a couple of tweaks for version 6.1. Very cool application.

23 Jan 2004 enes koytak

can anyone send me a matlab 6.5 version? it doesn't work :(

27 Mar 2004 Abdul Nasser

gathering information on matlab.

01 Jul 2004 carlos rodrigues

I meed a funcion to read a serial port.
I meed to read data from de port.

24 Mar 2005 Walter Allensworth

Hi!
Well I got it reading data from my Garmin Etrex Legend in Matlab 6.1 after about 90 minutes of code debugging. There were many instances of '&&' in several functions where a single '&' were needed, and the final line in the sizeof.m function needs to be changed to:
s = getfield(typemap,type);

It's also a bit slow downloading the track-files, but that's OK.

Lastly, the analysis program has big trouble if you've got several dirrerent tracks in your GPS from different locations. So... you should clear it before capturing just the track you want.

What I was really looking for when I stumbled on this code is Matlab S/W that will read a NMEA string output from the GPS so I can store it in a file of my own format.

Is there code around to do that?

Thanks!

01 Jul 2005 vimal patel

it is very good

15 Dec 2005 Alon Alfa

correction:
"min" is a function and a var.
change the name of the function.

05 Jan 2007 Steven Kolak

.

MATLAB supports serial devices including RS-232 using the Instrument Control Toolbox.

When you use Instrument Control Toolbox, you are provided with a graphical tool to configure and control your serial device in MATLAB without writing MATLAB script. In fact, the tool automatically generates MATLAB script that you can reuse in your application. Type "tmtool" to launch this tool.

Visit the MATLAB serial resource page for more information and a downloadable MATLAB code example automatically generated with the graphical tool provided by the toolbox:
http://www.mathworks.com/serial

14 Mar 2007 Olivier Progin  
12 Apr 2007 houssam SASSINE  
02 Nov 2007 mie wryant

thanks for th files.
this very easy to use.
but i have problem with OpenGPS.m
the error message is
"??? Undefined function or method 'OpenGPS' for input arguments of type 'char'."

can you help me again please.

Please login to add a comment or rating.
Updates
17 Nov 2010

Added BSD license.

Tag Activity for this File
Tag Applied By Date/Time
data import Peter Webb 22 Oct 2008 06:59:22
data export Peter Webb 22 Oct 2008 06:59:22
serial object gps Peter Webb 22 Oct 2008 06:59:22
garmin Peter Webb 22 Oct 2008 06:59:22
tracklog Peter Webb 22 Oct 2008 06:59:22
global positioning satellite Peter Webb 22 Oct 2008 06:59:22
global positioning satellite kuoping 29 Jun 2010 07:20:09
serial object gps kuoping 29 Jun 2010 07:20:12
garmin Paul 14 Mar 2011 14:51:44
data export kapil 29 Apr 2011 14:48:03

Contact us at files@mathworks.com