18 #ifndef OBSERVABILITY_HPP_
19 #define OBSERVABILITY_HPP_
21 #include "StelModule.hpp"
25 #include "VecMath.hpp"
26 #include "SolarSystem.hpp"
28 #include "StelFader.hpp"
57 Q_PROPERTY(
bool flagShowReport READ isShownReport WRITE
showReport)
62 virtual void update(
double) {;}
64 virtual double getCallOrder(StelModuleActionName actionName)
const;
91 bool isShownReport()
const {
return flagShowReport;}
143 void updateMessageText();
150 void setDateFormat(
bool b) { dmyFormat=b; }
151 bool getDateFormat(
void) {
return dmyFormat; }
158 double calculateHourAngle(
double latitude,
double elevation,
double declination);
163 double HourAngle2(
double RA,
double ST);
169 bool calculateSolarSystemEvents(
StelCore* core,
int bodyType);
178 int calculateAcroCos(
int& acroRise,
int& acroSet,
int& cosRise,
int& cosSet);
186 int calculateHeli(
int imethod,
int& heliRise,
int& heliSet);
201 void getSunMoonCoords(
StelCore* core, QPair<double, double> JD,
202 double& raSun,
double& decSun,
203 double& raMoon,
double& decMoon,
204 double& eclLon,
bool getBack);
214 void getPlanetCoords(
StelCore* core,QPair<double, double> JD,
215 double &RA,
double &Dec,
bool getBack);
219 void getMoonDistance(
StelCore* core, QPair<double, double> JD,
220 double& distance,
bool getBack);
227 double Lambda(
double RA1,
double Dec1,
double RA2,
double Dec2);
234 void double2hms(
double t,
int &h,
int &m,
int &s);
237 double sign(
double d);
243 QString formatAsDate(
int dayNumber);
249 QString formatAsDateRange(
int startDay,
int endDay);
253 double toUnsignedRA(
double RA);
259 void updatePlanetData(
StelCore* core);
269 void toRADec(Vec3d vec3d,
double& ra,
double& dec);
272 QPair<double, double> yearJD[366];
276 bool CheckRise(
int day);
280 static const double Rad2Deg, Rad2Hr, UA, TFrac, JDsec, halfpi, MoonT, RefFullMoon, MoonPerilune;
283 double nextFullMoon, prevFullMoon, GMTShift, Jan1stJD;
287 double twilightAltRad;
294 double refractedHorizonAlt;
297 double horizonAltitude;
303 double selRA, selDec, mylat, mylon, alti, horizH, culmAlt;
306 QPair<double, double> myJD;
313 double sunSidT[4][366];
316 double objectRA[366];
317 double objectDec[366];
318 double objectH0[366];
321 double objectSidT[2][366];
324 double MoonRise, MoonSet, MoonCulm, lastJDMoon;
330 Vec3d ObserverLoc, Pos1, Pos2, RotObserver;
349 QString lineBestNight;
351 QString lineObservableRange;
353 QString lineAcroCos, lineHeli;
356 QString RiseTime, SetTime, CulmTime;
359 QStringList monthNames;
365 Vec3d EquPos, LocPos;
368 bool isStar, isMoon, isSun, isScreen;
379 bool show_AcroCos, show_Good_Nights, show_Best_Night, show_Today, show_FullMoon;
395 QString msgSetsAt, msgRoseAt, msgSetAt, msgRisesAt, msgCircumpolar, msgNoRise, msgCulminatesAt, msgCulminatedAt, msgH, msgM, msgS;
396 QString msgSrcNotObs, msgNoACRise, msgGreatElong, msgLargSSep, msgNone, msgAcroRise, msgNoAcroRise, msgCosmRise, msgNoCosmRise;
397 QString msgHeliRise, msgHeliSet, msgNoHeliRise;
398 QString msgWholeYear, msgNotObs, msgAboveHoriz, msgToday, msgThisYear, msgPrevFullMoon, msgNextFullMoon;
405 #include "StelPluginInterface.hpp"
410 Q_PLUGIN_METADATA(IID StelPluginInterface_iid)
int getTwilightAltitude()
Get the user-defined Sun altitude at twilight.
void showReport(bool b)
Controls whether an observability report will be displayed.
Vec3f getFontColor(void)
get the current font color:
void saveConfiguration()
Save the plug-in's configuration to the main configuration file.
virtual bool configureGui(bool show=true)
Implement this to tell the main Stellarium GUI that there is a GUI element to configure this plugin...
virtual StelPluginInfo getPluginInfo() const =0
void enableFullMoonField(bool enabled=true)
Display date of the full moon.
void resetConfiguration()
Restore and reload the default plug-in settings.
virtual class StelModule * getStelModule() const =0
void loadConfiguration()
Read (or re-read) settings from the main config file.
Configuration window of the Observability Analysis plug-in.
void enableTodayField(bool enabled=true)
Display today's events (rise, set and transit times).
void enableOppositionField(bool enabled=true)
Display when selected object is in opposition.
void enableGoodNightsField(bool enabled=true)
Display nights when the object is above the horizon after darkness.
void setHorizonAltitude(int altitude)
Set the angular altitude of the visual horizon.
void enableAcroCosField(bool enabled=true)
Display acronychal and cosmical rising/setting.
bool getShowFlags(int)
get Show Flags from current configuration:
int getHorizonAltitude()
Get the user-defined altitude of the visual horizon.
int getFontSize(void)
get current font size:
void setTwilightAltitude(int altitude)
Set the angular altitude below the horizon of the Sun at twilight.
void setFontSize(int size)
Set the size of the font used to display the report.
void setFontColor(const Vec3f &color)
Set the color of the font used to display the report.
Main class of the Observability Analysis plug-in.