ARTS
2.2.66
|
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 &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... | |
This file contains definitions of internal functions of geodetic character.
Definition in file geodetic.h.
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
r | Out: Radius of position. |
lat | Out: Latitude of position. |
x | x-coordinate of position. |
z | z-coordinate of position. |
lat0 | Original latitude. |
za0 | Original zenith angle. |
Definition at line 82 of file geodetic.cc.
References abs, ANGTOL, and RAD2DEG.
Referenced by defocusing_general_sub(), do_gridcell_2d_byltest(), and ppathFromRtePos2().
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 & | 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.
r | Out: Radius of observation position. |
lat | Out: Latitude of observation position. |
lon | Out: Longitude of observation position. |
za | Out: LOS zenith angle at observation position. |
aa | Out: LOS azimuth angle at observation position. |
x | x-coordinate of observation position. |
y | y-coordinate of observation position. |
z | z-coordinate of observation position. |
dx | x-part of LOS unit vector. |
dy | y-part of LOS unit vector. |
dz | z-part of LOS unit vector. |
ppc | Propagation path constant (r*sin(za)) |
lat0 | Original latitude. |
lon0 | Original longitude. |
za0 | Original zenith angle. |
aa0 | Original azimuth angle. |
Definition at line 459 of file geodetic.cc.
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.
r | Out: Radius of observation position. |
lat | Out: Latitude of observation position. |
za | Out: LOS zenith angle at observation position. |
x | x-coordinate of observation position. |
z | z-coordinate of observation position. |
dx | x-part of LOS unit vector. |
dz | z-part of LOS unit vector. |
ppc | Propagation path constant (r*sin(za)) |
lat0 | Original latitude. |
za0 | Original zenith angle. |
Definition at line 125 of file geodetic.cc.
References abs, ANGTOL, DEG2RAD, dx, and RAD2DEG.
Referenced by do_gridcell_2d_byltest(), do_gridcell_3d_byltest(), mcPathTraceIPA(), ppath_start_stepping(), ppathFromRtePos2(), and raytrace_3d_linear_basic().
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.
r | Out: Radius of observation position. |
lat | Out: Latitude of observation position. |
lon | Out: Longitude of observation position. |
x | x-coordinate of observation position. |
y | y-coordinate of observation position. |
z | z-coordinate of observation position. |
lat0 | Original latitude. |
lon0 | Original longitude. |
za0 | Original zenith angle. |
aa0 | Original azimuth angle. |
Definition at line 596 of file geodetic.cc.
References abs, ANGTOL, POLELAT, and RAD2DEG.
Referenced by defocusing_general_sub(), do_gridcell_3d_byltest(), geompath_tanpos_3d(), and ppathFromRtePos2().
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.
l | Out: The distance |
r1 | Radius of position 1 |
lat1 | Latitude of position 1 |
r2 | Radius of position 2 |
lat2 | Latitude of position 2 |
Definition at line 201 of file geodetic.cc.
References abs, dx, and pol2cart().
Referenced by defocusing_general(), iyRadioLink(), and ppathFromRtePos2().
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.
l | Out: The distance |
r1 | Radius of position 1 |
lat1 | Latitude of position 1 |
lon1 | Longitude of position 1 |
r2 | Radius of position 2 |
lat2 | Latitude of position 2 |
lon2 | Longitude of position 2 |
Definition at line 658 of file geodetic.cc.
References dx, and sph2cart().
Referenced by defocusing_general(), iyRadioLink(), plevel_crossing_3d(), and ppathFromRtePos2().
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.
r_tan | Out: Radius of tangent point. |
lat_tan | Out: Latitude of tangent point. |
lon_tan | Out: Longitude of tangent point. |
l_tan | Out: Distance along path to the tangent point. |
r | Radius of observation position. |
lat | Latitude of observation position. |
lon | Longitude of observation position. |
za | LOS zenith angle at observation position. |
aa | LOS azimuth angle at observation position. |
ppc | Geometrical propagation path constant. |
Definition at line 699 of file geodetic.cc.
References cart2sph(), dx, and poslos2cart().
Referenced by do_gridcell_3d().
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.
lat2 | Latitude of end position. |
lon2 | Longitude of end position. |
lat1 | Latitude of start position. |
lon1 | Longitude of start position. |
aa | Azimuth/bearing at start point. |
ddeg | Angular distance (in degrees). |
Definition at line 927 of file geodetic.cc.
References DEG2RAD, and RAD2DEG.
Referenced by plevel_crossing_3d(), and plevel_slope_3d().
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.), and is part of the operational code for both OSIRIS and SMR on-board- the Odin satellite. lloy d@usa sk.c a
The zenith angle must be >= 90.
r_tan | Out: Radius of tangent point. |
lat_tan | Out: Latitude of tangent point. |
lon_tan | Out: Longitude of tangent point. |
r | Radius of observation position. |
lat | Latitude of observation position. |
lon | Longitude of observation position. |
za | LOS zenith angle at observation position. |
aa | LOS azimuth angle at observation position. |
Find the intersection between a line and a circle
x | Out: X-coordinate of intersection |
z | Out: Z-coordinate of intersection |
xl | A x-coordinate on the line |
zl | A z-coordinate on the line |
dx | X-component of line direction vector |
dz | Z-component of line direction vector |
xc | X-coordinate of sphere origo |
zc | Z-coordinate of sphere origo |
r | Radius of sphere |
Definition at line 302 of file geodetic.cc.
Referenced by ppathFromRtePos2().
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.), and is part of the operational code for both OSIRIS and SMR on-board- the Odin satellite. lloy d@usa sk.c a
The zenith angle must be >= 90.
r_tan | Out: Radius of tangent point. |
lat_tan | Out: Latitude of tangent point. |
lon_tan | Out: Longitude of tangent point. |
r | Radius of observation position. |
lat | Latitude of observation position. |
lon | Longitude of observation position. |
za | LOS zenith angle at observation position. |
aa | LOS azimuth angle at observation position. |
Find the intersection between a line and a sphere
x | Out: X-coordinate of intersection |
y | Out: Y-coordinate of intersection |
z | Out: Z-coordinate of intersection |
xl | A x-coordinate on the line |
yl | A y-coordinate on the line |
zl | A z-coordinate on the line |
dx | X-component of line direction vector |
dy | Y-component of line direction vector |
dz | Z-component of line direction vector |
xc | X-coordinate of sphere origo |
yc | Y-coordinate of sphere origo |
zc | Z-coordinate of sphere origo |
r | Radius of sphere |
Definition at line 865 of file geodetic.cc.
Referenced by ppathFromRtePos2().
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).
longrid_out | Out: shifted longitude grid. |
longrid_in | Original longitude grid. |
lon | A longitude value. |
Definition at line 1358 of file geodetic.cc.
References ConstVectorView::nelem().
Referenced by surface_complex_refr_indexFromGriddedField5(), surface_reflectivityFromGriddedField6(), and surface_scalar_reflectivityFromGriddedField4().
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.
za | Out: LOS zenith angle at position 1. |
aa | Out: LOS azimuth angle at position 1. |
r | Radius of position 1. |
lat | Latitude of position 1. |
lon | Longitude of position 1. |
x1 | x-coordinate of position 1. |
y1 | y-coordinate of position 1. |
z1 | z-coordinate of position 1. |
x2 | x-coordinate of position 2. |
y2 | y-coordinate of position 2. |
z2 | z-coordinate of position 2. |
Definition at line 977 of file geodetic.cc.
References DEG2RAD, dx, and RAD2DEG.
Referenced by rte_losGeometricFromRtePosToRtePos2().
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.
x | Out: x position. |
z | Out: z position. |
r | Radius. |
lat | Latitude. |
Definition at line 356 of file geodetic.cc.
References DEG2RAD.
Referenced by distance2D(), ppathFromRtePos2(), and rte_losGeometricFromRtePosToRtePos2().
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 rference 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*.
atmosphere_dim | In: As the WSV with same name. |
refellipsoid | In: As the WSV with same name. |
lat_grid | In: As the WSV with same name. |
lon_grid | In: As the WSV with same name. |
rte_pos | In: As the WSV with same name. |
Definition at line 1139 of file geodetic.cc.
References gridpos(), last(), ConstVectorView::nelem(), refell2d(), and refell2r().
Referenced by iyRadioLink(), ppathFromRtePos2(), and rte_losGeometricFromRtePosToRtePos2().
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.
x | Out: x-coordinate of observation position. |
y | Out: y-coordinate of observation position. |
z | Out: z-coordinate of observation position. |
dx | Out: x-part of LOS unit vector. |
dy | Out: y-part of LOS unit vector. |
dz | Out: z-part of LOS unit vector. |
r | Radius of observation position. |
lat | Latitude of observation position. |
lon | Longitude of observation position. |
za | LOS zenith angle at observation position. |
aa | LOS azimuth angle at observation position. |
Definition at line 1049 of file geodetic.cc.
void poslos2cart | ( | Numeric & | x, |
Numeric & | z, | ||
Numeric & | dx, | ||
Numeric & | dz, | ||
const Numeric & | r, | ||
const Numeric & | lat, | ||
const Numeric & | za | ||
) |
poslos2cart
2D version of poslos2cart
x | Out: x-coordinate of observation position. |
z | Out: z-coordinate of observation position. |
dx | Out: x-part of LOS unit vector. |
dz | Out: z-part of LOS unit vector. |
r | Radius of observation position. |
lat | Latitude of observation position. |
za | LOS zenith angle at observation position. |
Definition at line 387 of file geodetic.cc.
Referenced by defocusing_general_sub(), do_gridcell_2d_byltest(), do_gridcell_3d(), do_gridcell_3d_byltest(), geompath_tanpos_3d(), mcPathTraceIPA(), ppath_start_stepping(), ppathFromRtePos2(), and raytrace_3d_linear_basic().
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).
refellipsoid | In: As the WSV with same name. |
lat_grid | In: As the WSV with same name. |
gp | In: Latitude grid position. |
Definition at line 1244 of file geodetic.cc.
References GridPos::fd, GridPos::idx, and refell2r().
Referenced by get_refr_index_2d(), get_refr_index_3d(), mcPathTraceIPA(), pos2refell_r(), ppath_start_stepping(), and specular_losCalc().
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).
refellipsoid | In: As the WSV with same name. |
latitude | In: A geoecentric latitude. |
Definition at line 1199 of file geodetic.cc.
References DEG2RAD, and ConstVectorView::nelem().
Referenced by cloud_ppath_update3D(), defocusing_general(), mcPathTraceIPA(), 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(), wind_u_fieldIncludePlanetRotation(), and z_fieldFromHSE().
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.
x | Out: x position. |
y | Out: y position. |
z | Out: z position. |
r | Radius. |
lat | Latitude. |
lon | Longitude. |
Definition at line 1312 of file geodetic.cc.
Referenced by distance3D(), ppathFromRtePos2(), and rte_losGeometricFromRtePosToRtePos2().
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" distance between two points, specified by their latitude and longitude.
lat1 | Latitude of position 1. |
lon1 | Longitude of position 1. |
lat2 | Latitude of position 2. |
lon2 | Longitude of position 2. |
Definition at line 1276 of file geodetic.cc.
References DEG2RAD, and RAD2DEG.
Referenced by bending_angle1d().