[GRASS-user] gpsbabel and garmin_txt, v.in.garmin, v.in.gpsbabel - with garmin etrex

Hello,
anyone has expierences with gpsbabel?

I try to import data from a garmin etrex gps

I use this command:

gpsbabel -t D9 -i garmin -f /dev/ttyUSB0 -o garmin_txt,grid=ddd,prec=6 -F trackpoints.dat

cause I read in http://www.gpsbabel.org/htmldoc-development/fmt_garmin_txt.html
that one can specify a grid-parameter:

#########################################################################
grid option

Write position using this grid..

This value specifies the grid to be used on write.

Table 3.1. Grid values for garmin_txt
# idx short file-header sample
0 ddd Lat/Lon hddd.ddddd S26.25333 E27.92333
1 dmm Lat/Lon hddd°mm.mm N33 56.539 W118 24.471
########################################################################

unfortunately it doesnt work.

the gpsbabel --help tells me
########################################################################
  garmin_txt Garmin MapSource - txt (tab delimited)
           date Read/Write date format (i.e. yyyy/mm/dd)
           datum GPS datum (def. WGS 84)
           dist Distance unit [m=metric, s=statute]
           prec Precision of coordinates
           temp Temperature unit [c=Celsius,
########################################################################
NO GRID-PARAMETER!!! :o(

so whatever grid-parameter I set i get a file-header like

Grid Lat/Lon hddd mm.mmm'
Datum WGS 84

I need the grid #idx=1 (ddd) to sort and filter the points before I import them to GRASS. I tried different settings but I got everytime the dmm-format.

Finally I want to project the data in Gauss-Krueger-Projection (Transversal-Mercator).

I know that GRASS contains v.in.gpsbabel and v.in.garmin. Its very nice that I get the data immediatley in Gauss-Krueger-coordinates. But using this tools it doesn't work to import altitude-data and other informations as well.

Is there a posibility to get Gauss-Krueger-Data just by using gpsbabel?

Between the ++++ I pasted the outputs of different attempts of v.in.garmin and v.in.gpsbael. Jump to the END if you want to save time!!! :wink:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

v.in.garmin port=/dev/ttyUSB0 -t -p out=vingarmin_gpstrans_tracks
GPStrans (ASCII) - Version 0.39
Copyright (c) 1995 by Carsten Tschach (tschach@zedat.fu-berlin.de)
Linux/KKJ mods by Janne Sinkkonen <janne@iki.fi> (1996)
Copyright (c) 2000 German Grid by Andreas Lange <andreas.lange@rhein-main.de>
Copyright (c) 1998,2000 Mayko-mXmap mods by Matthias Kattanek <mattes@ugraf.com>
Copyright (c) 2001 Development by Joao Seabra-CT2GNL <seabra@ci.AAC.uc.pt>
Receiving Tracks...
ERROR: Only DDD coordinates currently supported. [DMS]

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

v.in.garmin port=/dev/ttyUSB0 -t -p -u out=vingarmin_gardump_tracks
Receiving Tracks...

gardump: unknown track packet type: 0
Attempting waypoint projection transform with cs2cs...
Importing Track as points...
...
Building topology for vector map <vingarmin_gardump_tracks>...
6792 primitives registered
Building areas: 100%

---> with v.out.ascii I get this format:
4416848.824221|5359764.2067414|25 #id=25

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

v.in.garmin port=/dev/ttyUSB0 -t -p -u -z out=vingarmin_gardump_tracks_z
Receiving Tracks...
...
gardump: unknown track packet type: 0
--> WARNING: No altitude data found, creating 2D vector map <--
Attempting waypoint projection transform with cs2cs...
and so on...

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

v.in.gpsbabel in=/dev/ttyUSB0 -t -p output=vingpsbabel_tracks
Loading Tracks as points from </dev/ttyUSB0>...
Attempting waypoint projection transform with cs2cs
...
Building topology for vector map <vingpsbabel_tracks>...
6792 primitives registered
Building areas: 100%
---> with v.out.ascii I get this format:
4416846.9562442|5359757.9513647|26 #id=26

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
v.in.gpsbabel in=/dev/ttyUSB0 -t -p output=vingpsbabel_tracks_ddd for=garmin_txt,grid=ddd
Loading Tracks as points from </dev/ttyUSB0>...
'grid=ddd' is an unknown option to garmin_txt.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

v.in.gpsbabel in=/dev/ttyUSB0 -t -p output=vingpsbabel_tracks_ddd for=garmin_txt
Loading Tracks as points from </dev/ttyUSB0>...
Quit

Does not do anything...

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

END

The solution I get for me is to connect the output of v.out.ascii and also the output of gpsbabel (both have 6792 points) paste them together, use awk and so on and import it enentually with v.in.ascii -z

But this cannot be the final solution... can it???

Cheers

Philipp

PS:

Versions:
GPSBabel Version: 1.3.2
eTrex.VistaCx.Software.Version.2.50.
Unit: eTrex VistaCx Software Version 2.50
ID: 421
Version: 2.50Rx
GRASS 6.3 svn
debian etch

PS:I post this mail also to the gpsbabel-misc-list

The gpsbabelproblem is solved. I attach the correspondence. Neverthelesss I still hope for answers of the GRASS-related questions.

Robert Lipe schrieb:

On Thu, Feb 21, 2008 at 10:11 AM, Philipp Steigenberger <userlist@online.de <mailto:userlist@online.de>> wrote:

    cause I read in
    http://www.gpsbabel.org/htmldoc-development/fmt_garmin_txt.html
    that one can specify a grid-parameter:

Note that big green box that says " This is the README file from the GPSBabel distribution. It may or may not match what is installed on your system. For the best match, be sure to use the documentation for specific version of GPSBabel that you are using."

    GPSBabel Version: 1.3.2

Grid was added after 1.3.2.

> Philipp Steigenberger schrieb:
> Im sorry,
> i'm not a native speaker, so sometimes I try to read only the
> "important" things .... (but they weren't important enough)
>
> well thanx for the hint.
>
> This minutes I already tried to install the newest version using the
> .rpm and alien -i
> but when I type gpsbabel [--help] I only get the mesage
>
> >> Floating point exception <<
>
> Do I have to install something else?
>
> best regards
> Philipp

Robert Lipe schrieb:

    This minutes I already tried to install the newest version using the
    .rpm and alien -i
    but when I type gpsbabel [--help] I only get the mesage

     >> Floating point exception <<

    Do I have to install something else?

The binary distribution is for Fedora. Users of Suse or Debian-based distributions like Ubuntu would be best served by |rpmbuild --rebuild whatever.rpm' | on the source rpm.

Or forgo the rpm completely and build from source.

Philipp Steigenberger schrieb:

> I installed it by using the tar.gz and make, make install.
> Fisrt I got some problems, but after a restart of the bash it works very
> well.
> Thank you
> om shantih
> Philipp
>

[...]
Finally I want to project the data in Gauss-Krueger-Projection (Transversal-Mercator).

I know that GRASS contains v.in.gpsbabel and v.in.garmin. Its very nice that I get the data immediatley in Gauss-Krueger-coordinates. But using this tools it doesn't work to import altitude-data and other informations as well.

Is there a posibility to get Gauss-Krueger-Data just by using gpsbabel?

Between the ++++ I pasted the outputs of different attempts of v.in.garmin and v.in.gpsbael. Jump to the END if you want to save time!!! :wink:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

v.in.garmin port=/dev/ttyUSB0 -t -p out=vingarmin_gpstrans_tracks
GPStrans (ASCII) - Version 0.39
Copyright (c) 1995 by Carsten Tschach (tschach@zedat.fu-berlin.de)
Linux/KKJ mods by Janne Sinkkonen <janne@iki.fi> (1996)
Copyright (c) 2000 German Grid by Andreas Lange <andreas.lange@rhein-main.de>
Copyright (c) 1998,2000 Mayko-mXmap mods by Matthias Kattanek <mattes@ugraf.com>
Copyright (c) 2001 Development by Joao Seabra-CT2GNL <seabra@ci.AAC.uc.pt>
Receiving Tracks...
ERROR: Only DDD coordinates currently supported. [DMS]

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

v.in.garmin port=/dev/ttyUSB0 -t -p -u out=vingarmin_gardump_tracks
Receiving Tracks...

gardump: unknown track packet type: 0
Attempting waypoint projection transform with cs2cs...
Importing Track as points...
...
Building topology for vector map <vingarmin_gardump_tracks>...
6792 primitives registered
Building areas: 100%

---> with v.out.ascii I get this format:
4416848.824221|5359764.2067414|25 #id=25

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

v.in.garmin port=/dev/ttyUSB0 -t -p -u -z out=vingarmin_gardump_tracks_z
Receiving Tracks...
...
gardump: unknown track packet type: 0
--> WARNING: No altitude data found, creating 2D vector map <--
Attempting waypoint projection transform with cs2cs...
and so on...

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

v.in.gpsbabel in=/dev/ttyUSB0 -t -p output=vingpsbabel_tracks
Loading Tracks as points from </dev/ttyUSB0>...
Attempting waypoint projection transform with cs2cs
...
Building topology for vector map <vingpsbabel_tracks>...
6792 primitives registered
Building areas: 100%
---> with v.out.ascii I get this format:
4416846.9562442|5359757.9513647|26 #id=26

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
v.in.gpsbabel in=/dev/ttyUSB0 -t -p output=vingpsbabel_tracks_ddd for=garmin_txt,grid=ddd
Loading Tracks as points from </dev/ttyUSB0>...
'grid=ddd' is an unknown option to garmin_txt.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

v.in.gpsbabel in=/dev/ttyUSB0 -t -p output=vingpsbabel_tracks_ddd for=garmin_txt
Loading Tracks as points from </dev/ttyUSB0>...
Quit

Does not do anything...

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

END

The solution I get for me is to connect the output of v.out.ascii and also the output of gpsbabel (both have 6792 points) paste them together, use awk and so on and import it enentually with v.in.ascii -z

But this cannot be the final solution... can it???

Philipp Steigenberger wrote:

> v.in.garmin port=/dev/ttyUSB0 -t -p out=vingarmin_gpstrans_tracks
> GPStrans (ASCII) - Version 0.39
> Copyright (c) 1995 by Carsten Tschach (tschach@zedat.fu-berlin.de)
> Linux/KKJ mods by Janne Sinkkonen <janne@iki.fi> (1996)
> Copyright (c) 2000 German Grid by Andreas Lange
> <andreas.lange@rhein-main.de>
> Copyright (c) 1998,2000 Mayko-mXmap mods by Matthias Kattanek
> <mattes@ugraf.com>
> Copyright (c) 2001 Development by Joao Seabra-CT2GNL
<seabra@ci.AAC.uc.pt>
> Receiving Tracks...
> ERROR: Only DDD coordinates currently supported. [DMS]

see the v.in.garmin help page about running 'gpstrans -s' first to set
output as DDD.

I have found that gpstrans can sometimes be buggy (tracks offset by 1
relative to timestamp), so you may prefer another solution if you need
exact timestamps.

> v.in.garmin port=/dev/ttyUSB0 -t -p -u
out=vingarmin_gardump_tracks
> Receiving Tracks...

...

> ---> with v.out.ascii I get this format:
> 4416848.824221|5359764.2067414|25 #id=25

The last attribute is not being split into two columns for some reason.
What model Garmin and what version of gardump do you use?
can you send a few line sample of the result of running gardump from
the command line to the list as an attachment?
do you have an idea what the #id= means?

I am rather too busy right now to spend much time on this, or even to
monitor the mailing list closely, but I hope someone else might be able
to have a look and see the problem. If not, please file a bug report
with as much information and sample data as you can and I'll eventually
get to it. Or jump into the shell script yourself- it's a pile of sed
and awk processing.

Hamish

      ____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs

Hamish,
thanks for helping!

Im very sorry that I confused you.
The #ID 25 is just a comment to tell you that the third column contains the ID.

I tried a little more to get my data from GPS. No that I installed the newest version of gpsbabel it also works that I get the aptitude-values using v.in.gps.babel. My goal is to generate a DTM from this data, so I'm happy now. - And - as you - I am also to busy to spend more time on this.

sincerly
Philipp

Hamish schrieb:

Philipp Steigenberger wrote:

v.in.garmin port=/dev/ttyUSB0 -t -p out=vingarmin_gpstrans_tracks
GPStrans (ASCII) - Version 0.39
Copyright (c) 1995 by Carsten Tschach (tschach@zedat.fu-berlin.de)
Linux/KKJ mods by Janne Sinkkonen <janne@iki.fi> (1996)
Copyright (c) 2000 German Grid by Andreas Lange <andreas.lange@rhein-main.de>
Copyright (c) 1998,2000 Mayko-mXmap mods by Matthias Kattanek <mattes@ugraf.com>
Copyright (c) 2001 Development by Joao Seabra-CT2GNL

<seabra@ci.AAC.uc.pt>

Receiving Tracks...
ERROR: Only DDD coordinates currently supported. [DMS]

see the v.in.garmin help page about running 'gpstrans -s' first to set
output as DDD.

I have found that gpstrans can sometimes be buggy (tracks offset by 1
relative to timestamp), so you may prefer another solution if you need
exact timestamps.

v.in.garmin port=/dev/ttyUSB0 -t -p -u

out=vingarmin_gardump_tracks

Receiving Tracks...

...

---> with v.out.ascii I get this format:
4416848.824221|5359764.2067414|25 #id=25

The last attribute is not being split into two columns for some reason.
What model Garmin and what version of gardump do you use?
can you send a few line sample of the result of running gardump from
the command line to the list as an attachment?
do you have an idea what the #id= means?

I am rather too busy right now to spend much time on this, or even to
monitor the mailing list closely, but I hope someone else might be able
to have a look and see the problem. If not, please file a bug report
with as much information and sample data as you can and I'll eventually
get to it. Or jump into the shell script yourself- it's a pile of sed
and awk processing.

Hamish

      ____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs

Philipp Steigenberger wrote:

I tried a little more to get my data from GPS. No that I installed
the newest version of gpsbabel it also works that I get the
aptitude-values using v.in.gps.babel. My goal is to generate a
DTM from this data, so I'm happy now.

note GPS positions will be about an order of magnitude less accurate in
the vertical than in the horizontal, don't be surprised if a standard
handheld GPS differs in the vertical by +-20m. also note that the
elevation given is height above the WGS84 geoid, not above sea level.

Hamish

      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ