OSMAND: speed unit other than knots?

Shuhhi3 years ago

Hi all,
I run a local Traccar server on a RPi4, which is working fine.
As tracking device I use an Android phone with Locus 4, which provides a livetracking function (OSMAND). The connection to Traccar is working very well, except one thing: the unit of speed.

I am aware of the Traccar possibility to display speed in various units. The point is, that (I believe!) this affects the presentation of values from the DB.
Locus is sending speed in "m/s" (which I personally would also prefer, as this is the SI unit of speed), but Traccar (I believe!) interprets the values retrieved via OSMAND as knots. Showing these values then in "km/h" in Traccar leads to approx halved numbers:

  1. Driving at 100km/h gives 100/3.6=27.7m/s
  2. Traccar takes "27.7" and saves it to the DB
  3. "27.7" interpreted as knots gives 27.7*1.852=51.4km/h on the GUI.

I can now use a "computed attribute" to create a new field "v_kmh" that carries the correct value, but the speed value in the GUI is still wrong.

Did I miss a functionality to tell Traccar to interpret "speed" in OSMAND protocol as "m/s"?
Can I maybe overwrite the speed value with a "computed attribute"?

Of course this is only one way that leads to a speed value of my taste; also Locus could implement a way to send speed in "kn" instead of "m/s"; I already ask for support also on their side.

Thanks,
Phil

Anton Tananaev3 years ago

You can configure expected units using osmand.speed. Set value to mps.

Shuhhi3 years ago

Thanks Anton,
I added the line

<entry key='osmand.speed'>mps</entry>

to traccar.xml and restarted Traccar.

As it is raining like sh*t I will tryout tomorrow.

Is there a list of all parameters that can be manipulated in the XMLs? I think default.xml and "https://www.traccar.org/configuration-file/" do not include everything.

Best regards,
Phil

Anton Tananaev3 years ago

Is there a list of all parameters that can be manipulated in the XMLs?

You can find it in the code, but we have a plan to automatically publish all config options.

Djelloula year ago

Hello @Shuhhi,

I'm facing the exact same problem as you regarding OSMAnd Speed value managed under Traccar server.
You made a proposal to add following line to the traccar.xml file:

<entry key='osmand.speed'>mps</entry>

But it hasn't changed anything on my Traccar server web interface.
Did your suggestion worked on your side?

I'm using Traccar 5.4 and I don't know if this configuration paramater is still taken in account in this version.

If anybody can help, I'll be glad to have some guidance on this subject.
Thank you for your attention.

Shuhhia year ago

Hello Djelloul,
this setting is working for me. I am using Locus Map (Android) as tracker, it explicitly says that it send velocity in m/s. Other setups using OSMAND might work differently.
BR
Shuhhi

Djelloula year ago

Thank you for your reply,

In regard of @Anton Tananaev previous suggestion, I have observed no changes in my Traccar web server configuration.
I took some time to update my server version from 5.4 to last 5.9 and now the setting is taken in account.
I can see the speed being now expressed in km/h without the need of a Calculated Attribute's help.
The tool I'm using for GNSS tracking is GPSlogger, an app that can be easily automated with Android Intents and that is using OSMAND arguments as it should be (exactly like Locus) but with more flexibility.

I consider this topic could be closed thanks to @Anton Tananaev and your feedback, but this one being yours, I let you give the final word or the forum admins decide what to do.

Thank you again for your feedback!