Making a GeoFence Using Linkit One

by tejalmamaniya in Circuits > Sensors

1404 Views, 9 Favorites, 0 Comments

Making a GeoFence Using Linkit One

temp_1085167380.jpg
Geofence are georaphical boundaries which when entered or left will trigger certain outputs. In this instructable I'm gonna make a geofence of desired radius which when entered will trigger an SMS, "Device in RADIUS".

Connections

temp_1088189581.jpg
temp_44297006.jpg
You will need to use a standard SIM card. Insert the sim card in the SIM tray.

Also Attach the GSM antenna ti the board.

Also since we are using the GPS module, connect the GPS antenna as well

NOTE: The antenna connectors are extremely delicate, handle them carefully

Calculations

Lat_Long.gif
temp_872014939.jpg
From the Average raduis of the earth, I calculated the per degree offset in meters, which 111194.9m

Also we use the circle equations to find the locas of all the points within the radius at any particular centre.

Code

Change the values of centerlongitude, centerlatitude with the coordinates of the center of your geofence. Also change the value of radius in meters.

Now, in the loop, replace YOUR_NUMBER with the cell phone number to be notified.

Downloads

Compile, Run

Compile and upload the code to the board.

Keep the antenna of the board in an open space so that to increase precision and accuracy.

Keep radius as large as possible (possibly in km) so that the round offs in the calculations is compensated for