Zephyr Scientific Library (zscilib)
Files | Functions

Functions and structs for dealing with gravity. More...

Files

file  gravity.h
 API header file for gravity in zscilib.
 

Functions

int zsl_grav_lat_alt (zsl_real_t lat, zsl_real_t alt, zsl_real_t *g)
 Calculates the geographical gravitational field based on latitude and altitude over the sea level. More...
 

Detailed Description

Functions and structs for dealing with gravity.

Function Documentation

◆ zsl_grav_lat_alt()

int zsl_grav_lat_alt ( zsl_real_t  lat,
zsl_real_t  alt,
zsl_real_t g 
)

Calculates the geographical gravitational field based on latitude and altitude over the sea level.

Information taken from the following webpage: https://www.welmec.org/welmec/documents/guides/2/2021/WELMEC_Guide_2_v2021.pdf

Parameters
latLatitude of the point where the gravity is to be calculated, in degrees.
altAltitude of the point of interest, in meters.
gPointer to the output gravity, in meters per second squared.
Returns
0 if everything executed correctly, -EINVAL if the altitude is negative or if the latitude is not between -90 and 90 degrees.