0

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?

Guizinhobeback
  • 86
  • 1
  • 14

2 Answers2

2

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.

Sunil
  • 919
  • 15
  • 25
  • I wasn't aware of geofance, with what I have read apply really well what Im looking for. I have already tracked down the lat and long that belong with each section. I'm struggling in how to determinate the end of the line based on the data provided by the people on the line – Guizinhobeback Sep 23 '15 at 08:05
  • which database you are using? – Sunil Sep 23 '15 at 08:21
  • In your case you can periodically check in which section gps is not logged, for eg. If all person are in 4th section and now new location logged in 5th section, then for each gps logged event you can check all your sections and section in which you did not found any data you can say it's end of line... – Sunil Sep 23 '15 at 08:26
0
  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.

  • It doesn't run out of tables for people to sit and eat, the issue is the people serving food that are really slow. With this the line gets huge because they can't serve the food/replace food faster. Another factor is the menu of the day, so I don't think a statistics of waiting time would work. Anyway, I liked your idea a lot about entrance and leaving, but unfortunately does not help in this case – Guizinhobeback Sep 23 '15 at 01:25
  • Guizinhobeback. I like your attitude of solving a real world problem. Also, I am glad to know about geo-fencing as well. – Shyamal Desai Sep 23 '15 at 17:39