Advanced filters: Track points filtering based on signals

With Advanced Filters you can get more detailed information of the tracks.

Using this feature you'll be able to display the interval a switch on the device was on or off. This comes in handy when you want to monitor the activity of a tool on your vehicle, e.g. when the broom of a street cleaner was down for cleaning.

How to use: Street cleaner example

Street cleaning vehicles send a boolean signal to GpsGate to inform if the broom for cleaning is down (active) or not. By using Advanced Filters, we can see when the vehicle was in cleaning mode.

First, we have to make sure that GpsGate is receiving the signal in question. For this purpose, we create a GpsGate variable, and map it with the right input from the device. Steps to do this:

  1. Go to Site Admin → Devices → Variables
  2. Define a variable named BroomOn of System.Boolean type and save it.
  3. Go to Vehicle Tracker. Open the device mapper panel and pair the right input with BroomOn signal. You can read more about the device mapper here.

You can access Advanced Filters panel from the dropdown menu on the top right of track points list in your vechile tracker application:

On the panel, apart from Time, Speed and Altitude filters, you will find a dropdown list where you can pick any of the mapped boolean signals for filtering.

Pick BroomOn signal from the list, and click Apply Filter. Track point list will be updated and will only include the track points where broom was down (i.e. BroomOn signal was True):

Now that you have a list of track points where the street cleaner was in cleaning mode, you can draw the track, and the result on the map.

Before Filter

Before filtering

After Filter
After filtering

Combining more signals for filtering

It’s also possible to combine two or more signals for filtering. To do this, you will need to use device mapper scripting feature in GpsGate.

If we go back to our street cleaner examle, let’s assume that the device doesn’t have an explicit BroomOn signal sent to GpsGate Server. Instead, the condition is that vehicle speed is more than 1 kph, and CustomBoolean1 signal is true. In this case, we can map BroomOn signal to a device mapper script:

// Read speed value
var speed = fields.get('Speed');
// Read CustomBoolean1 signal
var customBoolean1 = fields.get('CustomBoolean1');
// Return true if speed is greater than 1 kph
// and CustomBoolean1 is true.
return (speed > 1 && customBoolean1 == true);

Read more about device mapper scripting here.