gctl_toolkits/archive/sh2xyz
2024-09-10 20:25:18 +08:00
..
example initial upload 2024-09-10 20:25:18 +08:00
.gitignore initial upload 2024-09-10 20:25:18 +08:00
CMakeLists.txt initial upload 2024-09-10 20:25:18 +08:00
main.cpp initial upload 2024-09-10 20:25:18 +08:00
makefile initial upload 2024-09-10 20:25:18 +08:00
NALF-SFCM.h initial upload 2024-09-10 20:25:18 +08:00
progressBar_imp.h initial upload 2024-09-10 20:25:18 +08:00
README.md initial upload 2024-09-10 20:25:18 +08:00
sh2xyz.h initial upload 2024-09-10 20:25:18 +08:00
sysDefine.h initial upload 2024-09-10 20:25:18 +08:00

Forward calculation of topographic or gravitational data using spherical harmonic coefficients

Introduction

Files and folders

  1. CMakeLists.txt CMake project file;
  2. *.h and *.cpp Source files;
  3. README.md This file;
  4. example Example files.

Source file lists

main.cpp
NALF-SFCM.h
progressBar_imp.h
sh2xyz.h
sysDefine.h

Installation

This program is a toolkit of a software collection that is developed and maintained by Dr. Yi Zhang (zhangyiss@icloud.com) , which could be compiled and installed using the CMake software. Follow the three step instructions bellow, if you want to compile this program out of the collection.

  1. Uncomment the first two lines in the CMakeLists.txt file,
cmake_minimum_required(VERSION 3.15.2)
project(<project_name>)
  1. Compile the program as
mkdir build && cd build && make
  1. Move or symlink the executable file to any directory included in your $PATH, for instance, /usr/local/bin.

Usage

sph2xyz -t<table> -r<lonmin>/<lonmax>/<latmin>/<latmax>[/<altitude>] -i<dlon>/<dlat> -d<type> -f<ln>/<lm>/<hn>/<hm> [-p<loc-file>] [-s<refr>/<refR>] [-g<GM>/<R>] [-n<type>] [-c<col1>,<col2>,<col3>,<col4>] [-z<alti-file>[+d<col1>,<col2>,<col3>]] [-h] > out-file

Options

  • -t: Input filename of the coefficients.
  • -r: Initialize the range of observation points. Altitude of the points is optional (will be 0 if no set).
  • -i: Intervals of the observation points.
  • -d: Types of forward calculation.
  • -f: Starting and ending order/degree that will be used for calculation.
  • -p: Interpolate the forward calculated data to spherical locations read from the file.
  • -s: short and long semi-radius of the reference coordinate system.
  • -g: Model parameters of gravity models. This option must be set if we are calculating gravitational data.
  • -n: Normalization type of the Associated Legendre Function.
  • -c: Select input columns of the coefficients.
  • -z: Initialize the observation's altitudes from the a input file.
  • -h: Show help information.

Examples

To forward calculating an example.SHcoeffs which maximal degree/order are both 360.

sh2xyz -t example.SHcoeffs -r -180/180/-90/90/0 -i 0.5/0.5 -f 0/0/360/360 -s 10000/10000 > example.txt

The calculated data is shown as below: sh2xyz example