---
name: "GIS::Distance::MathTrig"
section: "3pm"
platform: "linux"
package: "libgis-distance-perl"
version: "0.20-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/GIS::Distance::MathTrig"
---

# GIS::Distance::MathTrig(3pm)

Great cirlce distance calculations using Math::Trig.

## NAME

GIS::Distance::MathTrig - Great cirlce distance calculations using Math::Trig.

## DESCRIPTION

This formula uses Math::Trig's `"great_circle_distance()"` which at this time uses math almost exactly the same formula as the GIS::Distance::Cosine formula.  And the Cosine formula is about 5% faster than this formula.

Normally this module is not used directly.  Instead GIS::Distance is used which in turn interfaces with the various formula classes.

## FORMULA

```
    lat0 = 90 degrees - phi0
    lat1 = 90 degrees - phi1
    d = R * arccos(cos(lat0) * cos(lat1) * cos(lon1 - lon01) + sin(lat0) * sin(lat1))
```

As stated in the Math::Trig documentation.

## SUPPORT

See "SUPPORT" in GIS::Distance.

## AUTHORS

See "AUTHORS" in GIS::Distance.

## LICENSE

See "LICENSE" in GIS::Distance.
