ajimehji that's easy
create calculator:
selector: geofence of 4 circles, inverted: true (to detect trips when device is outside geofences)
counter:
- geofence - to know which of circles was the origin
- route - to visualize it in toolbox
- expression - summary - mileage
- interval - trip average speed counted by formula (mileage / duration) * 3600 (or you can count average speed by expression - average position.speed reported by the device)
{
"intervals_ttl": 31536000,
"update_delay": 30,
"update_period": 31536000,
"messages_source": {
"source": "device"
},
"name": "pit-port",
"selectors": [
{
"geofences": [
{
"center": {
"lat": 52.307282,
"lon": 9.860821
},
"name": "pit",
"radius": 0.1,
"type": "circle"
},
{
"center": {
"lat": 52.322538,
"lon": 9.848054
},
"name": "port",
"radius": 0.1,
"type": "circle"
}
],
"invert": true,
"merge_message_after": true,
"merge_message_before": true,
"name": "pit",
"type": "geofence"
}
],
"intervals_rotate": 0,
"counters": [
{
"name": "geofence",
"type": "geofence"
},
{
"name": "route",
"type": "route"
},
{
"expression": "mileage()",
"method": "summary",
"name": "mileage",
"type": "expression"
},
{
"expression": "(mileage / duration) * 3600",
"name": "trip.speed",
"type": "interval"
}
]
}
You can write to flespi chat (top right corner of your flespi.io account) if you'll need some assist while implementing this