Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Isis 3 Programmer Reference
Longitude.h
1#ifndef Longitude_h
2#define Longitude_h
3
8
9/* SPDX-License-Identifier: CC0-1.0 */
10
11#include "Angle.h"
12#include <QList>
13#include <QPair>
14
15namespace Isis {
16 class PvlGroup;
17
40 class Longitude : public Angle {
41 public:
52
68
69 Longitude();
70 Longitude(double longitude,
71 Angle::Units longitudeUnits,
72 Direction lonDir = PositiveEast,
73 Domain lonDomain = Domain360);
74 Longitude(Angle longitude,
75 Direction lonDir = PositiveEast,
76 Domain lonDomain = Domain360);
77 Longitude(double longitude,
78 PvlGroup mapping,
79 Angle::Units longitudeUnits);
80 Longitude(const Longitude &longitudeToCopy);
81 ~Longitude();
82
83 double positiveEast(Angle::Units units = Angle::Radians) const;
84 void setPositiveEast(double longitude,
86 double positiveWest(Angle::Units units = Angle::Radians) const;
87 void setPositiveWest(double longitude,
89
92
93 bool inRange(Longitude min, Longitude max) const;
95
104
105 Longitude& operator=(const Longitude & longitudeToCopy);
106
107 private:
112 };
113}
114
115#endif
Defines an angle and provides unit conversions.
Definition Angle.h:45
Angle()
Constructs a blank angle object which needs a value to be set in order to do any calculations.
Definition Angle.cpp:24
Units
The set of usable angle measurement units.
Definition Angle.h:49
@ Radians
Radians are generally used in mathematical equations, 0-2*PI is one circle, however these are more di...
Definition Angle.h:63
This class is designed to encapsulate the concept of a Longitude.
Definition Longitude.h:40
double positiveWest(Angle::Units units=Angle::Radians) const
Get the longitude in the PositiveWest coordinate system.
void setPositiveEast(double longitude, Angle::Units units=Angle::Radians)
Set the longitude given a value in the PositiveEast longitude system.
Direction
Possible longitude directions: Is a positive longitude towards east or towards west?
Definition Longitude.h:46
@ PositiveWest
As the longitude increases the actual position is more west.
Definition Longitude.h:50
@ PositiveEast
As the longitude increases the actual position is more east.
Definition Longitude.h:48
void setPositiveWest(double longitude, Angle::Units units=Angle::Radians)
Set the longitude given a value in the PositiveWest longitude system.
Longitude()
Create a blank Longitude object with 0-360 domain.
Definition Longitude.cpp:24
~Longitude()
This cleans up the Longitude class.
Domain
Use LongitudeDomain360 if 0-360 is the primary range of the longitude values with 180 being the 'cent...
Definition Longitude.h:62
@ Domain180
As the longitude increases the actual position is more west.
Definition Longitude.h:66
@ Domain360
As the longitude increases the actual position is more east.
Definition Longitude.h:64
Longitude force180Domain() const
This returns a longitude that is constricted to -180 to 180 degrees.
static QList< QPair< Longitude, Longitude > > to360Range(Longitude startLon, Longitude endLon)
Calculates where the longitude range is in 0-360.
Longitude force360Domain() const
This returns a longitude that is constricted to 0-360 degrees.
Domain m_currentDomain
This is necessary for converting to PositiveWest and back.
Definition Longitude.h:111
double positiveEast(Angle::Units units=Angle::Radians) const
Get the longitude in the PositiveEast coordinate system.
Longitude & operator=(const Longitude &longitudeToCopy)
Same as positiveEast.
bool inRange(Longitude min, Longitude max) const
Checks if this longitude value is within the given range.
This is free and unencumbered software released into the public domain.
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16