ARTS 2.5.9 (git: 825fa5f2)
geodetic.h
Go to the documentation of this file.
1/* Copyright (C) 2012
2 Patrick Eriksson <Patrick.Eriksson@chalmers.se>
3
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License as published by the
6 Free Software Foundation; either version 2, or (at your option) any
7 later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17 USA. */
18
19/*===========================================================================
20 === File description
21 ===========================================================================*/
22
31#ifndef geodetic_h
32#define geodetic_h
33
34#include "interpolation.h"
35#include "matpackI.h"
36
37// 2D:
38
39void cart2pol(Numeric& r,
40 Numeric& lat,
41 const Numeric& x,
42 const Numeric& z,
43 const Numeric& lat0,
44 const Numeric& za0);
45
46void cart2poslos(Numeric& r,
47 Numeric& lat,
48 Numeric& za,
49 const Numeric& x,
50 const Numeric& z,
51 const Numeric& dx,
52 const Numeric& dz,
53 const Numeric& ppc,
54 const Numeric& lat0,
55 const Numeric& za0);
56
57void distance2D(Numeric& l,
58 const Numeric& r1,
59 const Numeric& lat1,
60 const Numeric& r2,
61 const Numeric& lat2);
62
63/*
64void geomtanpoint2d(
65 Numeric& r_tan,
66 Numeric& lat_tan,
67 ConstVectorView refellipsoid,
68 const Numeric& r,
69 const Numeric& lat,
70 const Numeric& za );
71*/
72
74 const Vector& refellipsoid,
75 const Numeric& x,
76 const Numeric& y,
77 const Numeric& z,
78 const Numeric& dx,
79 const Numeric& dy,
80 const Numeric& dz);
81
83 Numeric& z,
84 const Numeric& xl,
85 const Numeric& zl,
86 const Numeric& dx,
87 const Numeric& dz,
88 const Numeric& xc,
89 const Numeric& zc,
90 const Numeric& r);
91
92void pol2cart(Numeric& x, Numeric& z, const Numeric& r, const Numeric& lat);
93
94void poslos2cart(Numeric& x,
95 Numeric& z,
96 Numeric& dx,
97 Numeric& dz,
98 const Numeric& r,
99 const Numeric& lat,
100 const Numeric& za);
101
102// 3D:
103
104void cart2poslos(Numeric& r,
105 Numeric& lat,
106 Numeric& lon,
107 Numeric& za,
108 Numeric& aa,
109 const Numeric& x,
110 const Numeric& y,
111 const Numeric& z,
112 const Numeric& dx,
113 const Numeric& dy,
114 const Numeric& dz,
115 const Numeric& ppc,
116 const Numeric& x0,
117 const Numeric& y0,
118 const Numeric& z0,
119 const Numeric& lat0,
120 const Numeric& lon0,
121 const Numeric& za0,
122 const Numeric& aa0);
123
125 Numeric& lat,
126 Numeric& lon,
127 Numeric& za,
128 Numeric& aa,
129 const Numeric& x,
130 const Numeric& y,
131 const Numeric& z,
132 const Numeric& dx,
133 const Numeric& dy,
134 const Numeric& dz);
135
136void cart2sph(Numeric& r,
137 Numeric& lat,
138 Numeric& lon,
139 const Numeric& x,
140 const Numeric& y,
141 const Numeric& z,
142 const Numeric& lat0,
143 const Numeric& lon0,
144 const Numeric& za0,
145 const Numeric& aa0);
146
147void cart2sph_plain(Numeric& r,
148 Numeric& lat,
149 Numeric& lon,
150 const Numeric& x,
151 const Numeric& y,
152 const Numeric& z);
153
154void distance3D(Numeric& l,
155 const Numeric& r1,
156 const Numeric& lat1,
157 const Numeric& lon1,
158 const Numeric& r2,
159 const Numeric& lat2,
160 const Numeric& lon2);
161
162void geompath_tanpos_3d(Numeric& r_tan,
163 Numeric& lat_tan,
164 Numeric& lon_tan,
165 Numeric& l_tan,
166 const Numeric& r,
167 const Numeric& lat,
168 const Numeric& lon,
169 const Numeric& za,
170 const Numeric& aa,
171 const Numeric& ppc);
172
173/*
174void geomtanpoint(
175 Numeric& r_tan,
176 Numeric& lat_tan,
177 Numeric& lon_tan,
178 ConstVectorView refellipsoid,
179 const Numeric& r,
180 const Numeric& lat,
181 const Numeric& lon,
182 const Numeric& za,
183 const Numeric& aa );
184*/
185
186void latlon_at_aa(Numeric& lat2,
187 Numeric& lon2,
188 const Numeric& lat1,
189 const Numeric& lon1,
190 const Numeric& aa,
191 const Numeric& ddeg);
192
194 Numeric& y,
195 Numeric& z,
196 const Numeric& xl,
197 const Numeric& yl,
198 const Numeric& zl,
199 const Numeric& dx,
200 const Numeric& dy,
201 const Numeric& dz,
202 const Numeric& xc,
203 const Numeric& yc,
204 const Numeric& zc,
205 const Numeric& r);
206
207void los2xyz(Numeric& za,
208 Numeric& aa,
209 const Numeric& r1,
210 const Numeric& lat1,
211 const Numeric& lon1,
212 const Numeric& x1,
213 const Numeric& y1,
214 const Numeric& z1,
215 const Numeric& x2,
216 const Numeric& y2,
217 const Numeric& z2);
218
219void poslos2cart(Numeric& x,
220 Numeric& y,
221 Numeric& z,
222 Numeric& dx,
223 Numeric& dy,
224 Numeric& dz,
225 const Numeric& r,
226 const Numeric& lat,
227 const Numeric& lon,
228 const Numeric& za,
229 const Numeric& aa);
230
231Numeric pos2refell_r(const Index& atmosphere_dim,
232 ConstVectorView refellipsoid,
233 ConstVectorView lat_grid,
234 ConstVectorView lon_grid,
235 ConstVectorView rte_pos);
236
237Numeric refell2r(ConstVectorView refellipsoid, const Numeric& lat);
238
239Numeric refell2d(ConstVectorView refellipsoid,
240 ConstVectorView lat_grid,
241 const GridPos gp);
242
243Numeric sphdist(const Numeric& lat1,
244 const Numeric& lon1,
245 const Numeric& lat2,
246 const Numeric& lon2);
247
248void sph2cart(Numeric& x,
249 Numeric& y,
250 Numeric& z,
251 const Numeric& r,
252 const Numeric& lat,
253 const Numeric& lon);
254
255// longitude functions
256
257void lon_shiftgrid(Vector& longrid_out,
258 ConstVectorView longrid_in,
259 const Numeric lon);
260
261void cycle_lat_lon(Numeric& lat, Numeric& lon);
262
263// Functions involving geodetic latitude
264
265void geodetic2cart(Numeric& x,
266 Numeric& y,
267 Numeric& z,
268 const Numeric& h,
269 const Numeric& lat_gd,
270 const Numeric& lon_gd,
271 const Vector& refellipsoid );
272
274 Numeric& y,
275 Numeric& z,
276 Numeric& dx,
277 Numeric& dy,
278 Numeric& dz,
279 const Numeric& h,
280 const Numeric& lat_gd,
281 const Numeric& lon_gd,
282 const Numeric& za,
283 const Numeric& aa,
284 const Vector& refellipsoid );
285
287 Numeric& lat,
288 Numeric& lon,
289 Numeric& za,
290 Numeric& aa,
291 const Numeric& x,
292 const Numeric& y,
293 const Numeric& z,
294 const Numeric& dx,
295 const Numeric& dy,
296 const Numeric& dz,
297 const Vector& refellipsoid );
298#endif // geodetic_h
A constant view of a Vector.
Definition: matpackI.h:521
The Vector class.
Definition: matpackI.h:910
void distance3D(Numeric &l, const Numeric &r1, const Numeric &lat1, const Numeric &lon1, const Numeric &r2, const Numeric &lat2, const Numeric &lon2)
distance3D
Definition: geodetic.cc:670
void distance2D(Numeric &l, const Numeric &r1, const Numeric &lat1, const Numeric &r2, const Numeric &lat2)
distance2D
Definition: geodetic.cc:183
void cart2geodeticposlos(Numeric &h, Numeric &lat, Numeric &lon, Numeric &za, Numeric &aa, const Numeric &x, const Numeric &y, const Numeric &z, const Numeric &dx, const Numeric &dy, const Numeric &dz, const Vector &refellipsoid)
cart2geodeticposlos
Definition: geodetic.cc:1639
void sph2cart(Numeric &x, Numeric &y, Numeric &z, const Numeric &r, const Numeric &lat, const Numeric &lon)
sph2cart
Definition: geodetic.cc:1367
void los2xyz(Numeric &za, Numeric &aa, const Numeric &r1, const Numeric &lat1, const Numeric &lon1, const Numeric &x1, const Numeric &y1, const Numeric &z1, const Numeric &x2, const Numeric &y2, const Numeric &z2)
los2xyz
Definition: geodetic.cc:1060
void cart2poslos_plain(Numeric &r, Numeric &lat, Numeric &lon, Numeric &za, Numeric &aa, const Numeric &x, const Numeric &y, const Numeric &z, const Numeric &dx, const Numeric &dy, const Numeric &dz)
Definition: geodetic.cc:543
void cart2sph(Numeric &r, Numeric &lat, Numeric &lon, const Numeric &x, const Numeric &y, const Numeric &z, const Numeric &lat0, const Numeric &lon0, const Numeric &za0, const Numeric &aa0)
cart2sph
Definition: geodetic.cc:603
void geodetic2cart(Numeric &x, Numeric &y, Numeric &z, const Numeric &h, const Numeric &lat_gd, const Numeric &lon_gd, const Vector &refellipsoid)
Conversion from geodetic to cartesian coordinates.
Definition: geodetic.cc:1522
void pol2cart(Numeric &x, Numeric &z, const Numeric &r, const Numeric &lat)
pol2cart
Definition: geodetic.cc:332
Numeric refell2r(ConstVectorView refellipsoid, const Numeric &lat)
refell2r
Definition: geodetic.cc:1266
void cycle_lat_lon(Numeric &lat, Numeric &lon)
Cyclic latitude longitude coordinates.
Definition: geodetic.cc:1433
Numeric pos2refell_r(const Index &atmosphere_dim, ConstVectorView refellipsoid, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstVectorView rte_pos)
pos2refell_r
Definition: geodetic.cc:1212
void line_circle_intersect(Numeric &x, Numeric &z, const Numeric &xl, const Numeric &zl, const Numeric &dx, const Numeric &dz, const Numeric &xc, const Numeric &zc, const Numeric &r)
geomtanpoint2d
Definition: geodetic.cc:279
void line_refellipsoid_intersect(Numeric &l, const Vector &refellipsoid, const Numeric &x, const Numeric &y, const Numeric &z, const Numeric &dx, const Numeric &dy, const Numeric &dz)
geomtanpoint
Definition: geodetic.cc:875
Numeric sphdist(const Numeric &lat1, const Numeric &lon1, const Numeric &lat2, const Numeric &lon2)
sphdist
Definition: geodetic.cc:1336
void latlon_at_aa(Numeric &lat2, Numeric &lon2, const Numeric &lat1, const Numeric &lon1, const Numeric &aa, const Numeric &ddeg)
latlon_at_aa
Definition: geodetic.cc:1014
void geodeticposlos2cart(Numeric &x, Numeric &y, Numeric &z, Numeric &dx, Numeric &dy, Numeric &dz, const Numeric &h, const Numeric &lat_gd, const Numeric &lon_gd, const Numeric &za, const Numeric &aa, const Vector &refellipsoid)
geodeticposlos2cart
Definition: geodetic.cc:1567
void poslos2cart(Numeric &x, Numeric &z, Numeric &dx, Numeric &dz, const Numeric &r, const Numeric &lat, const Numeric &za)
poslos2cart
Definition: geodetic.cc:356
void lon_shiftgrid(Vector &longrid_out, ConstVectorView longrid_in, const Numeric lon)
lon_shiftgrid
Definition: geodetic.cc:1409
Numeric refell2d(ConstVectorView refellipsoid, ConstVectorView lat_grid, const GridPos gp)
refell2d
Definition: geodetic.cc:1305
void cart2sph_plain(Numeric &r, Numeric &lat, Numeric &lon, const Numeric &x, const Numeric &y, const Numeric &z)
Definition: geodetic.cc:642
void cart2poslos(Numeric &r, Numeric &lat, Numeric &za, const Numeric &x, const Numeric &z, const Numeric &dx, const Numeric &dz, const Numeric &ppc, const Numeric &lat0, const Numeric &za0)
cart2poslos
Definition: geodetic.cc:114
void cart2pol(Numeric &r, Numeric &lat, const Numeric &x, const Numeric &z, const Numeric &lat0, const Numeric &za0)
cart2pol
Definition: geodetic.cc:75
void geompath_tanpos_3d(Numeric &r_tan, Numeric &lat_tan, Numeric &lon_tan, Numeric &l_tan, const Numeric &r, const Numeric &lat, const Numeric &lon, const Numeric &za, const Numeric &aa, const Numeric &ppc)
geompath_tanpos_3d
Definition: geodetic.cc:707
void line_sphere_intersect(Numeric &x, Numeric &y, Numeric &z, const Numeric &xl, const Numeric &yl, const Numeric &zl, const Numeric &dx, const Numeric &dy, const Numeric &dz, const Numeric &xc, const Numeric &yc, const Numeric &zc, const Numeric &r)
line_sphere_intersect
Definition: geodetic.cc:954
Header file for interpolation.cc.
Implementation of Matrix, Vector, and such stuff.
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
Structure to store a grid position.
Definition: interpolation.h:73