42 static char device_str[64] =
"Telescope Simulator";
60 static double range(
double deg)
62 while (deg > 180.0) deg -= 360.0;
63 while (deg <= -180.0) deg += 360.0;
67 static double hrstoDeg(
double hrs)
69 return range(hrs * 15.0);
84 angle = range(degrees);
104 return (angle >= 0) ? angle : 360.0 + angle;
113 double h = angle / 15.0;
149 angle = hrstoDeg(hrs);
165 return range(this->angle - a.angle);
170 return Angle(-this->angle);
175 angle = range(angle + a.angle);
181 angle = range(angle + d);
187 angle = range(angle - a.angle);
193 angle = range(angle - d);
199 return Angle(this->angle + a.angle);
204 return Angle(this->angle + d);
209 return Angle(this->angle - rhs.angle);
214 return Angle(this->angle - rhs);
226 return Angle(this->angle * duration);
324 void StartGuide(
double rate, uint32_t durationMs);
328 return guideDuration > 0;
344 struct timeval lastTime
353 Angle rotateCentre { 90.0 };
355 double guideDuration;
356 Angle guideRateDegSec;
503 Angle flipHourAngle = 0;
522 void correction(
Angle instrumentHa,
Angle instrumentDec,
Angle *correctionHa,
Angle *correctionDec);
594 return L *
L +
M *
M +
N *
N;
The Alignment class This converts between the mount axis angles and the sky hour angle and declinatio...
void setCorrections(double ih, double id, double ch, double np, double ma, double me)
setCorrections set the values of the six corrections
void apparentRaDecToMount(Angle apparentRa, Angle apparentDec, Angle *primary, Angle *secondary)
void mountToApparentHaDec(Angle primary, Angle secondary, Angle *apparentHa, Angle *apparentDec)
mountToApparentHaDec: convert mount position to apparent Ha, Dec
void apparentHaDecToMount(Angle apparentHa, Angle apparentDec, Angle *primary, Angle *secondary)
apparentHaDecToMount
void observedToInstrument(Angle observedHa, Angle observedDec, Angle *instrumentHa, Angle *instrumentDec)
void mountToApparentRaDec(Angle primary, Angle secondary, Angle *apparentRa, Angle *apparentDec)
mountToApparentRaDec: convert mount position to apparent Ra, Dec
void instrumentToObserved(Angle instrumentHa, Angle instrumentDec, Angle *observedHa, Angle *observedDec)
void setFlipHourAngle(double deg)
const char * getDeviceName()
The Angle class This class implements an angle type. This holds an angle that is always in the range ...
double Degrees360()
Degrees360.
bool operator<=(const Angle &a)
double difference(Angle a)
bool operator==(const Angle &a)
void setHours(double hrs)
setHours set the angle
void setDegrees(double deg)
setDegrees set the angle in degrees
bool operator>(const Angle &a)
bool operator!=(const Angle &a)
bool operator>=(const Angle &a)
bool operator<(const Angle &a)
Angle & operator-=(const Angle &a)
Angle & operator+=(const Angle &a)
Angle operator*(const double duration)
operator * multiplies the angle by a double, used to manage tracking and slewing
Angle operator+(const Angle &a)
The Axis class Implements a generic Axis which can be used for equatorial or AltAz mounts for both ax...
Angle TrackingRateDegSec
TrackingRateDegSec.
void setDegrees(double degrees)
void StartGuide(double rate, uint32_t durationMs)
StartGuide start guiding.
void Tracking(bool enabled)
AXIS_TRACK_RATE TrackRate()
TrackRate returns the AXIS_TRACK_RATE property.
void StartSlew(Angle angle)
const char * getDeviceName()
AXIS_TRACK_RATE
The AXIS_TRACK_RATE enum defines the common track rates.
void setHours(double hours)
The Vector class This implements the Directional Cosine used by Taki in his Matrix method....
Vector rotateY(Angle angle)
rotateY rotates this vector through angle about the Y axis
Vector rotateX(Angle angle)
rotateX rotates this vector through angle about the X axis
Vector()
Vector creates an empty vector.
Vector rotateZ(Angle angle)
rotateZ rotates this vector through angle about the Z axis
Angle secondary()
secondary returns the secondary angle (dec, altitude) from this vector
Angle primary()
primary returns the primary angle (Ra, Ha, Azimuth) from this vector
Implementations for common driver routines.
#define TRACKRATE_SIDEREAL