gpsd-users
[Top][All Lists]
Advanced

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

Re: Strangeness with speed


From: Florian Kiera
Subject: Re: Strangeness with speed
Date: Thu, 17 Feb 2022 12:14:32 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

Hey Владимир,

the reason the 2nd TPV message returns speed 0 is because you didnt move an inch compared to the previous point. Which speed value do you expect? "null" is entirely wrong in this situation as its possible to calculate a speed value with the points you have (speed = (p2-p1) / (t2-t1); speed = ((61.079583333, 28.254500000) - (61.079583333, 28.254500000)) / (11:48:13.000-13:46:18.000); speed = 0/(11:48:13.000-13:46:18.000) = 0)

Besides, its interesting that gpsd is calculating any speed at all with the "sentences.nmea" file you gave us, as multiple NMEA sentences are from the exact same time. (You're at multiple places at the same time? How can that result in a speed value when the time difference is 0? (division through 0 returns a valid speed value?)) I simply downloaded the "sentences.nmea" file and used "cat sentences.nmea | gpsdecode > test.txt". May I have used it wrong. Wrong and wrong might resulted in even more wrong? Might be my bad.

By the way as Gary already mentioned the file you gave us is different to the file you used to produce your outputs... you may want to send your original file or else nobody can help you with the problem you have with your original file.

Regards Florian

test.txt would be to big (672KB) so I quartered the file.

Am 14.02.22 um 15:51 schrieb Владимир Калачихин:
Hi all and Gary. I have an underground knock.

I have the NMEA file (included).
I created this file on my app by filtering RMC and GGA sentences and changing the time.

I play this file in gpsfeed, and gpsd understands him perfectly. As result, gpsd return the following: {"class":"TPV","device":"tcp://localhost:2222","mode":3,"time":"2022-02-14T11:46:18.000Z","ept":0.005,"lat":61.079016667,"lon":28.256983333,"altHAE":36.440,"altMSL":49.870,"alt":49.870,"track":283.8300,"magtrack":10.7967,"magvar":10.8,"speed":2.212,"geoidSep":0.000,"eph":0.000}

The same result is if I play this file in my app without any changes in data.

But if I during playback changed the time in sentences to now - gpsd returns two differents TPV:

{"class":"TPV","device":"tcp://localhost:2222","mode":3,"time":"2022-02-14T11:46:18.000Z","ept":0.005,"lat":61.079583333,"lon":28.254500000,"track":296.0900,"magtrack":306.8855,"magvar":10.8,"speed":2.531,"geoidSep":16.832,"eph":0.000} {"class":"TPV","device":"tcp://localhost:2222","mode":3,"time":"2022-02-14T13:48:13.000Z","ept":0.005,"lat":61.079583333,"lon":28.254500000,"altHAE":54.300,"altMSL":54.300,"alt":54.300,"magvar":10.8,"speed":0.000,"geoidSep":0.000,"eph":0.000}

one of these has speed == 0

Why is it that?
Is it the time value something special for gpsg?
Why speed == 0 instead null?


--
###############################################################
Florian Kiera               Tel:    (0385) 3993 93 58
Logic Way GmbH              Geschäftsführer: Andreas Loerzer
Hagenower Strasse 73        HTTP:   http://www.logicway.de
19061 Schwerin              email:  mailto:florian.kiera@logicway.de
###############################################################

Attachment: test.txt
Description: Text document


reply via email to

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