navit-project.org
http://forum.navit-project.org/

cannot read gps
http://forum.navit-project.org/viewtopic.php?f=11&t=526
Page 1 of 1

Author:  malcolm [ 06 Sep 2014, 08:36 ]
Post subject:  cannot read gps

I am running: navit-code-5870-trunk
I get the following messages when running navit.
Code:
vehicle_file:vehicle_file_io:Overflow. Most likely wrong baud rate or no nmea protocol
vehicle_file:vehicle_file_parse:no leading $ in '.2861,E,8,10,2.0,69.4,M,3.7,M,,*51

the vehicle definition in navit.xml is:
Code:
<vehicle name="My" enabled="yes" source="file:/dev/ttyUSB0" active="1" baudrate="4800">

The gps unit is a garmin etrex whose baud rate is 4800 and claims nmea protocol.
I can successfully see the output from the gps unit using:
Code:
cat /dev/ttySB0

Author:  xenos1984 [ 06 Sep 2014, 16:24 ]
Post subject:  Re: cannot read gps

Can you connect to your GPS with gpsd and display the decoded data with xgps? If gpsd works, you can try to connect Navit to gpsd instead.

I also used a Garmin eTrex via USB, but not via NMEA format - instead I used the native Garmin live GPS mode and converted the data using gpsbabel.

Author:  malcolm [ 07 Sep 2014, 01:07 ]
Post subject:  Re: cannot read gps

Thanks for reply.
I can display the garmin data OK with xgps from gpsd.
I tried gpsd ://localhost source as per the navit.xml file
but get:
Code:
navit:vehicle_new:invalid source 'gpsd://localhost': unknown type 'gpsd'


Actually my main problem is that I cannot see my vehicle; I'm trying to clear up what I don't understand first.
Two more of these are:
Code:
navit:convert_to_attrs:failed to create attribute 'distance_metric' with value '25'
repeated ...
and
Code:
navit:tracking_update:failed to get position data 1 1 1 0

Author:  xenos1984 [ 07 Sep 2014, 05:11 ]
Post subject:  Re: cannot read gps

This is indeed strange. Did you compile Navit from source? If so, did you include the gpsd module (it should be listed as enabled in the configure stage). It is enabled by default, but requires gpsd-dev libraries and is disabled if they are missing.

Author:  Killerhippy [ 18 Mar 2016, 23:58 ]
Post subject:  Re: cannot read gps

Sorry for Malcom, you have errors I have not seen before, I can't help.

I was also unable to use GPS at my linux box.
I have an USB-Device from [url]http://www.ehajo.de/bausätze/bedrahtete-bausätze/gps-shield.html[/url] which uses an FTDI-Bridge and works well e.g. with gpsmon when passing the device:

Code:
/dev/ttyUSB0 9600 8N1         NMEA0183>
┌──────────────────────────────────────────────────────────────────────────────┐
│Time: 2016-03-18T23:39:36.000Z Lat:  52 15' 53.645" N Lon:  10 30' 13.753" E  │
└───────────────────────────────── Cooked TPV ─────────────────────────────────┘
┌──────────────────────────────────────────────────────────────────────────────┐
│ GPRMC GPVTG GPGGA GPGSA GPGSV GPGLL                                          │
└───────────────────────────────── Sentences ──────────────────────────────────┘
┌──────────────────┐┌────────────────────────────┐┌────────────────────────────┐
│Ch PRN  Az El S/N ││Time:      233936.00        ││Time:      233936.00        │
│ 0   4 173 11   0 ││Latitude:    5215.89409 N   ││Latitude:  5215.89409       │
│ 1   7 304 13  31 ││Longitude:  01030.22922 E   ││Longitude: 01030.22922      │
│ 2   8 295 42  21 ││Speed:     0.335            ││Altitude:  75.9             │
│ 3  10 147 53  14 ││Course:                     ││Quality:   1   Sats: 10     │
│ 4  11 266  3   0 ││Status:    A       FAA: A   ││HDOP:      0.99             │
│ 5  13  16  6  21 ││MagVar:                     ││Geoid:     45.6             │
│ 6  15  51 15   0 │└─────────── RMC ────────────┘└─────────── GGA ────────────┘
│ 7  16 199 45  24 │┌────────────────────────────┐┌────────────────────────────┐
│ 8  18  82 51  14 ││Mode: A3 ...s: 7 8 10 13 16 ││UTC:           RMS:         │
│ 9  20  39  5  20 ││DOP: H=0.99  V=1.29  P=1.62 ││MAJ:           MIN:         │
│10  21  72 36  10 ││TOFF:  0.114279000          ││ORI:           LAT:         │
│11  26 181 20  19 ││PPS:                        ││LON:           ALT:         │
└────── GSV ───────┘└──────── GSA + PPS ─────────┘└─────────── GST ────────────┘
(66) $GPGSV,4,2,14,11,03,266,,13,06,016,21,15,15,051,,16,45,199,24*7E


Though it did not work without passing it. I didn't wonder too much about it, because I knew it worked.

Long story short: I configured gpsd wrongly. I put ttyUSB0 in it instead of /dev/ttyUSB0.
After correction, all is fine.

Author:  Karel A. J. ADAMS [ 27 Apr 2019, 09:35 ]
Post subject:  Re: cannot read gps

I am running into similar issues:
* running on Raspberry PI, raspbian 9 (stretch)
* gpsd deliberately not installed
* navit -v
navit 0.5.0+git:0000-

* usb gps receiver works fine, grep GPRMC <dev/ttyACM0 gives neat NMEA records
* <vehicle name="Local GPS" profilename="car" follow="1" enabled="yes" active="1" source="file:/dev/ttyACM0" baudrate="4800" >
* (tried leaving out the baudrate, doesn't make a difference)
* navit -d4 2>&1 | grep ACM
debug:navit:attr_new_from_text:enter name='source' value='file:/dev/ttyACM0'
debug:navit:vehicle_new:source='file:/dev/ttyACM0' type='file'

* cat debug_20190427-0.txt
type=track_tracked

[[edited to add an update:]] this seems related to the particular GPS receiver. I replaced it with an older one, that installs as /dev/ttyUSB0, and all was fine. Still it is strange that the new receiver does work as expected for grep and so on but not within navit.

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/