Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

151
Views
how to increase location accuracy?

I am college student and I have beginner level experience of web development(NodeJS, MongoDB) I am developing a website for student attendance if a student is present in classroom in given time and he/she fill attendance by pressing a button then his/her attendance should be marked as present.

I am doing it by accessing location of user...

I am using geolocation API to access location of user :https://www.w3schools.com/html/tryit.asp?filename=tryhtml5_geolocation

it returns value like :
Latitude: 20.7819165
Longitude: 22.5789159

but many times it gives different values for the same point of location(varying last four digits) and I can't find any criteria to differentiate user who is inside the classroom and outside the classroom

Almost same value of for both points

Almost same value of for both points in above image
I think I need to apply some math, but I don't know what exactly I should do ?

Please give any suggestion....
Is it possible or not ?
Is there any other way(other than use of location) to do it ?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Locally, the Earth surface is flat. Assuming that you far enough from poles and classroom is small, the equation for straight lines is approximately

a*longitude + b*latitude + c = 0

so if you can find (a,b,c) that describe the walls of the classroom, you can derive 4 checks

a_i*longitude + b_i*latitude + c_i >= 0? i=1,2,3,4

that have to be satisfied for a person to be inside the rectangle.

Of course, we also assume that you get person's and classroom's location with sufficient accuracy.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!