Skip to content

New Cog: Distance Between Locations#16

Open
chasepg0821 wants to merge 1 commit into
Jay-Madden:masterfrom
chasepg0821:master
Open

New Cog: Distance Between Locations#16
chasepg0821 wants to merge 1 commit into
Jay-Madden:masterfrom
chasepg0821:master

Conversation

@chasepg0821

@chasepg0821 chasepg0821 commented Dec 6, 2023

Copy link
Copy Markdown

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

@chasepg0821 chasepg0821 changed the title Cog: Distance Between Locations New Cog: Distance Between Locations #15 Dec 6, 2023
@chasepg0821

Copy link
Copy Markdown
Author

image

Forgot screenshots of operation.

I couldn't add reviewers, so I will ping once. Apologies. @Jay-Madden or @jkriste

@chasepg0821 chasepg0821 changed the title New Cog: Distance Between Locations #15 New Cog: Distance Between Locations Dec 7, 2023
@chasepg0821

Copy link
Copy Markdown
Author

closes #15

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.

New Cog: Distance Between Locations (Port From ClemBot#630)

1 participant