Go to the documentation of this file.
28 #ifndef CASA_MVPOSITION_H
29 #define CASA_MVPOSITION_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/casa/Arrays/Vector.h>
35 #include <casacore/casa/Quanta/Unit.h>
36 #include <casacore/casa/Quanta/Quantum.h>
37 #include <casacore/casa/Quanta/MeasValue.h>
38 #include <casacore/casa/iosfwd.h>
244 const Unit &unit)
const;
250 const Unit &unit)
const;
256 virtual void print(ostream &os)
const;
MVPosition(Double in0, Double in1, Double in2)
Creates a specified vector.
const Double & operator()(uInt which) const
MVPosition & operator*=(const RotMatrix &right)
Multiplication with rotation matrix (see also global functions)
MVPosition()
Default constructor generates a (0,0,0) position.
MVPosition(const Quantity &l, const Quantum< Vector< Double > > &angle)
virtual uInt type() const
Tell me your type.
Bool near(const MVPosition &other, Double tol=1e-13) const
virtual Vector< Quantum< Double > > getXRecordValue() const
MVPosition(const Quantity &l, const Quantity &angle0, const Quantity &angle1)
Creates the position from specified angles and length.
Quantity positionAngle(const MVPosition &other, const Unit &unit) const
MVPosition operator-(const MVPosition &right) const
Double separation(const MVPosition &other) const
Get the angular separation between two directions.
virtual void putVector(const Vector< Double > &in)
Set the value from internal units (set 0 for empty vector)
virtual void print(ostream &os) const
Print data.
Vector< Double > get() const
Generate a 3-vector of coordinates (length(m), angles(rad))
virtual void readjust(Double res)
Re-adjust using factor given.
Double getLat(Double ln) const
Get the latitude assuming length is given.
Base class for values in a Measure.
virtual MeasValue * clone() const
Clone.
Double positionAngle(const MVPosition &other) const
Get the position angle between the directions.
MVPosition(const Quantity &l, Double angle0, Double angle1)
Creates the position from specified (azimuth,elevation) angles and length.
MVPosition & operator-=(const MVPosition &right)
Double getLong() const
Get the longitudinal angle (in radians)
virtual void adjust(Double &res)
Adjustment with returned factor.
virtual Vector< Quantum< Double > > getRecordValue() const
Get the internal value as a Vector<Quantity>.
MVPosition operator+(const MVPosition &right) const
MVPosition(Double in0)
Creates a vector with specified length towards pole.
Bool operator==(const MVPosition &other) const
Equality comparisons.
const Vector< Double > & getValue() const
Generate a 3-vector of x,y,z in m.
static const Double hiLimit
MVPosition(const Vector< Quantity > &other)
MVPosition & operator=(const MVPosition &other)
Copy assignment.
Quantum< Vector< Double > > getAngle(const Unit &unit) const
and with specified units
MVPosition crossProduct(const MVPosition &other) const
Produce the cross product.
MVPosition & operator+=(const MVPosition &right)
virtual Double radius()
Get radius of position.
this file contains all the compiler specific defines
Quantity getLength() const
Generate the length.
static const Double loLimit
Internal limts codes for negative height.
Double getLat() const
Get the latitude angle (rad)
Vector< Double > xyz
Position vector (in m)
MVPosition operator-() const
Addition and subtraction.
virtual Vector< Quantum< Double > > getTMRecordValue() const
Quantity getLong(const Unit &unit) const
and with specified units
MVPosition & operator*=(Double right)
Multiplication with constant.
virtual Bool putValue(const Vector< Quantum< Double > > &in)
Set the internal value if correct values and dimensions.
const Double e
e and functions thereof:
MVPosition(const Quantum< Vector< Double > > &angle)
If not enough angles: pole assumed (if none), or elevation =0 (if 1)
Double & operator()(uInt which)
Obtain an element.
MVPosition(const Quantity &l)
virtual void adjust()
Normalise direction aspects by adjusting the length to 1.
static void assure(const MeasValue &in)
bool Bool
Define the standard types used by Casacore.
MVPosition(const MVPosition &other)
Copy constructor.
virtual ~MVPosition()
Destructor.
Quantum< Vector< Double > > getAngle() const
Generate angle 2-vector (in rad)
Bool operator!=(const MVPosition &other) const
Quantity getLength(const Unit &unit) const
and generate it with the specified units
Double operator*(const MVPosition &other) const
Multiplication defined as in-product.
MVBaseline operator*(const RotMatrix &left, const MVBaseline &right)
Rotate a Baseline vector with rotation matrix and other multiplications.
virtual Vector< Double > getVector() const
Get the value in internal units.
Bool nearAbs(const MVPosition &other, Double tol=1e-13) const
Quantity getLat(const Unit &unit) const
and with specified units
Quantity separation(const MVPosition &other, const Unit &unit) const
Bool near(const MVPosition &other, Quantity tol) const
MVPosition(const Vector< Double > &other)
Create from specified length and/or angles and/or position.