-
Notifications
You must be signed in to change notification settings - Fork 1
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
Aeonoi
wants to merge
35
commits into
main
Choose a base branch
from
route-progress
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Route progress #87
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This reverts commit 8dffcc3.
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.
This reverts commit 964576b.
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)
Instead of a priority queue for the location history, it is now a simple array calling .first and .last.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.