![]() |
This class is a 3-vector that represents a position on the Earth's surface. More...
#include <position.hh>
Public Member Functions | |
| Position () | |
| Default constructor: calls default constructor of Vector. | |
| Position (Vector vec) | |
| Position (double theta_inp, double phi_inp) | |
| Identical to the Vector constructor with the same inputs. | |
| Position (double longitude, double latitude, double altitude) | |
| double | Lat () const |
| Returns latitude, where the +z direction is at 0 latitude. | |
| double | Lon () const |
| Returns longitude. More... | |
| double | Distance (const Position &second) const |
| Returns chord distance (direct distance between two vectors) | |
| double | SurfaceDistance (const Position &second, double local_surface) const |
| Returns "surface distance" between two positions. More... | |
Public Member Functions inherited from Vector | |
| double | operator[] (int i) const |
| Vector (double x_inp, double y_inp, double z_inp) | |
| Vector (double *xarray) | |
| Vector (double theta, double phi) | |
| Vector | RotateX (double angle) const |
| Vector | RotateY (double angle) const |
| Vector | RotateZ (double angle) const |
| Vector | Cross (const Vector &vec) const |
| double | Dot (const Vector &vec) const |
| Vector | Rotate (double angle, const Vector &axis) const |
| Vector | Zero () |
| double | Mag2 () const |
| double | Mag () const |
| double | Angle (const Vector &vec) const |
| Vector | ChangeCoord (const Vector &new_x_axis, const Vector &new_y_axis) const |
| Vector | ChangeCoord (const Vector &new_z_axis) const |
| Vector | Orthogonal () const |
| Vector | Unit () const |
| double | GetX () const |
| double | GetY () const |
| double | GetZ () const |
| double | X () const |
| double | Y () const |
| double | Z () const |
| double | Theta () const |
| double | Phi () const |
| void | Print () const |
| void | SetX (double inp) |
| void | SetY (double inp) |
| void | SetZ (double inp) |
| void | SetXYZ (double inpx, double inpy, double inpz) |
| void | Reset (double x_inp, double y_inp, double z_inp) |
Additional Inherited Members | |
Protected Member Functions inherited from Vector | |
| void | UpdateThetaPhi () const |
Protected Attributes inherited from Vector | |
| double | x |
| double | y |
| double | z |
| double | theta |
| double | phi |
| bool | angles_need_updating |
This class is a 3-vector that represents a position on the Earth's surface.
Definition at line 26 of file position.hh.


| Position::Position | ( | double | longitude, |
| double | latitude, | ||
| double | altitude | ||
| ) |
Constructs a position vector given a longitude, latitude, and distance from the center of the Earth.
Definition at line 17 of file position.cc.
| double Position::Lon | ( | ) | const |
Returns longitude.
where 0 degrees longitude corresponds to phi = 270 deg (-y axis), and increases clockwise. Hence, lon=0 -> phi=270, lon=90 -> phi=180, lon=180 -> phi=90, lon=270 -> phi=0,
Definition at line 51 of file position.cc.
| double Position::SurfaceDistance | ( | const Position & | second, |
| double | local_surface | ||
| ) | const |
Returns "surface distance" between two positions.
The surface distance is the the length of arc between two positions. Altitude (i.e. length of the position vector) is irrelevant; only angle between the two position vectors is considered.
Definition at line 43 of file position.cc.
1.8.11