User:Tcncv/Geodist/doc
Appearance
< User:Tcncv | Geodist
These templates calculate the distance between two geographic points using Vincenty's formulae.
Usage
[edit]{{User:Tcncv/Geodist | lat1 | long1 | lat2 | long2 }}
All parameters are signed decimal values in degrees.
Examples
[edit]- Lower 45 degrees latitude = 4984.944
- Upper 45 degrees latitude = 14986.91 (problem case)
- Upper 45 degrees latitude = 5017.021 (adjusted)
- 45 degrees longitude = 5009.321
- 45/45 lat/longitude = 6662.454
- Paris to Berlin - 878.593 km (Vincenty 878594.288 m)
- Los Angeles to Perth - 15023.658 km (Vincenty 15023747.718 m)
- London to Cape Town - 9635.44 km (Vincenty 9635442.275 m)
- Moscow to Washington DC - 7843.327 km (Vincenty 7843324.779 m)
- Rio to Tokyo - 18558.6 km (Vincenty 18558543.383 m)
Internally used templates
[edit]Utilities:
- {{User:Tcncv/Geodist/DMStoRadians}} - Convert degrees, minutes, seconds to radians
- {{User:Tcncv/Geodist/WGS84}} - Set WGS 84 reference ellipsoid values
- {{User:Tcncv/Geodist/consume}} - Workaround/kluge to force evaluation of deferred expressions
- {{User:Tcncv/Geodist/debug}} - Emit formatted debug information
- {{User:Tcncv/Geodist/doc}} - This document
- {{User:Tcncv/Geodist/output}} - Convert, scale, and format final results
Core Vincenty calculation:
- {{User:Tcncv/Geodist/Vincenty1}} - Calculate U1 and U2, and set the initial λ value
- Iteration 1 for the λ calculation (skipped due to template nesting limitations)
- {{User:Tcncv/Geodist/Vincenty2a}} - Calculate sinσ and cosσ
- {{User:Tcncv/Geodist/Vincenty3a}} - Calculate σ and sinα
- {{User:Tcncv/Geodist/Vincenty4a}} - Calculate cos²α and cosα
- {{User:Tcncv/Geodist/Vincenty5a}} - Calculate cos2σm and C
- {{User:Tcncv/Geodist/Vincenty6a}} - Calculate λ′
- Iteration 2 for the λ calculation (skipped due to template nesting limitations)
- {{User:Tcncv/Geodist/Vincenty2b}} - Calculate sinσ and cosσ
- {{User:Tcncv/Geodist/Vincenty3b}} - Calculate σ and sinα
- {{User:Tcncv/Geodist/Vincenty4b}} - Calculate cos²α and cosα
- {{User:Tcncv/Geodist/Vincenty5b}} - Calculate cos2σm and C
- {{User:Tcncv/Geodist/Vincenty6b}} - Calculate λ′
- Iteration 3 for the λ calculation
- {{User:Tcncv/Geodist/Vincenty2c}} - Calculate sinσ and cosσ
- {{User:Tcncv/Geodist/Vincenty3c}} - Calculate σ and sinα
- {{User:Tcncv/Geodist/Vincenty4c}} - Calculate cos²α and cosα
- {{User:Tcncv/Geodist/Vincenty5c}} - Calculate cos2σm and C
- {{User:Tcncv/Geodist/Vincenty6c}} - Calculate λ′
- Iteration 4 for the λ calculation
- {{User:Tcncv/Geodist/Vincenty2d}} - Calculate sinσ and cosσ
- {{User:Tcncv/Geodist/Vincenty3d}} - Calculate σ and sinα
- {{User:Tcncv/Geodist/Vincenty4d}} - Calculate cos²α and cosα
- {{User:Tcncv/Geodist/Vincenty5d}} - Calculate cos2σm and C
- {{User:Tcncv/Geodist/Vincenty6d}} - Calculate λ′ and u²
- {{User:Tcncv/Geodist/Vincenty7}} - Calculate A and B
- {{User:Tcncv/Geodist/Vincenty8}} - Calculate Δσ
- {{User:Tcncv/Geodist/Vincenty9}} - Final calculation of distance s