ARTS  2.4.0(git:4fb77825)
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 
39 void cart2pol(Numeric& r,
40  Numeric& lat,
41  const Numeric& x,
42  const Numeric& z,
43  const Numeric& lat0,
44  const Numeric& za0);
45 
46 void 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 
57 void distance2D(Numeric& l,
58  const Numeric& r1,
59  const Numeric& lat1,
60  const Numeric& r2,
61  const Numeric& lat2);
62 
63 /*
64 void 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  Numeric& z,
75  const Numeric& xl,
76  const Numeric& zl,
77  const Numeric& dx,
78  const Numeric& dz,
79  const Numeric& xc,
80  const Numeric& zc,
81  const Numeric& r);
82 
83 void pol2cart(Numeric& x, Numeric& z, const Numeric& r, const Numeric& lat);
84 
85 void poslos2cart(Numeric& x,
86  Numeric& z,
87  Numeric& dx,
88  Numeric& dz,
89  const Numeric& r,
90  const Numeric& lat,
91  const Numeric& za);
92 
93 // 3D:
94 
95 void cart2poslos(Numeric& r,
96  Numeric& lat,
97  Numeric& lon,
98  Numeric& za,
99  Numeric& aa,
100  const Numeric& x,
101  const Numeric& y,
102  const Numeric& z,
103  const Numeric& dx,
104  const Numeric& dy,
105  const Numeric& dz,
106  const Numeric& ppc,
107  const Numeric& x0,
108  const Numeric& y0,
109  const Numeric& z0,
110  const Numeric& lat0,
111  const Numeric& lon0,
112  const Numeric& za0,
113  const Numeric& aa0);
114 
115 void cart2sph(Numeric& r,
116  Numeric& lat,
117  Numeric& lon,
118  const Numeric& x,
119  const Numeric& y,
120  const Numeric& z,
121  const Numeric& lat0,
122  const Numeric& lon0,
123  const Numeric& za0,
124  const Numeric& aa0);
125 
126 void distance3D(Numeric& l,
127  const Numeric& r1,
128  const Numeric& lat1,
129  const Numeric& lon1,
130  const Numeric& r2,
131  const Numeric& lat2,
132  const Numeric& lon2);
133 
134 void geompath_tanpos_3d(Numeric& r_tan,
135  Numeric& lat_tan,
136  Numeric& lon_tan,
137  Numeric& l_tan,
138  const Numeric& r,
139  const Numeric& lat,
140  const Numeric& lon,
141  const Numeric& za,
142  const Numeric& aa,
143  const Numeric& ppc);
144 
145 /*
146 void geomtanpoint(
147  Numeric& r_tan,
148  Numeric& lat_tan,
149  Numeric& lon_tan,
150  ConstVectorView refellipsoid,
151  const Numeric& r,
152  const Numeric& lat,
153  const Numeric& lon,
154  const Numeric& za,
155  const Numeric& aa );
156 */
157 
158 void latlon_at_aa(Numeric& lat2,
159  Numeric& lon2,
160  const Numeric& lat1,
161  const Numeric& lon1,
162  const Numeric& aa,
163  const Numeric& ddeg);
164 
166  Numeric& y,
167  Numeric& z,
168  const Numeric& xl,
169  const Numeric& yl,
170  const Numeric& zl,
171  const Numeric& dx,
172  const Numeric& dy,
173  const Numeric& dz,
174  const Numeric& xc,
175  const Numeric& yc,
176  const Numeric& zc,
177  const Numeric& r);
178 
179 void los2xyz(Numeric& za,
180  Numeric& aa,
181  const Numeric& r1,
182  const Numeric& lat1,
183  const Numeric& lon1,
184  const Numeric& x1,
185  const Numeric& y1,
186  const Numeric& z1,
187  const Numeric& x2,
188  const Numeric& y2,
189  const Numeric& z2);
190 
191 void poslos2cart(Numeric& x,
192  Numeric& y,
193  Numeric& z,
194  Numeric& dx,
195  Numeric& dy,
196  Numeric& dz,
197  const Numeric& r,
198  const Numeric& lat,
199  const Numeric& lon,
200  const Numeric& za,
201  const Numeric& aa);
202 
208 
210 
213  const GridPos gp);
214 
215 Numeric sphdist(const Numeric& lat1,
216  const Numeric& lon1,
217  const Numeric& lat2,
218  const Numeric& lon2);
219 
220 void sph2cart(Numeric& x,
221  Numeric& y,
222  Numeric& z,
223  const Numeric& r,
224  const Numeric& lat,
225  const Numeric& lon);
226 
227 // coord transform
228 
229 void lon_shiftgrid(Vector& longrid_out,
230  ConstVectorView longrid_in,
231  const Numeric lon);
232 
234 
235 #endif // geodetic_h
ARTS::Var::atmosphere_dim
Index atmosphere_dim(Workspace &ws) noexcept
Definition: autoarts.h:2510
latlon_at_aa
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:883
ARTS::Var::lat
Numeric lat(Workspace &ws) noexcept
Definition: autoarts.h:3933
line_circle_intersect
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:278
ARTS::Var::lat_grid
Vector lat_grid(Workspace &ws) noexcept
Definition: autoarts.h:3962
interpolation.h
Header file for interpolation.cc.
poslos2cart
void poslos2cart(Numeric &x, Numeric &z, Numeric &dx, Numeric &dz, const Numeric &r, const Numeric &lat, const Numeric &za)
poslos2cart
Definition: geodetic.cc:355
lon_shiftgrid
void lon_shiftgrid(Vector &longrid_out, ConstVectorView longrid_in, const Numeric lon)
lon_shiftgrid
Definition: geodetic.cc:1276
pos2refell_r
Numeric pos2refell_r(const Index &atmosphere_dim, ConstVectorView refellipsoid, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstVectorView rte_pos)
pos2refell_r
Definition: geodetic.cc:1081
ARTS::Var::y
Vector y(Workspace &ws) noexcept
Definition: autoarts.h:7401
cart2poslos
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:113
x0
#define x0
Definition: lineshapemodel.h:413
los2xyz
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:929
ARTS::Var::lon
Numeric lon(Workspace &ws) noexcept
Definition: autoarts.h:4064
cart2sph
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:563
sphdist
Numeric sphdist(const Numeric &lat1, const Numeric &lon1, const Numeric &lat2, const Numeric &lon2)
sphdist
Definition: geodetic.cc:1205
matpackI.h
Implementation of Matrix, Vector, and such stuff.
geompath_tanpos_3d
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:655
ARTS::Var::rte_pos
Vector rte_pos(Workspace &ws) noexcept
Definition: autoarts.h:5672
sph2cart
void sph2cart(Numeric &x, Numeric &y, Numeric &z, const Numeric &r, const Numeric &lat, const Numeric &lon)
sph2cart
Definition: geodetic.cc:1236
line_sphere_intersect
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)
geomtanpoint
Definition: geodetic.cc:823
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
distance2D
void distance2D(Numeric &l, const Numeric &r1, const Numeric &lat1, const Numeric &r2, const Numeric &lat2)
distance2D
Definition: geodetic.cc:182
refell2d
Numeric refell2d(ConstVectorView refellipsoid, ConstVectorView lat_grid, const GridPos gp)
refell2d
Definition: geodetic.cc:1174
ARTS::Var::refellipsoid
Vector refellipsoid(Workspace &ws) noexcept
Definition: autoarts.h:5519
refell2r
Numeric refell2r(ConstVectorView refellipsoid, const Numeric &lat)
refell2r
Definition: geodetic.cc:1135
ARTS::Var::lon_grid
Vector lon_grid(Workspace &ws) noexcept
Definition: autoarts.h:4090
GridPos
Structure to store a grid position.
Definition: interpolation.h:73
distance3D
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:618
pol2cart
void pol2cart(Numeric &x, Numeric &z, const Numeric &r, const Numeric &lat)
pol2cart
Definition: geodetic.cc:331
cart2pol
void cart2pol(Numeric &r, Numeric &lat, const Numeric &x, const Numeric &z, const Numeric &lat0, const Numeric &za0)
cart2pol
Definition: geodetic.cc:74
cycle_lat_lon
void cycle_lat_lon(Numeric &lat, Numeric &lon)
Cyclic latitude longitude coordinates.
Definition: geodetic.cc:1300
x1
#define x1
Definition: lineshapemodel.h:414
dx
#define dx
Definition: legacy_continua.cc:22180
ARTS::Var::x
Vector x(Workspace &ws) noexcept
Definition: autoarts.h:7346
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
Vector
The Vector class.
Definition: matpackI.h:860
ConstVectorView
A constant view of a Vector.
Definition: matpackI.h:476
x2
#define x2
Definition: lineshapemodel.h:415