![]() |
Tesseroids 1.0: User Manual and API Documentation |
Functions that calculate the gravitational potential and its first and second derivatives for the tesseroid. More...
#include <math.h>
#include "utils.h"
#include "glq.h"
#include "constants.h"
#include "grav_tess.h"
Functions | |
double | calc_tess_model (TESSEROID *model, int size, double lonp, double latp, double rp, GLQ *glq_lon, GLQ *glq_lat, GLQ *glq_r, double(*field)(TESSEROID, double, double, double, GLQ, GLQ, GLQ)) |
Calculates the field of a tesseroid model at a given point. | |
double | calc_tess_model_adapt (TESSEROID *model, int size, double lonp, double latp, double rp, GLQ *glq_lon, GLQ *glq_lat, GLQ *glq_r, double(*field)(TESSEROID, double, double, double, GLQ, GLQ, GLQ)) |
Adaptatively calculate the field of a tesseroid model at a given point by splitting the tesseroids if necessary to maintain GLQ stability. | |
double | tess_pot (TESSEROID tess, double lonp, double latp, double rp, GLQ glq_lon, GLQ glq_lat, GLQ glq_r) |
Calculates potential caused by a tesseroid. | |
double | tess_gx (TESSEROID tess, double lonp, double latp, double rp, GLQ glq_lon, GLQ glq_lat, GLQ glq_r) |
Calculates gx caused by a tesseroid (Grombein et al., 2010). | |
double | tess_gy (TESSEROID tess, double lonp, double latp, double rp, GLQ glq_lon, GLQ glq_lat, GLQ glq_r) |
Calculates gy caused by a tesseroid (Grombein et al., 2010). | |
double | tess_gz (TESSEROID tess, double lonp, double latp, double rp, GLQ glq_lon, GLQ glq_lat, GLQ glq_r) |
Calculates gz caused by a tesseroid (Grombein et al., 2010). | |
double | tess_gxx (TESSEROID tess, double lonp, double latp, double rp, GLQ glq_lon, GLQ glq_lat, GLQ glq_r) |
Calculates gxx caused by a tesseroid (Grombein et al., 2010). | |
double | tess_gxy (TESSEROID tess, double lonp, double latp, double rp, GLQ glq_lon, GLQ glq_lat, GLQ glq_r) |
Calculates gxy caused by a tesseroid (Grombein et al., 2010). | |
double | tess_gxz (TESSEROID tess, double lonp, double latp, double rp, GLQ glq_lon, GLQ glq_lat, GLQ glq_r) |
Calculates gxz caused by a tesseroid (Grombein et al., 2010). | |
double | tess_gyy (TESSEROID tess, double lonp, double latp, double rp, GLQ glq_lon, GLQ glq_lat, GLQ glq_r) |
Calculates gyy caused by a tesseroid (Grombein et al., 2010). | |
double | tess_gyz (TESSEROID tess, double lonp, double latp, double rp, GLQ glq_lon, GLQ glq_lat, GLQ glq_r) |
Calculates gyz caused by a tesseroid (Grombein et al., 2010). | |
double | tess_gzz (TESSEROID tess, double lonp, double latp, double rp, GLQ glq_lon, GLQ glq_lat, GLQ glq_r) |
Calculates gzz caused by a tesseroid (Grombein et al., 2010). |
Functions that calculate the gravitational potential and its first and second derivatives for the tesseroid.
References
double calc_tess_model | ( | TESSEROID * | model, | |
int | size, | |||
double | lonp, | |||
double | latp, | |||
double | rp, | |||
GLQ * | glq_lon, | |||
GLQ * | glq_lat, | |||
GLQ * | glq_r, | |||
double(*)(TESSEROID, double, double, double, GLQ, GLQ, GLQ) | field | |||
) |
Calculates the field of a tesseroid model at a given point.
Uses a function pointer to call one of the apropriate field calculating functions:
To pass a function pointer to a function use something like:
calc_tess_model(my_model, 10, 0, 10, 1, glqlon, glqlat, glqr, &tess_gx);
This would calculate the gx effect of the model my_model with 10 tesseroids at lon=0 lat=10 r=1.
Will re-use the same GLQ structures, and therefore the same order, for all the tesseroids.
model | TESSEROID array defining the model | |
size | number of tesseroids in the model | |
lonp | longitude of the computation point P | |
latp | latitude of the computation point P | |
rp | radial coordinate of the computation point P | |
glq_lon | pointer to GLQ structure used for the longitudinal integration | |
glq_lat | pointer to GLQ structure used for the latitudinal integration | |
glq_r | pointer to GLQ structure used for the radial integration | |
field | pointer to one of the field calculating functions |
double calc_tess_model_adapt | ( | TESSEROID * | model, | |
int | size, | |||
double | lonp, | |||
double | latp, | |||
double | rp, | |||
GLQ * | glq_lon, | |||
GLQ * | glq_lat, | |||
GLQ * | glq_r, | |||
double(*)(TESSEROID, double, double, double, GLQ, GLQ, GLQ) | field | |||
) |
Adaptatively calculate the field of a tesseroid model at a given point by splitting the tesseroids if necessary to maintain GLQ stability.
See calc_tess_model() for more details.
Will re-use the same GLQ structures, and therefore the same order, for all the tesseroids.
model | TESSEROID array defining the model | |
size | number of tesseroids in the model | |
lonp | longitude of the computation point P | |
latp | latitude of the computation point P | |
rp | radial coordinate of the computation point P | |
glq_lon | pointer to GLQ structure used for the longitudinal integration | |
glq_lat | pointer to GLQ structure used for the latitudinal integration | |
glq_r | pointer to GLQ structure used for the radial integration | |
field | pointer to one of the field calculating functions |
double tess_gx | ( | TESSEROID | tess, | |
double | lonp, | |||
double | latp, | |||
double | rp, | |||
GLQ | glq_lon, | |||
GLQ | glq_lat, | |||
GLQ | glq_r | |||
) |
Calculates gx caused by a tesseroid (Grombein et al., 2010).
The derivatives of the potential are made with respect to the local coordinate system x->North, y->East, z->out
Input values in SI units and degrees and returns values in mGal!
Use function glq_new() to create the GLQ parameters required. The integration limits should be set to:
tess | data structure describing the tesseroid | |
lonp | longitude of the computation point P | |
latp | latitude of the computation point P | |
rp | radial coordinate of the computation point P | |
glq_lon | GLQ structure with the nodes, weights and integration limits set for the longitudinal integration | |
glq_lat | GLQ structure with the nodes, weights and integration limits set for the latitudinal integration | |
glq_r | GLQ structure with the nodes, weights and integration limits set for the radial integration |
double tess_gxx | ( | TESSEROID | tess, | |
double | lonp, | |||
double | latp, | |||
double | rp, | |||
GLQ | glq_lon, | |||
GLQ | glq_lat, | |||
GLQ | glq_r | |||
) |
Calculates gxx caused by a tesseroid (Grombein et al., 2010).
The derivatives of the potential are made with respect to the local coordinate system x->North, y->East, z->out
Input values in SI units and degrees and returns values in Eotvos!
Use function glq_new() to create the GLQ parameters required. The integration limits should be set to:
tess | data structure describing the tesseroid | |
lonp | longitude of the computation point P | |
latp | latitude of the computation point P | |
rp | radial coordinate of the computation point P | |
glq_lon | GLQ structure with the nodes, weights and integration limits set for the longitudinal integration | |
glq_lat | GLQ structure with the nodes, weights and integration limits set for the latitudinal integration | |
glq_r | GLQ structure with the nodes, weights and integration limits set for the radial integration |
double tess_gxy | ( | TESSEROID | tess, | |
double | lonp, | |||
double | latp, | |||
double | rp, | |||
GLQ | glq_lon, | |||
GLQ | glq_lat, | |||
GLQ | glq_r | |||
) |
Calculates gxy caused by a tesseroid (Grombein et al., 2010).
The derivatives of the potential are made with respect to the local coordinate system x->North, y->East, z->out
Input values in SI units and degrees and returns values in Eotvos!
Use function glq_new() to create the GLQ parameters required. The integration limits should be set to:
tess | data structure describing the tesseroid | |
lonp | longitude of the computation point P | |
latp | latitude of the computation point P | |
rp | radial coordinate of the computation point P | |
glq_lon | GLQ structure with the nodes, weights and integration limits set for the longitudinal integration | |
glq_lat | GLQ structure with the nodes, weights and integration limits set for the latitudinal integration | |
glq_r | GLQ structure with the nodes, weights and integration limits set for the radial integration |
double tess_gxz | ( | TESSEROID | tess, | |
double | lonp, | |||
double | latp, | |||
double | rp, | |||
GLQ | glq_lon, | |||
GLQ | glq_lat, | |||
GLQ | glq_r | |||
) |
Calculates gxz caused by a tesseroid (Grombein et al., 2010).
The derivatives of the potential are made with respect to the local coordinate system x->North, y->East, z->out
Input values in SI units and degrees and returns values in Eotvos!
Use function glq_new() to create the GLQ parameters required. The integration limits should be set to:
tess | data structure describing the tesseroid | |
lonp | longitude of the computation point P | |
latp | latitude of the computation point P | |
rp | radial coordinate of the computation point P | |
glq_lon | GLQ structure with the nodes, weights and integration limits set for the longitudinal integration | |
glq_lat | GLQ structure with the nodes, weights and integration limits set for the latitudinal integration | |
glq_r | GLQ structure with the nodes, weights and integration limits set for the radial integration |
double tess_gy | ( | TESSEROID | tess, | |
double | lonp, | |||
double | latp, | |||
double | rp, | |||
GLQ | glq_lon, | |||
GLQ | glq_lat, | |||
GLQ | glq_r | |||
) |
Calculates gy caused by a tesseroid (Grombein et al., 2010).
The derivatives of the potential are made with respect to the local coordinate system x->North, y->East, z->out
Input values in SI units and degrees and returns values in mGal!
Use function glq_new() to create the GLQ parameters required. The integration limits should be set to:
tess | data structure describing the tesseroid | |
lonp | longitude of the computation point P | |
latp | latitude of the computation point P | |
rp | radial coordinate of the computation point P | |
glq_lon | GLQ structure with the nodes, weights and integration limits set for the longitudinal integration | |
glq_lat | GLQ structure with the nodes, weights and integration limits set for the latitudinal integration | |
glq_r | GLQ structure with the nodes, weights and integration limits set for the radial integration |
double tess_gyy | ( | TESSEROID | tess, | |
double | lonp, | |||
double | latp, | |||
double | rp, | |||
GLQ | glq_lon, | |||
GLQ | glq_lat, | |||
GLQ | glq_r | |||
) |
Calculates gyy caused by a tesseroid (Grombein et al., 2010).
The derivatives of the potential are made with respect to the local coordinate system x->North, y->East, z->out
Input values in SI units and degrees and returns values in Eotvos!
Use function glq_new() to create the GLQ parameters required. The integration limits should be set to:
tess | data structure describing the tesseroid | |
lonp | longitude of the computation point P | |
latp | latitude of the computation point P | |
rp | radial coordinate of the computation point P | |
glq_lon | GLQ structure with the nodes, weights and integration limits set for the longitudinal integration | |
glq_lat | GLQ structure with the nodes, weights and integration limits set for the latitudinal integration | |
glq_r | GLQ structure with the nodes, weights and integration limits set for the radial integration |
double tess_gyz | ( | TESSEROID | tess, | |
double | lonp, | |||
double | latp, | |||
double | rp, | |||
GLQ | glq_lon, | |||
GLQ | glq_lat, | |||
GLQ | glq_r | |||
) |
Calculates gyz caused by a tesseroid (Grombein et al., 2010).
The derivatives of the potential are made with respect to the local coordinate system x->North, y->East, z->out
Input values in SI units and degrees and returns values in Eotvos!
Use function glq_new() to create the GLQ parameters required. The integration limits should be set to:
tess | data structure describing the tesseroid | |
lonp | longitude of the computation point P | |
latp | latitude of the computation point P | |
rp | radial coordinate of the computation point P | |
glq_lon | GLQ structure with the nodes, weights and integration limits set for the longitudinal integration | |
glq_lat | GLQ structure with the nodes, weights and integration limits set for the latitudinal integration | |
glq_r | GLQ structure with the nodes, weights and integration limits set for the radial integration |
double tess_gz | ( | TESSEROID | tess, | |
double | lonp, | |||
double | latp, | |||
double | rp, | |||
GLQ | glq_lon, | |||
GLQ | glq_lat, | |||
GLQ | glq_r | |||
) |
Calculates gz caused by a tesseroid (Grombein et al., 2010).
The derivatives of the potential are made with respect to the local coordinate system x->North, y->East, z->out
Input values in SI units and degrees and returns values in mGal!
Use function glq_new() to create the GLQ parameters required. The integration limits should be set to:
tess | data structure describing the tesseroid | |
lonp | longitude of the computation point P | |
latp | latitude of the computation point P | |
rp | radial coordinate of the computation point P | |
glq_lon | GLQ structure with the nodes, weights and integration limits set for the longitudinal integration | |
glq_lat | GLQ structure with the nodes, weights and integration limits set for the latitudinal integration | |
glq_r | GLQ structure with the nodes, weights and integration limits set for the radial integration |
double tess_gzz | ( | TESSEROID | tess, | |
double | lonp, | |||
double | latp, | |||
double | rp, | |||
GLQ | glq_lon, | |||
GLQ | glq_lat, | |||
GLQ | glq_r | |||
) |
Calculates gzz caused by a tesseroid (Grombein et al., 2010).
The derivatives of the potential are made with respect to the local coordinate system x->North, y->East, z->out
Input values in SI units and degrees and returns values in Eotvos!
Use function glq_new() to create the GLQ parameters required. The integration limits should be set to:
tess | data structure describing the tesseroid | |
lonp | longitude of the computation point P | |
latp | latitude of the computation point P | |
rp | radial coordinate of the computation point P | |
glq_lon | GLQ structure with the nodes, weights and integration limits set for the longitudinal integration | |
glq_lat | GLQ structure with the nodes, weights and integration limits set for the latitudinal integration | |
glq_r | GLQ structure with the nodes, weights and integration limits set for the radial integration |
double tess_pot | ( | TESSEROID | tess, | |
double | lonp, | |||
double | latp, | |||
double | rp, | |||
GLQ | glq_lon, | |||
GLQ | glq_lat, | |||
GLQ | glq_r | |||
) |
Calculates potential caused by a tesseroid.
Input and output values in SI units and degrees!
Use function glq_new() to create the GLQ parameters required. The integration limits should be set to:
tess | data structure describing the tesseroid | |
lonp | longitude of the computation point P | |
latp | latitude of the computation point P | |
rp | radial coordinate of the computation point P | |
glq_lon | GLQ structure with the nodes, weights and integration limits set for the longitudinal integration | |
glq_lat | GLQ structure with the nodes, weights and integration limits set for the latitudinal integration | |
glq_r | GLQ structure with the nodes, weights and integration limits set for the radial integration |