Units of speed of accuracy in OsmAnd url

Ramona year ago

Copied from https://github.com/traccar/traccar-client-android/issues/459

The following is submitted by the client:

?id=string
×tamp=int
&lat=double
&lon=double
&speed=double
&bearing=double
&altitude=double
&accuracy=double
&batt=double

The timestamp value likely is time in Linux time in seconds based on the sizes of the int but in what unit is speed? Is is km/h, m/h, m/s?

What does accuracy mean? Does this apply to both horizontal and vertical accuracy? Is this in meters?

Same for bearing, I assume this is degrees but could it also be radian.

The values on the https://www.traccar.org/osmand/ are not the same. For example, it lists hdop. Searching for this shows "horizontal dilution of precision". Does that mean hdop became accuracy and that its horizontal accuracy?

It would be useful to add this information to https://www.traccar.org/osmand/

Anton Tananaeva year ago
Ramona year ago

Thanks Anton,

Maybe add that link to the https://www.traccar.org/osmand/ page ?

Anton Tananaeva year ago

That doesn't make sense because some of those units are configurable. This only applies to the Traccar Client.

Ramona year ago

I don't get that. That page defines the OsmAnd API. That should come with guidance on how to submit or process the provided arguments?

Anton Tananaeva year ago

I agree that the documentation can be improved, but just linking to Android documentation doesn't make sense to me.

Ramona year ago

I can't find the website in github as I would have created a PR for it.

Anton Tananaeva year ago

It's not public, but you can just send us a doc if you want.

Ramona year ago

Here you go, in Markdown a table per argument

Name Type Description
id string The device ID
timestamp int Linux time in seconds
lat double The latitude in degrees.
lon double The longitude in degrees.
speed float The speed at the time of this location in meters per second.
bearing double The bearing at the time of this location in degrees.
altitude double The altitude of this location in meters above the WGS84 reference ellipsoid.
accuracy float The estimated horizontal accuracy radius in meters of this location at the 68th percentile confidence level.
batt float The battery level as a percentage from 0-100
Anton Tananaeva year ago

It seems like you kind of ignored what I said earlier. Some of those units are configurable. For example speed and timestamp.

Ramona year ago

ok, after looking at the code at https://github.com/traccar/traccar/blob/master/src/main/java/org/traccar/protocol/OsmAndProtocolDecoder.java#L68-L148

You mean that the interpretation of the unit for these values are configurable in the Traccar Server. I'll create a table based on the source code for that I just linked.

Anton Tananaeva year ago

Correct, they are configurable on the server.

swatfa year ago

Thank you Ramon for trying. I started building a device a few weeks ago that sends updates to a server using OsmAnd but was getting frustrated with the lack of any idea of what fields are used.

Anton, why don't you update the website with some useful information on the OsmAnd page? Currently there is more information in this thread than there is on the entire website regarding this recommended protocol. Rather than just saying "it is configurable" can we have a list of options so we can send valid data first time without having to do lots of trial and error?

Anton Tananaeva year ago

Anton, why don't you update the website with some useful information on the OsmAnd page?

The only reason is that you haven't sent me that information yet.

swatfa year ago

I'm not the OP but if I had the info I would send it to you to put on the website. But where am I supposed to find this information? I'm very confused here. Bit of a chicken and egg situation?