Page 1 of 1

GPS P082 update rate

Posted: 17 May 2019, 13:44
by muppet96
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.

Re: GPS P082 update rate

Posted: 17 May 2019, 14:39
by grovkillen
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".

Re: GPS P082 update rate

Posted: 17 May 2019, 14:52
by muppet96
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.

Re: GPS P082 update rate

Posted: 18 May 2019, 13:45
by muppet96
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!

Re: GPS P082 update rate

Posted: 28 May 2019, 09:17
by muppet96
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.

Re: GPS P082 update rate

Posted: 28 May 2019, 10:13
by TD-er
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)

Re: GPS P082 update rate

Posted: 29 May 2019, 16:35
by muppet96
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.

Re: GPS P082 update rate

Posted: 30 May 2019, 13:53
by Wiki
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]

Re: GPS P082 update rate

Posted: 31 May 2019, 10:48
by muppet96
I read it ages ago and contributed. It still doesn't hurt to say thanks!