Instrument Neutral Distributed Interface INDI 2.2.5
TelescopeDirectionVectorSupportFunctions.h
Go to the documentation of this file.
1
9#pragma once
10
11#include "Common.h"
12#include "libastro.h"
13#include "indicom.h"
14
15namespace INDI
16{
17namespace AlignmentSubsystem
18{
25{
26 public:
29
46
60
69 INDI::IHorizontalCoordinates &HorizontalCoordinates)
70 {
71 double AzimuthAngle;
72 double AltitudeAngle;
74 AltitudeAngle, FROM_AZIMUTHAL_PLANE);
75 HorizontalCoordinates.azimuth = range360(RAD_TO_DEG(AzimuthAngle));
76 HorizontalCoordinates.altitude = RAD_TO_DEG(AltitudeAngle);
77 };
78
86 INDI::IEquatorialCoordinates &EquatorialCoordinates)
87 {
88 double AzimuthAngle;
89 double PolarAngle;
91 PolarAngle, FROM_AZIMUTHAL_PLANE);
92 EquatorialCoordinates.rightascension = range24(RAD_TO_DEG(AzimuthAngle) / 15.0);
93 EquatorialCoordinates.declination = rangeDec(RAD_TO_DEG(PolarAngle));
94 };
95
103 INDI::IEquatorialCoordinates &EquatorialCoordinates)
104 {
105 double AzimuthAngle;
106 double PolarAngle;
109 EquatorialCoordinates.rightascension = range24(RAD_TO_DEG(AzimuthAngle) / 15.0);
110 EquatorialCoordinates.declination = rangeDec(RAD_TO_DEG(PolarAngle));
111 };
112
122 double &AzimuthAngle,
124 double &PolarAngle, PolarAngleDirection_t PolarAngleDirection);
125
139
153
166
176 TelescopeDirectionVectorFromSphericalCoordinate(const double AzimuthAngle,
178 const double PolarAngle, PolarAngleDirection_t PolarAngleDirection);
179};
180
181} // namespace AlignmentSubsystem
182} // namespace INDI
These functions are used to convert different coordinate systems to and from the telescope direction ...
const TelescopeDirectionVector TelescopeDirectionVectorFromSphericalCoordinate(const double AzimuthAngle, AzimuthAngleDirection_t AzimuthAngleDirection, const double PolarAngle, PolarAngleDirection_t PolarAngleDirection)
Calculates a telescope direction vector from the supplied spherical coordinate information.
void SphericalCoordinateFromTelescopeDirectionVector(const TelescopeDirectionVector TelescopeDirectionVector, double &AzimuthAngle, AzimuthAngleDirection_t AzimuthAngleDirection, double &PolarAngle, PolarAngleDirection_t PolarAngleDirection)
Calculates a spherical coordinate from the supplied telescope direction vector.
const TelescopeDirectionVector TelescopeDirectionVectorFromAltitudeAzimuth(INDI::IHorizontalCoordinates HorizontalCoordinates)
Calculates a normalised direction vector from the supplied altitude and azimuth.
void EquatorialCoordinatesFromTelescopeDirectionVector(const TelescopeDirectionVector TelescopeDirectionVector, INDI::IEquatorialCoordinates &EquatorialCoordinates)
Calculates equatorial coordinates from the supplied telescope direction vector and declination.
const TelescopeDirectionVector TelescopeDirectionVectorFromEquatorialCoordinates(INDI::IEquatorialCoordinates EquatorialCoordinates)
Calculates a telescope direction vector from the supplied equatorial coordinates.
const TelescopeDirectionVector TelescopeDirectionVectorFromLocalHourAngleDeclination(INDI::IEquatorialCoordinates EquatorialCoordinates)
Calculates a telescope direction vector from the supplied local hour angle and declination.
void LocalHourAngleDeclinationFromTelescopeDirectionVector(const TelescopeDirectionVector TelescopeDirectionVector, INDI::IEquatorialCoordinates &EquatorialCoordinates)
Calculates a local hour angle and declination from the supplied telescope direction vector and declin...
enum INDI::AlignmentSubsystem::TelescopeDirectionVectorSupportFunctions::PolarAngleDirection PolarAngleDirection_t
void AltitudeAzimuthFromTelescopeDirectionVector(const TelescopeDirectionVector TelescopeDirectionVector, INDI::IHorizontalCoordinates &HorizontalCoordinates)
Calculates an altitude and azimuth from the supplied normalised direction vector and declination.
enum INDI::AlignmentSubsystem::TelescopeDirectionVectorSupportFunctions::AzimuthAngleDirection AzimuthAngleDirection_t
double range24(double r)
range24 Limits a number to be between 0-24 range.
Definition indicom.c:1311
double range360(double r)
range360 Limits an angle to be between 0-360 degrees.
Definition indicom.c:1321
double rangeDec(double decdegrees)
rangeDec Limits declination value to be in -90 to 90 range.
Definition indicom.c:1341
Implementations for common driver routines.
#define RAD_TO_DEG(r)
Definition indimacros.h:131
#define DEG_TO_RAD(d)
Definition indimacros.h:128
Namespace to encapsulate INDI client, drivers, and mediator classes.
Holds a normalised direction vector (direction cosines)
Definition Common.h:69