You can find answers here:
https://developer.android.com/reference/android/location/Location
Thanks Anton,
Maybe add that link to the https://www.traccar.org/osmand/ page ?
That doesn't make sense because some of those units are configurable. This only applies to the Traccar Client.
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?
I agree that the documentation can be improved, but just linking to Android documentation doesn't make sense to me.
I can't find the website in github as I would have created a PR for it.
It's not public, but you can just send us a doc if you want.
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 |
It seems like you kind of ignored what I said earlier. Some of those units are configurable. For example speed and timestamp.
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.
Correct, they are configurable on the server.
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, 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.
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?
Copied from https://github.com/traccar/traccar-client-android/issues/459
The following is submitted by the client:
The
timestamp
value likely is time in Linux time in seconds based on the sizes of the int but in what unit isspeed
? 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 meanhdop
becameaccuracy
and that its horizontal accuracy?It would be useful to add this information to https://www.traccar.org/osmand/