Changeset 15195 for trunk/Mars/libnova
- Timestamp:
- 03/30/13 15:34:37 (12 years ago)
- Location:
- trunk/Mars/libnova
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/libnova/NovaLinkDef.h
r15191 r15195 5 5 #pragma link off all functions; 6 6 7 // transform 7 #pragma link C++ global LN_SOLAR_STANDART_HORIZON; 8 8 9 #pragma link C++ struct ln_lnlat_posn; 9 10 #pragma link C++ struct ln_hrz_posn; … … 21 22 22 23 // lunar 24 #pragma link C++ function ln_get_lunar_equ_coords; 23 25 #pragma link C++ function ln_get_lunar_equ_coords_prec; 24 26 #pragma link C++ function ln_get_lunar_disk; 27 #pragma link C++ function ln_get_lunar_rst; 28 29 // Nova wrapper 30 #pragma link C++ namespace Nova; 25 31 26 32 #endif -
trunk/Mars/libnova/nova.cc
r15180 r15195 1 #include "nova.h"1 //#include "nova.h" -
trunk/Mars/libnova/nova.h
r15180 r15195 1 #ifndef MARS_Nova 2 #define MARS_Nova 3 1 4 #include <libnova/solar.h> 2 5 #include <libnova/lunar.h> 3 6 #include <libnova/rise_set.h> 4 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 HrzPosn GetHrzFromEqu(const EquPosn &obj, const LnLatPosn &obs, double jd) 17 { 18 HrzPosn hrz; 19 ln_get_hrz_from_equ(const_cast<EquPosn*>(&obj), const_cast<LnLatPosn*>(&obs), jd, &hrz); 20 return hrz; 21 } 22 23 RstTime GetSolarRst(double jd, const LnLatPosn &obs, double hrz=LN_SOLAR_STANDART_HORIZON) 24 { 25 RstTime rst; 26 ln_get_solar_rst_horizon(jd, const_cast<LnLatPosn*>(&obs), hrz, &rst); 27 return rst; 28 } 29 30 RstTime GetLunarRst(double jd, const LnLatPosn &obs) 31 { 32 RstTime rst; 33 ln_get_lunar_rst(jd, const_cast<LnLatPosn*>(&obs), &rst); 34 return rst; 35 } 36 37 double GetLunarDisk(double jd) 38 { 39 return ln_get_lunar_disk(jd); 40 } 41 42 EquPosn GetLunarEquCoords(double jd, double precision=0) 43 { 44 EquPosn equ; 45 ln_get_lunar_equ_coords_prec(jd, &equ, precision); 46 return equ; 47 } 48 } 49 50 #endif
Note:
See TracChangeset
for help on using the changeset viewer.