26#ifndef CASA_MVPOSITION_H
27#define CASA_MVPOSITION_H
31#include <casacore/casa/aips.h>
32#include <casacore/casa/Arrays/Vector.h>
33#include <casacore/casa/Quanta/Unit.h>
34#include <casacore/casa/Quanta/Quantum.h>
35#include <casacore/casa/Quanta/MeasValue.h>
36#include <casacore/casa/iosfwd.h>
241 const Unit &unit)
const;
247 const Unit &unit)
const;
253 virtual void print(ostream &os)
const;
Double & operator()(uInt which)
Obtain an element.
Quantum< Vector< Double > > getAngle(const Unit &unit) const
and with specified units
MVPosition & operator*=(const RotMatrix &right)
Multiplication with rotation matrix (see also global functions)
Quantum< Vector< Double > > getAngle() const
Generate angle 2-vector (in rad)
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.
static void assure(const MeasValue &in)
Tell me your type.
const Double & operator()(uInt which) const
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.
static const Double loLimit
Internal limts codes for negative height.
MVPosition(Double in0)
Creates a vector with specified length towards pole.
virtual Vector< Quantum< Double > > getXRecordValue() const
virtual Vector< Quantum< Double > > getRecordValue() const
Get the internal value as a Vector<Quantity>.
MVPosition(const Quantum< Vector< Double > > &angle)
If not enough angles: pole assumed (if none), or elevation =0 (if 1)
Double positionAngle(const MVPosition &other) const
Get the position angle between the directions.
MVPosition & operator-=(const MVPosition &right)
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.
const Vector< Double > & getValue() const
Generate a 3-vector of x,y,z in m.
MVPosition(const Vector< Double > &other)
Create from specified length and/or angles and/or position.
Quantity getLength() const
Generate the length.
Bool nearAbs(const MVPosition &other, Double tol=1e-13) const
virtual void adjust(Double &res)
Adjustment with returned factor.
Quantity positionAngle(const MVPosition &other, const Unit &unit) const
MVPosition(const MVPosition &other)
Copy constructor.
MVPosition & operator=(const MVPosition &other)
Copy assignment.
Double separation(const MVPosition &other) const
Get the angular separation between two directions.
MVPosition & operator*=(Double right)
Multiplication with constant.
virtual void putVector(const Vector< Double > &in)
Set the value from internal units (set 0 for empty vector)
virtual Vector< Quantum< Double > > getTMRecordValue() const
Bool near(const MVPosition &other, Double tol=1e-13) 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.
virtual Vector< Double > getVector() const
Get the value in internal units.
MVPosition & operator+=(const MVPosition &right)
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
virtual MeasValue * clone() const
Clone.
Vector< Double > get() const
Generate a 3-vector of coordinates (length(m), angles(rad))
Double getLat(Double ln) const
Get the latitude assuming length is given.
Quantity getLong(const Unit &unit) const
and with specified units
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.