Jump to content

Convert GPX to NMEA?


Recommended Posts

I usually see topics about converting an NMEA file to a GPX file, but never the other way around. Is it possible to convert a GPX file to an NMEA file?

Yes, using GPSBabel. But remember that GPX is a much "richer" format, so a GPX file may include many data tyoes which have no equivalents in NMEA.

 

Do you have a device that needs a NMEA data stream that you wish to populate from a GPX file?

Link to comment
I usually see topics about converting an NMEA file to a GPX file, but never the other way around. Is it possible to convert a GPX file to an NMEA file?

Yes, using GPSBabel. But remember that GPX is a much "richer" format, so a GPX file may include many data tyoes which have no equivalents in NMEA.

 

Do you have a device that needs a NMEA data stream that you wish to populate from a GPX file?

 

No, it's an app that only takes NMEA files with a .log extension.

 

Will I lose any data when converting GPX to NMEA since GPX is a richer format?

Link to comment

Both formats are quite expressive; "richer" is in the eye of the beholder. NMEA can express satellites currently in view, water depth below transducers, mean water temperature, and lots of other zany things. GPX was designed around handheld/outdoor-class GPS receivers from about the turn of the century and is hung around waypoints, tracks, and routes. Via extensions, GPX _can_ express most of those things (or, say, Geocaches...) but I've never seen anyone do it. Even doing NMEA->NMEA or GPX->GPX, there can be some "impedance" when moving data between apps or devices. In the abstract, it generally is possible to convert the locational components between the two. Can you get something on the screen that shows your hike? Almost certainly. Can it be a line instead of a row of dots? Probably. Will your colored 'campground' icon be preserved? Probably not. So depending on what's in your GPX file and what kind of NMEA the reader is looking for, your results may vary wildly. If you're converting a pocket query to NMEA, for example, you'll probably get nothing more than dots on the maps where the geocaches are and maybe a GC#.

 

Think of it like human language translation: simple ideas familiar to everyone ("I want a glass of water") machine translate very well. A poem or a song will probably lose some nuance and a machine translation will need some help.

 

If it doesn't Just Work, show us (here or on the GPSBabel list) a representative GPX file that you're starting with and the kind of NMEA that your reader is looking for.

 

You can learn more about NMEA at http://www.catb.org/gpsd/NMEA.html and the relevant page of the GPSabel doc starting with http://www.gpsbabel.org/htmldoc-development/fmt_nmea.html - observe that our NMEA writer contains lots of nerdy switches to try to satisfy the various readers.

 

Signed,

Creator of GPSBabel.

Link to comment

No, it's an app that only takes NMEA files with a .log extension.

 

Will I lose any data when converting GPX to NMEA since GPX is a richer format?

I like Robert's description, but will choose to simplify an answer just a bit. What comes in a GPX file and what can be spit out by a GPS in NMEA sentences are quite different. The only typical overlap between the two are coordinates. GPX talks a lot about the details of a waypoint, and NMEA talks a lot about the conditions under which the coordinates were obtained from the satellite. Very different purposes, very different languages.

 

If you can tell me just a bit more (it shouldn't take much) about the app that needs the NMEA, or what kind of NMEA input it wants (different things are described in different kinds of what NMEA calls 'sentences'), I could whip up a program that acts as a *.gpx file parser that creates NMEA $GPGLL sentences (simple latitude/longitude) in an output file in no time at all.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...