![]() You only enter the names of the starting points and destinations (make sure you specify the city name and country name), and calculate the distance using the GetDistanceH function. To calculate the distance by traffic you need a much simpler table. In the last column, type the formula using the GetDistanceH function, and then copy it to the remaining cells in the table. To calculate the air distance between two places, you need to create a table containing columns with: site names, latitude and longitude of both locations. To make them easier to distinguish, I gave them names GetDistanceH and GetDistanceG and made minor corrections in the code in accordance with the new names. Then you need to select Insert / New Module option and add these two formulas. By Clicking Alt + F11 you’ll enter Visual Basic Editor. I found the haversine formula here, and you can find the formula for calculating the distances with a „little help“ of Google Maps at this link. In the following text I will show you how to use Google Maps to calculate distance. If you are planning to take off on the road, you are surely interested in getting from point A to point B by traffic. How to calculate distance between the two places on the map? The simplest way is by using the formula for calculating the haversine, which for the given coordinates returns the distance of the points on the sphere.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |