gpsd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple TPV lines per sec?


From: Tor Rune Skoglund
Subject: Re: Multiple TPV lines per sec?
Date: Wed, 9 Jun 2021 12:35:55 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2

Thank Gary,

Den 08.06.2021 20:07, skrev Gary E. Miller:
On Tue, 8 Jun 2021 19:47:51 +0200
Tor Rune Skoglund <trs@fourc.eu> wrote:

This is because of your receiver firmware changing its output due to
changing conditions.  Nothing can be done about it.  All GNSS
receivers do it.
OK. I am just wondering why restarting gpsd, even in read only mode,
changes that output and what that condition then might be...?
gpsd did not change anything, your receiver changed something.

The receiver sends stuff to gpsd, and gpsd forwards it.  What your
receiver sends, and when, can vary like the weather.  Garbage in,
garbage out (GIGO).

The way to see this is to capture your receivers's raw output this way:
gpspipe -|R > raw.log

Then look at it and you can start to guess why gpsd forwaards what it
does, when it does.

By using your hint about raw output we think we figured out what is happening.

- The GNSS device emits both GPRMC and GNGNS messages. As long as we delay the startup of gpsd, gpds will only use GPRMC to report positions.

- When the vehicle enters the tunnel, GPRMC goes empty, and then gpsd starts emitting TPV messages based on GNGNS.

- When the vehicle leaves the tunnel, GPRMC comes back and gpsd starts reporting TPV based on them, in addition to GNGNS. So then we have two TPVs per sec.

I am not sure if this is a bug, a feature, or "just the way things are", but at least we now believe we know the cause. :)

$ sudo /etc/init.d/gpsd restart
 * Stopping gpsd ... [ ok ]
 * Starting gpsd ...
$ gpspipe -wR | grep "TPV\|GPRMC\|GNS"
...
$GNGNS,100353.0,6326.657403,N,01052.572860,E,AN,09,0.9,10.1,40.0,,*5D
$GPRMC,100353.0,A,6326.657403,N,01052.572860,E,45.8,251.0,090621,0.0,E,A*38
{"class":"TPV","device":"/dev/gpsUSB.1.6","mode":3,"time":"2021-06-09T10:03:53.000Z","ept":0.005,"lat":63.444290050,"lon":10.876214333,"altHAE":50.100,"altMSL":10.100,"alt":10.100,"epx":8.343,"epy":16.521,"epv":20.700,"track":251.0000,"magtrack":251.0000,"magvar":3.9,"speed":23.562,"climb":0.800,"epd":68.7520,"eps":33.04,"epc":41.40,"geoidSep":40.000,"eph":17.100,"sep":24.700}
$GNGNS,100354.0,6326.652300,N,01052.546356,E,AN,09,0.9,9.8,40.0,,*63
$GPRMC,100354.0,A,6326.652300,N,01052.546356,E,46.1,248.5,090621,0.0,E,A*30
{"class":"TPV","device":"/dev/gpsUSB.1.6","mode":3,"time":"2021-06-09T10:03:54.000Z","ept":0.005,"lat":63.444205000,"lon":10.875772600,"altHAE":49.800,"altMSL":9.800,"alt":9.800,"epx":8.343,"epy":16.521,"epv":20.700,"track":248.5000,"magtrack":248.5000,"magvar":3.9,"speed":23.716,"climb":-0.300,"epd":69.0949,"eps":33.04,"epc":41.40,"geoidSep":40.000,"eph":17.100,"sep":24.700}
...

Entering tunnel:

$GNGNS,100356.0,6326.642443,N,01052.495137,E,AN,09,0.9,10.0,40.0,,*5A
$GPRMC,100356.0,A,6326.642443,N,01052.495137,E,45.4,247.5,090621,0.0,E,A*30
{"class":"TPV","device":"/dev/gpsUSB.1.6","mode":3,"time":"2021-06-09T10:03:56.000Z","ept":0.005,"lat":63.444040717,"lon":10.874918950,"altHAE":50.000,"altMSL":10.000,"alt":10.000,"epx":8.343,"epy":16.521,"epv":20.700,"track":247.5000,"magtrack":247.5000,"magvar":3.9,"speed":23.356,"climb":0.000,"epd":71.0178,"eps":33.04,"epc":41.40,"geoidSep":40.000,"eph":17.100,"sep":24.700}
$GNGNS,100357.0,,,,,NN,,,,,,*4D
$GPRMC,,V,,,,,,,,,,N*53
$GNGNS,100358.0,,,,,NN,,,,,,*42
{"class":"TPV","device":"/dev/gpsUSB.1.6","mode":1,"time":"2021-06-09T10:03:58.000Z","ept":0.005}
$GPRMC,,V,,,,,,,,,,N*53
$GNGNS,100359.0,,,,,NN,,,,,,*43
{"class":"TPV","device":"/dev/gpsUSB.1.6","mode":1,"time":"2021-06-09T10:03:59.000Z","ept":0.005}

Leaving tunnel:

GPRMC,,V,,,,,,,,,,N*53
$GNGNS,100643.0,,,,,NN,,,,,,*4D
{"class":"TPV","device":"/dev/gpsUSB.1.6","mode":1,"time":"2021-06-09T10:06:43.000Z","ept":0.005}
$GPRMC,,V,,,,,,,,,,N*53
$GNGNS,100644.0,6324.983113,N,01049.595707,E,AA,10,0.9,22.6,40.0,,*52
{"class":"TPV","device":"/dev/gpsUSB.1.6","mode":3,"time":"2021-06-09T10:06:44.000Z","ept":0.005,"lat":63.416385217,"lon":10.826595117,"altHAE":62.600,"altMSL":22.600,"alt":22.600,"epv":20.700,"magvar":3.9,"geoidSep":40.000,"eph":17.100,"sep":24.700}
$GPRMC,100644.0,A,6324.983113,N,01049.595707,E,46.0,210.5,090621,0.0,E,A*3D
{"class":"TPV","device":"/dev/gpsUSB.1.6","mode":3,"time":"2021-06-09T10:06:44.000Z","ept":0.005,"lat":63.416385217,"lon":10.826595117,"altHAE":62.600,"altMSL":22.600,"alt":22.600,"epv":20.700,"track":210.5000,"magtrack":210.5000,"magvar":3.9,"speed":23.664,"geoidSep":40.000,"eph":17.100,"sep":24.700}
$GNGNS,100645.0,6324.972448,N,01049.583141,E,AA,11,0.8,27.4,40.0,,*52
{"class":"TPV","device":"/dev/gpsUSB.1.6","mode":3,"time":"2021-06-09T10:06:45.000Z","ept":0.005,"lat":63.416207467,"lon":10.826385683,"altHAE":67.400,"altMSL":27.400,"alt":27.400,"epx":8.177,"epy":9.809,"epv":18.400,"magvar":3.9,"speed":22.406,"climb":4.800,"epd":47.2859,"eps":19.62,"epc":39.10,"geoidSep":40.000,"eph":15.200,"sep":22.800}


BR,

Tor Rune Skoglund




reply via email to

[Prev in Thread] Current Thread [Next in Thread]