1

How to get unit last location

Topic: How to get unit last location

Hi

We want to get last location of an unit in an interval, may anyone help us?
We use messages/load_interval and check last message but problem is occur when there is no coordinates in last message (sometimes unit lost GPS or sometimes device send HW messages or text etc...) while we need last message in interval that has location data (last known location in specific interval)
Please help how we can do it? anyone knows any trick?

2

How to get unit last location

Re: How to get unit last location

i know table called "Unit latest data" that give you last location for units in reports

3

How to get unit last location

Re: How to get unit last location

I don't understand what is the problem.

messages/load_interval responds with array of messages in that interval. You can just iterate over them from the end and find first message, that has a position.

4

How to get unit last location

Re: How to get unit last location

rual, you're right, but I'm looking for probably possible way to get last location directly from Wialon

5

How to get unit last location

(edited by rual 20/06/2017 16:30:52)

Re: How to get unit last location

hhamedk wrote:

rual, you're right, but I'm looking for probably possible way to get last location directly from Wialon

It is possible to do core/search_item with id of unit and flag of Message Params, result will contain parameter posinfo with last available position.

But in such case you couldn't specify an interval and it will be the latest position for all of the time.

6

How to get unit last location

Re: How to get unit last location

Create a Report for a Unit Group or Unit and select Unit Last data as a type This will give the last known location of the units.

Nishad Hussain Kaippally
Implementation Specialist, Middle East, Gurtam

"Computer science is no more about computers than astronomy is about telescopes."