OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
vincenty.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

double vincenty_distance (double lat1, double lon1, double lat2, double lon2)
 

Detailed Description

Provides a single function to calculate geographical distances.

The Vincenty algorithm is described at: https://en.wikipedia.org/wiki/Vincenty's_formulae#Inverse_problem

Definition in file vincenty.h.

Function Documentation

◆ vincenty_distance()

double vincenty_distance ( double  lat1,
double  lon1,
double  lat2,
double  lon2 
)

Calculate geographical distances using Vincenty's algorithm.

Parameters
[in]lat1Latitude, in degrees, of first point.
[in]lon1Longitude, in degrees, of first point.
[in]lat2Latitude, in degrees, of second point.
[in]lon2Longitude, in degrees, of second point.
[out]metersDistance between the two points, in meters.
Returns
0 on success.

Definition at line 47 of file vincenty.c.