Relation between approximate and accuracy

Khaksar3 years ago

Hi to all members,
Is it possible to have accuracy greater than zero, but no value for approximate field in attributes section of a position object?

I noted here that both of them are relevant to each other, but I have some position records in my traccar where the accuracy is >0 but approximate attribute is absent at all.

Anton Tananaev3 years ago

There is no approximate attribute.

Khaksar3 years ago

But I think it is being set for the position object in GeolocationHandler here alongside with accuracy. And I also see, it is being used in FilterHandler.

Anton Tananaev3 years ago

Completely forgot about that. That attribute is only set for geolocation results.

Khaksar3 years ago

Noted.

But the accuracy field is set also there at the same time. I see some of the positions that they have accuracy>0 but not have approximate. Is the accuracy is also being set without geolocation results? I need to make a decision where the position was reported by GPS or LBS, for me approximate was making sense because it was used in the filter handler also for the same purpose.

Anton Tananaev3 years ago

The attribute is set only if LBS was done on the server. For example if Traccar Client reports a location, it won't be set, even if it was an LBS location. That's because it's on the phone side.

Khaksar3 years ago

Okay, got it, it means the trackers are also doing LBS on tracker side.

So, I think to differentiate correctly GPS from LBS, we can use the accuracy field, as it is always 0 for GPS.

Anton Tananaev3 years ago

I think so, but I can't guarantee that it's always for all devices. But it's 99.9% the case.

Khaksar3 years ago

Okay. Got it. Thank you!