knadh / dns.toys

A DNS server that offers useful utilities and services over the DNS protocol. Weather, world time, unit conversion etc.
https://www.dns.toys
MIT License
2.48k stars 135 forks source link

Add Aerial Distance Calculation #48

Closed i-sanyam closed 1 year ago

i-sanyam commented 1 year ago

I frequently find myself finding distance between two points on a random website. Will love if this is handled by dns.toys

For the query dig 12.9352,77.6245,12.9698,77.7500.aerial @dns.toys

and the server responds with Aerial Distance is 14.13 KMs

The issue however I am having is that in the Query method, I am not able to get delimiter , properly,

eg. for the above command, the query string q received in the function is 12.935277.624512.969877.7500

I am trying to add this feature via draft PR #47

It's still a WIP as I have to figure out this and add tests.