KSAlmanac
#include <ksalmanac.h>
Public Member Functions | |
KSAlmanac () | |
KSAlmanac (const KStarsDateTime &midnight, const GeoLocation *geo=nullptr) | |
double | getDawnAstronomicalTwilight () const |
double | getDuskAstronomicalTwilight () const |
double | getMoonIllum () const |
double | getMoonPhase () const |
double | getMoonRise () const |
double | getMoonSet () const |
double | getSunMaxAlt () const |
double | getSunMinAlt () const |
double | getSunRise () const |
double | getSunSet () const |
QTime | moonRise () const |
QTime | moonSet () const |
void | setLocation (const GeoLocation *geo_) |
QTime | sunRise () const |
QTime | sunSet () const |
double | sunZenithAngleToTime (double z) const |
void | setDate (const KStarsDateTime &utc_midnight) |
void | setDateFromLT (const KStarsDateTime &local_midnight) |
KStarsDateTime | getDate () const |
Detailed Description
A class that implements methods to find sun rise, sun set, twilight begin / end times, moon rise and moon set times.
Implement methods to find important times in a day
- Version
- 1.0
Definition at line 26 of file ksalmanac.h.
Constructor & Destructor Documentation
◆ KSAlmanac() [1/2]
KSAlmanac::KSAlmanac | ( | ) |
KSAlmanac constructor initializing an almanac for the current KStarsData::Instance geolocation and time.
Definition at line 13 of file ksalmanac.cpp.
◆ KSAlmanac() [2/2]
KSAlmanac::KSAlmanac | ( | const KStarsDateTime & | midnight, |
const GeoLocation * | geo = nullptr ) |
KSAlmanac constructor initializing an almanac for an arbitrary geolocation and time.
- Parameters
-
midnight is the midnight date and time to consider as beginning of the day at the "geo" location. geo is the GeoLocation to use for this almanac, defaulting to the KStarsData::Instance geolocation.
- Note
- if the timespec of midnight is local time, its UTC value at the geolocation "geo" will be used instead.
Definition at line 29 of file ksalmanac.cpp.
Member Function Documentation
◆ getDate()
|
inline |
Definition at line 52 of file ksalmanac.h.
◆ getDawnAstronomicalTwilight()
|
inline |
Definition at line 70 of file ksalmanac.h.
◆ getDuskAstronomicalTwilight()
|
inline |
Definition at line 69 of file ksalmanac.h.
◆ getMoonIllum()
|
inline |
- Returns
- get the moon illuminated fraction at the given date/time. Range is [0.,1.]
Definition at line 86 of file ksalmanac.h.
◆ getMoonPhase()
|
inline |
- Returns
- the moon phase in degrees at the given date/time. Ranges is [0, 180]
Definition at line 81 of file ksalmanac.h.
◆ getMoonRise()
|
inline |
Definition at line 67 of file ksalmanac.h.
◆ getMoonSet()
|
inline |
Definition at line 68 of file ksalmanac.h.
◆ getSunMaxAlt()
|
inline |
These functions return the max and min altitude of the sun during the course of the day in degrees.
Definition at line 75 of file ksalmanac.h.
◆ getSunMinAlt()
|
inline |
Definition at line 76 of file ksalmanac.h.
◆ getSunRise()
|
inline |
All the functions returns the fraction of the day given by getDate() as their return value.
Definition at line 65 of file ksalmanac.h.
◆ getSunSet()
|
inline |
Definition at line 66 of file ksalmanac.h.
◆ moonRise()
|
inline |
Definition at line 90 of file ksalmanac.h.
◆ moonSet()
|
inline |
Definition at line 91 of file ksalmanac.h.
◆ setDate()
void KSAlmanac::setDate | ( | const KStarsDateTime & | utc_midnight | ) |
Get/set the date for computations to the given date.
- Parameters
-
utc_midnight and local_midnight are the midnight date and time to consider as beginning of the day at the geo_ location, either UTC or local.
- Note
- The time must be the local time midnight of the day the almanac is required for, so that resulting ephemerides are calculated around that time.
- These functions are not merged into a single timespec-aware one for backwards compatilibity.
Definition at line 172 of file ksalmanac.cpp.
◆ setDateFromLT()
|
inline |
Definition at line 51 of file ksalmanac.h.
◆ setLocation()
void KSAlmanac::setLocation | ( | const GeoLocation * | geo_ | ) |
Set the location for computations to the given location.
- Parameters
-
geo_ The location to set for computations
Definition at line 178 of file ksalmanac.cpp.
◆ sunRise()
|
inline |
Definition at line 88 of file ksalmanac.h.
◆ sunSet()
|
inline |
Definition at line 89 of file ksalmanac.h.
◆ sunZenithAngleToTime()
double KSAlmanac::sunZenithAngleToTime | ( | double | z | ) | const |
Convert the zenithal distance of the sun to fraction of the day.
- Parameters
-
z Zenithal angular distance
- Returns
- Time as a fraction of the day, at which the zenithal distance is attained by the sun
- Note
- This is accurate only for zenithal angles close to sunset. TODO: Make this more accurate
Definition at line 184 of file ksalmanac.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.