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

Implement methods to find important times in a day.

A class that implements methods to find sun rise, sun set, twilight begin / end times, moon rise and moon set times.

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

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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-2022 The KDE developers.
Generated on Thu Dec 8 2022 03:59:52 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.