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
|
||||
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:
|
||||
|
||||
#include <stdio.h>
|
||||
#include "glq.h"r
|
||||
#include "constants.h"
|
||||
#include "grav_tess.h"
|
||||
#include "stdio.h"
|
||||
#include "tess/glq.h"
|
||||
#include "tess/constants.h"
|
||||
#include "tess/grav_tess.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
TESSEROID tess = {1000, 44, 46, -1, 1, MEAN_EARTH_RADIUS - 100000,
|
||||
MEAN_EARTH_RADIUS};
|
||||
TESSEROID tess = {1000, -1, 1, 44, 46, MEAN_EARTH_RADIUS - 100000, MEAN_EARTH_RADIUS};
|
||||
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;
|
||||
|
||||
glqlon = glq_new(order, tess.w, tess.e);
|
||||
glqlat = glq_new(order, tess.s, tess.n);
|
||||
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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user