How an entry or exit is decided
Every position a tracker sends is checked against the account's geofences. If the previous position was outside a zone and this one is inside, that is an entry; the reverse is an exit. The check uses the positions and nothing else. It has no idea that the vehicle is parked, that the driver is having lunch, or that the road happens to clip the corner of the zone.
In GPStrix every geofence in an account is checked against every vehicle in it. Which crossings become alerts is decided by the rules you write, not by the zone, and that is where most of the fixing happens.
A position is also not a point. A tracker with a clear view of the sky is usually within a few metres; between tall buildings, under a flyover or in a covered yard it can wander by tens of metres from one record to the next while the vehicle stands still. Keep that in mind for everything below.
The four mistakes behind most false alerts
- The parked-on-the-line vehicle
- A truck parks along the depot wall, which is where you drew the boundary. Each position lands a few metres either side of it, and every other one is an entry or an exit. This is the commonest cause of an alert storm, and it always happens at night when nobody is watching the inbox.
- The fence across a road
- A zone drawn generously around a customer's site also covers part of the main road outside. Every vehicle in the fleet that drives past "enters" and "leaves" the customer.
- The fence that is too small
- A circle drawn tight around a building rather than the yard, the gate and the parking. Vehicles that are clearly at the site are recorded as outside it.
- The gap in coverage
- A vehicle loses signal inside a zone and next reports from outside it. The exit is real, but it is stamped at the time of the first position outside, which can be well after it actually left.
Draw zones around where vehicles stop, not around buildings
- For a depot or yard, include all of it: the gate, the parking, the loading bays and the turning space. Put the boundary out in the open, a clear margin away from where vehicles park. If vehicles park along the wall, the wall is not your boundary.
- Keep boundaries off roads your vehicles drive along. If a site sits on a highway, draw the zone back from the carriageway, or use a polygon that follows the site's own edge rather than a circle that spills onto the road.
- Use a polygon when the site is long and thin, such as a factory along a service road. A circle big enough to cover it will cover half the estate.
- For a route, use a corridor: a line along the road rather than an area. Leaving the corridor is a route deviation. It suits fixed routes, such as a school bus or a regular run between two plants, and is a poor fit where the route changes every day.
GPStrix checks a shape before saving it. A polygon with only two corners would save in most systems and then never fire, because it has no inside; the console refuses it while you are still drawing.
Write the rule for the question you actually have
Most people want to know one of three things, and each wants a different rule:
| The question | What to use |
|---|---|
| Has it left the depot? | An alert on exit from the depot only, scoped to the vehicles concerned. Not on entry as well: the return is rarely the news. |
| Did it reach the customer, and how long did it stay? | Usually no alert at all. The geofence and site-visit reports answer it, every morning or on demand. |
| Did it go somewhere it should never go? | An alert on entry to that zone. These are rare enough that every one deserves attention. |
Alerting on every entry and exit of every customer site is the setup that produces the forty-alert night. A report gives the same information without interrupting anyone.
Use the rule's scope and throttle
A GPStrix rule can apply to the whole account, to one vehicle group or to a single vehicle. A rule about the cement plant's gate does not need to watch the delivery vans in another city.
Each rule also has a throttle window. Once it fires, further matches inside the window are held back rather than sent, and counted. The default is five minutes, kept separately for each vehicle, so one truck parked on a boundary cannot silence the rule for the rest of the fleet. When the next alert does go out, it says how many were held back: "and 37 more since the last alert". That one line tells you a boundary needs moving without anybody receiving 37 messages.
A throttle is a safety net, not a fix. If a rule keeps saying "and 37 more", go back to the drawing and move the boundary away from where that vehicle stands.
Speed limits that belong to a place
A geofence can carry its own speed limit, for a school zone, a plant's internal roads or a ghat section. Inside it, overspeed is judged against the zone's limit. Outside any such zone the vehicle's own limit applies, and failing that the account's default. A zone without a speed limit has no opinion and changes nothing, so a zone drawn only for reporting never switches overspeed off by accident.
A checklist before you switch alerts on
- Open a week of replay for two or three vehicles that use the site, and look at where they actually stand.
- Redraw the boundary in the open, clear of the parking and of any road.
- Decide which of the three questions above you are asking, and write only that rule.
- Scope it to the vehicles that need it.
- Leave it a week, then read the alerts with the replay open. Every alert should be one you would have wanted to receive.