Instrument Neutral Distributed Interface INDI 2.2.5
libastro.h
Go to the documentation of this file.
1/*
2 libastro
3
4 functions used for coordinate conversions, based on libnova
5
6 Copyright (C) 2020 Chris Rowland
7 Copyright (C) 2021 Jasem Mutlaq
8
9 This library is free software; you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as published
11 by the Free Software Foundation; either version 2.1 of the License, or
12 (at your option) any later version.
13
14 This library is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17 License for more details.
18
19 You should have received a copy of the GNU Lesser General Public License
20 along with this library; if not, write to the Free Software Foundation,
21 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22
23*/
24
25// file libsatro.h
26
27// functions used for coordinate conversions, based on libnova
28
29#pragma once
30
31#include <libnova/utility.h>
32#include "indimacros.h"
33
34namespace INDI
35{
36
43
46typedef struct
47{
49 double declination;
51
54typedef struct
55{
56 double azimuth;
57 double altitude;
59
62typedef struct
63{
64 double longitude;
65 double latitude;
66 double elevation;
68
71/*
72* \brief This provides astrometric helper functions
73* based on the libnova library
74*/
75
83void ObservedToJ2000(IEquatorialCoordinates *observed, double jd, IEquatorialCoordinates *J2000pos);
84
92void J2000toObserved(IEquatorialCoordinates *J2000pos, double jd, IEquatorialCoordinates * observed);
93
103 IHorizontalCoordinates *position);
104
114 IEquatorialCoordinates *position);
115
122void ln_get_equ_nut(ln_equ_posn *posn, double jd, bool reverse = false);
123
124}
Namespace to encapsulate INDI client, drivers, and mediator classes.
void ln_get_equ_nut(ln_equ_posn *posn, double jd, bool reverse)
apply or remove nutation
Definition libastro.cpp:103
void J2000toObserved(IEquatorialCoordinates *J2000pos, double jd, IEquatorialCoordinates *observed)
*J2000toObserved converts catalogue to observed
Definition libastro.cpp:81
void EquatorialToHorizontal(IEquatorialCoordinates *object, IGeographicCoordinates *observer, double JD, IHorizontalCoordinates *position)
EquatorialToHorizontal Calculate horizontal coordinates from equatorial coordinates.
Definition libastro.cpp:141
void HorizontalToEquatorial(IHorizontalCoordinates *object, IGeographicCoordinates *observer, double JD, IEquatorialCoordinates *position)
HorizontalToEquatorial Calculate Equatorial EOD Coordinates from horizontal coordinates.
Definition libastro.cpp:161
void ObservedToJ2000(IEquatorialCoordinates *observed, double jd, IEquatorialCoordinates *J2000pos)
ObservedToJ2000 converts an observed position to a J2000 catalogue position removes aberration,...
Definition libastro.cpp:51