Jump to content

Geofence: Difference between revisions

From Transight Wiki
Created page with "= πŸ›°οΈ Geofence Configuration = == πŸ“˜ 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 cur..."
Β 
No edit summary
Line 1: Line 1:
= πŸ›°οΈ Geofence Configuration =
== Introduction ==
Geofencing is a key feature in GPS tracking. It allows users to define virtual boundaries on a map. When a vehicle or asset enters or exits these boundaries, the system can trigger alerts or actions.


== πŸ“˜ Introduction ==
== How Geofence Works ==
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.
* A geofence can be circular or polygonal.
* The GPS tracker regularly checks its position via satellites.
* The system compares the location against the defined geofence.
* When the boundary is crossed, it logs or notifies the event.


----
== Getting Coordinates from Google Maps ==
# Open [https://maps.google.com Google Maps].
# Search for your location (e.g., office, school).
# Right-click the spot and select '''"What’s here?"'''
# Copy the decimal coordinates shown (e.g., 10.0556255, 76.3544891).


== βš™οΈ How Geofence Works ==
Use these coordinates:
* A geofence can be a circular or polygonal area defined by latitude and longitude.
* As the center for circular geofences.
* The Discovery 4G GPS tracker continuously checks its current location via satellite.
* As corners for polygon geofences (3–6 recommended points).
* 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.


----
== Geofence Command Format ==
Β 
== 🌐 How to Get Coordinates from Google Maps ==
# Open [https://maps.google.com 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 (e.g., '''10.0556255, 76.3544891''')
# Use this 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
* '''Status''': 1 = Enable, 0 = Disable
* '''Geofence ID''': Unique ID (e.g., 1313, 1777)
* '''Geofence ID''': Unique number (e.g., 1313)
* '''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 (e.g., 10.0556255, 76.3544891)
* '''Latitude/Longitude''': Decimal format
* '''Radius''': Only for circles (in meters)
* '''Radius''': In meters (only for circular type)
* '''#''': Used to separate parameters
* '''#''': Parameter separator
* '''&''': Must be added at the end of polygon commands
* '''&''': Required at 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
== Circular Geofence Example ==
* Geofence ID: 1313
Objective: Create a 1000-meter circular geofence at 10.0556255, 76.3544891
* Alert Type: 3
* Shape: 0
* Latitude: 10.0556255
* Longitude: 76.3544891
* Radius: 1000
Β 
'''Command format:'''
<pre>
SET CUGF:&lt;Status&gt;&lt;Geofence ID&gt;-&lt;Alert Type&gt;-&lt;Shape&gt;#&lt;Latitude-Longitude&gt;#&lt;Radius&gt;
</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:
Response: Error : 0
Error : 0
</pre>
</pre>


----
== Polygon Geofence Example ==
Β 
Objective: Create a polygon geofence with 4 corner points.
=== πŸ”· Example 2: Polygon Geofence ===
'''Objective''': Create a polygon geofence with 4 corner points (first point repeated at the end)


* Status: 1
Coordinates:
* Geofence ID: 1777
* 10.0535097, 76.334262
* Alert Type: 3
* 10.0504267, 76.3328855
* Shape: 1
* 10.0474386, 76.3439598
* Coordinates:
* 10.0503084, 76.3437023
** 10.0535097, 76.334262
* (Repeat the first point to close the shape)
** 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:&lt;Status&gt;&lt;Geofence ID&gt;-&lt;Alert Type&gt;-&lt;Shape&gt;#&lt;Lat-Long&gt;#...#&lt;Lat-Long&gt;&amp;
</pre>


'''Example''':
Command:
<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''':
== Save the Configuration ==
<pre>
After setting geofences, save to memory:
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>
Line 114: Line 64:
</pre>
</pre>


----
== Check Configured Geofences ==
To view saved 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 Checklist ==
Β 
* Confirm GPS fix is available on device.
----
* Move the vehicle inside and outside geofence area.
Β 
* Verify alerts or logs are triggered correctly.
== βœ… 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:29, 28 June 2025

Introduction

Geofencing is a key feature in GPS tracking. It allows users to define virtual boundaries on a map. When a vehicle or asset enters or exits these boundaries, the system can trigger alerts or actions.

How Geofence Works

  • A geofence can be circular or polygonal.
  • The GPS tracker regularly checks its position via satellites.
  • The system compares the location against the defined geofence.
  • When the boundary is crossed, it logs or notifies the event.

Getting Coordinates from Google Maps

  1. Open Google Maps.
  2. Search for your location (e.g., office, school).
  3. Right-click the spot and select "What’s here?"
  4. Copy the decimal coordinates shown (e.g., 10.0556255, 76.3544891).

Use these coordinates:

  • As the center for circular geofences.
  • As corners for polygon geofences (3–6 recommended points).

Geofence Command Format

  • Status: 1 = Enable, 0 = Disable
  • Geofence ID: Unique number (e.g., 1313)
  • Alert Type: 1 = Entry, 2 = Exit, 3 = Both
  • Shape: 0 = Circle, 1 = Polygon
  • Latitude/Longitude: Decimal format
  • Radius: In meters (only for circular type)
  • #: Parameter separator
  • &: Required at end of polygon commands

Circular Geofence Example

Objective: Create a 1000-meter circular geofence at 10.0556255, 76.3544891

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

Polygon Geofence Example

Objective: Create a polygon geofence with 4 corner points.

Coordinates:

  • 10.0535097, 76.334262
  • 10.0504267, 76.3328855
  • 10.0474386, 76.3439598
  • 10.0503084, 76.3437023
  • (Repeat the first point to close the shape)

Command:

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&

Save the Configuration

After setting geofences, save to memory:

SET TSMR:2

Check Configured Geofences

To view saved geofences:

GET CUGF

Final Checklist

  • Confirm GPS fix is available on device.
  • Move the vehicle inside and outside geofence area.
  • Verify alerts or logs are triggered correctly.