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
60 NOTIFY flagReportVisibilityChanged
95 bool isShownReport()
const {
return flagShowReport;}
98 void flagReportVisibilityChanged(
bool b);
151 void updateMessageText();
158 void setDateFormat(
bool b) { dmyFormat=b; }
159 bool getDateFormat(
void) {
return dmyFormat; }
166 double calculateHourAngle(
double latitude,
double elevation,
double declination);
171 double HourAngle2(
double RA,
double ST);
177 bool calculateSolarSystemEvents(
StelCore* core,
int bodyType);
186 int calculateAcroCos(
int& acroRise,
int& acroSet,
int& cosRise,
int& cosSet);
194 int calculateHeli(
int imethod,
int& heliRise,
int& heliSet);
209 void getSunMoonCoords(
StelCore* core, QPair<double, double> JD,
210 double& raSun,
double& decSun,
211 double& raMoon,
double& decMoon,
212 double& eclLon,
bool getBack);
222 void getPlanetCoords(
StelCore* core,QPair<double, double> JD,
223 double &RA,
double &Dec,
bool getBack);
227 void getMoonDistance(
StelCore* core, QPair<double, double> JD,
228 double& distance,
bool getBack);
235 double Lambda(
double RA1,
double Dec1,
double RA2,
double Dec2);
242 void double2hms(
double t,
int &h,
int &m,
int &s);
245 double sign(
double d);
251 QString formatAsDate(
int dayNumber);
257 QString formatAsDateRange(
int startDay,
int endDay);
261 double toUnsignedRA(
double RA);
267 void updatePlanetData(
StelCore* core);
277 void toRADec(
Vec3d vec3d,
double& ra,
double& dec);
280 QPair<double, double> yearJD[366];
284 bool CheckRise(
int day);
288 static const double Rad2Deg, Rad2Hr, UA, TFrac, halfpi, MoonT, RefFullMoon, MoonPerilune;
291 double nextFullMoon, prevFullMoon, GMTShift, Jan1stJD;
295 double twilightAltRad;
302 double refractedHorizonAlt;
305 double horizonAltitude;
311 double selRA, selDec, mylat, mylon, alti, horizH, culmAlt;
314 QPair<double, double> myJD;
321 double sunSidT[4][366];
324 double objectRA[366];
325 double objectDec[366];
326 double objectH0[366];
329 double objectSidT[2][366];
332 double MoonRise, MoonSet, MoonCulm, lastJDMoon;
338 Vec3d ObserverLoc, Pos1, Pos2, RotObserver;
357 QString lineBestNight;
359 QString lineObservableRange;
361 QString lineAcroCos, lineHeli;
364 QString RiseTime, SetTime, CulmTime;
367 QStringList monthNames;
373 Vec3d EquPos, LocPos;
376 bool isStar, isMoon, isSun, isScreen;
387 bool show_AcroCos, show_Good_Nights, show_Best_Night, show_Today, show_FullMoon;
403 QString msgSetsAt, msgRoseAt, msgSetAt, msgRisesAt, msgCircumpolar, msgNoRise, msgCulminatesAt, msgCulminatedAt, msgH, msgM, msgS;
404 QString msgSrcNotObs, msgNoACRise, msgGreatElong, msgLargSSep, msgNone, msgAcroRise, msgNoAcroRise, msgCosmRise, msgNoCosmRise;
405 QString msgHeliRise, msgHeliSet, msgNoHeliRise;
406 QString msgWholeYear, msgNotObs, msgAboveHoriz, msgToday, msgThisYear, msgPrevFullMoon, msgNextFullMoon;
413 #include "StelPluginInterface.hpp" 418 Q_PLUGIN_METADATA(IID StelPluginInterface_iid)
Define the interface to implement when creating a plugin.
int getTwilightAltitude()
Get the user-defined Sun altitude at twilight.
void showReport(bool b)
Controls whether an observability report will be displayed.
virtual void draw(StelCore *core)
Execute all the drawing functions for this module.
Vec3f getFontColor(void)
get the current font color:
void saveConfiguration()
Save the plug-in's configuration to the main configuration file.
Main class for Stellarium core processing.
virtual bool configureGui(bool show=true)
Implement this to tell the main Stellarium GUI that there is a GUI element to configure this plugin...
void enableFullMoonField(bool enabled=true)
Display date of the full moon.
virtual void update(double)
Update the module with respect to the time.
void resetConfiguration()
Restore and reload the default plug-in settings.
void loadConfiguration()
Read (or re-read) settings from the main config file.
StelModuleActionName
Define the possible action for which an order is defined.
Configuration window of the Observability Analysis plug-in.
void enableTodayField(bool enabled=true)
Display today's events (rise, set and transit times).
virtual double getCallOrder(StelModuleActionName actionName) const
Return the value defining the order of call for the given action For example if stars.callOrder[ActionDraw] == 10 and constellation.callOrder[ActionDraw] == 11, the stars module will be drawn before the constellations.
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.
virtual void init()
Initialize itself.
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.
This is the common base class for all the main components of stellarium.
void setFontSize(int size)
Set the size of the font used to display the report.
Contains information about a Stellarium plugin.
void setFontColor(const Vec3f &color)
Set the color of the font used to display the report.
Main class of the Observability Analysis plug-in.