How to determinate who is in the end of a line

57 views Asked by At

Im trying to build a app that will give the estimated position of a line. here in my college we have a Student restaurant, the line gets huge some days, something like 1h or 2h waiting.

I have write a code that will get the position by gps of a person and indicate which part of the line in different sections this person is. something like this enter image description here where section 1 is the entrance and goes growing until section 6 where is the longest line ever possible.

This is working great, but I am struggling in how to determine in wich sector the end of the line is.

My idea: The app would be running background during lunch time and if the user was inside the sections, it would send their location to a database with time and which section he is. with that, get his position in the section 15min later, if he still in the same block or in a block neighbor, he is in a line (because he stopped/barely walking). But I just don't get the best way to determine which section the end of the line is, do you guys have any thoughts on how I could deal with this?

2

There are 2 answers

2
Shyamal Desai On
  1. Insert sensors at places which can report their readings.
  2. Collect data for a few days and statistically determine the probability of wait at different times

E.g. from 1: Have a counter at section 1 (entrance) and 1 counter at exit.

You know how many can fit into the restaurant.

The queue size is restaurant Entrance Counter - Restaurant Capacity - exit counter. You might be able to calculate the rate at which people finish eating and when a place becomes available.

3
Sunil On

Use geofencing for this.

  1. Set geoFence for all these sections.

  2. Get gps location of user and determine in which geofence is he.

  3. Get user's location after 15 minutes and determine whether user's geofence section is changed or not, it will tell you in which section user is right now.

Main challenge is to determine geofence for each section 1 to 6. You have to manually feed geofence for each section and then need to check user's location against geofence range.