Implementation of Geo-fencing to monitor a specific target using Point in Polygon Algorithm

Page 1

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 09 Issue: 12 | Dec 2022 www.irjet.net p-ISSN: 2395-0072

Implementation of Geo-fencing to monitor a specific target using Point in Polygon Algorithm

1Professor, Dept. of Electronics and Telecommunication, Vishwakarma Institute of Technology, India 2,3,4,5,6Student, Dept. of Electronics and Telecommunication, Vishwakarma Institute of Technology, India ***

Abstract - Geo-fence is a method in which we use GPS, RFID, Wi-Fi or cellular data to provoke an action whenever our device or RFID tag is inside or outside a virtual borderline. Some of the most common applications of Geo-Fence are in automation, management, security, andmarketing. Some geofences are set for monitoring activity in safe areas, which allows the administrator to get notified or alerted when anyone enters or exits that specific area. In this project paper, we have demonstrated the use of Geo-Fence usingNodeMCU. A virtual border or fence is created.

Key Words: Geo-Fencing, Internet of Things, NodeMCU, ESP8266, Neo 6M, Location Based Services.

1. INTRODUCTION

Securitymethodsandnavigatorshavecontinuallybecomea necessity of a human’s existence. The incidents of leading Radios have caused progressive changes in these fields. Equipmentstealingisaharshquestioninmanycorporations containingconveyanceandbuilding,exceptionallyformore meaningfultrades.Thereisnoresolutioninlisteningtothe shift of the bus, and we mix up the current condition and positionofthejeeps.TheGPS-locatedcarradiodetection and ranging is an individual's ultimate understandable habits.TheGlobalPositioningSystem(GPS)isaschemethat determines trustworthy part and period news always in someweatherconditionondust.Wearegoingtoanswerthe site following question by utilizing GPS located listening wholeaccompanyingageo-swordsmanshipwherewithalto paththebicycle.Thisarrangementcoveredanyimportant partsthatlinkedsubsidiaryideastoideasabouttheposition of the automobile to a detached consumer. Geoswordsmanshipauthorizeddetachedlisteningofterrestrial districts among a in essence fence (geo-fence), and mechanicaldetectionswhenittracedmovableobjectsthat filedorwithdrewtheseextents.

2. LITERATURE REVIEW

The literature survey of some of the research papers referredisgiveninthissection.

The paper [1] talks about the Geo-fencing infrastructure. Geo-FenceisafeaturethatmakesuseofGlobalPositioning System(GPS)orRFIDi.e.radiofrequencyidentificationto creategeo-boundaries.Itentailsbothcontinuouslocationof

the mobile device and continual matching of the mobile's positionwithasetofgeo-fences.Thispapertalksaboutthe Locationbasedservices(LBS),geofencing,itsworkingand applications.LBSaremobile-phone-basedservicesthattake into consideration the device's geographic location. InformationisprovidedbyLBS.BecauseLBSaresoreliant on the location of the mobile user, the major goal of the serviceprovider'ssystemistofigureoutwheretheuseris. Geo-fencing encircles a geographic area with GPS coordinates,andusesthelocationdataofamobileuserto determinehisorherproximitytothatregion.Thereare2 types of Geo-Fencing namely Circular Geo-Fence and PolygonalGeo-Fence.Incircular,aradiusisdecidedandthe circularareaaroundaspecificpointisfenced.Whereasina polygonalGeo-Fence,thelatitudeandlongitudevaluesare used to create the gro-fence. So, the basic idea of GeoFencing is explained in this paper along with some applications.

Thepaper[2]discussestheuseofGeo-FencingandMachine learning in tracking Covid-19 Patients. The aim of the proposedprojectwastocontrolthepandemiconNational andpersonallevel.Theroleofgeo-fenceistotracetheuser's location.Alsothelocationofthepeoplethathavecomein contact with the infected person. An App with inbuilt features of Geo-Fencing was created which created geofencesaroundtheuserandpeoplearoundhim/her.

Inthepaper[3]theuseofGeo-Fenceinlocationtrackingof vehiclesisexplained.Therateofvehicletheftisincreasing daybyday,andtheproblemisbecomingworse.Thissystem isdesignedfortheprotectionofvehiclesinanefficientway andeconomicway.Ageo-Fencecanbecreatedinwhichthe vehicleusuallytravels.Andthelocationistrackedusingthe GPS module and is visible on the google map and Ubidots platform. So whenever the vehicle is out of the fence, the ownerisnotifiedandtheactioncanbetakenrespectively. Thiswillhelptheownertotrackthelocationdetailsofthe vehicleandprotectthevehicle.

Asystemtoprotectchildrenfromchildmaltreatment(CM)is proposedinthepaper[4].Theissueisincreasingrapidlyin the21stcentury.Anapplicationismadeinwhichwecanset thelimitofthemobileusertoaspecificarea.Thelocationof the child is traced by the mobile phone GPS. Also some different modules lik communication and voice recording modulesareintroduced.Wheneverthechildisoutsidethe

© 2022,
|
|
Certified Journal | Page1000
IRJET
Impact Factor value: 7.529
ISO 9001:2008
Ajay Talele1, Aditya Vaishale2, Mohish Khadse3, Suraj Chaudhari4, Khushi Junnare5 , Aditya Ingale6

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 09 Issue: 12 | Dec 2022 www.irjet.net p-ISSN: 2395-0072

area set on the app, the parents are notified and a notificationonthechild'smobileisalsodisplayed.Thenthe childcanselectI’msafeoptionifhe/sheissafe.ThisITbased applicationwithgeo-fencingtechniquesisintroducedinthis paper.

Inpaper[5]VictoriaBopearachchiproposesanovelstrategy totrackcovid-19patientsusingaGPS-basedtrackingsystem whichcanprovidealivemapofthepatient'sposition.The suggestedsystemincludesanESP8266-12E,apushbutton, batteryandaNEO-6MGPSmodule.Throughcommunication withsatellites,theNEO-6MGPSmodulesendsandreceives signalscarryinginformationontheuser'slocation.Latitude andlongitudeinformationisreadifnodemcuconnectedto Wi-Fisuccessfully;else,positioncoordinatesaresavedon theserver.Real-timemappingofpatientsisalsoprovidedon awebapplication.

SupreethSKetal.[6]proposesasystemwhichusesasensor networktotrackthewhereaboutsofanimalsinsanctuaries andnationalparkswithoutcausingharmtotheanimals.The proposed system uses sensors to detect animal positions. Thesensedinformationisstoredtothecloudserverandalso displayedonaLCDscreen.Theproposedsystemimproved knowledgeaboutanimalrangesandecosystems.Butcomes withsomedrawbackslikeexpensiveHigh-endtechnologies.

G.Rameshetal.[7]proposesasystemtopreciselypinpoint theanimal'slocationinsidethatwidespace.Theproposed trackingsystemisbasedonGPSandtheWIFIModule,which runs in real-time on the Arduino-ATmega328P. In the proposed system, the GPS module is used to get the coordinates.ThroughtheWi-Fimodulethedataisstoredon the cloud. A web Application is created to receive the coordinates of location from the Wi-Fi module. When compared to other tracking technologies, the proposed system is fast and accurate method of determining the locationoftheanimal.

Accordingto[9]technologyprovidesahigh-securitysystem thatprotectsautomobilesfrombeingstolen.Italsodelivered analerttotheuserdependingonthelocation'sboundaries byutilisingtheInternetofThings(IoT).Inthisinvestigation, thesystemcouldsimplymonitorandtrackthecar'slocation andsendanalertwhenthevehicleleftthegeo-fencingarea. However[10]asimilarkindofsystemisalsousedforthe covid19patientmonitoring,Thesystemisdividedintofour levels, each with its own set of capabilities: wearable sensors, a cloud server layer, an IoT gateway layer, and a client application layer for viewing and analysis. The wearable sensors layer comprises of wearable biomedical andGPSsensorsforphysiologicalmetrics,aswellasGPSand Wi-Fi Received Signal Quality Indicator collection for healthcareapplicationsanduserGeo-fencing.Alsothiskind of system are also being tried to put their application in wildlifemonitoringdomain[8]theauthorsconcentrateon three types of animal monitoring applications: position

tracking, ecosystem environment observation, and behavioralpatternsidentification.

3. PROPOSED WORK

TheprojectiscreatingaGeo-FenceusingNodeMCUandGPS module.Itcreatesavirtualboundaryorfencethatcoversa physical area. It creates a wall between that area and the outside environment. But geo-Fence is not like a physical fence, it can detect the movement of the object or body withinthefenceonly.Inthisproject,weusedthepolygonal Geo-fencingtechnique.Theobjectivesoftheprojectwillbe liketotrackthetargetlocation,todisplaythetargetlocation onGoogleMaps,togivetargetstatusi.e.InsideorOutside geo-fence, to Alarm with buzzer and LED light when the target is outside. The hardware needed for the proposed system will be Node MCU, GPS module- Neo 6M, LIPO Battery.

Themost importanttask ingeo-fenceisdecidingwhether theobjectisinsideoroutsidethevirtualfencewecreated. The fence can be of any shape. For example figure 1. This problemissolvedbyassumingthatthefenceisofpolygonal shape.Consideringthiswechosethisalgorithm.

Let’ssupposethattheshapeofthefenceisofNdimensions. ThecoordinatesofalltheverticesaregivenasVn(Xn,Yn) format.ThecoordinateoftargetpointisgivenbyT(Xt,Yt). Inthisalgorithm,thesumofanglesbetweentheconsecutive lineswhicharedrawnfromthetrackingpointtoverticesis thedecidingfactorthatwilldecidewhetherthetargetpoint is within or outside the fence. The sum can be taken clockwiseoranticlockwise.

Fig-1: Point-in-Polygon

The steps for calculating the angle between the two coordinatesaregivenbelow.Thedotproductoftwovectors (|a.b|)= |a|.|b|.cos(θ). Here, ‘a’ is the vector fromtracking pointtovertex1andbisthevectorfromtrackingpointto vertex2.

a=(x1-xt)i+(y1-yt)j

b=(x2-xt)i+(y2-yt)j

Fromdotpointwecanwrite, θ= 〖cos〗^(-1)((|a.b|)/(|a|.|b|))

©
Certified Journal | Page1001
2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 09 Issue: 12 | Dec 2022 www.irjet.net p-ISSN: 2395-0072

In this way, we can find all the angles between all the consecutivepoints.

Theflowchartbelowshowsthestepsofthealgorithm.Ifthe additionof alltheanglesisequalto360thenthetargetis inside the fence and if not, then the target is outside the fence.

WeusedNodeMCUforcontrollingthesystem.TheNeo6M modulewasusedfortrackingthelocation.ALIPOBattery with Charging and Discharging IC is connected to the controller.

Fig-2: Flowchartofpoint-in-polygonalgorithm.

 θ_sum=θ_1+θ_2+θ_3+...+θ_n=360

Targetpositionisinside  θ_sum=θ_1+θ_2+θ_3+...+θ_n≠360

Targetpositionisoutside.

Thesamplegeo-fenceiscreatedusingGoogleMapforgetting the coordinates points latitude and longitude values. By using these values, we’ll make a virtual geo-fence for the system.Here,we’vecreatedmygeo-fenceusing8coordinate points.

Thetargetstatuswillbeinsideifthelocationiswithinthese coordinatepointsandviceversa.Oursystemwillverifythe locationof the deviceusing a GPSmoduleanddisplaythe outputontheserverwecreated.

Fig-3:Geo-Fenceimage.

Fig-4: CircuitDiagram

Various libraries were imported like TinyGPS++, ESP8266WebServer,WifiClient,etcfortheproject.Anarray wascreatedfirstforstoringthelatitudeandlongitudevalues ofthecoordinates.OncetheGPSturnsonandisconnectedto the Node MCU, the location will be displayed on the web server which is created using HTML and CSS. Using this location,thepoint-in-polygonalgorithmisappliedandthe targetstatuscanbegiventotheserver.We’vealsointerfaced a Buzzer and LED to the Node MCU. If the target status is outside,thebuzzerweinterfacedwillmakeasoundandalso theLEDwillglowforatimeduration.

4. RESULT AND DISCUSSION

The location of the target is tracked and displayed on the webservercreated.TheparameterslikeLatitude,Longitude, No.ofsatsandthetargetStatusaredisplayedontheserver. Also we can check the current location of the device on GoogleMaps.Thebelowimageillustratesthewebserver.

© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page1002
Fig-5:WebServer

International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056

Volume: 09 Issue: 12 | Dec 2022 www.irjet.net p-ISSN: 2395-0072

Theresultsofthisprojectshowthatthesystemdeveloped givesmanyadvantagesandbenefitstotheuser.Intheend, this project proved its effectiveness as it provided approximately 95% location accuracy compared to the actualcardonthemobilephone.

5. APPLICATION

Thedesignedsystemisflexibletoimplementonanyofthe belowapplications.

1.Cattlegrazingmanagement 2.VehicletheftControl 3.ChildSafety 4.Geo-fencinginagriculture. 5.Geo-fencingintheforest

6. CONCLUSIONS

Thedesignedsystemprovidesaccuratestatusofthetarget device by using various communication technologies like hardwareandsoftwaresystems.Thepositionofthedevice wasalsodisplayedonthewebserverandtheTargetofthe devicewasdisplayed.Thesystemcanhelpinvariousfields.

This system has been tried out in various conditions and givesaccurateresults.Itcanbeusedforlocationtracking. Geo-fencingshowsmaximumsecurityresultswhencoming orgoingoutofthevirtualzone.TheGPS-basedgeo-fencing location tracking system has been successfully built. However,thissystemcanbemademorepowerfulbyusinga morepreciseGPSunit.

Theproposedsystemissuccessfullydevelopedwithprecise design,flexibilityandcustomizable.

7. FUTURE SCOPE

SystemcanbefurthermodifiedtouseamorepreciseGPS module for getting a more accurate location. A mobile application can be designed to make the location details available on it and actions can be taken accordingly. Accordingtotheapplication,wecanaddfeaturesrequiredto thesystem.

REFERENCES

[1] Rahate,SachinW.,“Geo-fencingInfrastructure:Location BasedService.”,2016.

[2] D.Koshti,S.Kamoji,K.Cheruthuruthy,S.P.ShahiandM. Mishra,"ADetection,TrackingandAlertingSystemfor Covid-19 using Geo-Fencing and Machine Learning," 2021 5th International Conference on Intelligent Computing and Control Systems (ICICCS), 2021, pp. 1499-1506,doi:10.1109/ICICCS51141.2021.9432254.R.

Factor value:

Nicole,“Titleofpaperwithonlyfirstwordcapitalized,”J. NameStand.Abbrev.,inpress.

[3] A.H. Abbas, Mohammed I. Habelalmateen, Syukran Jurdi,.Audah,andN.A.M.Alduais.“GPSBasedLocation Monitoring System with Geo-fencing Capabilities”. (2019).

[4] S. P. Raflesia, Firdaus and D. Lestarini, "An Integrated Child Safety using Geo-fencing Information on Mobile Devices," 2018 International Conference on Electrical EngineeringandComputerScience(ICECOS),2018,pp. 379-384,doi:10.1109/ICECOS.2018.8605200.

[5] Bopearachchi,Victoria."COVID-19PATIENTTRACKING SYSTEM."

[6] Supreeth,S.K.,D.N.Suraj,A.R.Vishnu,andV.Vishruth. "Iot–wildlife monitoring virtual fencing with deforestation notifications." International Research JournalofEngineeringandTechnology(IRJET)(2019): 1837-1840.

[7] Ramesh,G.,K.Sivaraman,V.Subramani,P.YogaVignesh, andS.VenkataVeeraBhogachari."Farmanimallocation trackingsystemusingarduinoandgpsmodule."In2021 InternationalConferenceonComputerCommunication andInformatics(ICCCI),pp.1-4.IEEE,2021.

[8] Liu, Xiaohan, Tao Yang, and Baoping Yan. "Internet of Things for wildlife monitoring." In 2015 IEEE/CIC InternationalConferenceonCommunicationsinChinaWorkshops(CIC/ICCC),pp.62-66.IEEE,2015.

[9] Abbas, A. H., Mohammed I. Habelalmateen, Syukran Jurdi,LukmanAudah,andN.A.M.Alduais."GPSbased location monitoring system with geo-fencing capabilities."InAIPConferenceProceedings,vol.2173, no.1,p.020014.AIPPublishingLLC,2019.

[10] Ullah,Farman,HassanUlHaq,JebranKhan,Arslan AliSafeer,UsmanAsif,and SungchangLee."Wearable iots and geo-fencing based framework for COVID-19 remote patient health monitoring and quarantine managementtocontrolthepandemic."Electronics10, no.16(2021):2035.

©
Page1003
2022, IRJET | Impact
7.529 | ISO 9001:2008 Certified Journal |

Turn static files into dynamic content formats.

Create a flipbook