Eliko RTLS Technical Documentation

Live Positioning Data, Notifications and History

Live positioning data reports

SET_REPORT_LIST

This request can be used by the client to ask for live positioning data reports from the Eliko RTLS. Exact types of desired reports will be specified as arguments. Note that depending on the number of tags in the system and their configured update intervals, there may be huge amount of live data.

There are slight differences in the behavior of SET_REPORT_LIST request, depending on the TCP connection type:

  • When the Eliko RTLS is working as a TCP Server and the client initiates a connection to it, there is no live positioning data sent to the client automatically. To request live positioning data on that connection, the client can use the SET_REPORT_LIST request. This request applies only to this specific TCP connection and each new TCP connection is considered as fresh one with no automatic live positioning data.

  • When the Eliko RTLS is working as a TCP Client and initiates a connection to the specified destination server, the RR_L and COORD_E reports are sent automatically by the Eliko RTLS. To stop receiving these live positioning reports or request different types of reports, the destination server can use the SET_REPORT_LIST request. Note that the Eliko RTLS simultaneously supports only one outbound TCP connection and the flags set by SET_REPORT_LIST in that connection are remembered by the RTLS Server, even If the outbound TCP connection is closed and opened again.

Client sends:

$PEKIO,SET_REPORT_LIST,<parameter list>

<parameter list> is a variable length, comma-separated list of report types desired by the client. An empty list requests the Eliko RTLS to stop sending any live data. Each time the client issues the SET_REPORT_LIST request, previous state will be reset and only those live reports will be sent that were specified in the current request.

Live data will be sent as asynchronous NMEA sentences.

Currently, the built-in live report types are RR_L, COORD and COORD_E. There may be more in the future. Additional to the built-in types, it is also possible to configure custom report types with ADD_CUSTOM_REPORT_TYPE request. When configured, these custom-defined positioning report names may also be used here.

A full example of client’s request would be:

$PEKIO,SET_REPORT_LIST,RR_L,COORD_E

The system responds:

$PEKIO,OK

The asynchronous live reports from the Eliko RTLS to the client will be specified in the following chapters.

If there was an error while processing the request, the system responds:

$PEKIO,NOT_GOOD,INCORRECT_PARAMETER,<parameter number>

<parameter number> is the number of the unrecognized field in the request.

A full example of the system’s error response would be:

$PEKIO,NOT_GOOD,INCORRECT_PARAMETER,2

RR_L

This is a low-level Range Report, which allows the user to get raw information about the measured distances between the tags and the anchors.

According to these distance measurements, the RTLS Ranging software calculates the coordinates of the tags. In most cases, the client is not interested in the raw distance measurements, but the calculated coordinates. In such case, please do not use the RR_L report, use COORD or COORD_E instead.

To request the system to send these RR_L reports as live data, the client should use the SET_REPORT_LIST request and include “RR_L” in the parameter list. After that, asynchronous RR_L reports will be sent from the system to the client as follows:

$PEKIO,RR_L,<parameter list>

<parameter list> is a comma-separated list with the following fields:

Field name

Explanation

Example

Sequence Number

An 8-bit media access sequence number of ranging, expressed as a decimal value from 0 to 255. Value is incremented by the tag during the ranging process.

If the client needs to simultaneously handle multiple live positioning reports (whether the built-in RR_L, COORD, COORD_E or custom-defined), this Sequence Number can be used to match them in the data feed.

042

Tag’s Serial Number

A 24-bit identifier that is unique among all the produced RTLS tags, in 6-digit hexadecimal format. The Serial Number does not change during the whole life cycle of the tag and can thus be used to uniquely identify it.

0x003464

Serial Number of the first anchor

A 24-bit identifier that is unique among all the produced RTLS anchors, in 6-digit hexadecimal format. The Serial Number does not change during the whole life cycle of the anchor and can thus be used to uniquely identify it.

A value of 0 may appear here If no anchor participated in this slot or If measuring the distance to this anchor was not successful.

0x128345

First distance

Distance from the tag to the first anchor in centimeters.

A value of 0 may appear here If no anchor participated in this slot or If measuring the distance to this anchor was not successful.

3245

Serial Number of the second anchor

A 24-bit identifier that is unique among all the produced RTLS anchors, in 6-digit hexadecimal format. The Serial Number does not change during the whole life cycle of the anchor and can thus be used to uniquely identify it.

A value of 0 may appear here If no anchor participated in this slot or If measuring the distance to this anchor was not successful.

0x128346

Second distance B

Distance from tag to the second anchor in centimeters.

A value of 0 may appear here If no anchor participated in this slot or If measuring the distance to this anchor was not successful.

123

...

Serial Number and distance pairs for all the other anchors that participated in the ranging process (up to 20 pairs may be reflected here).

 

Tag’s Timestamp

Tag’s Timestamp in units of milliseconds. This is a relative timestamp, which is not related to wall clock or other tags.

00004810

Anchor’s information and error flags

Currently may be considered as Eliko’s internal debug information, one byte per anchor, separated by commas. The example on the right is valid If 4 anchors participated in the ranging process.

0x00,0x00,0x00,0x00

Tag’s information and error flags

A hexadecimal value that should be used as bitfield. Currently only the lowest bit has been defined and its meaning is as follows: value of 0 means the tag is moving and thus using the High Update Interval. Value of 1 means the tag is standstill and thus using the Low Update Interval.

NOTE that though currently no other bits have been advertised, the user should NOT assume they are always zeros. These might be used for development purposes and/or be defined for some future functionality. To get the lowest bit for deciding if the tag is moving or not, a bitwise AND between this value and 0x01 is necessary.

0x01

A full example of RR_L report from the system might be:

$PEKIO,RR_L,180,0x00FF0C,0x000010,88,0x000000,0,0x000000,0,0x000000,0,00174110,0x00,0x00,0x00,0x00,0x01

COORD


This is an asynchronous report from the Eliko RTLS used to notify the client that a new position has been calculated for a tag. This is the main report to be used when the client needs live updates about tag position. This report is also sent by the system if the client requests the historic positioning data.

To request the system to send these asynchronous COORD reports, the client should use the SET_REPORT_LIST request and include “COORD” in the parameter list.

The system sends:

$PEKIO,COORD,<parameter list>

<parameter list> is a comma-separated list with the following fields:

Field name

Explanation

Example

Sequence Number

An 8-bit media access sequence number of ranging, expressed as a decimal value from 0 to 255. Value is incremented by the tag during the ranging process.

If the client needs to simultaneously handle multiple live positioning reports (whether the built-in RR_L, COORD, COORD_E or custom-defined), this Sequence Number can be used to match them in the data feed.

123

Tag’s Serial Number

A 24-bit identifier that is unique among all the produced RTLS tags, in 6-digit hexadecimal format. The Serial Number does not change during the whole life cycle of the tag and can thus be used to uniquely identify it.

0x003464

Tag’s Position

The calculated X, Y and Z coordinates for the tag (in meters). May be empty fields when coordinates could not be calculated.

10,-1.12,9.8

Information String

A human readable information string. Possible messages are explained in the next table.

Error: too few anchors in input.

Calculation’s Timestamp

Unix Timestamp when the coordinate calculation was started, with millisecond precision.

1563453225.876

<Information String> may carry the following information:

Message

Explanation

Info: unregistered anchor detected (0x245224).

Anchor with the specified serial number has not been registered in the system. This means that the anchor is powered up and participates in the positioning process, but does not have a communication link with the current RTLS Server. This may mean that the communication link is broken or the anchor belongs to another system/server.

Error: no usable anchors in input.

The Range Report received from an anchor did not contain any usable distance between the tag and anchors. This may happen in case the distances to the anchors could not be measured or that the coordinates for the (otherwise usable) anchors are missing.

Note that this exact error message is used from software version 2.5.2. Earlier software versions use message “Error: too few anchors in input.” to reflect the same situation (which means the error message was not accurate for the situation).

Math: Bad geometry.

The anchor network is not properly set up. This may mean that the anchor coordinates have not been properly measured and entered into the system or that the positions of reported anchors do not provide sufficient information to make any calculations (for example the anchors are located too close to each other, located all on one line, etc).

Math: Not enough data.

The Range Report received from an anchor did not provide sufficient information to calculate the tag’s position and the missing parts could not be even estimated by previous measurements. This may mean that the anchor positions and/or roles have not been selected optimally or radio signals from some of the important anchors are blocked by thick objects.

Math: Lsq solver did not converge.

There were sufficient amount of distance measurements in the Range Report, but they do not converge at one point. This may mean that the anchors’ coordinates have not been properly measured and entered into the system or that the radio signal from some of the anchors are prolonged too much by the objects between the tag and anchors.

Math: Fallback to shorter lsq.

This message indicates that the measured distances do not meet at one point, but after approximations, some coordinate estimation could still be done. Note: this is just a warning, not an error.

<any other message>

Other messages are considered as server’s internal errors. Please report them to Eliko.

Note that messages starting with “Info:” and “Math:” may occur simultaneously. For example:

Info: unregistered anchor detected (0x245224). Math: Lsq solver did not converge.

Some full examples of the system’s output would be:

$PEKIO,COORD,123,0x003F4A,10,10,0,,1563453225

$PEKIO,COORD,123,0x003F4A,,,, Math: Bad geometry.,1563453225.876


COORD_E


This is an asynchronous report from the Eliko RTLS used to notify the client that a new position has been calculated for a tag. The report is similar to the COORD report, but with some added values.

To request the system to send these asynchronous COORD_E reports, the client should use the SET_REPORT_LIST request and include “COORD_E” in the parameter list.

The system sends:

$PEKIO,COORD_E,<parameter list>

<parameter list> is a comma-separated list with the following fields:

Field name

Explanation

Example

...

Same parameters as with simple COORD report: Sequence Number, Tag’s Serial Number, Tag’s Position, Information String, Calculation’s Timestamp

 

IP address

IP address of anchor that received the underlying distance measurements.

192.168.1.45

X confidence,

Y confidence,

Z confidence

Estimates for accuracy of the X, Y, Z coordinates, in meters. Should be treated as a ± value.

5.1,1.0,0.214

A full example of the system’s output would be:

$PEKIO,COORD_E,123,0x003F4A,0.23,3.43,0.00,,1563453225,192.168.1.45,5.1,1.0,0.214

ADD_CUSTOM_REPORT_TYPE

This request allows the client to define additional report types for live positioning data (in case the built-in types RR_L, COORD, COORD_E are not sufficient). Custom report types allow the clients to choose exactly the data fields they are interested in and leave out anything else, thus reducing load on the network and processing side.

When defining a new custom report type, the client chooses a unique name and selects a list of field identifiers, which correspond to certain types of data fields that will make up this custom report. It is allowed to define as many custom report types as necessary – this can be done by subsequent ADD_CUSTOM_REPORT_TYPE requests.

Client sends:

$PEKIO,ADD_CUSTOM_REPORT_TYPE,<parameter list>

<parameter list> is a comma-separated list with the following fields:

Field name

Explanation

Example

Custom report name

A unique name for the user-defined report. Should start with “CR_”, but otherwise the user is free to choose. If a name without “CR_” prefix is chosen, this prefix will be added automatically. If an existing name is chosen, the previously defined custom report type is overwritten.

CR_MY_REPORT

Field identifiers ON/OFF

This parameter allows the user to choose if the custom report will include also the field identifiers or not. This is an “ON” or “OFF” switch, which will affect the live positioning data reports as follows:

  • “ON” – the data reports will contain the selected fields as a key and value pair. This allows parsing the values by knowing the field identifier names.

  • “OFF” – the data reports will contain only the selected data fields, but not the identifiers. This avoids some overhead in the transmission, but the values must be parsed by knowing their position in the report.

ON

List of field identifiers

A variable length, comma separated list of field identifiers, which correspond to the data fields that will be included in the custom report. The list with all of the possible field identifiers is presented in the next table.

X,Y,TAG_SN

To select data fields to be included in the live positioning data, these field identifiers can be used:

Field identifier

Explanation

Example value in custom report

SEQ_NR

An 8-bit media access sequence number of ranging, expressed as a decimal value from 0 to 255. Value is incremented by the tag during the ranging process.

If the client needs to simultaneously handle multiple live positioning reports (whether the built-in RR_L, COORD, COORD_E or custom-defined), this Sequence Number can be used to match them in the data feed.

042

TAG_SN

Tag’s unique serial number.

0x003431

X

Tag’s X coordinate (in meters).

15.21

Y

Tag’s Y coordinate (in meters).

-3.98

Z

Tag’s Z coordinate (in meters).

2.15


A_SN

B_SN

...

J_SN


Anchor’s unique serial number, which participated in the coordinate calculation process. Please note that there are 10 different field identifiers, which correspond to anchors that simultaneously participated in the ranging.

0x005412

SNS

An alternative method to include the anchors that participated in the coordinate calculation in the custom report. All the anchors will be listed on a single field, separated by semicolons.

0x005412;0x0012E4;0x0023EB


A_DIST

B_DIST

...

J_DIST


Distance to the anchor (in meters), which participated in the coordinate calculation process. Please note that there are 10 different field identifiers, which correspond to anchors that simultaneously participated in the ranging.

15.22

DISTS

An alternative method to include the distances to the anchors (in meters), which participated in the coordinate calculation process. All the distances will be listed on a single field, separated by semicolons.

1.56;32.77;11.7

TAG_TIMESTAMP

Tag’s Timestamp in units of milliseconds. This is a relative timestamp, which is not related to wall clock or other tags.

00004810

TAG_FLAGS

Tag’s information and error flags. This is a hexadecimal value that should be used as bitfield. Currently only the lowest bit has been defined and its meaning is as follows: value of 0 means the tag is moving and thus using the High Update Interval. Value of 1 means the tag is standstill and thus using the Low Update Interval.

NOTE that though currently no other bits have been advertised, the user should NOT assume they are always zeros. These might be used for development purposes and/or be defined for some future functionality. To get the lowest bit for deciding if the tag is moving or not, a bitwise AND between this value and 0x01 is necessary.

0x01

IS_MOVING

YES or NO (corresponds to the bit in TAG_FLAGS, but is easier to handle).

YES

INFO_STR

A human readable information or error string.

Less than 3 anchors detected

ARRIVAL_TIME

Unix Timestamp when the coordinate calculation was started, with millisecond precision.

1563453225.876

CALC_TIME

Unix Timestamp when the the coordinate calculation was finished, with millisecond precision. Note that usually this value should be slightly larger than ARRIVAL_TIME. If it is smaller, this indicates the coordinate calculation failed this time and the coordinates in this packet are a copy of previous successful calculation.

1563453225.936

IP_FIRST

IP address of first anchor that reported the current distance measurements.

192.168.1.45


X_CONF

Y_CONF

Z_CONF


Estimates for accuracy of the X, Y, Z coordinates, in meters. Should be treated as a ± value.

5.1,1.0,0.214

PROXIMITY_ANCHOR_SN

If the proximity detection mode is used for an anchor and the tag is near that anchor, this field represents the unique serial number of the anchor.

0x00128A

COORD_TYPE

A string which gives information about which method was used for the current coordinate estimation output. Can be:

  • 2D or 3D – if the coordinate was calculated according to the regular X, Y, Z coordinate calculation method.

  • 1D – if the coordinate was calculated by the “1D Mode” subsystem.

  • PROXIMITY – if the coordinate was randomized inside an anchor’s proximity detection area.

2D

NR_ANCHORS

Number of usable anchors from input (ie number of anchors, for which both the anchor’s serial number and distance to the tag were reported).

4

NR_ANCHORS_USED

Number of anchors that the math module used when calculating the tag’s position. Note that this can be more than in the field NR_ANCHORS, because the math module can use some buffered and filtered values from previous measurements, if necessary.

5

IN_ZONES

When the geofencing subsystem is used, this field contain the list of Zone IDs, where the tag currently is.

2;8;23

IN_AGS

When the anchor groups are used, this field contains the list of anchor groups, where the tag currently is.

1;2

IN_TGS

When the tag groups are used, this field contains the list of tag groups, where the tag belongs to.

3;4

INTERVAL_R

The time (in milliseconds) elapsed from last distance measurement result.

292

INTERVAL_C

The time (in milliseconds) elapsed from last coordinate calculation.

293

A full example of client request would be:

$PEKIO,ADD_CUSTOM_REPORT_TYPE,CR_MY_OWN_COORD,OFF,SEQ_NR,TAG_SN,X,Y,Z,INFO_STR,ARRIVAL_TIME

Note: the example request above defines a custom report type “CR_MY_OWN_COORD”, which is identical to the built-in report type “COORD”.

If processing the request was successful, the system responds:

$PEKIO,OK

If the client did not provide a name for the custom report type, the system responds:

$PEKIO,NOT_GOOD,NAME

If the “Field Identifiers ON/OFF” switch could not be parsed as “ON” or “OFF”, the system responds:

$PEKIO,NOT_GOOD,SHOW_FIELDS

If the client has specified an unknown field identifier, the system responds:

$PEKIO,NOT_GOOD,UNKNOWN_FIELD


GET_CUSTOM_REPORT_TYPES


This request allows the client to get information about the custom positioning report types, which have been defined by ADD_CUSTOM_REPORT_TYPE request. This request allows to query the custom report types one-by-one or all in one go.

Client sends:

$PEKIO,GET_CUSTOM_REPORT_TYPES,<custom report name>

<custom report name> is the name of the custom report, for which information is queried. Instead of the name, it is possible to use the keyword “ALL” – in such case a list with all of the custom report types will be responded. The same behavior can be achieved by just omitting this parameter completely.

Some full examples of client request would be:

$PEKIO,GET_CUSTOM_REPORT_TYPE,CR_MY_PACKET

$PEKIO,GET_CUSTOM_REPORT_TYPE

$PEKIO,GET_CUSTOM_REPORT_TYPE,ALL

If processing the request was successful, the system lists all the custom positioning report types previously defined by the ADD_CUSTOM_REPORT_TYPE request, one row for each. The list is terminated with the $PEKIO,EOF marker:

$PEKIO,CUSTOM_REPORT_TYPE,<parameter list>

$PEKIO,CUSTOM_REPORT_TYPE,<parameter list>

...

$PEKIO,CUSTOM_REPORT_TYPE,<parameter list>

$PEKIO,EOF

<parameter list> is exactly the same as described in chapter ADD_CUSTOM_REPORT_TYPE.

A full example of the system’s response would be:

$PEKIO,CUSTOM_REPORT_TYPE,CR_MY_REPORT1,OFF,SEQ_NR,TAG_SN,X,Y,Z

$PEKIO,CUSTOM_REPORT_TYPE,CR_MY_REPORT2,ON,TAG_SN,X,Y,Z,ARRIVAL_TIME

$PEKIO,EOF

If the client provided a non-existent custom report name, the system responds:

$PEKIO,NOT_GOOD,UNKNOWN_REPORT_TYPE

REMOVE_CUSTOM_REPORT_TYPES


This request allows the client to remove the custom positioning report types, which have been defined by ADD_CUSTOM_REPORT_TYPE request. This request allows to remove the custom report types one-by-one or all in one go.

Client sends:

$PEKIO,REMOVE_CUSTOM_REPORT_TYPES,<custom report name>

<custom report name> is the name of the custom report type to be removed. Instead of the name, it is possible to use the keyword “ALL” – in such case all the custom report types will be removed.

Some full examples of client request would be:

$PEKIO,REMOVE_CUSTOM_REPORT_TYPES,CR_MY_PACKET

$PEKIO,REMOVE_CUSTOM_REPORT_TYPES,ALL

If processing the request was successful, the system responds:

$PEKIO,OK

If the client did not provide a custom report type, the system responds:

$PEKIO,NOT_GOOD,NAME

If the client provided a non-existent custom report type, the system responds:

$PEKIO,NOT_GOOD,UNKNOWN_REPORT_TYPE


SKIP

This request allows to skip live positioning reports to reduce the data load on the network. Note that this functionality is different from just decreasing the tags’ update rate, as it does not affect the internal math module and filtering mechanisms. The skip functionality can be used to:

  • Reduce the network traffic and terminal output to some manageable level, while maintain tags’ high update rate to allow the filtering and averaging mechanisms to produce high accuracy results.

  • View only one or some tags in one TCP connection, might be useful for manual data viewing during testing or in some specific end user application.

The skip functionality is session-specific, which means each new TCP connection, established to the RTLS Server, starts with this functionality disabled. When enabled, this affects only the live positioning reports in the same TCP connection, other simultaneous or future connections are not affected.

Note that the SKIP request itself does not allow or disable sending any live positioning reports. The desired reports should still be selected and enabled by using the SET_REPORT_LIST request.

The idea behind the skip functionality is to specify a time duration in milliseconds, during which new positioning reports will not be sent for the same tag. When a new positioning report is internally generated, its timestamp is compared to the previous report that was actually sent out for the same tag. If less than the specified time has elapsed, the current report is skipped (i.e. not sent out). It is possible to choose a negative value to skip some (or most) of the tags at all.

When choosing the skip duration, there are three options to select the tags the value is applied to:

  • A single tag, according to its serial number.

  • All of the tags. Note that this setting applies not only to the tags currently online, but also tags appearing online in the future.

  • All of the tags, except one. This option might be useful for example to only allow live positioning reports from one tag, disabling all of the others. This setting also applies not only to the tags currently online, but also tags appearing online in the future.

It is possible to use the SKIP request multiple times in a row to achieve the desired result. When applying the skip duration to the same tag or group of tags again, the previous setting will be overwritten.

Client sends:

$PEKIO,SKIP,<parameter list>

<parameter list> is a comma-separated list with the following fields:

Field name

Explanation

Examples

Tag’s Serial Number

OR

The keyword “ALL”

Selects a single tag for which the skip duration is applied. Alternatively, there are three special cases:

  • The keyword “ALL” may be specified to select all of the tags (both currently online and appearing online in the future).

  • The tilde prefix (“~”) may be used with a tag’s serial number to select all the tags, except the mentioned one. Note that “all the tags” means both these currently online and also those appearing online in the future.

  • The exclamation mark prefix (“!”) may be used with a tag’s serial number to select this particular tag, i.e. all the other tags will be skipped.

0x0002E3

ALL

~0x0002E3

!0x0002E3

Skip duration

Skip duration in milliseconds. There are two special cases:

  • A value of “0” disables the skip functionality for the selected tag or group of tags, which means all the live positioning reports, which were selected by the SET_REPORT_LIST, will be sent to the client.

  • Any negative value will disable sending any data for the selected tag or group of tags (which means everything is skipped). The same behavior may be achieved also by setting the value to a very large positive number.

500

0

-1

Following are some full examples of client requests.

To choose a skip duration for a single tag:

$PEKIO,SKIP,0x0067AE,500

To choose a skip duration for all of the tags:

$PEKIO,SKIP,ALL,500

To allow live positioning reports only from a single tag, disabling the reports for any others:

$PEKIO,SKIP,~0x0067AE,-1

To disable the skip functionality, i.e. to return to the TCP connection’s initial/default state:

$PEKIO,SKIP,ALL,0

If processing the request was successful, the system responds:

$PEKIO,OK

If there was an error while processing the request, the following response will be sent:

$PEKIO,NOT_GOOD,<error ID>

<error ID> can be one of the following:

Error ID

Explanation

CANNOT_PARSE_ID

The tag’s serial number field could not be parsed.

EMPTY_ID

The tag’s serial number field was empty (since software version 2.6.0).

INCORRECT_SKIP

The skip duration field could not be parsed (since software version 2.6.0).

UNKNOWN_ID

No such tag in the database (since software version 2.6.0).

CANNOT_PARSE_VALUES

Could not find two parameters from the request (this error is present up to software versions 2.5.x; from 2.6.0, the general error WRONG_NUMBER_OF_PARAMETERS is used instead).

Notifications and historic data


NOTIFICATIONS

This request allows the client to ask for notifications in this TCP socket. Note that after issuing this command, asynchronous packets will be sent out by the RTLS. This means the client should parse its input in a way it could distinguish between responses for its own subsequent requests and these asynchronous notifications.

Client sends:

$PEKIO,NOTIFICATIONS,ON

$PEKIO,NOTIFICATIONS,OFF

The system responds:

$PEKIO,OK

Currently, the following notifications are defined:

  • ANCHOR_COORD. Each time the system establishes or loses a connection to an anchor, this notification will be sent to the client, so it can keep track of the anchor statuses.

  • TAG_BATTERY (described in “GET_BATTERIES” chapter). This notification will be sent right after the tag has been switched ON and later with interval of 5 minutes.


GET_HISTORY

This request allows the client to ask for historic positioning data.

Client sends:

$PEKIO,GET_HISTORY_BY_UNIX_TIME,<parameter list>

<parameter list> is a comma-separated list with the following fields:

Field name

Explanation

Example

Tag’s Serial Number

OR

The keyword “ALL”

Selects the tag for which history is queried. Alternatively, keyword “ALL” may be specified to get the historic data for all the tags.

0x000226

Start Timestamp

Specifies the start timestamp, for which period the history is queried, in Unix Timestamp format.

1563803000

End Timestamp

Specifies the end timestamp, for which period the history is queried, in Unix Timestamp format.

1563803002

If processing the request was successful, the system responds:

$PEKIO,OK

$PEKIO,DBH,<parameter list>

$PEKIO,DBH,<parameter list>

...

$PEKIO,DBH,<parameter list>

$PEKIO,EOF

Note that the first line of the response (the $PEKIO,OK) will be always sent immediately to indicate that the system understood the query. The following lines may be delayed, depending on the size of the database holding the historic positioning data, as well as the number of data samples that need to be extracted from the database and transferred to the client. When constructing the request, please choose reasonable start and end timestamps, otherwise the query might take even several minutes and there may be enormous amount of data returned.

The $PEKIO,EOF marker is sent finally to notify the client that sending the data is complete. This marker is present even If the database query did not return any data (i.e. there were no positioning samples between the start and end timestamps).

Each $PEKIO,DBH,<parameter list> line contains one historic positioning sample, where <parameter list> contains the following fields:

Field name

Explanation

Example

ARRIVAL_TIME

Unix Timestamp when the coordinate calculation was started, with millisecond precision.

1563453225.876

CALC_TIME

Unix Timestamp when the the coordinate calculation was finished, with millisecond precision. Note that usually this value should be slightly larger than ARRIVAL_TIME. If it is smaller, this indicates the coordinate calculation failed this time and the coordinates in this packet are a copy of previous successful calculation.

1563453225.936

TAG_SN

Tag’s unique serial number.

0x003431

TAG_TIMESTAMP

Tag’s Timestamp in units of milliseconds. This is a relative timestamp, which is not related to wall clock or other tags.

00004810

SEQ_NR

An 8-bit media access sequence number of ranging, expressed as a decimal value from 0 to 255. Value is incremented by the tag during the ranging process.

042

TAG_FLAGS

Tag’s information and error flags. This is a hexadecimal value that should be used as bitfield. Currently only the lowest bit has been advertised and its meaning is as follows: value of 0 means the tag is moving and thus using the High Update Interval. Value of 1 means the tag is standstill and thus using the Low Update Interval.

NOTE that though currently no other bits have been advertised, the user should NOT assume they are always zeros. These might be used for development purposes and/or be defined for some future functionality.

0x0001

X

Tag’s X coordinate (in meters).

15.21

Y

Tag’s Y coordinate (in meters).

-3.98

Z

Tag’s Z coordinate (in meters).

2.15

COORD_TYPE

A string which gives information about which method was used for the current coordinate estimation output. Can be:

  • 2D or 3D – if the coordinate was calculated according to the regular X, Y, Z coordinate calculation method.

  • 1D – if the coordinate was calculated by the “1D Mode” subsystem.

  • PROXIMITY – if the coordinate was randomized inside an anchor’s proximity detection area.

2D

IS_MOVING

YES or NO (corresponds to the bit in TAG_FLAGS, but is easier to handle).

YES

IN_ZONES

When the geofencing subsystem is used, this field contains the list of Zone IDs, where the tag currently is.

2;8;23

IN_AGS

When the anchor groups are used, this field contains the list of anchor groups, where the tag currently is.

 1;2

IN_TGS

When the tag groups are used, this field contains the list of tag groups, where the tag belongs to.

 3;4

IMU_EVENTS

Reserved for future functionality, can be ignored for now.

 

IMU_DATA

Reserved for future functionality, can be ignored for now.

 

NR_ANCHORS

Number of usable anchors from input (i.e. number of anchors, for which both the anchor’s serial number and distance to the tag were reported).

4

NR_ANCHORS_USED

Number of anchors that the math module used when calculating the tag’s position. Note that this can be more than in the field NR_ANCHORS, because the math module can use some buffered and filtered values from previous measurements, if necessary.

5

SNS

List of anchor serial numbers that participated in the coordinate calculation, separated by semicolons.

0x005412;0x0012E4;0x0023EB

DISTS

List of measured distances (in meters) to the anchors, which participated in the coordinate calculation process, separated by semicolons. The list is in the same order as the anchors were listed in the SNS field.

1.56;32.77;11.7

INTERVAL_R

The time (in milliseconds) elapsed from last distance measurement result.

292

INTERVAL_C

The time (in milliseconds) elapsed from last coordinate calculation.

293

A full example from the system’s output would be:

$PEKIO,OK

$PEKIO,DBH,1704383948.101,1704383948.122,0x0F6E,225337753,19,0x0201,21.78,0.17,1.36,2D,NO,,,,,0;0;0,4,4,0x000413;0x00000C;0x0002E5;0x0000F0,222;250;342;502,11753,11753

$PEKIO,DBH,1704383952.019,1704383952.042,0x0F6E,225341756,20,0x0201,21.78,0.17,1.36,2D,NO,,,,,0;0;0,4,4,0x000413;0x00000C;0x0002E5;0x0000F0,215;261;337;495,11753,11752

$PEKIO,DBH,1704383955.937,1704383955.961,0x0F6E,225345760,21,0x0201,21.78,0.17,1.36,2D,NO,,,,,0;0;0,4,4,0x000413;0x00000C;0x0002E5;0x0000F0,222;247;338;502,11754,11754

$PEKIO,DBH,1704383959.855,1704383959.877,0x0F6E,225349763,22,0x0201,21.79,0.17,1.36,2D,NO,,,,,0;0;0,4,4,0x000413;0x00000C;0x0002E5;0x0000F0,223;257;344;512,11754,11755

$PEKIO,EOF

 If the system could not access its internal database, the following response is sent:

$PEKIO,NOT_GOOD,NO_DB_ACCESS

If the tag’s serial number could not be parsed from the request, the following response is sent:

$PEKIO,NOT_GOOD,NO_ID

If the start or end timestamp could not be parsed, the following response is sent:

$PEKIO,NOT_GOOD,PARAMS

If the start timestamp is larger than end timestamp, the following response is sent:

$PEKIO,NOT_GOOD,PARAMS_ORDER