1 | #ifndef MARS_Nova
|
---|
2 | #define MARS_Nova
|
---|
3 |
|
---|
4 | #include <libnova/solar.h>
|
---|
5 | #include <libnova/lunar.h>
|
---|
6 | #include <libnova/rise_set.h>
|
---|
7 | #include <libnova/transform.h>
|
---|
8 |
|
---|
9 | namespace Nova
|
---|
10 | {
|
---|
11 | typedef ln_lnlat_posn LnLatPosn;
|
---|
12 | typedef ln_hrz_posn HrzPosn;
|
---|
13 | typedef ln_equ_posn EquPosn;
|
---|
14 | typedef ln_rst_time RstTime;
|
---|
15 |
|
---|
16 | const LnLatPosn &ORM()
|
---|
17 | {
|
---|
18 | const static LnLatPosn obs = { -(17.+53./60+26.525/3600), 28.+45./60+42.462/3600 };
|
---|
19 | return obs;
|
---|
20 | }
|
---|
21 |
|
---|
22 | HrzPosn GetHrzFromEqu(const EquPosn &obj, const LnLatPosn &obs, double jd)
|
---|
23 | {
|
---|
24 | HrzPosn hrz;
|
---|
25 | ln_get_hrz_from_equ(const_cast<EquPosn*>(&obj), const_cast<LnLatPosn*>(&obs), jd, &hrz);
|
---|
26 | return hrz;
|
---|
27 | }
|
---|
28 | HrzPosn GetHrzFromEqu(const EquPosn &obj, double jd)
|
---|
29 | {
|
---|
30 | return GetHrzFromEqu(obj, ORM(), jd);
|
---|
31 | }
|
---|
32 |
|
---|
33 | RstTime GetSolarRst(double jd, const LnLatPosn &obs, double hrz=LN_SOLAR_STANDART_HORIZON)
|
---|
34 | {
|
---|
35 | RstTime rst;
|
---|
36 | ln_get_solar_rst_horizon(jd, const_cast<LnLatPosn*>(&obs), hrz, &rst);
|
---|
37 | return rst;
|
---|
38 | }
|
---|
39 | RstTime GetSolarRst(double jd, double hrz=LN_SOLAR_STANDART_HORIZON)
|
---|
40 | {
|
---|
41 | return GetSolarRst(jd, ORM(), hrz);
|
---|
42 | }
|
---|
43 |
|
---|
44 | RstTime GetLunarRst(double jd, const LnLatPosn &obs=ORM())
|
---|
45 | {
|
---|
46 | RstTime rst;
|
---|
47 | ln_get_lunar_rst(jd, const_cast<LnLatPosn*>(&obs), &rst);
|
---|
48 | return rst;
|
---|
49 | }
|
---|
50 |
|
---|
51 | double GetLunarDisk(double jd)
|
---|
52 | {
|
---|
53 | return ln_get_lunar_disk(jd);
|
---|
54 | }
|
---|
55 |
|
---|
56 | EquPosn GetLunarEquCoords(double jd, double precision=0)
|
---|
57 | {
|
---|
58 | EquPosn equ;
|
---|
59 | ln_get_lunar_equ_coords_prec(jd, &equ, precision);
|
---|
60 | return equ;
|
---|
61 | }
|
---|
62 | }
|
---|
63 |
|
---|
64 | #endif
|
---|