Skip to content

Commit

Permalink
Switch from Vincenty to Karney for distance calculations, fixes #64
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdoug committed Aug 3, 2024
1 parent 3e283ee commit 9ef2b1f
Show file tree
Hide file tree
Showing 7 changed files with 754 additions and 89 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Changed
- Updates to data for Czechia, Denmark, ETRS89, Germany, Martinique, Portugal, St Helena, UK and WGS84
- Switched from Vincenty to Karney algorithm for calculating distance between two Geographic points
- Minimum PHP version increased to 8.1

## [5.8.0] - 2024-02-03
Expand Down
4 changes: 2 additions & 2 deletions docs/distance_calculations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ PHPCoord can calculate the distance between two ``Point``\s via the ``calculateD
Point $to,
): Length
* The distance between two ``ProjectedPoint``\s is calculated via Pythagoras
* The distance between two ``GeographicPoint``\s or two ``GeocentricPoint``\s is calculated via Vincenty's formula
* The distance between two ``ProjectedPoint``\s is calculated via Pythagoras' theorem
* The distance between two ``GeographicPoint``\s or two ``GeocentricPoint``\s is calculated via Karney's formula
* The distance between two ``VerticalPoint``\s is calculated as simple difference

Example
Expand Down
Loading

0 comments on commit 9ef2b1f

Please sign in to comment.