Go to the source code of this file.
◆ calculate_distance()
Calculate the distance between to points on the surface of earth. This function uses Vincenty formula.
- Parameters
-
| [in] | lat1_deg | Latitude of point A in degrees. |
| [in] | lng1_deg | Longitude of point A in degrees. |
| [in] | ele1 | Altitude of point A in meters. |
| [in] | lat2_deg | Latitude of point B in degrees. |
| [in] | lng2_deg | Longitude of point B in degrees. |
| [in] | ele2 | Altitude of point B in meters. |
- Returns
- Distance between point A and B in meters.
◆ calculate_incline()
| float calculate_incline |
( |
long double |
dst, |
|
|
alt_t |
d_ele |
|
) |
| const |
Calculate the incline.
- Note
- it does not matter which units are used as input as long as both parameters use the same unit.
- Parameters
-
| [in] | dst | Distance along the real path (e.x. road). |
| [in] | d_ele | Delta elevation, the height difference. |
- Returns
- incline