Changeset 15209
- Timestamp:
- 03/31/13 02:51:04 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/makeplots.cc
r15178 r15209 1 #include <libnova/solar.h> 2 #include <libnova/lunar.h> 3 #include <libnova/rise_set.h> 4 #include <libnova/transform.h> 1 #include "externals/nova.h" 5 2 6 3 #include "Database.h" … … 123 120 // ------------------ Eval config --------------------- 124 121 125 const double lon = -(17.+53./60+26.525/3600);126 const double lat = 28.+45./60+42.462/3600;127 128 ln_lnlat_posn observer;129 observer.lng = lon;130 observer.lat = lat;131 132 122 Time time; 133 123 if (conf.Has("date-time")) … … 139 129 140 130 // -12: nautical 141 ln_rst_time sun_set;// Sun set with the same date than th provided date142 ln_rst_time sun_rise;// Sun rise on the following day143 ln_get_solar_rst_horizon(time.JD()-0.5, &observer, -12, &sun_set);144 ln_get_solar_rst_horizon(time.JD()+0.5, &observer, -12, &sun_rise);131 // Sun set with the same date than th provided date 132 // Sun rise on the following day 133 const Nova::RstTime sun_set = Nova::GetSolarRst(time.JD()-0.5, -12); 134 const Nova::RstTime sun_rise = Nova::GetSolarRst(time.JD()+0.5, -12); 145 135 146 136 const double jd = floor(time.Mjd())+2400001; … … 159 149 // ------------------ Precalc moon coord --------------------- 160 150 161 vector<pair< ln_equ_posn, double>> fMoonCoords;151 vector<pair<Nova::EquPosn, double>> fMoonCoords; 162 152 163 153 for (double h=0; h<1; h+=1./(24*12)) 164 154 { 165 ln_equ_posn moon; 166 ln_get_lunar_equ_coords_prec(jd+h, &moon, 0.01); 167 168 const double disk = ln_get_lunar_disk(jd+h); 155 const Nova::EquPosn moon = Nova::GetLunarEquCoords(jd+h, 0.01); 156 157 const double disk = Nova::GetLunarDisk(jd+h); 169 158 170 159 fMoonCoords.push_back(make_pair(moon, disk)); … … 260 249 const string name = (*v)[0].c_str(); 261 250 262 ln_equ_posn pos;251 Nova::EquPosn pos; 263 252 pos.ra = double((*v)[1])*15; 264 253 pos.dec = double((*v)[2]); … … 298 287 299 288 // get local position of source 300 ln_hrz_posn hrz; 301 ln_get_hrz_from_equ(&pos, &observer, jd+h, &hrz); 289 const Nova::HrzPosn hrz = Nova::GetHrzFromEqu(pos, jd+h); 302 290 303 291 // Get moon properties and 304 ln_equ_posn moon= fMoonCoords[i].first;292 const Nova::EquPosn moon = fMoonCoords[i].first; 305 293 const double disk = fMoonCoords[i].second; 306 294 307 ln_hrz_posn hrzm; 308 ln_get_hrz_from_equ(&moon, &observer, jd+h, &hrzm); 295 const Nova::HrzPosn hrzm = Nova::GetHrzFromEqu(moon, jd+h); 296 297 if (v==res.begin()) 298 cout << Time(jd+h) <<" " << 90-hrzm.alt << endl; 309 299 310 300 // Distance between source and moon
Note:
See TracChangeset
for help on using the changeset viewer.