Geofencing for Construction Sites: Preventing Equipment Walkoffs

Every time a GPS tracker on a piece of construction equipment reports its position, a server takes that latitude and longitude and checks whether it falls inside a shape someone drew on a map. If the answer changes from inside to outside, you get an alert. Sales pages make this sound like a fence with a guard at the gate, but the real behaviour is messier, mostly because the position being checked is never quite where the machine actually is.

I got curious about this after a friend who runs a small excavation company told me his alerts went off so often in the first month that he muted them, so he was paying for a tracker he had effectively switched off.

Sites aren’t circles, so why are so many zones?

Most tools offer circles and polygons. A circle is a centre point plus a radius, and checking it is cheap: measure the distance from the centre to the reported position and compare it with the radius. With a polygon you click corners around the real site boundary, so the zone can follow an L-shaped lot or a laydown yard that sticks out past the trailer. Construction sites are almost never round, and a circle big enough to reach the far corners usually also takes in the street and whatever happens to be across it.

I find the polygon check oddly satisfying. (There is no map involved at this stage, just coordinates and arithmetic.) The standard method is called ray casting: from the reported point you draw an imaginary line heading off in one direction, say due east, and count how many times it crosses an edge of the polygon. An odd count means the point is inside and an even count means it is outside, for any shape, including ones with a notch where the neighbour’s lot pokes in. It is only a loop over the edges with a bit of multiplication, so it costs almost nothing to run on every incoming position. The only awkward case is a line passing exactly through a corner, and every implementation has a small tie-breaking rule for it that nobody thinks about until a point lands right there.

Why the alerts flap

GPS on a cheap tracker is usually good to within about 5 metres under open sky, and worse next to anything big and metal. A construction site is full of that, mostly steel framing and stacked shipping containers. Signals bounce off those surfaces before they arrive, so the receiver works from a signal that took a longer path than it should have and the reported point wanders around the real one. If an excavator is parked 3 metres inside the boundary, that wandering puts it outside on some reports and back inside on the next, and every crossing fires an alert. Overnight that adds up to a lot of messages about a machine that never moved.

That is almost certainly what happened to my friend, whose yard fence ran right along the line where his operators liked to park at the end of the day.

The usual fixes are dwell time and hysteresis, and good systems use both. Dwell time means the tracker has to stay outside for a set period, something like 10 minutes, before anyone gets told. Hysteresis means the line for leaving is drawn wider than the line for coming back, so a machine has to get well past the boundary, maybe 20 metres, before it counts as gone. A parked machine jittering along the fence stops generating noise, while one on a trailer heading down the road crosses the outer line almost immediately.

Dwell time does cost you something, because a thief gets those minutes for free, so I’d keep it short and let the wider leaving line do most of the work.

After hours

A machine leaving the site in the middle of a Tuesday afternoon is usually going to another job. The same machine leaving late on a Saturday night probably isn’t, and most tools let you attach a schedule to a zone so off-hours crossings get escalated, maybe to a phone call. Some go further and alert on any movement at all after hours, even inside the zone, which catches the slow part of a theft where someone is loading a skid steer onto a trailer before it reaches the gate.

I prefer the movement rule to the exit rule, since a machine crossing the boundary is already strapped down and leaving, although a security guard repositioning a light tower will set it off, and so will the operator who left his lunchbox in the cab and drove back for it after dark.

Put the tracker on the machine

A geofence only knows about things that report a position into it, and a tempting shortcut for a small contractor is to track people’s phones and assume the equipment is wherever the crew is. That holds up during the day and fails completely at night, when the phones go home and the excavator stays behind. For theft, the tracker has to be on the equipment itself, wired to the machine’s battery or running on its own, and hidden somewhere a thief won’t find it in a quick look with a flashlight.

Battery life is where this gets annoying. A wired unit can report every few seconds, but a self-powered one hidden on a towable generator might check in a handful of times a day to save its battery. Fed that rarely, a geofence can only tell you the generator left sometime since lunch, which is a much weaker thing to hand the police than an exact time and a direction of travel.

Tracking where crew members are is a separate job, and it needs different tools. A people-focused product like Konvoyage for field teams shows where team members are on a live map while they work, and it has no geofencing and isn’t built to follow equipment. I wrote about why construction crews need location tracking rather than vehicle tracking, and the equipment side is the part that post left out.

What I still haven’t seen anyone handle well is the site that keeps moving. Road crews and utility jobs relocate every few weeks, and redrawing a polygon each time the work shifts down the road is the kind of chore that gets put off, after which the zone guards an empty field while the machines sit somewhere else.

If your jobs move like that, do you redraw the fence every time, or have you found a setup where the zone follows the work?