Geofence: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
== Introduction == | == Introduction == | ||
Geofencing is a | Geofencing is a core feature in modern GPS tracking systems. It allows users to define virtual boundaries on a map. When a GPS-tracked vehicle or asset enters or exits these areas, the system automatically triggers alerts or actions. | ||
== How Geofence Works == | == How Geofence Works == | ||
* A geofence can be circular or polygonal. | * A geofence can be a circular or polygonal area defined by latitude and longitude. | ||
* The GPS tracker | * The Discovery 4G GPS tracker continuously checks its current location via satellite. | ||
* The system compares | * The system compares this live data against the predefined geofence area. | ||
* | * If the asset enters or exits, the event is logged or notified based on configuration. | ||
== | == How to Get Coordinates from Google Maps == | ||
# Open [https://maps.google.com Google Maps] | # Open [https://maps.google.com Google Maps] | ||
# Search for your location (e.g., | # Search for your desired location (e.g., warehouse, school) | ||
# Right-click the | # Right-click on the location and select '''“What’s here?”''' | ||
# | # Note the coordinates shown below (e.g., '''10.0556255, 76.3544891''') | ||
# Use these as: | |||
## Center point for circular geofences | |||
## Corner points for polygon geofences (at least 3, ideally 4–6) | |||
# Enter the values into the command format explained below | |||
'''Note''': A maximum of '''6 geofences''' (circle or polygon combined) can be configured on any Transight telematics device. | |||
== Geofence Command Format == | == Geofence Command Format == | ||
* '''Status''': 1 = Enable, 0 = Disable | * '''Status''': 1 = Enable, 0 = Disable | ||
* '''Geofence ID''': Unique | * '''Geofence ID''': Unique ID (e.g., 1313, 1777) | ||
* '''Alert Type''': 1 = Entry, 2 = Exit, 3 = Both | * '''Alert Type''': 1 = Entry, 2 = Exit, 3 = Both | ||
* '''Shape''': 0 = Circle, 1 = Polygon | * '''Shape''': 0 = Circle, 1 = Polygon | ||
* '''Latitude/Longitude''': Decimal format | * '''Latitude/Longitude''': Decimal format (e.g., 10.0556255, 76.3544891) | ||
* '''Radius''': | * '''Radius''': Only for circles (in meters) | ||
* '''#''': | * '''#''': Used to separate parameters | ||
* '''&''': | * '''&''': Must be added at the end of polygon commands | ||
== Command Examples with Field Mapping == | |||
=== Example 1: Circular Geofence === | |||
'''Objective''': Create a 1000-meter circular geofence at '''10.0556255, 76.3544891''' | |||
* Status: 1 | |||
* Geofence ID: 1313 | |||
* Alert Type: 3 | |||
* Shape: 0 | |||
* Latitude: 10.0556255 | |||
* Longitude: 76.3544891 | |||
* Radius: 1000 | |||
'''Command format:''' | |||
<pre> | |||
SET CUGF:<Status><Geofence ID>-<Alert Type>-<Shape>#<Latitude-Longitude>#<Radius> | |||
</pre> | |||
'''Example:''' | |||
<pre> | <pre> | ||
SET CUGF:1-1313-3-0#10.0556255-76.3544891#1000 | SET CUGF:1-1313-3-0#10.0556255-76.3544891#1000 | ||
</pre> | </pre> | ||
Response: | '''Response:''' | ||
<pre> | <pre> | ||
IMEI: 862942074896044 | IMEI: 862942074896044 | ||
Command: SET CUGF:1-1313-3-0#10.0556255-76.3544891#1000 | Command: SET CUGF:1-1313-3-0#10.0556255-76.3544891#1000 | ||
Response: Error : 0 | Response: | ||
Error : 0 | |||
</pre> | </pre> | ||
== Polygon Geofence | === Example 2: Polygon Geofence === | ||
Objective: Create a polygon geofence with 4 corner points. | '''Objective''': Create a polygon geofence with 4 corner points (first point repeated at the end) | ||
* Status: 1 | |||
* Geofence ID: 1777 | |||
* Alert Type: 3 | |||
* Shape: 1 | |||
* Coordinates: | |||
** 10.0535097, 76.334262 | |||
** 10.0504267, 76.3328855 | |||
** 10.0474386, 76.3439598 | |||
** 10.0503084, 76.3437023 | |||
** 10.0535097, 76.334262 (repeat to close loop) | |||
'''Command format:''' | |||
<pre> | |||
SET CUGF:<Status><Geofence ID>-<Alert Type>-<Shape>#<Lat-Long>#...#<Lat-Long>& | |||
</pre> | |||
'''Example:''' | |||
<pre> | <pre> | ||
SET CUGF:1-1777-3-1#10.0535097-76.334262#10.0504267-76.3328855#10.0474386-76.3439598#10.0503084-76.3437023#10.0535097-76.334262& | SET CUGF:1-1777-3-1#10.0535097-76.334262#10.0504267-76.3328855#10.0474386-76.3439598#10.0503084-76.3437023#10.0535097-76.334262& | ||
</pre> | </pre> | ||
'''Response:''' | |||
<pre> | |||
IMEI: 862942074896044 | |||
Command: SET CUGF:1-1777-3-1#... | |||
Response: | |||
Error : 0 | |||
</pre> | |||
== Save Configuration == | |||
After setting up geofences, you must execute the below command to save the configuration permanently: | |||
<pre> | <pre> | ||
SET TSMR:2 | SET TSMR:2 | ||
</pre> | </pre> | ||
== Check Configured Geofences == | == To Check Configured Geofences == | ||
Use the command: | |||
<pre> | <pre> | ||
GET CUGF | GET CUGF | ||
</pre> | </pre> | ||
This will show all geofences currently saved in the device memory. | |||
== Final | ==Final Verification == | ||
* | After setup: | ||
* | * Ensure the device has a GPS fix | ||
* | * Drive or move the asset in and out of the geofenced area | ||
* Confirm alerts are received/logged as expected | |||
Revision as of 05:44, 28 June 2025
Introduction
Geofencing is a core feature in modern GPS tracking systems. It allows users to define virtual boundaries on a map. When a GPS-tracked vehicle or asset enters or exits these areas, the system automatically triggers alerts or actions.
How Geofence Works
- A geofence can be a circular or polygonal area defined by latitude and longitude.
- The Discovery 4G GPS tracker continuously checks its current location via satellite.
- The system compares this live data against the predefined geofence area.
- If the asset enters or exits, the event is logged or notified based on configuration.
How to Get Coordinates from Google Maps
- Open Google Maps
- Search for your desired location (e.g., warehouse, school)
- Right-click on the location and select “What’s here?”
- Note the coordinates shown below (e.g., 10.0556255, 76.3544891)
- Use these as:
- Center point for circular geofences
- Corner points for polygon geofences (at least 3, ideally 4–6)
- Enter the values into the command format explained below
Note: A maximum of 6 geofences (circle or polygon combined) can be configured on any Transight telematics device.
Geofence Command Format
- Status: 1 = Enable, 0 = Disable
- Geofence ID: Unique ID (e.g., 1313, 1777)
- Alert Type: 1 = Entry, 2 = Exit, 3 = Both
- Shape: 0 = Circle, 1 = Polygon
- Latitude/Longitude: Decimal format (e.g., 10.0556255, 76.3544891)
- Radius: Only for circles (in meters)
- #: Used to separate parameters
- &: Must be added at the end of polygon commands
Command Examples with Field Mapping
Example 1: Circular Geofence
Objective: Create a 1000-meter circular geofence at 10.0556255, 76.3544891
- Status: 1
- Geofence ID: 1313
- Alert Type: 3
- Shape: 0
- Latitude: 10.0556255
- Longitude: 76.3544891
- Radius: 1000
Command format:
SET CUGF:<Status><Geofence ID>-<Alert Type>-<Shape>#<Latitude-Longitude>#<Radius>
Example:
SET CUGF:1-1313-3-0#10.0556255-76.3544891#1000
Response:
IMEI: 862942074896044 Command: SET CUGF:1-1313-3-0#10.0556255-76.3544891#1000 Response: Error : 0
Example 2: Polygon Geofence
Objective: Create a polygon geofence with 4 corner points (first point repeated at the end)
- Status: 1
- Geofence ID: 1777
- Alert Type: 3
- Shape: 1
- Coordinates:
- 10.0535097, 76.334262
- 10.0504267, 76.3328855
- 10.0474386, 76.3439598
- 10.0503084, 76.3437023
- 10.0535097, 76.334262 (repeat to close loop)
Command format:
SET CUGF:<Status><Geofence ID>-<Alert Type>-<Shape>#<Lat-Long>#...#<Lat-Long>&
Example:
SET CUGF:1-1777-3-1#10.0535097-76.334262#10.0504267-76.3328855#10.0474386-76.3439598#10.0503084-76.3437023#10.0535097-76.334262&
Response:
IMEI: 862942074896044 Command: SET CUGF:1-1777-3-1#... Response: Error : 0
Save Configuration
After setting up geofences, you must execute the below command to save the configuration permanently:
SET TSMR:2
To Check Configured Geofences
Use the command:
GET CUGF
This will show all geofences currently saved in the device memory.
Final Verification
After setup:
- Ensure the device has a GPS fix
- Drive or move the asset in and out of the geofenced area
- Confirm alerts are received/logged as expected