• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

  • sources
  • kde-4.12
  • kdeedu
  • kstars
  • kstars
ksalmanac.h
Go to the documentation of this file.
1 /***************************************************************************
2  ksalmanac.h - description
3 
4  -------------------
5  begin : Friday May 8, 2009
6  copyright : (C) 2009 by Prakash Mohan
7  email : prakash.mohan@kdemail.net
8  ***************************************************************************/
9 
10 /***************************************************************************
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * *
17  ***************************************************************************/
18 
19 #ifndef KSALMANAC_H_
20 #define KSALMANAC_H_
21 
22 #include "skyobjects/kssun.h"
23 #include "skyobjects/ksmoon.h"
24 #include "kstarsdatetime.h"
25 
26 
38 class GeoLocation;
39 
40 // TODO: Fix the documentation for these methods
41 
42 class KSAlmanac {
43 public:
44  // TODO: Add documentation
45  KSAlmanac();
46 
51  void setDate( KStarsDateTime *newdt );
52 
57  void setLocation( GeoLocation *m_geo );
58 
63  inline double getSunRise() { return SunRise; }
64  inline double getSunSet() { return SunSet; }
65  inline double getMoonRise() { return MoonRise; }
66  inline double getMoonSet() { return MoonSet; }
67  inline double getDuskAstronomicalTwilight() { return DuskAstronomicalTwilight; }
68  inline double getDawnAstronomicalTwilight() { return DawnAstronomicalTwilight; }
69 
70  inline QTime sunRise() { return SunRiseT; }
71  inline QTime sunSet() { return SunSetT; }
72  inline QTime moonRise() { return MoonRiseT; }
73  inline QTime moonSet() { return MoonSetT; }
74  // TODO: Implement:
75  // inline QTime duskAstronomicalTwilight() { return DuskAstronomicalTwilightT; }
76  // inline QTime dawnAstronomicalTwilight() { return DawnAstronomicalTwilightT; }
77 
84  double sunZenithAngleToTime( double z );
85 
86 private:
87  void update();
88 
93  void RiseSetTime( SkyObject *o, double *riseTime, double *setTime, QTime *RiseTime, QTime *SetTime );
94 
99  void findDawnDusk();
100 
105  double findAltitude( SkyPoint *p, double hour );
106 
107  KSSun m_Sun;
108  KSMoon m_Moon;
109  KStarsDateTime dt;
110 
111  GeoLocation *geo;
112  double SunRise, SunSet, MoonRise, MoonSet, DuskAstronomicalTwilight, DawnAstronomicalTwilight;
113  QTime SunRiseT, SunSetT, MoonRiseT, MoonSetT, DuskAstronomicalTwilightT, DawnAstronomicalTwilightT;
114 };
115 
116 #endif
KSAlmanac::sunSet
QTime sunSet()
Definition: ksalmanac.h:71
KSAlmanac::sunRise
QTime sunRise()
Definition: ksalmanac.h:70
KSAlmanac::setDate
void setDate(KStarsDateTime *newdt)
Set the date for computations to the given date.
Definition: ksalmanac.cpp:130
KSSun
Child class of KSPlanetBase; encapsulates information about the Sun.
Definition: kssun.h:31
KSAlmanac
A class that implements methods to find sun rise, sun set, twilight begin / end times, moon rise and moon set times.
Definition: ksalmanac.h:42
KSAlmanac::KSAlmanac
KSAlmanac()
Definition: ksalmanac.cpp:33
SkyPoint
The sky coordinates of a point in the sky.
Definition: skypoint.h:50
KSAlmanac::getSunRise
double getSunRise()
All the functions returns the fraction of the day as their return value.
Definition: ksalmanac.h:63
GeoLocation
Contains all relevant information for specifying a location on Earth: City Name, State/Province name...
Definition: geolocation.h:39
KSAlmanac::getDuskAstronomicalTwilight
double getDuskAstronomicalTwilight()
Definition: ksalmanac.h:67
KStarsDateTime
Extension of KDateTime for KStars KStarsDateTime can represent the date/time as a Julian Day...
Definition: kstarsdatetime.h:45
KSAlmanac::getDawnAstronomicalTwilight
double getDawnAstronomicalTwilight()
Definition: ksalmanac.h:68
KSAlmanac::sunZenithAngleToTime
double sunZenithAngleToTime(double z)
Convert the zenithal distance of the sun to fraction of the day.
Definition: ksalmanac.cpp:141
kssun.h
KSMoon
A subclass of SkyObject that provides information needed for the Moon.
Definition: ksmoon.h:36
KSAlmanac::getSunSet
double getSunSet()
Definition: ksalmanac.h:64
KSAlmanac::getMoonRise
double getMoonRise()
Definition: ksalmanac.h:65
ksmoon.h
KSAlmanac::getMoonSet
double getMoonSet()
Definition: ksalmanac.h:66
kstarsdatetime.h
KSAlmanac::moonSet
QTime moonSet()
Definition: ksalmanac.h:73
SkyObject
Provides all necessary information about an object in the sky: its coordinates, name(s), type, magnitude, and QStringLists of URLs for images and webpages regarding the object.
Definition: skyobject.h:46
KSAlmanac::moonRise
QTime moonRise()
Definition: ksalmanac.h:72
KSAlmanac::setLocation
void setLocation(GeoLocation *m_geo)
Set the location for computations to the given location.
Definition: ksalmanac.cpp:135
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

Skip menu "kstars"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal