KSAlmanac

Search for usage in LXR

KSAlmanac Class Reference

#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

Author
Prakash Mohan
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
midnightis the midnight date and time to consider as beginning of the day at the "geo" location.
geois 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()

KStarsDateTime KSAlmanac::getDate ( ) const
inline

Definition at line 52 of file ksalmanac.h.

◆ getDawnAstronomicalTwilight()

double KSAlmanac::getDawnAstronomicalTwilight ( ) const
inline

Definition at line 70 of file ksalmanac.h.

◆ getDuskAstronomicalTwilight()

double KSAlmanac::getDuskAstronomicalTwilight ( ) const
inline

Definition at line 69 of file ksalmanac.h.

◆ getMoonIllum()

double KSAlmanac::getMoonIllum ( ) const
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()

double KSAlmanac::getMoonPhase ( ) const
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()

double KSAlmanac::getMoonRise ( ) const
inline

Definition at line 67 of file ksalmanac.h.

◆ getMoonSet()

double KSAlmanac::getMoonSet ( ) const
inline

Definition at line 68 of file ksalmanac.h.

◆ getSunMaxAlt()

double KSAlmanac::getSunMaxAlt ( ) const
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()

double KSAlmanac::getSunMinAlt ( ) const
inline

Definition at line 76 of file ksalmanac.h.

◆ getSunRise()

double KSAlmanac::getSunRise ( ) const
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()

double KSAlmanac::getSunSet ( ) const
inline

Definition at line 66 of file ksalmanac.h.

◆ moonRise()

QTime KSAlmanac::moonRise ( ) const
inline

Definition at line 90 of file ksalmanac.h.

◆ moonSet()

QTime KSAlmanac::moonSet ( ) const
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_midnightand 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()

void KSAlmanac::setDateFromLT ( const KStarsDateTime & local_midnight)
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()

QTime KSAlmanac::sunRise ( ) const
inline

Definition at line 88 of file ksalmanac.h.

◆ sunSet()

QTime KSAlmanac::sunSet ( ) const
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
zZenithal 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:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:42 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.