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