Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Route progress #87

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open

Route progress #87

wants to merge 35 commits into from

Conversation

Aeonoi
Copy link

@Aeonoi Aeonoi commented Feb 16, 2024

There are some improvements that can be made to the distance tracker. I have left the skeleton on how to approach/fix it.
Edit: Some of the old commits did not work/function properly so I removed them in the latest commit. Latest changes should fix all of those issues.

Aeonoi and others added 30 commits October 19, 2023 17:39
Used a priority queue to store the previous locations/coordinates that the bus has visited. As of right now, it contains all of them, in the future, it should remove "old" locations.
Used priority queue to store the previously visited locations and removes the "outdated" locations.
Completed part of ETA algorithm
Implemented the three test cases that should be considered when finding the the total distance that have been traveled.
Implemented the three test cases to consider when reaching the nearest vertex/endpoint
- Able to remove "old" data locations
- Did not loop through all indices of the coordinates of route
- May implement progress as struct
Previous commit ran into issues with nill
- Used previous bus location as a starting point
- Left skeleton of utilizing the previous location to finish the tracking total distance
- Fixed some bugs and improved optimization
- The next step is to figure out if we can use swift code or use the parser to get the waypoints to make our own distance tracker in Python
Implementation of getting the time is flawed and should be fixed
- I changed the types within the parsing file to ensure to make it cleaner and easier to read
- I modified the tracking distance algorithm to be more open for different uses.  Changed the parameters from bus.location -> coordinate type
- Originally wanted to use Python as a script to help determine average speed limit, however, there were some issues and blockers. I came across difficulties, so I ended up doing doing everything in Swift
- In ParseData, changed data type of "type" to LocationType to allow for correct data to be used when creating a bus location type
- In TrackAverageSpeed, made bus location types and fixed the time difference issue
- Getting distance is wrong, have to edit tracking distance algorithm
- Throws conflict error if there are no buses on the route
- Use: Latitude __ Longitude __
- Currently, does not return a sorted array of buses sorted by location, but rather gives the array of all buses that is before the location. Further changes need to be made.
- Changed returns [Bus] to returns [Int] to return the bus ids rather than the bus types themselves.
- Added to the route path.
- The distance tracker has some issues such as detecting moving away or towards the union. When it moves towards the union, it does not detect that and returns a incorrect distance.
- calculate ETA algorithm needs to be implemented.
- I left a skeleton for more things to consider such as the time of day which will effect the speeds throughout the day.
- I added some more collections to track since distance tracker now requires a extra optional parameter. (Depends on what you are using it for)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant