/rust/registry/src/index.crates.io-1949cf8c6b5b557f/sofars-0.6.1/src/astro/mod.rs
Line | Count | Source |
1 | | //! Astrometry |
2 | | |
3 | | // Star-independent astrometry parameters |
4 | | #[derive(Debug, Clone, Copy)] |
5 | | pub struct IauAstrom { |
6 | | pub pmt: f64, // PM time interval (SSB, Julian years) |
7 | | pub eb: [f64; 3], // SSB to observer (vector, au) |
8 | | pub eh: [f64; 3], // Sun to observer (unit vector) |
9 | | pub em: f64, // distance from Sun to observer (au) |
10 | | pub v: [f64; 3], // barycentric observer velocity (vector, c) |
11 | | pub bm1: f64, // sqrt(1-|v|^2): reciprocal of Lorenz factor |
12 | | pub bpn: [[f64; 3]; 3], // bias-precession-nutation matrix |
13 | | pub along: f64, // longitude + s' + dERA(DUT) (radians) |
14 | | pub phi: f64, // geodetic latitude (radians) |
15 | | pub xpl: f64, // polar motion xp wrt local meridian (radians) |
16 | | pub ypl: f64, // polar motion yp wrt local meridian (radians) |
17 | | pub sphi: f64, // sine of geodetic latitude |
18 | | pub cphi: f64, // cosine of geodetic latitude |
19 | | pub diurab: f64, // magnitude of diurnal aberration vector |
20 | | pub eral: f64, // "local" Earth rotation angle (radians) |
21 | | pub refa: f64, // refraction constant A (radians) |
22 | | pub refb: f64, // refraction constant B (radians) |
23 | | } |
24 | | |
25 | | impl Default for IauAstrom { |
26 | 0 | fn default() -> Self { |
27 | 0 | IauAstrom { |
28 | 0 | pmt: 0.0, |
29 | 0 | eb: [0.0; 3], |
30 | 0 | eh: [0.0; 3], |
31 | 0 | em: 0.0, |
32 | 0 | v: [0.0; 3], |
33 | 0 | bm1: 0.0, |
34 | 0 | bpn: [[0.0; 3]; 3], |
35 | 0 | along: 0.0, |
36 | 0 | phi: 0.0, |
37 | 0 | xpl: 0.0, |
38 | 0 | ypl: 0.0, |
39 | 0 | sphi: 0.0, |
40 | 0 | cphi: 0.0, |
41 | 0 | diurab: 0.0, |
42 | 0 | eral: 0.0, |
43 | 0 | refa: 0.0, |
44 | 0 | refb: 0.0, |
45 | 0 | } |
46 | 0 | } |
47 | | } |
48 | | |
49 | | // Body parameters for light deflection |
50 | | pub struct IauLdBody { |
51 | | pub bm: f64, // mass of the body (solar masses) |
52 | | pub dl: f64, // deflection limiter (radians^2/2) |
53 | | pub pv: [[f64; 3]; 2], // barycentric PV of the body (au, au/day) |
54 | | } |
55 | | |
56 | | impl IauLdBody { |
57 | 0 | pub fn new(bm: f64, dl: f64, pv: [[f64; 3]; 2]) -> Self { |
58 | 0 | IauLdBody { bm, dl, pv } |
59 | 0 | } |
60 | | } |
61 | | |
62 | | mod ab; |
63 | | pub use ab::*; |
64 | | |
65 | | mod apcg; |
66 | | pub use apcg::*; |
67 | | |
68 | | mod apcg13; |
69 | | pub use apcg13::*; |
70 | | |
71 | | mod apci; |
72 | | pub use apci::*; |
73 | | |
74 | | mod apci13; |
75 | | pub use apci13::*; |
76 | | |
77 | | mod apco; |
78 | | pub use apco::*; |
79 | | |
80 | | mod apco13; |
81 | | pub use apco13::*; |
82 | | |
83 | | mod apcs; |
84 | | pub use apcs::*; |
85 | | |
86 | | mod apcs13; |
87 | | pub use apcs13::*; |
88 | | |
89 | | mod aper; |
90 | | pub use aper::*; |
91 | | |
92 | | mod aper13; |
93 | | pub use aper13::*; |
94 | | |
95 | | mod apio; |
96 | | pub use apio::*; |
97 | | |
98 | | mod apio13; |
99 | | pub use apio13::*; |
100 | | |
101 | | mod atcc13; |
102 | | pub use atcc13::*; |
103 | | |
104 | | mod atccq; |
105 | | pub use atccq::*; |
106 | | |
107 | | mod atci13; |
108 | | pub use atci13::*; |
109 | | |
110 | | mod atciq; |
111 | | pub use atciq::*; |
112 | | |
113 | | mod atciqn; |
114 | | pub use atciqn::*; |
115 | | |
116 | | mod atciqz; |
117 | | pub use atciqz::*; |
118 | | |
119 | | mod atco13; |
120 | | pub use atco13::*; |
121 | | |
122 | | mod atic13; |
123 | | pub use atic13::*; |
124 | | |
125 | | mod aticq; |
126 | | pub use aticq::*; |
127 | | |
128 | | mod aticqn; |
129 | | pub use aticqn::*; |
130 | | |
131 | | mod atio13; |
132 | | pub use atio13::*; |
133 | | |
134 | | mod atioq; |
135 | | pub use atioq::*; |
136 | | |
137 | | mod atoc13; |
138 | | pub use atoc13::*; |
139 | | |
140 | | mod atoi13; |
141 | | pub use atoi13::*; |
142 | | |
143 | | mod atoiq; |
144 | | pub use atoiq::*; |
145 | | |
146 | | mod pmpx; |
147 | | pub use pmpx::*; |
148 | | |
149 | | mod pmsafe; |
150 | | pub use pmsafe::*; |
151 | | |
152 | | mod pvtob; |
153 | | pub use pvtob::*; |
154 | | |
155 | | mod refco; |
156 | | pub use refco::*; |
157 | | |
158 | | mod ld; |
159 | | pub use ld::*; |
160 | | |
161 | | mod ldn; |
162 | | pub use ldn::*; |
163 | | |
164 | | mod ldsun; |
165 | | pub use ldsun::*; |
166 | | |
167 | | mod pvstar; |
168 | | pub use pvstar::*; |
169 | | |
170 | | mod starpm; |
171 | | pub use starpm::*; |
172 | | |
173 | | mod starpv; |
174 | | pub use starpv::*; |