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
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?