Re: [Gpsbabel-code] [PATCH] add support for mynavi trc format
GPSBabel converts and transfers data like waypoints, tracks & routes.
Brought to you by:
robertl
|
From: Robert L. <rob...@gp...> - 2014-12-01 15:32:16
|
Thanx. This seems pretty reasonable to me. I'd like to tweak the copyright to reflect shared ownership if that's OK. This source is a derived work and me being owner of the file puts me in a better place to argue about legal squabbles. For the <productname> in doc, can you please refer to actual products (GPSs, mapping products, etc.) that use this format? On Sat, Nov 29, 2014 at 4:45 PM, Ralf Horstmann <ral...@ac...> wrote: > Hi, > > the patch below adds support for mynav trc file format as documented here: > http://www.mynav.it/hwdoc/dev/TRC_Format_Spec.pdf . This format is used > by VDO > GP7 cycle computers. > > The patch is against SVN r4937. > > Cheers, > Ralf > > diff -r a4ac308f26be Makefile.in > --- a/Makefile.in Sat Nov 29 16:22:14 2014 +0100 > +++ b/Makefile.in Sat Nov 29 23:29:54 2014 +0100 > @@ -80,7 +80,8 @@ > pocketfms_bc.o pocketfms_fp.o pocketfms_wp.o naviguide.o enigma.o \ > vpl.o teletype.o jogmap.o bushnell.o bushnell_trl.o wintec_tes.o \ > subrip.o garmin_xt.o garmin_fit.o lowranceusr4.o \ > - mtk_locus.o googledir.o mapbar_track.o f90g_track.o mapfactor.o > energympro.o > + mtk_locus.o googledir.o mapbar_track.o f90g_track.o mapfactor.o > energympro.o \ > + mynav.o > > FMTS=@FMTS@ > > @@ -821,6 +822,7 @@ > mtk_logger.o: mtk_logger.cc defs.h config.h queue.h zlib/zlib.h \ > zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h session.h \ > src/core/datetime.h gbser.h > +mynav.o: mynav.cc defs.h config.h gbfile.h > navicache.o: navicache.cc defs.h config.h queue.h zlib/zlib.h \ > zlib/zconf.h gbfile.h cet.h cet_util.h inifile.h session.h \ > src/core/datetime.h src/core/file.h > diff -r a4ac308f26be mynav.cc > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/mynav.cc Sat Nov 29 23:29:54 2014 +0100 > @@ -0,0 +1,171 @@ > +/* > + Handle MyNav TRC format .trc and .ftn files > + > + Copyright (c) 2014 Ralf Horstmann <ra...@ac...> > + > + This program is free software; you can redistribute it and/or modify > + it under the terms of the GNU General Public License as published by > + the Free Software Foundation; either version 2 of the License, or > + (at your option) any later version. > + > + This program is distributed in the hope that it will be useful, > + but WITHOUT ANY WARRANTY; without even the implied warranty of > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + GNU General Public License for more details. > + > + You should have received a copy of the GNU General Public License > + along with this program; if not, write to the Free Software > + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA > + > + */ > + > +#include <QtCore/QStringList> > + > +#include "defs.h" > + > +#define MYNAME "mynav" > + > +typedef enum { > + fld_type = 0, > + fld_lon, > + fld_lat, > + fld_direction, > + fld_speed, > + fld_altitude, > + fld_timestamp, > + fld_duration, > + fld_gps_valid, > + fld_distance, > + fld_ascent, > + fld_cadence, > + fld_heart_rate, > + fld_id, > + fld_total_duration, > + fld_terminator > +} field_e; > + > +static route_head* mynav_track; > +static gbfile* fin; > + > > +//******************************************************************************* > +// local helper functions > > +//******************************************************************************* > +static void > +mynav_rd_line(char *buf) > +{ > + Waypoint* wpt = NULL; > + QStringList fields; > + QString line; > + bool ok; > + int val_type; > + int val_gps_valid; > + double val_lat; > + double val_lon; > + double val_alt; > + int val_time; > + > + line = buf; > + fields = line.split("|"); > + > + if (global_opts.debug_level > 1) { > + qDebug() << "line: " << line; > + for (int i = 0; i < fields.size(); i++) > + qDebug() << "field" << i << fields.at(i); > + } > + > + // don't consider lines without latitude/longitude > + if (fields.size() < fld_lat) > + return; > + > + // only type 1 and type 5 lines contain coordinates > + val_type = fields.at(fld_type).trimmed().toInt(&ok); > + if (!ok) > + return; > + if (val_type != 1 && val_type != 5) > + return; > + > + // This field is not present in .trc files, only in .ftn, so > + // ignore line if present and != 1 > + if (fields.size() >= fld_gps_valid) { > + val_gps_valid = fields.at(fld_gps_valid).trimmed().toInt(&ok); > + if (!ok || val_gps_valid != 1) > + return; > + } > + > + val_lon = fields.at(fld_lon).trimmed().toDouble(&ok) / 3600000.0; > + if (!ok) > + return; > + val_lat = fields.at(fld_lat).trimmed().toDouble(&ok) / 3600000.0; > + if (!ok) > + return; > + > + wpt = new Waypoint; > + wpt->latitude = val_lat; > + wpt->longitude = val_lon; > + > + if (fields.size() >= fld_altitude) { > + val_alt = fields.at(fld_altitude).trimmed().toDouble(&ok); > + if (ok) > + wpt->altitude = val_alt; > + } > + > + if (fields.size() >= fld_timestamp) { > + val_time = fields.at(fld_timestamp).trimmed().toInt(&ok); > + if (ok) > + wpt->SetCreationTime(val_time); > + } > + > + track_add_wpt(mynav_track, wpt); > +} > + > + > > +//******************************************************************************* > +// global callbacks called by gpsbabel main process > > +//******************************************************************************* > + > +static void > +mynav_rd_init(const char* fname) > +{ > + fin = gbfopen(fname, "rb", MYNAME); > + mynav_track = route_head_alloc(); > + track_add_head(mynav_track); > +} > + > +static void > +mynav_rd_deinit(void) > +{ > + gbfclose(fin); > +} > + > +static void > +mynav_rd(void) > +{ > + char * buff; > + > + while ((buff = gbfgetstr(fin))) { > + buff = lrtrim(buff); > + if ((*buff == '\0') || (*buff == '#')) { > + continue; > + } > + mynav_rd_line(buff); > + } > +} > + > +ff_vecs_t mynav_vecs = { > + ff_type_file, > + { > + ff_cap_none, // waypoints > + ff_cap_read, // tracks > + ff_cap_none // routes > + }, > + mynav_rd_init, // rd_init > + NULL, // wr_init > + mynav_rd_deinit, // rd_deinit > + NULL, // wr_deinit > + mynav_rd, // read > + NULL, // write > + NULL, // exit > + NULL, //args > + CET_CHARSET_ASCII, 0 //encode,fixed_encode > + //NULL //name dynamic/internal? > +}; > diff -r a4ac308f26be reference/track/mynav.ftn > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/reference/track/mynav.ftn Sat Nov 29 23:29:54 2014 +0100 > @@ -0,0 +1,79 @@ > +0|6.2.1.0|1.0|100|2|m|m > +0|2140 > +0|2090 > +0|MARIO|M|30|74|191 > +0|0|0|0|0|5 > +1|0|0|0|0|450|1405862664|0|0|0|0|0|0|1 > +1|0|0|0|0|451|1405862669|0|0|0|0|0|0|2 > +1|0|0|0|0|447|1405862675|0|0|0|0|0|0|3 > +1|0|0|0|0|447|1405862680|0|0|0|0|0|0|4 > +1|0|0|0|0|450|1405862685|0|0|0|0|0|0|5 > +1|0|0|0|0|449|1405862690|0|0|0|0|0|0|6 > +1|0|0|0|0|450|1405862695|0|0|0|0|0|0|7 > +1|0|0|0|0|449|1405862700|0|0|0|0|0|0|8 > +1|0|0|0|0|449|1405862705|0|0|0|0|0|0|9 > +1|0|0|0|0|449|1405862710|0|0|0|0|0|0|10 > +1|0|0|0|0|449|1405862715|0|0|0|0|0|0|11 > +1|0|0|0|0|449|1405862720|0|0|0|0|0|0|12 > +1|0|0|0|0|450|1405862725|0|0|0|0|0|0|13 > > +9|1405862659|0|0|1405862725|0|0|0|0|0|0|0|0|0|0|0|0|451|447|0|0|0|0|0|0|0|0 > +1|0|0|0|0|449|1405862730|0|0|0|0|0|0|14 > +1|0|0|0|0|449|1405862735|0|0|0|0|0|0|15 > +1|0|0|0|0|448|1405862740|0|0|0|0|0|0|16 > +1|0|0|0|0|449|1405862745|0|0|0|0|0|0|17 > +1|0|0|0|0|449|1405862750|0|0|0|0|0|0|18 > +1|0|0|0|0|449|1405862755|0|0|0|0|0|0|19 > +1|0|0|0|0|449|1405862760|0|0|0|0|0|0|20 > +1|0|0|0|0|450|1405862765|0|0|0|0|0|0|21 > +1|0|0|0|0|449|1405862770|0|0|0|0|0|0|22 > +1|0|0|0|0|450|1405862775|0|0|0|0|0|0|23 > +1|0|0|0|0|450|1405862780|0|0|0|0|0|0|24 > +1|0|0|0|0|450|1405862785|0|0|0|0|0|0|25 > +1|0|0|0|0|450|1405862790|0|0|0|0|0|0|26 > > +9|1405862659|0|0|1405862790|0|0|0|0|0|0|0|0|0|0|0|0|451|447|0|0|0|0|0|0|0|0 > +1|0|0|0|0|453|1405862795|0|0|0|0|0|0|27 > +1|0|0|0|0|451|1405862800|0|0|0|0|0|0|28 > +1|0|0|0|0|452|1405862805|0|0|0|0|0|0|29 > +1|0|0|0|0|453|1405862810|0|0|0|0|0|0|30 > +1|0|0|0|0|452|1405862815|0|0|0|0|0|0|31 > +1|0|0|0|0|452|1405862820|0|0|0|0|0|0|32 > +1|0|0|0|0|452|1405862825|0|0|0|0|0|0|33 > +1|0|0|0|0|454|1405862830|0|0|0|0|0|0|34 > +1|0|0|0|0|455|1405862835|0|0|0|0|0|0|35 > +1|0|0|0|0|457|1405862840|0|0|0|0|0|0|36 > +1|0|0|0|0|458|1405862845|0|0|0|0|0|0|37 > +1|31928364|184598304|0|0|460|1407050195|0|0|0|0|0|0|38 > +1|31927716|184597590|210|4.8|461|1407050200|9|1|46|0|0|0|39 > > +9|1405862659|9|46|1407050200|5.364|5.364|0|0|0|0|0|0|0|0|0|0|461|447|0|0|0|0|0|0|0|0 > +1|31927038|184597068|219|4.928|463|1407050205|14|1|81|7.8|0|0|40 > +1|31926150|184596396|214|5.134|464|1407050210|19|1|108|4.5|0|0|41 > +1|31925472|184595724|213|4.728|465|1407050215|24|1|133|5.4|0|0|42 > +1|31925040|184595184|196|3.395|465|1407050220|29|1|151|4|0|0|43 > +1|31924938|184594986|191|0|464|1407050225|33|1|158|0|0|0|44 > +1|31924956|184595022|191|0|465|1407050230|33|1|158|0|0|0|45 > +1|31924944|184595040|191|0|465|1407050235|33|1|158|0|0|0|46 > +1|31924920|184595058|191|0|465|1407050240|33|1|158|0|0|0|47 > +1|31924866|184595040|191|0|465|1407050245|33|1|158|0|0|0|48 > +1|31924794|184594980|191|0|465|1407050250|33|1|158|0|0|0|49 > +1|31918374|184589958|191|0|465|1407050255|33|1|158|0|0|0|50 > +1|31918386|184589952|191|0|464|1407050260|33|1|158|0|0|0|51 > +1|31918398|184589952|191|0|464|1407050265|33|1|158|0|0|0|52 > > +9|1405862659|33|158|1407050265|4.85|6.146|5|0|6.3|9|0|0|0|0|0|0|466|447|0.4|0|0|0|0|0|82|0 > +1|31918410|184589976|191|0|465|1407050270|33|1|158|0|0|0|53 > +1|31918404|184589964|191|0|465|1407050275|33|1|158|0|0|0|54 > +1|31918386|184589970|191|0|465|1407050280|33|1|158|0|0|0|55 > +1|31918368|184589970|191|0|465|1407050285|33|1|158|0|0|0|56 > +1|31918368|184589982|191|0|465|1407050290|33|1|158|0|0|0|57 > +1|31918392|184589988|191|0|465|1407050295|33|1|158|0|0|0|58 > +1|31918392|184590000|191|0|464|1407050300|33|1|158|0|0|0|59 > +1|31918314|184589994|191|0|464|1407050305|33|1|158|0|0|0|60 > +1|31917924|184589814|235|1.837|465|1407050310|66|1|368|0|0|0|61 > +1|31917498|184589580|243|2.418|466|1407050315|71|1|379|0|0|0|62 > +1|31916682|184589832|295|3.997|465|1407050321|76|1|397|0|0|0|63 > +1|31915656|184590150|295|4.337|466|1407050325|81|1|419|0|0|0|64 > +1|31914558|184590528|298|5.006|465|1407050330|86|1|444|0|0|0|65 > > +9|1405862659|86|444|1407050330|5.18|6.146|5|0|6.3|9|0|0|0|0|0|0|466|447|0.4|0|0|0|0|0|82|0 > +1|31913154|184590942|294|5.947|463|1407050335|91|1|474|-6.2|0|0|66 > +1|31911576|184591416|296|7.032|461|1407050341|96|1|508|-5.7|0|0|67 > +1|31909878|184591896|295|7.104|460|1407050346|100|1|537|-5|0|0|68 > +1|31908486|184592334|298|5.314|458|1407050351|106|1|574|-4|0|0|69 > diff -r a4ac308f26be reference/track/mynav.trc > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/reference/track/mynav.trc Sat Nov 29 23:29:54 2014 +0100 > @@ -0,0 +1,18 @@ > +0|-100|1407050197|1407063420 > +0|\SDMMC\MyNav\MyNav_DMW\TRC\HARTMANN.trc|||| > +1|31927800|184597626|0|5.17|460|1407050197 > +1|31927992|184597488|210|4.239|460|1407050198 > +1|31927716|184597590|210|4.8|461|1407050199 > +1|31927668|184597350|213|4.846|461|1407050200 > +1|31927236|184597080|214|4.347|461|1407050201 > +1|31927494|184597134|214|4.064|461|1407050202 > +1|31927206|184597170|213|4.692|462|1407050203 > +1|31927038|184597068|219|4.928|463|1407050204 > +1|31926822|184596948|227|4.975|463|1407050205 > +1|31926642|184596804|219|4.995|462|1407050206 > +1|31926474|184596666|216|5.103|462|1407050207 > +1|31926312|184596528|214|5.124|462|1407050208 > +1|31926150|184596396|214|5.134|463|1407050209 > +1|31926012|184596264|216|5.124|465|1407050210 > +1|31925880|184596120|215|4.975|464|1407050211 > +1|31925748|184595976|211|4.97|464|1407050212 > diff -r a4ac308f26be reference/track/mynav1.gpx > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/reference/track/mynav1.gpx Sat Nov 29 23:29:54 2014 +0100 > @@ -0,0 +1,75 @@ > +<?xml version="1.0" encoding="UTF-8"?> > +<gpx version="1.1" creator="GPSBabel - http://www.gpsbabel.org" xmlns=" > http://www.topografix.com/GPX/1/1" xmlns:gpxx=" > http://www.garmin.com/xmlschemas/GpxExtensions/v3" xmlns:gpxtpx=" > http://www.garmin.com/xmlschemas/TrackPointExtension/v1"> > + <metadata> > + <time>1970-01-01T00:00:00Z</time> > + <bounds minlat="51.276660000" minlon="8.868263333" > maxlat="51.277118333" maxlon="8.868886667"/> > + </metadata> > + <trk> > + <trkseg> > + <trkpt lat="51.277118333" lon="8.868833333"> > + <ele>460.000000</ele> > + <time>2014-08-03T07:16:37Z</time> > + </trkpt> > + <trkpt lat="51.277080000" lon="8.868886667"> > + <ele>460.000000</ele> > + <time>2014-08-03T07:16:38Z</time> > + </trkpt> > + <trkpt lat="51.277108333" lon="8.868810000"> > + <ele>461.000000</ele> > + <time>2014-08-03T07:16:39Z</time> > + </trkpt> > + <trkpt lat="51.277041667" lon="8.868796667"> > + <ele>461.000000</ele> > + <time>2014-08-03T07:16:40Z</time> > + </trkpt> > + <trkpt lat="51.276966667" lon="8.868676667"> > + <ele>461.000000</ele> > + <time>2014-08-03T07:16:41Z</time> > + </trkpt> > + <trkpt lat="51.276981667" lon="8.868748333"> > + <ele>461.000000</ele> > + <time>2014-08-03T07:16:42Z</time> > + </trkpt> > + <trkpt lat="51.276991667" lon="8.868668333"> > + <ele>462.000000</ele> > + <time>2014-08-03T07:16:43Z</time> > + </trkpt> > + <trkpt lat="51.276963333" lon="8.868621667"> > + <ele>463.000000</ele> > + <time>2014-08-03T07:16:44Z</time> > + </trkpt> > + <trkpt lat="51.276930000" lon="8.868561667"> > + <ele>463.000000</ele> > + <time>2014-08-03T07:16:45Z</time> > + </trkpt> > + <trkpt lat="51.276890000" lon="8.868511667"> > + <ele>462.000000</ele> > + <time>2014-08-03T07:16:46Z</time> > + </trkpt> > + <trkpt lat="51.276851667" lon="8.868465000"> > + <ele>462.000000</ele> > + <time>2014-08-03T07:16:47Z</time> > + </trkpt> > + <trkpt lat="51.276813333" lon="8.868420000"> > + <ele>462.000000</ele> > + <time>2014-08-03T07:16:48Z</time> > + </trkpt> > + <trkpt lat="51.276776667" lon="8.868375000"> > + <ele>463.000000</ele> > + <time>2014-08-03T07:16:49Z</time> > + </trkpt> > + <trkpt lat="51.276740000" lon="8.868336667"> > + <ele>465.000000</ele> > + <time>2014-08-03T07:16:50Z</time> > + </trkpt> > + <trkpt lat="51.276700000" lon="8.868300000"> > + <ele>464.000000</ele> > + <time>2014-08-03T07:16:51Z</time> > + </trkpt> > + <trkpt lat="51.276660000" lon="8.868263333"> > + <ele>464.000000</ele> > + <time>2014-08-03T07:16:52Z</time> > + </trkpt> > + </trkseg> > + </trk> > +</gpx> > diff -r a4ac308f26be reference/track/mynav2.gpx > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/reference/track/mynav2.gpx Sat Nov 29 23:29:54 2014 +0100 > @@ -0,0 +1,135 @@ > +<?xml version="1.0" encoding="UTF-8"?> > +<gpx version="1.1" creator="GPSBabel - http://www.gpsbabel.org" xmlns=" > http://www.topografix.com/GPX/1/1" xmlns:gpxx=" > http://www.garmin.com/xmlschemas/GpxExtensions/v3" xmlns:gpxtpx=" > http://www.garmin.com/xmlschemas/TrackPointExtension/v1"> > + <metadata> > + <time>1970-01-01T00:00:00Z</time> > + <bounds minlat="51.274883333" minlon="8.863468333" > maxlat="51.277108333" maxlon="8.868810000"/> > + </metadata> > + <trk> > + <trkseg> > + <trkpt lat="51.277108333" lon="8.868810000"> > + <ele>461.000000</ele> > + <time>2014-08-03T07:16:40Z</time> > + </trkpt> > + <trkpt lat="51.276963333" lon="8.868621667"> > + <ele>463.000000</ele> > + <time>2014-08-03T07:16:45Z</time> > + </trkpt> > + <trkpt lat="51.276776667" lon="8.868375000"> > + <ele>464.000000</ele> > + <time>2014-08-03T07:16:50Z</time> > + </trkpt> > + <trkpt lat="51.276590000" lon="8.868186667"> > + <ele>465.000000</ele> > + <time>2014-08-03T07:16:55Z</time> > + </trkpt> > + <trkpt lat="51.276440000" lon="8.868066667"> > + <ele>465.000000</ele> > + <time>2014-08-03T07:17:00Z</time> > + </trkpt> > + <trkpt lat="51.276385000" lon="8.868038333"> > + <ele>464.000000</ele> > + <time>2014-08-03T07:17:05Z</time> > + </trkpt> > + <trkpt lat="51.276395000" lon="8.868043333"> > + <ele>465.000000</ele> > + <time>2014-08-03T07:17:10Z</time> > + </trkpt> > + <trkpt lat="51.276400000" lon="8.868040000"> > + <ele>465.000000</ele> > + <time>2014-08-03T07:17:15Z</time> > + </trkpt> > + <trkpt lat="51.276405000" lon="8.868033333"> > + <ele>465.000000</ele> > + <time>2014-08-03T07:17:20Z</time> > + </trkpt> > + <trkpt lat="51.276400000" lon="8.868018333"> > + <ele>465.000000</ele> > + <time>2014-08-03T07:17:25Z</time> > + </trkpt> > + <trkpt lat="51.276383333" lon="8.867998333"> > + <ele>465.000000</ele> > + <time>2014-08-03T07:17:30Z</time> > + </trkpt> > + <trkpt lat="51.274988333" lon="8.866215000"> > + <ele>465.000000</ele> > + <time>2014-08-03T07:17:35Z</time> > + </trkpt> > + <trkpt lat="51.274986667" lon="8.866218333"> > + <ele>464.000000</ele> > + <time>2014-08-03T07:17:40Z</time> > + </trkpt> > + <trkpt lat="51.274986667" lon="8.866221667"> > + <ele>464.000000</ele> > + <time>2014-08-03T07:17:45Z</time> > + </trkpt> > + <trkpt lat="51.274993333" lon="8.866225000"> > + <ele>465.000000</ele> > + <time>2014-08-03T07:17:50Z</time> > + </trkpt> > + <trkpt lat="51.274990000" lon="8.866223333"> > + <ele>465.000000</ele> > + <time>2014-08-03T07:17:55Z</time> > + </trkpt> > + <trkpt lat="51.274991667" lon="8.866218333"> > + <ele>465.000000</ele> > + <time>2014-08-03T07:18:00Z</time> > + </trkpt> > + <trkpt lat="51.274991667" lon="8.866213333"> > + <ele>465.000000</ele> > + <time>2014-08-03T07:18:05Z</time> > + </trkpt> > + <trkpt lat="51.274995000" lon="8.866213333"> > + <ele>465.000000</ele> > + <time>2014-08-03T07:18:10Z</time> > + </trkpt> > + <trkpt lat="51.274996667" lon="8.866220000"> > + <ele>465.000000</ele> > + <time>2014-08-03T07:18:15Z</time> > + </trkpt> > + <trkpt lat="51.275000000" lon="8.866220000"> > + <ele>464.000000</ele> > + <time>2014-08-03T07:18:20Z</time> > + </trkpt> > + <trkpt lat="51.274998333" lon="8.866198333"> > + <ele>464.000000</ele> > + <time>2014-08-03T07:18:25Z</time> > + </trkpt> > + <trkpt lat="51.274948333" lon="8.866090000"> > + <ele>465.000000</ele> > + <time>2014-08-03T07:18:30Z</time> > + </trkpt> > + <trkpt lat="51.274883333" lon="8.865971667"> > + <ele>466.000000</ele> > + <time>2014-08-03T07:18:35Z</time> > + </trkpt> > + <trkpt lat="51.274953333" lon="8.865745000"> > + <ele>465.000000</ele> > + <time>2014-08-03T07:18:41Z</time> > + </trkpt> > + <trkpt lat="51.275041667" lon="8.865460000"> > + <ele>466.000000</ele> > + <time>2014-08-03T07:18:45Z</time> > + </trkpt> > + <trkpt lat="51.275146667" lon="8.865155000"> > + <ele>465.000000</ele> > + <time>2014-08-03T07:18:50Z</time> > + </trkpt> > + <trkpt lat="51.275261667" lon="8.864765000"> > + <ele>463.000000</ele> > + <time>2014-08-03T07:18:55Z</time> > + </trkpt> > + <trkpt lat="51.275393333" lon="8.864326667"> > + <ele>461.000000</ele> > + <time>2014-08-03T07:19:01Z</time> > + </trkpt> > + <trkpt lat="51.275526667" lon="8.863855000"> > + <ele>460.000000</ele> > + <time>2014-08-03T07:19:06Z</time> > + </trkpt> > + <trkpt lat="51.275648333" lon="8.863468333"> > + <ele>458.000000</ele> > + <time>2014-08-03T07:19:11Z</time> > + </trkpt> > + </trkseg> > + </trk> > +</gpx> > diff -r a4ac308f26be testo.d/mynav.test > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/testo.d/mynav.test Sat Nov 29 23:29:54 2014 +0100 > @@ -0,0 +1,8 @@ > +# > +# Basic mynav tests (readonly) > +# > +rm -f ${TMPDIR}/mynav* > +gpsbabel -i mynav -f ${REFERENCE}/track/mynav.trc -o gpx,garminextensions > -F ${TMPDIR}/mynav1.gpx > +compare ${REFERENCE}/track/mynav1.gpx ${TMPDIR}/mynav1.gpx > +gpsbabel -i mynav -f ${REFERENCE}/track/mynav.ftn -o gpx,garminextensions > -F ${TMPDIR}/mynav2.gpx > +compare ${REFERENCE}/track/mynav2.gpx ${TMPDIR}/mynav2.gpx > diff -r a4ac308f26be vecs.cc > --- a/vecs.cc Sat Nov 29 16:22:14 2014 +0100 > +++ b/vecs.cc Sat Nov 29 23:29:54 2014 +0100 > @@ -87,6 +87,7 @@ > extern ff_vecs_t mtk_m241_vecs; > extern ff_vecs_t mtk_m241_fvecs; > extern ff_vecs_t mtk_locus_vecs; > +extern ff_vecs_t mynav_vecs; > extern ff_vecs_t navicache_vecs; > extern ff_vecs_t netstumbler_vecs; > extern ff_vecs_t nmea_vecs; > @@ -1084,6 +1085,13 @@ > "cpo", > NULL, > }, > + { > + &mynav_vecs, > + "mynav", > + "MyNav TRC format", > + "trc", > + NULL, > + }, > #endif // MAXIMAL_ENABLED > { > NULL, > diff -r a4ac308f26be xmldoc/formats/mynav.xml > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/xmldoc/formats/mynav.xml Sat Nov 29 23:29:54 2014 +0100 > @@ -0,0 +1,14 @@ > +<para> > + Input support for the <productname>MyNav TRC and FTN file > + formats</productname>. > +</para> > +<para> > + For information on the data format see <ulink > + url="http://www.mynav.it/hwdoc/dev/TRC_Format_Spec.pdf">track format > + specification</ulink>. > +</para> > +<para> > + <userinput> > + gpsbabel -i mynav -f infile.trc -o gpx,garminextensions -F outfile.gpx > + </userinput> > +</para> > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > _______________________________________________ > Gpsbabel-code mailing list http://www.gpsbabel.org > Gps...@li... > https://lists.sourceforge.net/lists/listinfo/gpsbabel-code > |