New Cog: Distance Between Locations#16
Open
chasepg0821 wants to merge 1 commit into
Open
Conversation
Author
|
Forgot screenshots of operation. I couldn't add reviewers, so I will ping once. Apologies. @Jay-Madden or @jkriste |
Author
|
closes #15 |
This file contains hidden or 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
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.

Users can operate with the following command pattern:
!distance [metric] to
!dist [km] to
Added documentation similar to the weather_cog since parallel limitations are put on it due to the API usage.
There is a little more handling of user-inputted coordinates than other usages of the geocode API. Sending the API coordinates resulted in local, non-English spelling of city names. It would be a simple change if it is preferred to retrieve the non-English name instead of just using the coordinates entered.
Distance is calculated using the Haversine Formula, and the bearing is used to indicate the direction the recommended distance is calculated from. These formulas account for the curvature of the earth.
A handler was used to offer easier expanding at a later date. Currently it only handles the metric option, but routing may be a consideration if a discussion is had about costly routing APIs.
Calculations were verified using google maps distance tool.
Closes #15