|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
patch: add read waypoint support to v900 formatHi,
Attached is a patch which adds waypoint read support for v900 cvs format. If the waypoint is a voice recorded waypoint, the name of the waypoint will be the name of the file. In addition, a url link will be added to the waypoint, to make it easy to open the wav files from within josm (openstreetmap's editor) Tal [gpsbabel-v900_wpt.diff] Index: v900.c =================================================================== RCS file: /cvsroot/gpsbabel/gpsbabel/v900.c,v retrieving revision 1.3 diff -U5 -r1.3 v900.c --- v900.c 27 Jun 2009 04:52:08 -0000 1.3 +++ v900.c 25 Jul 2009 01:57:17 -0000 @@ -19,11 +19,10 @@ 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 TODO: - - support way points - QUESTION: course = heading ?? - HEIGHT: Altitude in meters (not corrected to WGS84...) ?? */ /****************************************************************************** @@ -34,12 +33,12 @@ All lines end with \r\n First line is a header line. It contains no nulls. Following lines are record lines. They are comma separated, but fields always have the exact same length (per field), and therfore, the commas are always at the exact same position on the line. Fields are padded with nulls, in case -they hace shorter value then the fixed field length. -Two modes availe: basic and advanced. +they have shorter value then the fixed field length. +Two modes are available: basic and advanced. The following two examples show "*" where null appears. ------basic mode - start------------------------- INDEX,TAG,DATE,TIME,LATITUDE N/S,LONGITUDE E/W,HEIGHT,SPEED,HEADING,VOX @@ -62,10 +61,12 @@ 7*****,T,090204,055730,31.768376N,035.209661E,150**,0***,0**,3D,SPS ,2.5**,2.3**,0.9**,********* 8*****,T,090204,055731,31.768376N,035.209661E,150**,0***,0**,3D,SPS ,2.5**,2.3**,0.9**,********* 9*****,T,090204,055737,31.768326N,035.209993E,150**,0***,0**,3D,SPS ,2.5**,2.3**,0.9**,********* 10****,T,090204,055738,31.768339N,035.209976E,153**,0***,0**,3D,SPS ,2.5**,2.3**,0.9**,********* 11****,T,090204,055739,31.768338N,035.209991E,155**,0***,0**,3D,SPS ,2.5**,2.3**,0.9**,********* +42****,C,090724,162320,31.763841N,035.205461E,788**,9***,344,3D,SPS ,1.2**,0.9**,0.8**,********* +121***,V,090724,162502,31.769619N,035.208964E,786**,16**,306,3D,SPS ,1.1**,0.8**,0.8**,VOX00003* ------advanced mode - end--------------------------- for a little more info, see structures: one_line_advanced_mode, one_line_basic_mode, one_line_common_start. ******************************************************************************/ @@ -345,14 +346,28 @@ else /* possible values: fix_unknown,fix_none,fix_2d,fix_3d,fix_dgps,fix_pps */ wpt->fix = fix_unknown; } - if(line.bas.common.tag == 'T') - track_add_wpt(track, wpt); - else - waypt_add(wpt); + track_add_wpt(track, wpt); + if(line.bas.common.tag != 'T') + { + assert(line.bas.common.tag == 'C' || line.bas.common.tag == 'V'); + waypoint *wpt2 = waypt_dupe(wpt); + if(line.bas.common.tag == 'V') // waypoint with voice recording? + { + char vox_file_name[sizeof(line.adv.vox)+5]; + const char *vox = is_advanced_mode ? line.adv.vox : line.bas.vox; + assert(vox[0] != '\0'); + strcpy(vox_file_name,vox); + strcat(vox_file_name,".WAV"); + wpt2->shortname = xstrdup(vox_file_name); + wpt2->description = xstrdup(vox_file_name); + waypt_add_url(wpt2, xstrdup(vox_file_name), xstrdup(vox_file_name)); + } + waypt_add(wpt2); + } } } ff_vecs_t v900_vecs = { ff_type_file, Index: xmldoc/formats/v900.xml =================================================================== RCS file: /cvsroot/gpsbabel/gpsbabel/xmldoc/formats/v900.xml,v retrieving revision 1.3 diff -U5 -r1.3 v900.xml --- xmldoc/formats/v900.xml 19 Jul 2009 01:18:10 -0000 1.3 +++ xmldoc/formats/v900.xml 25 Jul 2009 01:57:21 -0000 @@ -4,13 +4,23 @@ <para> <ulink url="http://www.visiontac.com/v900_specs.htm">Visiontac VGPS-900</ulink> </para> -<example id="v900"> +<example id="v900_e1"> <title>Conversion of a v900 csv log file to a gpx format</title> <para><userinput>gpsbabel -i v900 -f 09040400.csv -o gpx -F outfile.gpx</userinput></para> </example> <para> -The device support logging of trackpoints, waypoints, and voice recordings (.wav files). Currently only track points are supported. +The device support logging of trackpoints, waypoints, and voice recordings (.wav files). </para> + +<para>If you create voice recording waypoints, a link (url) to the corresponding wav file is added to the waypoint. +If you happen to use this for OpenStreetMap.org project, you can easily click on a waypoint and open the wav file from within JOSM. For this you must use gpx version 1.1 as the output file. The next example shows exactly how to do that. +</para> + +<example id="v900_e2"> + <title>Conversion of a v900 csv log file to a gpx 1.1 format</title> + <para><userinput>gpsbabel -i v900 -f 09040400.csv -o gpx,gpxver=1.1 -F outfile.gpx</userinput></para> +</example> + ------------------------------------------------------------------------------ _______________________________________________ Gpsbabel-code mailing list http://www.gpsbabel.org Gpsbabel-code@... https://lists.sourceforge.net/lists/listinfo/gpsbabel-code |
|
|
Re: patch: add read waypoint support to v900 formatOn Fri, Jul 24, 2009 at 9:27 PM, Tal <tal.bav@...> wrote:
Thanx. Applied with minor doc tweaks. ------------------------------------------------------------------------------ _______________________________________________ Gpsbabel-code mailing list http://www.gpsbabel.org Gpsbabel-code@... https://lists.sourceforge.net/lists/listinfo/gpsbabel-code |
|
|
Re: patch: add read waypoint support to v900 formatThanks!
On Sat, Jul 25, 2009 at 9:41 PM, Robert Lipe <robertlipe@...> wrote:
------------------------------------------------------------------------------ _______________________________________________ Gpsbabel-code mailing list http://www.gpsbabel.org Gpsbabel-code@... https://lists.sourceforge.net/lists/listinfo/gpsbabel-code |
| Free embeddable forum powered by Nabble | Forum Help |