CARMA C++
DecAngle.h
Go to the documentation of this file.
1 #ifndef CARMA_SERVICES_DECANGLE_H
2 #define CARMA_SERVICES_DECANGLE_H
3 
17 #include "carma/services/Angle.h"
18 
19 namespace carma {
20  namespace services {
21 
22  class DecAngle : public Angle {
23  public:
24 
28  explicit DecAngle(double value, const std::string& units);
29 
33  virtual ~DecAngle();
34 
35  std::string dms(int precision = 0) const ;
36 
43  const DecAngle operator+(const DecAngle& angle) const;
44 
51  const DecAngle operator-(const DecAngle& angle) const;
52 
59  DecAngle& operator+=(const DecAngle& angle);
60 
68  DecAngle& operator-=(const DecAngle& angle);
69 
70 
71  private:
72 
80  double checkValue(double value ) const;
81 
82  };
83 
87  std::ostream& operator<<(std::ostream& os,
88  const carma::services::DecAngle& angle);
89  } // End namespace services
90 
91 } // End namespace carma
92 
93 
94 
95 #endif // End #ifndef CARMA_SERVICES_DECANGLE_H
std::string dms(bool modulo=true, int precision=0) const
Angle & operator+=(const Angle &angle)
Add Angle.
const Angle operator-(const Angle &angle) const
Subtract two Angles.
Representation of an angle, return values are always modulo 2PI radians.
Angle & operator-=(const Angle &angle)
Subtract Angle.
const Angle operator+(const Angle &angle) const
Add two Angles.
Parent class for representations of quantities that can have conformable units, e.g.
std::ostream & operator<<(std::ostream &os, const carma::services::Angle &angle)
Define the &lt;&lt; operator to allow, e.g.