The spreadsheet Vincenty.xlsb uses those resources to perform the following calculations, using both on-sheet calculations and VBA user-defined functions (UDF’s):
- Calculation of distance and azimuth angles given latitude and longitude for two points.
- Calculation of latitude and longitude and azimuth for a second point, given the position and azimuth for the first point.
- Calculation of the area inside a closed polygon, using the excess angle method.
The spreadsheet contains full open source code, and documentation for the on-sheet calculations. Examples are shown in the screenshots below (click any image for full-size view):
The VincentyArea Function finds the area inside a polygon specified by the latitude and longitude for a series of points, listed in clockwise order, using the “Excess angle method”. Note that as well as the returning the area, if the optional second argument is set to 2 the function returns additional data for each segment of the polygon, as shown in columns H to L below:
The data for the points is listed with longitude first then latitude. All three functions have an optional third “XY” argument to deal with this convention with the values:
- 1 (default) – Latitude then Longitude
- 2 – Longitude, Latitude