Update grav_tess.h
This commit is contained in:
parent
85de73131c
commit
b218325169
@ -13,27 +13,29 @@ system x->North, y->East, z->Up (away from center of the Earth).
|
|||||||
To maintain the standard convention, only for component gz the z axis is
|
To maintain the standard convention, only for component gz the z axis is
|
||||||
inverted, so a positive density results in positive gz.
|
inverted, so a positive density results in positive gz.
|
||||||
|
|
||||||
Example
|
Example (Revised by Dr. Yi Zhang at 2021-05-05)
|
||||||
-------
|
-------
|
||||||
|
|
||||||
To calculate the gzz component due to a tesseroid on a regular grid:
|
To calculate the gzz component due to a tesseroid on a regular grid:
|
||||||
|
|
||||||
#include <stdio.h>
|
#include "stdio.h"
|
||||||
#include "glq.h"r
|
#include "tess/glq.h"
|
||||||
#include "constants.h"
|
#include "tess/constants.h"
|
||||||
#include "grav_tess.h"
|
#include "tess/grav_tess.h"
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
TESSEROID tess = {1000, 44, 46, -1, 1, MEAN_EARTH_RADIUS - 100000,
|
TESSEROID tess = {1000, -1, 1, 44, 46, MEAN_EARTH_RADIUS - 100000, MEAN_EARTH_RADIUS};
|
||||||
MEAN_EARTH_RADIUS};
|
|
||||||
GLQ *glqlon, *glqlat, *glqr;
|
GLQ *glqlon, *glqlat, *glqr;
|
||||||
double lon, lat, r = MEAN_EARTH_RADIUS + 1500000, res;
|
double lon, lat, res, r = MEAN_EARTH_RADIUS + 150000;
|
||||||
int order = 8;
|
int order = 8;
|
||||||
|
|
||||||
glqlon = glq_new(order, tess.w, tess.e);
|
glqlon = glq_new(order, tess.w, tess.e);
|
||||||
glqlat = glq_new(order, tess.s, tess.n);
|
glqlat = glq_new(order, tess.s, tess.n);
|
||||||
glqr = glq_new(order, tess.r1, tess.r2);
|
glqr = glq_new(order, tess.r1, tess.r2);
|
||||||
|
glq_precompute_sincos(glqlon);
|
||||||
|
glq_precompute_sincos(glqlat);
|
||||||
|
glq_precompute_sincos(glqr);
|
||||||
|
|
||||||
for(lat = 20; lat <= 70; lat += 0.5)
|
for(lat = 20; lat <= 70; lat += 0.5)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user