Instrument Neutral Distributed Interface INDI 2.2.5
sofa.h
Go to the documentation of this file.
1/*
2** sofa.h - SOFA-over-ERFA compatibility shim for INDI SPK Math Plugin
3**
4** Maps the SOFA iauXxx API onto the ERFA eraXxx API so that the SPK C
5** sources (spk_vtel.c, spk_pmfit.c, spk_astr.c) can be compiled unchanged
6** against the system liberfa library.
7**
8** ERFA (Essential Routines for Fundamental Astronomy) is a BSD-licensed
9** fork of SOFA with identical mathematics. See https://github.com/liberfa/erfa
10**
11** Usage: add the directory containing this header to the compiler include
12** path, then link against -lerfa. This is a header-only shim.
13*/
14
15#ifndef SOFA_H
16#define SOFA_H
17
18#include <erfa.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24/* -----------------------------------------------------------------------
25** Type aliases: map SOFA struct names onto the identical ERFA structs
26** --------------------------------------------------------------------- */
27
28typedef eraASTROM iauASTROM;
29typedef eraLDBODY iauLDBODY;
30
31/* -----------------------------------------------------------------------
32** Function name mappings: iau* -> era*
33** Only the subset used by spk_vtel.c, spk_pmfit.c, spk_astr.c and
34** SPKMathPlugin.cpp is listed here.
35** --------------------------------------------------------------------- */
36
37/* Angle normalization */
38#define iauAnp eraAnp
39#define iauAnpm eraAnpm
40
41/* Spherical <-> Cartesian */
42#define iauS2c eraS2c
43#define iauC2s eraC2s
44
45/* Rotation matrices */
46#define iauIr eraIr
47#define iauRx eraRx
48#define iauRy eraRy
49#define iauRz eraRz
50#define iauRxp eraRxp
51#define iauTrxp eraTrxp
52
53/* Geometry */
54#define iauPas eraPas
55#define iauHd2ae eraHd2ae
56#define iauAe2hd eraAe2hd
57
58/* Time conversions */
59#define iauDtf2d eraDtf2d
60#define iauJd2cal eraJd2cal
61#define iauUtctai eraUtctai
62#define iauTaiutc eraTaiutc
63#define iauUtcut1 eraUtcut1
64
65/* Astrometry setup */
66#define iauAper eraAper
67#define iauAper13 eraAper13
68#define iauApco13 eraApco13
69
70/* Coordinate transformations */
71#define iauAtciqz eraAtciqz
72#define iauAticq eraAticq
73#define iauAtioq eraAtioq
74#define iauAtoiq eraAtoiq
75
76#ifdef __cplusplus
77}
78#endif
79
80#endif /* SOFA_H */
eraLDBODY iauLDBODY
Definition sofa.h:29
eraASTROM iauASTROM
Definition sofa.h:28