magnetic-tesseroids/lib/geometry.h

38 lines
1.1 KiB
C
Raw Normal View History

2021-05-05 15:31:06 +08:00
/*
Data structures for geometric elements and functions that operate on them.
Defines the TESSEROID, SPHERE, and PRISM structures.
*/
2021-05-06 21:40:45 +08:00
#ifndef _MAG_TESSEROIDS_GEOMETRY_H_
#define _MAG_TESSEROIDS_GEOMETRY_H_
2021-05-05 15:31:06 +08:00
/* Store information on a tesseroid */
2021-05-06 21:43:06 +08:00
typedef struct magtess_struct {
2021-05-05 15:31:06 +08:00
/* s, n, w, e in degrees. r1 and r2 are the smaller and larger radius */
double density; /* in SI units */
double w; /* western longitude border in degrees */
double e; /* eastern longitude border in degrees */
double s; /* southern latitude border in degrees */
double n; /* northern latitude border in degrees */
double r1; /* smallest radius border in SI units */
double r2; /* largest radius border in SI units */
double suscept; /* magnetic susceptibility */
double Bx; /* x-component of ambient magnetic field */
double By; /* y-component of ambient magnetic field */
double Bz; /* z-component of ambient magnetic field */
double cos_a1;
double sin_a1;
double cos_b1;
double sin_b1;
//double Rx;
//double Ry;
//double Rz;
2021-05-06 21:40:45 +08:00
} MAG_TESSEROID;
2021-05-05 15:31:06 +08:00
2021-05-06 21:40:45 +08:00
void split_tess(MAG_TESSEROID tess, MAG_TESSEROID *split);
2021-05-05 15:31:06 +08:00
#endif