ARTS  2.4.0(git:4fb77825)
geodetic.h File Reference
#include "interpolation.h"
#include "matpackI.h"

Go to the source code of this file.

Functions

void cart2pol (Numeric &r, Numeric &lat, const Numeric &x, const Numeric &z, const Numeric &lat0, const Numeric &za0)
 cart2pol More...
 
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 More...
 
void distance2D (Numeric &l, const Numeric &r1, const Numeric &lat1, const Numeric &r2, const Numeric &lat2)
 distance2D More...
 
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 More...
 
void pol2cart (Numeric &x, Numeric &z, const Numeric &r, const Numeric &lat)
 pol2cart More...
 
void poslos2cart (Numeric &x, Numeric &z, Numeric &dx, Numeric &dz, const Numeric &r, const Numeric &lat, const Numeric &za)
 poslos2cart More...
 
void cart2poslos (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, const Numeric &ppc, const Numeric &x0, const Numeric &y0, const Numeric &z0, const Numeric &lat0, const Numeric &lon0, const Numeric &za0, const Numeric &aa0)
 cart2poslos More...
 
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 More...
 
void distance3D (Numeric &l, const Numeric &r1, const Numeric &lat1, const Numeric &lon1, const Numeric &r2, const Numeric &lat2, const Numeric &lon2)
 distance3D More...
 
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 More...
 
void latlon_at_aa (Numeric &lat2, Numeric &lon2, const Numeric &lat1, const Numeric &lon1, const Numeric &aa, const Numeric &ddeg)
 latlon_at_aa More...
 
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 More...
 
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 More...
 
void poslos2cart (Numeric &x, Numeric &y, Numeric &z, Numeric &dx, Numeric &dy, Numeric &dz, const Numeric &r, const Numeric &lat, const Numeric &lon, const Numeric &za, const Numeric &aa)
 poslos2cart More...
 
Numeric pos2refell_r (const Index &atmosphere_dim, ConstVectorView refellipsoid, ConstVectorView lat_grid, ConstVectorView lon_grid, ConstVectorView rte_pos)
 pos2refell_r More...
 
Numeric refell2r (ConstVectorView refellipsoid, const Numeric &lat)
 refell2r More...
 
Numeric refell2d (ConstVectorView refellipsoid, ConstVectorView lat_grid, const GridPos gp)
 refell2d More...
 
Numeric sphdist (const Numeric &lat1, const Numeric &lon1, const Numeric &lat2, const Numeric &lon2)
 sphdist More...
 
void sph2cart (Numeric &x, Numeric &y, Numeric &z, const Numeric &r, const Numeric &lat, const Numeric &lon)
 sph2cart More...
 
void lon_shiftgrid (Vector &longrid_out, ConstVectorView longrid_in, const Numeric lon)
 lon_shiftgrid More...
 
void cycle_lat_lon (Numeric &lat, Numeric &lon)
 Cyclic latitude longitude coordinates. More...
 

Detailed Description

Author
Patrick Eriksson Patri.nosp@m.ck.E.nosp@m.rikss.nosp@m.on@c.nosp@m.halme.nosp@m.rs.s.nosp@m.e
Date
2012-02-06

This file contains definitions of internal functions of geodetic character.

Definition in file geodetic.h.

Function Documentation

◆ cart2pol()

void cart2pol ( Numeric r,
Numeric lat,
const Numeric x,
const Numeric z,
const Numeric lat0,
const Numeric za0 
)

cart2pol

The inverse of pol2cart.

A 2D version of cart2sph

Parameters
rOut: Radius of position.
latOut: Latitude of position.
xx-coordinate of position.
zz-coordinate of position.
lat0Original latitude.
za0Original zenith angle.
Author
Patrick Eriksson
Date
2012-03-20

Definition at line 74 of file geodetic.cc.

References abs, ANGTOL, ARTS::Var::lat(), RAD2DEG, sqrt(), and ARTS::Var::x().

Referenced by defocusing_general_sub(), do_gridcell_2d_byltest(), and ppathFromRtePos2().

◆ cart2poslos() [1/2]

void cart2poslos ( 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,
const Numeric ppc,
const Numeric x0,
const Numeric y0,
const Numeric z0,
const Numeric lat0,
const Numeric lon0,
const Numeric za0,
const Numeric aa0 
)

cart2poslos

The inverse of poslos2cart.

Beside the cartesian coordinates (x,y,z,dx,dy,dz), the function takes as input information about the original position and LOS. The later data are used to improve the accuracy. For example, for zenith and nadir cases it is ensured that the latitude and longitude are not changed. This makes the function slower, but accuarcy is favoured as zenith, nadir, north and south line-of-sights are especially tricky as they can go along a grid box boundary and the smallest rounding error can move the path from one grid box to the neighbouring one.

Parameters
rOut: Radius of observation position.
latOut: Latitude of observation position.
lonOut: Longitude of observation position.
zaOut: LOS zenith angle at observation position.
aaOut: LOS azimuth angle at observation position.
xx-coordinate of observation position.
yy-coordinate of observation position.
zz-coordinate of observation position.
dxx-part of LOS unit vector.
dyy-part of LOS unit vector.
dzz-part of LOS unit vector.
ppcPropagation path constant (r*sin(za))
lat0Original latitude.
lon0Original longitude.
za0Original zenith angle.
aa0Original azimuth angle.
Author
Patrick Eriksson
Date
2002-12-30

Definition at line 421 of file geodetic.cc.

References abs, ANGTOL, DEG2RAD, dx, geompath_l_at_r(), ARTS::Var::lat(), ARTS::Var::lon(), POLELAT, pow(), RAD2DEG, sqrt(), ARTS::Var::x(), x0, and ARTS::Var::y().

◆ cart2poslos() [2/2]

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

2D version of the 3D cart2poslos.

Parameters
rOut: Radius of observation position.
latOut: Latitude of observation position.
zaOut: LOS zenith angle at observation position.
xx-coordinate of observation position.
zz-coordinate of observation position.
dxx-part of LOS unit vector.
dzz-part of LOS unit vector.
ppcPropagation path constant (r*sin(za))
lat0Original latitude.
za0Original zenith angle.
Author
Patrick Eriksson
Date
2012-03-21

Definition at line 113 of file geodetic.cc.

References abs, ANGTOL, DEG2RAD, dx, ARTS::Var::lat(), RAD2DEG, sqrt(), and ARTS::Var::x().

Referenced by do_gridcell_2d_byltest(), do_gridcell_3d_byltest(), ppath_start_stepping(), ppathFromRtePos2(), and raytrace_3d_linear_basic().

◆ 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

The inverse of sph2cart.

For definition of lat0, lon0, za0 and aa0, see cart2poslos.

Parameters
rOut: Radius of observation position.
latOut: Latitude of observation position.
lonOut: Longitude of observation position.
xx-coordinate of observation position.
yy-coordinate of observation position.
zz-coordinate of observation position.
lat0Original latitude.
lon0Original longitude.
za0Original zenith angle.
aa0Original azimuth angle.
Author
Patrick Eriksson
Date
2002-12-30

Definition at line 563 of file geodetic.cc.

References abs, ANGTOL, ARTS::Var::lat(), ARTS::Var::lon(), POLELAT, RAD2DEG, sqrt(), ARTS::Var::x(), and ARTS::Var::y().

Referenced by defocusing_general_sub(), do_gridcell_3d_byltest(), geompath_tanpos_3d(), and ppathFromRtePos2().

◆ cycle_lat_lon()

void cycle_lat_lon ( Numeric lat,
Numeric lon 
)

Cyclic latitude longitude coordinates.

Definition at line 1300 of file geodetic.cc.

References ARTS::Var::lat(), and ARTS::Var::lon().

Referenced by TelsemAtlas::calc_cellnum_nearest_neighbor().

◆ distance2D()

void distance2D ( Numeric l,
const Numeric r1,
const Numeric lat1,
const Numeric r2,
const Numeric lat2 
)

distance2D

The distance between two 2D points.

The two latitudes can deviate with max 180 degrees.

Parameters
lOut: The distance
r1Radius of position 1
lat1Latitude of position 1
r2Radius of position 2
lat2Latitude of position 2
Author
Patrick Eriksson
Date
2012-03-20

Definition at line 182 of file geodetic.cc.

References abs, dx, pol2cart(), sqrt(), x1, and x2.

Referenced by defocusing_general(), and ppathFromRtePos2().

◆ distance3D()

void distance3D ( Numeric l,
const Numeric r1,
const Numeric lat1,
const Numeric lon1,
const Numeric r2,
const Numeric lat2,
const Numeric lon2 
)

distance3D

The distance between two 3D points.

Parameters
lOut: The distance
r1Radius of position 1
lat1Latitude of position 1
lon1Longitude of position 1
r2Radius of position 2
lat2Latitude of position 2
lon2Longitude of position 2
Author
Patrick Eriksson
Date
2012-03-20

Definition at line 618 of file geodetic.cc.

References dx, sph2cart(), sqrt(), x1, and x2.

Referenced by defocusing_general(), and ppathFromRtePos2().

◆ 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

Position of the tangent point for 3D cases.

The zenith angle must be >= 90.

Parameters
r_tanOut: Radius of tangent point.
lat_tanOut: Latitude of tangent point.
lon_tanOut: Longitude of tangent point.
l_tanOut: Distance along path to the tangent point.
rRadius of observation position.
latLatitude of observation position.
lonLongitude of observation position.
zaLOS zenith angle at observation position.
aaLOS azimuth angle at observation position.
ppcGeometrical propagation path constant.
Author
Patrick Eriksson
Date
2002-12-31

Definition at line 655 of file geodetic.cc.

References cart2sph(), dx, ARTS::Var::lat(), ARTS::Var::lon(), poslos2cart(), sqrt(), ARTS::Var::x(), and ARTS::Var::y().

◆ 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

Destination point given distance and bearing from start point

Calculates the latitude and longitide, given a position, an azimuth angle and an angular distance.

Parameters
lat2Latitude of end position.
lon2Longitude of end position.
lat1Latitude of start position.
lon1Longitude of start position.
aaAzimuth/bearing at start point.
ddegAngular distance (in degrees).
Author
Patrick Eriksson
Date
2012-04-23

Definition at line 883 of file geodetic.cc.

References DEG2RAD, and RAD2DEG.

◆ 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

Position of the tangent point for 3D cases.

Calculates the 3D geometrical tangent point for arbitrary reference ellipsiod. That is, a spherical planet is not assumed. The tangent point is thus defined as the point closest to the ellipsoid (not as the ppoint with za=90).

Geocentric coordinates are used for both sensor and tangent point positions.

The algorithm used for non-spherical cases is derived by Nick Lloyd at University of Saskatchewan, Canada (nick..nosp@m.lloy.nosp@m.d@usa.nosp@m.sk.c.nosp@m.a), and is part of the operational code for both OSIRIS and SMR on-board- the Odin satellite.

The zenith angle must be >= 90.

Parameters
r_tanOut: Radius of tangent point.
lat_tanOut: Latitude of tangent point.
lon_tanOut: Longitude of tangent point.
rRadius of observation position.
latLatitude of observation position.
lonLongitude of observation position.
zaLOS zenith angle at observation position.
aaLOS azimuth angle at observation position.
Author
Patrick Eriksson
Date
2012-02-12 line_circle_intersect

Find the intersection between a line and a circle

Parameters
xOut: X-coordinate of intersection
zOut: Z-coordinate of intersection
xlA x-coordinate on the line
zlA z-coordinate on the line
dxX-component of line direction vector
dzZ-component of line direction vector
xcX-coordinate of sphere origo
zcZ-coordinate of sphere origo
rRadius of sphere
Author
Patrick Eriksson
Date
2012-03-30

Definition at line 278 of file geodetic.cc.

References dx.

Referenced by ppathFromRtePos2().

◆ 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

Position of the tangent point for 3D cases.

Calculates the 3D geometrical tangent point for arbitrary reference ellipsiod. That is, a spherical planet is not assumed. The tangent point is thus defined as the point closest to the ellipsoid (not as the ppoint with za=90).

Geocentric coordinates are used for both sensor and tangent point positions.

The algorithm used for non-spherical cases is derived by Nick Lloyd at University of Saskatchewan, Canada (nick..nosp@m.lloy.nosp@m.d@usa.nosp@m.sk.c.nosp@m.a), and is part of the operational code for both OSIRIS and SMR on-board- the Odin satellite.

The zenith angle must be >= 90.

Parameters
r_tanOut: Radius of tangent point.
lat_tanOut: Latitude of tangent point.
lon_tanOut: Longitude of tangent point.
rRadius of observation position.
latLatitude of observation position.
lonLongitude of observation position.
zaLOS zenith angle at observation position.
aaLOS azimuth angle at observation position.
Author
Patrick Eriksson
Date
2012-02-12 line_sphere_intersect

Find the intersection between a line and a sphere

Parameters
xOut: X-coordinate of intersection
yOut: Y-coordinate of intersection
zOut: Z-coordinate of intersection
xlA x-coordinate on the line
ylA y-coordinate on the line
zlA z-coordinate on the line
dxX-component of line direction vector
dyY-component of line direction vector
dzZ-component of line direction vector
xcX-coordinate of sphere origo
ycY-coordinate of sphere origo
zcZ-coordinate of sphere origo
rRadius of sphere
Author
Patrick Eriksson
Date
2012-03-30

Definition at line 823 of file geodetic.cc.

References dx.

Referenced by ppathFromRtePos2().

◆ lon_shiftgrid()

void lon_shiftgrid ( Vector longrid_out,
ConstVectorView  longrid_in,
const Numeric  lon 
)

lon_shiftgrid

Shifting longitude grid by +/- 360 to the same region as a given longitude.

Longitudes are allowed to be in [-360,360], but only covering at maximum 360 degrees at once. Different variables might be specified in different spaces of the allowed range. lon_shiftgrid shifts the longitude grid to the same space as the lon value. However, no check is done that lon is indeed within the range of longrid_out (only same region).

Parameters
longrid_outOut: shifted longitude grid.
longrid_inOriginal longitude grid.
lonA longitude value.
Author
Jana Mendrok
Date
2012-06-28

Definition at line 1276 of file geodetic.cc.

References ARTS::Var::lon(), and ConstVectorView::nelem().

Referenced by InterpGriddedField2ToPosition(), surface_complex_refr_indexFromGriddedField5(), surface_reflectivityFromGriddedField6(), surface_scalar_reflectivityFromGriddedField4(), and surface_typeInterpTypeMask().

◆ 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

Line-of-sight to another position given in cartesian coordinates.

Calculates the zenith and azimuth angle for the geomrical path from position 1 to position 2.

Parameters
zaOut: LOS zenith angle at position 1.
aaOut: LOS azimuth angle at position 1.
rRadius of position 1.
latLatitude of position 1.
lonLongitude of position 1.
x1x-coordinate of position 1.
y1y-coordinate of position 1.
z1z-coordinate of position 1.
x2x-coordinate of position 2.
y2y-coordinate of position 2.
z2z-coordinate of position 2.
Author
Patrick Eriksson
Date
2012-03-26

Definition at line 929 of file geodetic.cc.

References DEG2RAD, dx, RAD2DEG, sqrt(), x1, and x2.

Referenced by rte_losGeometricFromRtePosToRtePos2().

◆ pol2cart()

void pol2cart ( Numeric x,
Numeric z,
const Numeric r,
const Numeric lat 
)

pol2cart

Conversion from polar to cartesian coordinates.

The cartesian coordinate system is defined such as the x-axis goes along lat=0 and lon=0 and z-axis goes along lat=90.

Parameters
xOut: x position.
zOut: z position.
rRadius.
latLatitude.
Author
Patrick Eriksson
Date
2012-03-20

Definition at line 331 of file geodetic.cc.

References DEG2RAD, ARTS::Var::lat(), and ARTS::Var::x().

Referenced by distance2D(), ppathFromRtePos2(), and rte_losGeometricFromRtePosToRtePos2().

◆ pos2refell_r()

Numeric pos2refell_r ( const Index atmosphere_dim,
ConstVectorView  refellipsoid,
ConstVectorView  lat_grid,
ConstVectorView  lon_grid,
ConstVectorView  rte_pos 
)

pos2refell_r

Extracts the reference ellipsoid for the specified position.

The reference ellipsoid radius is defined slightly differently inside and outside of the model atmosphere. See refell2r. This function takes care of all those aspects.

If you know the latitude grid position of rte_pos, it is faster to use refell2d*.

Returns
Ellispoid radius
Parameters
atmosphere_dimIn: As the WSV with same name.
refellipsoidIn: As the WSV with same name.
lat_gridIn: As the WSV with same name.
lon_gridIn: As the WSV with same name.
rte_posIn: As the WSV with same name.
Author
Patrick Eriksson
Date
2012-03-27

Definition at line 1081 of file geodetic.cc.

References ARTS::Var::atmosphere_dim(), gridpos(), last(), ARTS::Var::lat_grid(), ARTS::Var::lon_grid(), refell2d(), refell2r(), ARTS::Var::refellipsoid(), and ARTS::Var::rte_pos().

Referenced by ppathFromRtePos2(), and rte_losGeometricFromRtePosToRtePos2().

◆ poslos2cart() [1/2]

void poslos2cart ( Numeric x,
Numeric y,
Numeric z,
Numeric dx,
Numeric dy,
Numeric dz,
const Numeric r,
const Numeric lat,
const Numeric lon,
const Numeric za,
const Numeric aa 
)

poslos2cart

Conversion from position and LOS to cartesian coordinates

A position (in geographical coordinates) and LOS are converted to a cartesian position and a viewing vector. The viewing direction is the the vector [dx,dy,dz]. This vector is normalised (it has length 1).

See the user guide for definition on the zenith and azimuth angles.

Parameters
xOut: x-coordinate of observation position.
yOut: y-coordinate of observation position.
zOut: z-coordinate of observation position.
dxOut: x-part of LOS unit vector.
dyOut: y-part of LOS unit vector.
dzOut: z-part of LOS unit vector.
rRadius of observation position.
latLatitude of observation position.
lonLongitude of observation position.
zaLOS zenith angle at observation position.
aaLOS azimuth angle at observation position.
Author
Patrick Eriksson
Date
2002-12-30

Definition at line 997 of file geodetic.cc.

References abs, DEG2RAD, dx, ARTS::Var::lat(), ARTS::Var::lon(), POLELAT, sign(), ARTS::Var::x(), and ARTS::Var::y().

◆ poslos2cart() [2/2]

void poslos2cart ( Numeric x,
Numeric z,
Numeric dx,
Numeric dz,
const Numeric r,
const Numeric lat,
const Numeric za 
)

poslos2cart

2D version of poslos2cart

Parameters
xOut: x-coordinate of observation position.
zOut: z-coordinate of observation position.
dxOut: x-part of LOS unit vector.
dzOut: z-part of LOS unit vector.
rRadius of observation position.
latLatitude of observation position.
zaLOS zenith angle at observation position.
Author
Patrick Eriksson
Date
2012-03-20

Definition at line 355 of file geodetic.cc.

References DEG2RAD, dx, ARTS::Var::lat(), and ARTS::Var::x().

Referenced by defocusing_general_sub(), do_gridcell_2d_byltest(), do_gridcell_3d_byltest(), geompath_tanpos_3d(), ppath_start_stepping(), ppathFromRtePos2(), and raytrace_3d_linear_basic().

◆ refell2d()

Numeric refell2d ( ConstVectorView  refellipsoid,
ConstVectorView  lat_grid,
const GridPos  gp 
)

refell2d

Reference ellipsoid radius for points inside 2D and 3D atmospheres.

To be consistent with the ppath calculations, the ellipsoid radius shall be treated to vary linear between the latitude grid points. This function performs this operation. The latitude position is specified by its grid position (gp).

Returns
Ellispoid radius
Parameters
refellipsoidIn: As the WSV with same name.
lat_gridIn: As the WSV with same name.
gpIn: Latitude grid position.
Author
Patrick Eriksson
Date
2012-02-09

Definition at line 1174 of file geodetic.cc.

References GridPos::fd, GridPos::idx, ARTS::Var::lat_grid(), refell2r(), and ARTS::Var::refellipsoid().

Referenced by get_refr_index_2d(), get_refr_index_3d(), pos2refell_r(), ppath_start_stepping(), and specular_losCalc().

◆ refell2r()

Numeric refell2r ( ConstVectorView  refellipsoid,
const Numeric lat 
)

refell2r

Reference ellipsoid radius, directly from refellipsoid.

Gives the distance from the Earth's centre and the reference ellipsoid as a function of geoCENTRIC latitude.

For 1D, extract r directly as refellipsoid[0] to save time.

This is the basic function to calculate the reference ellipsoid radius. However, inside the atmosphere this radius is just used at the positions of the lat_grid. A linear interpolation is applied between these points. This is handled by other functions. For 2D and 3D and the grid position is known, use refell2d. The function pos2refell_r handles all this in a general way (but not always the fastest option).

Returns
Ellispoid radius
Parameters
refellipsoidIn: As the WSV with same name.
latitudeIn: A geoecentric latitude.
Author
Patrick Eriksson
Date
2012-02-07

Definition at line 1135 of file geodetic.cc.

References ARTS::Var::refellipsoid().

Referenced by cloud_ppath_update3D(), defocusing_general(), plevel_slope_2d(), plevel_slope_3d(), pos2refell_r(), ppath_end_2d(), ppath_end_3d(), ppath_start_2d(), ppath_start_3d(), ppath_start_stepping(), refell2d(), refellipsoidOrbitPlane(), and wind_u_fieldIncludePlanetRotation().

◆ sph2cart()

void sph2cart ( Numeric x,
Numeric y,
Numeric z,
const Numeric r,
const Numeric lat,
const Numeric lon 
)

sph2cart

Conversion from spherical to cartesian coordinates.

The cartesian coordinate system is defined such as the x-axis goes along lat=0 and lon=0, the z-axis goes along lat=0 and lon=90, and z-axis goes along lat=90.

Parameters
xOut: x position.
yOut: y position.
zOut: z position.
rRadius.
latLatitude.
lonLongitude.
Author
Patrick Eriksson
Date
2002-12-17

Definition at line 1236 of file geodetic.cc.

References abs, DEG2RAD, ARTS::Var::lat(), ARTS::Var::lon(), ARTS::Var::x(), and ARTS::Var::y().

Referenced by distance3D(), ppathFromRtePos2(), and rte_losGeometricFromRtePosToRtePos2().

◆ sphdist()

Numeric sphdist ( const Numeric lat1,
const Numeric lon1,
const Numeric lat2,
const Numeric lon2 
)

sphdist

The distance between two geograpgical positions

"As-the-crow-flies" angular distance between two points, specified by their latitude and longitude.

Note that angular distance is returned. The distance in length varies with altitude.

Returns
Angular distance (in degrees)
Parameters
lat1Latitude of position 1.
lon1Longitude of position 1.
lat2Latitude of position 2.
lon2Longitude of position 2.
Author
Patrick Eriksson
Date
2012-04-05

Definition at line 1205 of file geodetic.cc.

References DEG2RAD, RAD2DEG, and sqrt().

Referenced by surfaceTelsem(), and telsemStandalone().