Thread: [Gpsbabel-misc] how to convert ?
Brought to you by:
robertl
From: Subhodip B. <sub...@gm...> - 2008-08-21 15:56:41
|
Hi ! what is the correct way of converting a gpx to nmea and vice versa . I used all gpsbabel tools (command line , gebabel , guibabel even gpsbabel+ on a mac) but on conversion i get blank nmea files and gpx files respectively . -- Regards Subhodip Biswas GPG key : FAEA34AB Server : pgp.mit.edu http://subhodipbiswas.wordpress.com http:/www.fedoraproject.org/wiki/SubhodipBiswas |
From: Robert L. <rob...@gp...> - 2008-08-22 04:03:36
|
On Thu, Aug 21, 2008 at 10:50 AM, Subhodip Biswas <sub...@gm...>wrote: > Hi ! > > what is the correct way of converting a gpx to nmea and vice versa . > It depends on what's in the files and what you hope to get in the new ones. > I used all gpsbabel tools (command line , gebabel , guibabel even > gpsbabel+ on a mac) but on conversion i get blank nmea files and gpx The common cause is that you have an NMEA file with bad checksums or no valid fixes (yes, we see that a LOT) or are trying to convert between tracks and waypoints without using the -t/-w and/or cvttypes filter. It does, in general, work though: rjlimac:gpsbabel robertlipe$ ./gpsbabel -i nmea -f reference/track/nmea -o gpx -F - | head -20 <?xml version="1.0" encoding="UTF-8"?> <gpx version="1.0" creator="GPSBabel - http://www.gpsbabel.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.topografix.com/GPX/1/0" xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd"> <time>2008-08-22T04:03:03Z</time> <bounds minlat="42.530485000" minlon="-88.121766667" maxlat="42.530528333" maxlon="-88.121706667"/> <trk> <trkseg> <trkpt lat="42.530485000" lon="-88.121721667"> <ele>209.800000</ele> <time>2004-08-07T03:29:08.379Z</time> <course>138.919998</course> <speed>0.083333</speed> <fix>3d</fix> <sat>5</sat> <hdop>1.600000</hdop> <vdop>4.500000</vdop> |
From: Subhodip B. <sub...@gm...> - 2008-08-22 04:44:06
Attachments:
165498.nmea
|
hi ! On Fri, Aug 22, 2008 at 9:33 AM, Robert Lipe <rob...@gp...> wrote: > > > On Thu, Aug 21, 2008 at 10:50 AM, Subhodip Biswas <sub...@gm...> > wrote: >> >> Hi ! >> >> what is the correct way of converting a gpx to nmea and vice versa . > > It depends on what's in the files and what you hope to get in the new ones. > >> >> I used all gpsbabel tools (command line , gebabel , guibabel even >> gpsbabel+ on a mac) but on conversion i get blank nmea files and gpx > > > The common cause is that you have an NMEA file with bad checksums or no > valid fixes > (yes, we see that a LOT) or are trying to convert between tracks and > waypoints without > using the -t/-w and/or cvttypes filter. Actually i generate nmea files by converting from gpx files . So how to make sure i dont get a bad checksum. the command i use is : - gpsbabel -t -i gpx -f "165498.gpx" -o nmea -F "165498.nmea" and nmea file is attached. however on reconverting from nmea to gpx i get a blank gpx file . can you point me what i have done wrong. > > It does, in general, work though: > > rjlimac:gpsbabel robertlipe$ ./gpsbabel -i nmea -f reference/track/nmea -o > gpx -F - | head -20 > <?xml version="1.0" encoding="UTF-8"?> > <gpx > version="1.0" > creator="GPSBabel - http://www.gpsbabel.org" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns="http://www.topografix.com/GPX/1/0" > xsi:schemaLocation="http://www.topografix.com/GPX/1/0 > http://www.topografix.com/GPX/1/0/gpx.xsd"> > <time>2008-08-22T04:03:03Z</time> > <bounds minlat="42.530485000" minlon="-88.121766667" maxlat="42.530528333" > maxlon="-88.121706667"/> > <trk> > <trkseg> > <trkpt lat="42.530485000" lon="-88.121721667"> > <ele>209.800000</ele> > <time>2004-08-07T03:29:08.379Z</time> > <course>138.919998</course> > <speed>0.083333</speed> > <fix>3d</fix> > <sat>5</sat> > <hdop>1.600000</hdop> > <vdop>4.500000</vdop> > > -- Regards Subhodip Biswas Fedora Ambassador West Bengal , India GPG key : FAEA34AB Server : pgp.mit.edu http://subhodipbiswas.wordpress.com http:/www.fedoraproject.org/wiki/SubhodipBiswas |
From: Robert L. <rob...@gp...> - 2008-08-22 05:30:24
|
> > gpsbabel -t -i gpx -f "165498.gpx" -o nmea -F "165498.nmea" > and nmea file is attached. > > however on reconverting from nmea to gpx i get a blank gpx file . can > This is a good example of what we babel-heads call the "alchemy problem" - producing data from where none existed is hard, though I think there might be a little more gold in this lead than what we're extracting. Your data is basically pairs of GPRMC and GPGGA sentences. The fixes are marked as valid, but there's no actual fix data that tells us they're valid or with what kind of a fix. so when we write the NMEA data, we can't *prove* they're valid so we mark them as invalid. (You're free to say that's lame....) So in the roundtripping to and from NMEA, we end up clearing the NMEA 'valid' flag in the GGA on the write. I'll put it on my markerboard to make the "read NMEA" case set the position 3d (?) flag if we see the "valid" flag in a GGA. Thanx for the test case. As an aside, the fewer round-trips of data you make, the higher fidelity your data will likely be. RJL |