📄 rec_const.h
字号:
//------------------------------------------------------------------------------
//
// Rec_Const.h
//
// Purpose:
//
// Definition of astronomical and mathematical constants (in MKS units)
//
// Notes:
//
// This software is protected by national and international copyright.
// Any unauthorized use, reproduction or modificaton is unlawful and
// will be prosecuted. Commercial and non-private application of the
// software in any form is strictly prohibited unless otherwise granted
// by the authors.
//
// The code is provided without any warranty; without even the implied
// warranty of merchantibility or fitness for a particular purpose.
//
// Last modified:
//
// 2000/03/04 OMO Final version (1st edition)
//
// (c) 1999-2000 O. Montenbruck, E. Gill
//
//------------------------------------------------------------------------------
#ifndef INC_SAT_CONST_H
#define INC_SAT_CONST_H
//
// Mathematical constants
//
const double pi = 3.14159265358979324;
const double pi2 = 2.0*pi; // 2pi
const double Rad = pi / 180.0; // Radians per degree
const double Deg = 180.0 / pi; // Degrees per radian
const double Arcs = 3600.0*180.0/pi; // Arcseconds per radian
//
// General
//
const double MJD_J2000 = 51544.5; // Modif. Julian Date of J2000.0
const double AU = 149597870000.0; // Astronomical unit [m]; IAU 1976
const double c_light = 299729458.0; // Speed of light [m/s]; IAU 1976
//
// Physical parameters of the Earth, Sun and Moon
//
// Equatorial radius and flattening
const double R_Earth = 6378.137e3; // Radius Earth [m]; WGS-84
const double f_Earth = 1.0/298.257223563; // Flattening; WGS-84
const double R_Sun = 696000.0e3; // Radius Sun [m]; Seidelmann 1992
const double R_Moon = 1738.0e3; // Radius Moon [m]
// Earth rotation (derivative of GMST at J2000; differs from inertial period by precession)
const double omega_Earth = 7.2921158553e-5; // [rad/s]; Aoki 1982, NIMA 1997
// Gravitational coefficient
const double GM_Earth = 398600.4415e+9; // [m^3/s^2]; JGM3
const double GM_Sun = 1.32712438e+20; // [m^3/s^2]; IAU 1976
const double GM_Moon = GM_Earth/81.300587;// [m^3/s^2]; DE200
// Solar radiation pressure at 1 AU
const double P_Sol = 4.560E-6; // [N/m^2] (~1367 W/m^2); IERS 96
// GPS constant
const double freq0 = 10.23e6; // fundamental freq. of GPS
const double freq1 = 154*freq0; // freq. on L1
const double L1 = c_light/freq1; // wavelength of L1
const double freq2 = 120*freq0; // freq. on L2
const double L2 = c_light/freq1; // wavelength of L2
const double freqCA = 1.023e6; // freq. of C/A code
const int MAX_TRIG = 0x1fff; // 8191 = 8192 - 1
const double MAGIC = (MAX_TRIG+1)/pi2;
const long SinTab[MAX_TRIG+1] = {
0, 50, 101, 151, 201, 251,
302, 352, 402, 452, 503, 553,
603, 653, 704, 754, 804, 854,
905, 955, 1005, 1056, 1106, 1156,
1206, 1257, 1307, 1357, 1407, 1458,
1508, 1558, 1608, 1659, 1709, 1759,
1809, 1860, 1910, 1960, 2010, 2061,
2111, 2161, 2211, 2261, 2312, 2362,
2412, 2462, 2513, 2563, 2613, 2663,
2714, 2764, 2814, 2864, 2914, 2965,
3015, 3065, 3115, 3165, 3216, 3266,
3316, 3366, 3417, 3467, 3517, 3567,
3617, 3667, 3718, 3768, 3818, 3868,
3918, 3969, 4019, 4069, 4119, 4169,
4219, 4270, 4320, 4370, 4420, 4470,
4520, 4570, 4621, 4671, 4721, 4771,
4821, 4871, 4921, 4972, 5022, 5072,
5122, 5172, 5222, 5272, 5322, 5372,
5422, 5473, 5523, 5573, 5623, 5673,
5723, 5773, 5823, 5873, 5923, 5973,
6023, 6073, 6123, 6173, 6224, 6274,
6324, 6374, 6424, 6474, 6524, 6574,
6624, 6674, 6724, 6774, 6824, 6874,
6924, 6974, 7024, 7074, 7124, 7174,
7224, 7273, 7323, 7373, 7423, 7473,
7523, 7573, 7623, 7673, 7723, 7773,
7823, 7873, 7923, 7972, 8022, 8072,
8122, 8172, 8222, 8272, 8322, 8371,
8421, 8471, 8521, 8571, 8621, 8670,
8720, 8770, 8820, 8870, 8919, 8969,
9019, 9069, 9119, 9168, 9218, 9268,
9318, 9367, 9417, 9467, 9517, 9566,
9616, 9666, 9716, 9765, 9815, 9865,
9914, 9964, 10014, 10063, 10113, 10163,
10212, 10262, 10312, 10361, 10411, 10461,
10510, 10560, 10609, 10659, 10709, 10758,
10808, 10857, 10907, 10956, 11006, 11056,
11105, 11155, 11204, 11254, 11303, 11353,
11402, 11452, 11501, 11551, 11600, 11650,
11699, 11749, 11798, 11847, 11897, 11946,
11996, 12045, 12095, 12144, 12193, 12243,
12292, 12341, 12391, 12440, 12490, 12539,
12588, 12638, 12687, 12736, 12785, 12835,
12884, 12933, 12983, 13032, 13081, 13130,
13180, 13229, 13278, 13327, 13376, 13426,
13475, 13524, 13573, 13622, 13672, 13721,
13770, 13819, 13868, 13917, 13966, 14016,
14065, 14114, 14163, 14212, 14261, 14310,
14359, 14408, 14457, 14506, 14555, 14604,
14653, 14702, 14751, 14800, 14849, 14898,
14947, 14996, 15045, 15094, 15143, 15192,
15240, 15289, 15338, 15387, 15436, 15485,
15534, 15582, 15631, 15680, 15729, 15778,
15826, 15875, 15924, 15973, 16021, 16070,
16119, 16168, 16216, 16265, 16314, 16362,
16411, 16460, 16508, 16557, 16606, 16654,
16703, 16751, 16800, 16849, 16897, 16946,
16994, 17043, 17091, 17140, 17188, 17237,
17285, 17334, 17382, 17431, 17479, 17528,
17576, 17625, 17673, 17721, 17770, 17818,
17867, 17915, 17963, 18012, 18060, 18108,
18156, 18205, 18253, 18301, 18350, 18398,
18446, 18494, 18543, 18591, 18639, 18687,
18735, 18783, 18832, 18880, 18928, 18976,
19024, 19072, 19120, 19168, 19216, 19264,
19313, 19361, 19409, 19457, 19505, 19553,
19600, 19648, 19696, 19744, 19792, 19840,
19888, 19936, 19984, 20032, 20080, 20127,
20175, 20223, 20271, 20319, 20366, 20414,
20462, 20510, 20557, 20605, 20653, 20701,
20748, 20796, 20844, 20891, 20939, 20987,
21034, 21082, 21129, 21177, 21224, 21272,
21320, 21367, 21415, 21462, 21510, 21557,
21604, 21652, 21699, 21747, 21794, 21842,
21889, 21936, 21984, 22031, 22078, 22126,
22173, 22220, 22268, 22315, 22362, 22409,
22457, 22504, 22551, 22598, 22645, 22693,
22740, 22787, 22834, 22881, 22928, 22975,
23022, 23069, 23116, 23163, 23210, 23257,
23304, 23351, 23398, 23445, 23492, 23539,
23586, 23633, 23680, 23727, 23774, 23820,
23867, 23914, 23961, 24008, 24054, 24101,
24148, 24195, 24241, 24288, 24335, 24381,
24428, 24475, 24521, 24568, 24614, 24661,
24708, 24754, 24801, 24847, 24894, 24940,
24987, 25033, 25080, 25126, 25172, 25219,
25265, 25312, 25358, 25404, 25451, 25497,
25543, 25589, 25636, 25682, 25728, 25774,
25821, 25867, 25913, 25959, 26005, 26051,
26098, 26144, 26190, 26236, 26282, 26328,
26374, 26420, 26466, 26512, 26558, 26604,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -