Changeset 18820
- Timestamp:
- 04/14/17 12:18:40 (8 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/InterpreterV8.cc
r18614 r18820 2183 2183 const Time utc(v/1000, v%1000); 2184 2184 2185 Nova::LnLatPosn obs = Nova:: ORM();2185 Nova::LnLatPosn obs = Nova::kORM; 2186 2186 2187 2187 ln_rst_time sun; … … 2195 2195 { 2196 2196 if (args.Length()>1) 2197 return ThrowException(String::New("Moon.horizon must not be called with one argument."));2197 return ThrowException(String::New("Moon.horizon must not be called with more than one argument.")); 2198 2198 2199 2199 if (args.Length()==1 && !args[0]->IsDate()) … … 2210 2210 const Time utc(v/1000, v%1000); 2211 2211 2212 Nova::LnLatPosn obs = Nova:: ORM();2212 Nova::LnLatPosn obs = Nova::kORM; 2213 2213 2214 2214 ln_rst_time moon; -
trunk/FACT++/src/Time.cc
r18445 r18820 314 314 { 315 315 #ifdef HAVE_LIBNOVA 316 Nova::LnLatPosn obs = Nova:: ORM();316 Nova::LnLatPosn obs = Nova::kORM; 317 317 318 318 ln_rst_time sun_day; … … 347 347 { 348 348 #ifdef HAVE_LIBNOVA 349 Nova::LnLatPosn obs = Nova:: ORM();349 Nova::LnLatPosn obs = Nova::kORM; 350 350 351 351 ln_rst_time sun_day; -
trunk/FACT++/src/drivectrl.cc
r18805 r18820 368 368 out.mjd = _mjd; 369 369 370 const double elong = Nova:: ORM().lng * M_PI/180;371 const double lat = Nova:: ORM().lat * M_PI/180;370 const double elong = Nova::kORM.lng * M_PI/180; 371 const double lat = Nova::kORM.lat * M_PI/180; 372 372 const double height = 2200; 373 373 … … 2373 2373 fTrackingCounter = 0; 2374 2374 2375 const double ha = fmod(fDrive.GetSeTime(),1)*24 - Nova:: ORM().lng/15;2375 const double ha = fmod(fDrive.GetSeTime(),1)*24 - Nova::kORM.lng/15; 2376 2376 2377 2377 array<double, 12> dim; -
trunk/Mars/mcore/nova.h
r17952 r18820 1 1 #ifndef MARS_Nova 2 2 #define MARS_Nova 3 4 #include <map> 5 #include <string> 3 6 4 7 #include <libnova/solar.h> … … 10 13 namespace Nova 11 14 { 12 typedef ln_lnlat_posn LnLatPosn; 13 typedef ln_rst_time RstTime; // Note that times are in JD not Mjd 14 //typedef ln_hrz_posn HrzPosn; 15 //typedef ln_equ_posn EquPosn; 15 typedef ln_rst_time RstTime; // Note that times are in JD not Mjd 16 16 17 17 struct ZdAzPosn; 18 18 struct RaDecPosn; 19 19 20 const static ln_lnlat_posn kORM 21 #ifndef __CINT__ 22 = { -(17.+53./60+26.525/3600), 28.+45./60+42.462/3600 } // 2200m 23 #endif 24 ; 25 const static ln_lnlat_posn kHAWC 26 #ifndef __CINT__ 27 = { -97.3084, 18.9947 } // 4100m; 28 #endif 29 ; 30 const static ln_lnlat_posn kSPM 31 #ifndef __CINT__ 32 = { -115.4637, 31.0439 } // 2800m; 33 #endif 34 ; 35 36 struct LnLatPosn : public ln_lnlat_posn 37 { 38 LnLatPosn() { } 39 LnLatPosn(const ln_lnlat_posn &pos) : ln_lnlat_posn(pos) { } 40 LnLatPosn(const std::string &obs) 41 { 42 #ifndef __CINT__ 43 static const std::map<std::string, ln_lnlat_posn> lut = 44 { 45 { "orm", kORM }, 46 { "hawc", kHAWC }, 47 { "spm", kSPM }, 48 }; 49 50 const auto it = lut.find(obs); 51 *this = it==lut.end() ? ln_lnlat_posn({0,0}) : it->second; 52 #endif 53 } 54 }; 20 55 21 56 // Warning: 0deg=South, 90deg=W … … 61 96 62 97 EquPosn::EquPosn(const RaDecPosn &rd) { ra = rd.ra*15; dec = rd.dec; } 63 64 65 66 const LnLatPosn &ORM()67 {68 //static LnLatPosn obs;69 //obs.lng = -(17.+53./60+26.525/3600);70 //obs.lat = 28.+45./60+42.462/3600;71 const static LnLatPosn obs = { -(17.+53./60+26.525/3600), 28.+45./60+42.462/3600 };72 return obs;73 }74 98 75 99 HrzPosn GetHrzFromEqu(const EquPosn &equ, const LnLatPosn &obs, double jd) … … 81 105 HrzPosn GetHrzFromEqu(const EquPosn &equ, double jd) 82 106 { 83 return GetHrzFromEqu(equ, ORM(), jd);107 return GetHrzFromEqu(equ, kORM, jd); 84 108 } 85 109 … … 92 116 EquPosn GetEquFromHrz(const HrzPosn &hrz, double jd) 93 117 { 94 return GetEquFromHrz(hrz, ORM(), jd);118 return GetEquFromHrz(hrz, kORM, jd); 95 119 } 96 120 … … 103 127 RstTime GetSolarRst(double jd, double hrz=LN_SOLAR_STANDART_HORIZON) 104 128 { 105 return GetSolarRst(jd, ORM(), hrz);106 } 107 108 RstTime GetLunarRst(double jd, const LnLatPosn &obs= ORM())129 return GetSolarRst(jd, kORM, hrz); 130 } 131 132 RstTime GetLunarRst(double jd, const LnLatPosn &obs=kORM) 109 133 { 110 134 RstTime rst; … … 171 195 double fEarthDist; 172 196 173 SolarObjects(const double &jd, const LnLatPosn &obs=Nova:: ORM())197 SolarObjects(const double &jd, const LnLatPosn &obs=Nova::kORM) 174 198 { 175 199 fJD = jd;
Note:
See TracChangeset
for help on using the changeset viewer.