Attendance geofence radius: how many metres
Updated · Author: Hadirly team
There is no single correct number for every place. In Hadirly, the radius is the distance from the site point that a manager sets, and the starting value is 100 metres. The server also adds the phone’s reported GPS accuracy, but only up to 100 metres. A good radius is large enough to cover the GPS accuracy at that location, and small enough that an “outside the area” flag still means something.
What geofence and GPS accuracy mean
A geofence is a virtual area around a single coordinate point. For attendance, the phone counts as inside the area when the distance from its fix to the site point does not exceed the radius.
GPS accuracy is an estimate of how far the reported position may be from the true position. Android reports horizontal accuracy as a radius in metres at a 68 percent confidence level. In other words, about two thirds of fixes fall within that radius, and the rest can be further away. Accuracy changes with signal conditions, tall buildings, and whether the phone is indoors.
Rules the server applies
The server calculates the straight-line distance between the fix and the site point, then checks three rules:
- If the distance is greater than the radius plus the calculated accuracy, the record gets the
outside_geofenceflag. - The accuracy used in the calculation is capped at 100 metres. An accuracy of 300 metres adds only 100 metres to the radius.
- An accuracy above 100 metres gets the
low_accuracyflag, which appears in the app as “GPS signal less accurate”.
The 100-metre cap stops very poor accuracy from widening the radius without limit. A phone that reports a large accuracy can still pass the distance check when it is close, but its record is still flagged.
Example for a 100-metre radius:
| Phone accuracy | Distance from site point | Result |
|---|---|---|
| 12 m | 105 m | Inside the area |
| 8 m | 109 m | Outside the area |
| 150 m | 180 m | Inside the area, flagged as less accurate GPS signal |
| 150 m | 230 m | Outside the area |
How to choose a radius
Start with a radius that covers the main door and the parking area, then review the flagged records for the first few days. If many records fall right at the edge of the radius, increase it slightly or move the site point to the true centre of the location. If almost every record passes with no difference in outcome, the radius may be too large to make the check meaningful.
A radius that is too small produces many flags that do not mean anything. A radius that is too large makes the location check almost meaningless.
Limits to know about
- The radius checks distance from one point. It does not confirm that the employee is inside a particular building.
- The site point is set by the manager. If the coordinates are wrong, every record at that site is judged from the wrong position.
- Hadirly does not reject attendance outside the area. Any further decision is left to the manager.
- The accuracy a phone reports is an estimate, and the server cannot verify it. The 100-metre cap only limits its effect.
Checklist
- The site point is at the centre of the work location, not on the roadside.
- The starting radius is 100 metres, then adjusted after the first records are reviewed.
- Employees know that a record outside the area is still saved, with a flag.
- Location permission for the Hadirly phone app is turned on in the phone settings.
- Records flagged for low accuracy are reviewed together, not judged one by one without context.
What the manager sees
Each attendance record shows the distance and the accuracy on one line, for example “Distance 42 m from site” and “GPS accuracy 12 m”. The flags that may appear are “Outside site area” for a distance beyond the rule, “GPS signal less accurate” for accuracy above 100 metres, and “Suspected fake location” when the mock location flag is set.
The server calculates the distance from the coordinates it receives, so the number the manager sees is the same number used for flagging. The accuracy still comes from the device, so it should always be read as an estimate.
Why attendance is not rejected outright
A direct rejection could be wrong. A weak GPS signal on an upper floor or inside a building can put an employee well away from their actual position. With a flag, the manager sees the case and can accept an explanation. A rejected record is not counted in reports, so the same kind of error would stop being visible.
Sources
- Android Developers, Location class reference (getAccuracy method).