GPS P082 update rate

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
muppet96
New user
Posts: 8
Joined: 17 May 2019, 13:31

GPS P082 update rate

#1 Post by muppet96 » 17 May 2019, 13:44

I've been trying out P082 GPS from the most recent release. It works ok but is updating via MQTT twice a second on all values despite being set to update once every 5 seconds. Under the devices tab it updates correctly at the set rate. Has anyone got any suggestions how to get it updating at the correct rate? Quite happy to fiddle with the software and re-compile if I can be helped to find where to look. Many thanks.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: GPS P082 update rate

#2 Post by grovkillen » 17 May 2019, 14:39

Yeah, sorry but the GPS plugin is currently overriding the interval setting. We are going to create some kind of logic for that one but that's but there yet. The current status is "testing".
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

muppet96
New user
Posts: 8
Joined: 17 May 2019, 13:31

Re: GPS P082 update rate

#3 Post by muppet96 » 17 May 2019, 14:52

That's great. Thanks for the reply. I know it's testing was just unsure if I had missed something or if it was a known issue.

muppet96
New user
Posts: 8
Joined: 17 May 2019, 13:31

Re: GPS P082 update rate

#4 Post by muppet96 » 18 May 2019, 13:45

Just for info if anybody cares, or needs, it if you set this rule:
on GPS#Longitude do
TaskValueSet 3,1,%eventvalue%
TaskValueSet 3,2,[GPS#Latitude]
TaskValueSet 3,3,[GPS#Speed]
endon
and set task 3 as dummy device with, in this case 3 sensors sending once every however many seconds and turn off sending the GPS device to controller you will achieve what the plugin is failing to do at the moment. Very inelegant I know and one of many ways it could be done but it works!

muppet96
New user
Posts: 8
Joined: 17 May 2019, 13:31

Re: GPS P082 update rate

#5 Post by muppet96 » 28 May 2019, 09:17

In case it's of any interest the speed units returned are quoted as metres per second when in fact they appear to be in knots which is the NMEA standard unit in the sentences from the module. If you set the formula for speed to %value%*0.514444 you will get m/s or *1.852 for kmh or *1.5078 for mph. I expect I'm wrong but it gives much more realistic results for me.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: GPS P082 update rate

#6 Post by TD-er » 28 May 2019, 10:13

You should try the latest version.
Last week I did change the outputs to be selectable and also added an option to trigger an update either by the set interval time, or a configurable distance travelled. (0 = disable the update by distance)
So the update rate issue is already fixed and also having a new feature :)
On my unit, I have had it running for months now and it appeared to me like the speed was logged in m/s.

As you may have seen it in the source code, it is using TinyGPS and I am querying the meter/sec value from that library.

Code: Select all

P082_setOutputValue(event, P082_QUERY_SPD,  P082_data->gps->speed.mps());
Could it be that the GPS unit you're using is set at some override to apply the conversion to knots?
Currently the GPS plugin does not communicate back to the GPS, so in my setup I only have the TX of the GPS connected. (using serial0 swapped without a PNP transistor for the RX of the GPS and thus not connected)

muppet96
New user
Posts: 8
Joined: 17 May 2019, 13:31

Re: GPS P082 update rate

#7 Post by muppet96 » 29 May 2019, 16:35

Thanks for that I will give it a go. As far as I can tell the Tiny GPS library used the speed units without conversion which, by NMEA format are in knots. I am using a Ublox 6M something or another. I did the m/s to mph conversion in formula and on the boat I live on it indicated 6mph which was mad. That is what lead me to look into it and find the raw NMEA unit is knots. I am configuring the gps using a USB to serial converter on a computer. Just had a look at the latest version and can see the changes in the code. Thanks very much for all the effort you put into it and for sharing it. It's greatly appreciated.

Wiki
Normal user
Posts: 413
Joined: 23 Apr 2018, 17:55
Location: Germany

Re: GPS P082 update rate

#8 Post by Wiki » 30 May 2019, 13:53

muppet96 wrote: 29 May 2019, 16:35 Thanks very much for all the effort you put into it and for sharing it. It's greatly appreciated.
Hi,
first of all a "welcome to the forum"
[OT on]
I have no relation to the developers, but let me gently ask the question: Did you read this already?
[/OT off]

Code: Select all

pi@raspberrypi:~ $ man woman
No manual entry for woman
pi@raspberrypi:~ $

muppet96
New user
Posts: 8
Joined: 17 May 2019, 13:31

Re: GPS P082 update rate

#9 Post by muppet96 » 31 May 2019, 10:48

I read it ages ago and contributed. It still doesn't hurt to say thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests