First released in version: 3.10

Displaying and Replaying Location Events (ubisense_location_logger and ubisense_location_replayer)

Two command-line tools are provided that can save location events to a text file, and replay those events through the platform. These are often used to develop and test SmartSpace systems, prior to production, or to analyze problems.

Use the ubisense_location_logger command-line tool to capture object or tag locations and spatial interactions over time to stdout or a text file. Because the logger connects to all location cells, it should be used with caution in a large SmartSpace system: its use will result in significant network traffic, for example possibly saturating a site connector link.

ubisense_location_replayer reads object names, locations and timestamps from stdin or, more usefully, a text file and injects location(s) of the specified object(s) at time intervals based on timestamps. SmartSpace object names are used to identify the objects to move. Locations can also be driven by specifying the tag ID. Using ubisense_location_replayer, you can inject locations in real-time and then watch to see how an object, or a tag and an associated SmartSpace object, behave. This can be useful for testing location rules such as parking and automatic association.

How to get ubisense_location_logger and ubisense_location_replayer

You can download ubisense_location_logger and ubisense_location_replayer using the Ubisense Application Manager. They can be found in the DOWNLOADABLES task under Ubisense > SmartSpace core > Location logging and replay.

ClosedHelp for downloading the tools >>

To download ubisense_location_logger and ubisense_location_replayer:

  1. Run Application Manager.

  2. Choose the DOWNLOADABLES task, and select Ubisense > > SmartSpace core > Location logging and replay.

  3. Click Download selected items and specify the path of a folder into which the tool will be written.

    To make it easy to run the tool, choose a folder that is on your user path (or add the location to your path later).

  4. Click Start download.

  5. When the messages indicate you have successfully downloaded the tool, you can click Close.

Using ubisense_location_logger

Usage

ubisense_location_logger

or

ubisense_location_logger > locationslog.txt

to save the logged locations to a file called locationslog.txt.

An example of the output is shown below:

location 13003580 [284.21,126.832,1.96157] 12.9425 -64.2745
spatial 13003580(UDM::Role::[MRO]extent<[MRO]Technician>) leaves General Office(UDM::Role::[MRO]extent<[MRO]Work_Zone>)
location 00:11:CE:00:00:02:14:DF [264.642,132.846,6.54731] 12.956 0
location 13003580 [288.101,124.734,1.93034] 13.4427 -27.9624
spatial 13003580(UDM::Role::[MRO]extent<[MRO]Technician>) enters Entrance Gate 1(UDM::Role::[MRO]extent<[MRO]Exit_Zone>)

 

To terminate the command, press Ctrl+C.

Using ubisense_location_replayer

Usage

ubisense_location_replayer

or

ubisense_location_replayer < locations.txt

to inject the locations stored in the locations.txt file.

An example of the file format, showing a series of tag locations, is shown below:

location 00:11:CE:00:00:01:E1:59 [0.94,-4.07,1.85] 2.24 0
location 00:11:CE:00:00:01:E1:59 [0.87,-4.06,1.85] 2.37 0
location 00:11:CE:00:00:01:E1:59 [0.76,-4.06,1.85] 2.5 0

Each line is a location to inject and contains:

  • the keyword location

  • the name of an object or tag

  • the x,y,z coordinates of the object or tag

    • enclosed by square brackets

    • comma delimited

    • with no spaces between coordinate values

  • a timestamp, giving the time at which the location is injected, in seconds from the start of replay

  • 0 (zero)

When the command is run, a series of messages displays as each location is injected in real time.

Parameters and Options

By default, ubisense_location_replayer replays locations in real time. A single numeric parameter can be supplied to slow down the replay. For example, appending 10 to the command will inject locations from the text file at 1/10 real time:

ubisense_location_replayer < locations.txt 10