Isis 3 Programmer Reference
Longitude.h
Go to the documentation of this file.
1 #ifndef Longitude_h
2 #define Longitude_h
3 
23 #include "Angle.h"
24 #include <QList>
25 #include <QPair>
26 
27 namespace Isis {
28  class PvlGroup;
29 
52  class Longitude : public Angle {
53  public:
58  enum Direction {
63  };
64 
74  enum Domain {
79  };
80 
81  Longitude();
82  Longitude(double longitude,
83  Angle::Units longitudeUnits,
84  Direction lonDir = PositiveEast,
85  Domain lonDomain = Domain360);
86  Longitude(Angle longitude,
87  Direction lonDir = PositiveEast,
88  Domain lonDomain = Domain360);
89  Longitude(double longitude,
90  PvlGroup mapping,
91  Angle::Units longitudeUnits);
92  Longitude(const Longitude &longitudeToCopy);
93  ~Longitude();
94 
95  double positiveEast(Angle::Units units = Angle::Radians) const;
96  void setPositiveEast(double longitude,
98  double positiveWest(Angle::Units units = Angle::Radians) const;
99  void setPositiveWest(double longitude,
100  Angle::Units units = Angle::Radians);
101 
102  Longitude force180Domain() const;
103  Longitude force360Domain() const;
104 
105  bool inRange(Longitude min, Longitude max) const;
107 
117  Longitude& operator=(const Longitude & longitudeToCopy);
118 
119  private:
124  };
125 }
126 
127 #endif
Direction
Possible longitude directions: Is a positive longitude towards east or towards west?
Definition: Longitude.h:58
Units
The set of usable angle measurement units.
Definition: Angle.h:66
Domain
Use LongitudeDomain360 if 0-360 is the primary range of the longitude values with 180 being the &#39;cent...
Definition: Longitude.h:74
double positiveWest(Angle::Units units=Angle::Radians) const
Get the longitude in the PositiveWest coordinate system.
Definition: Longitude.cpp:171
~Longitude()
This cleans up the Longitude class.
Definition: Longitude.cpp:148
Longitude force180Domain() const
This returns a longitude that is constricted to -180 to 180 degrees.
Definition: Longitude.cpp:302
Longitude force360Domain() const
This returns a longitude that is constricted to 0-360 degrees.
Definition: Longitude.cpp:280
As the longitude increases the actual position is more west.
Definition: Longitude.h:62
Domain m_currentDomain
This is necessary for converting to PositiveWest and back.
Definition: Longitude.h:123
void setPositiveEast(double longitude, Angle::Units units=Angle::Radians)
Set the longitude given a value in the PositiveEast longitude system.
Definition: Longitude.cpp:212
This class is designed to encapsulate the concept of a Longitude.
Definition: Longitude.h:52
Longitude & operator=(const Longitude &longitudeToCopy)
Same as positiveEast.
Definition: Longitude.cpp:265
As the longitude increases the actual position is more east.
Definition: Longitude.h:60
Contains multiple PvlContainers.
Definition: PvlGroup.h:57
static QList< QPair< Longitude, Longitude > > to360Range(Longitude startLon, Longitude endLon)
Calculates where the longitude range is in 0-360.
Definition: Longitude.cpp:377
As the longitude increases the actual position is more east.
Definition: Longitude.h:76
double positiveEast(Angle::Units units=Angle::Radians) const
Get the longitude in the PositiveEast coordinate system.
Definition: Longitude.cpp:159
Defines an angle and provides unit conversions.
Definition: Angle.h:62
void setPositiveWest(double longitude, Angle::Units units=Angle::Radians)
Set the longitude given a value in the PositiveWest longitude system.
Definition: Longitude.cpp:223
Longitude()
Create a blank Longitude object with 0-360 domain.
Definition: Longitude.cpp:37
As the longitude increases the actual position is more west.
Definition: Longitude.h:78
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
bool inRange(Longitude min, Longitude max) const
Checks if this longitude value is within the given range.
Definition: Longitude.cpp:332
Radians are generally used in mathematical equations, 0-2*PI is one circle, however these are more di...
Definition: Angle.h:80