SolarCalculator Class Reference
Calculation of apparent time of sunrise and sunset. More...
#include <SolarCalculator.h>
Public Member Functions | |
SolarCalculator () | |
Default constructor, uses Royal Observatory, Greenwich as default. More... | |
SolarCalculator (const SolarRef &ref) | |
Perform calculations using the given solar reference. More... | |
const SolarRef & | getRef () const |
Get the current location reference in use. More... | |
void | setRef (const SolarRef &ref) |
Set the location reference for calculations. More... | |
int | sunRiseSet (bool isRise, int y, int m, int d) |
int | sunrise (int y, int m, int d) |
int | sunset (int y, int m, int d) |
Detailed Description
Calculation of apparent time of sunrise and sunset.
Note: Months are 1-based
Constructor & Destructor Documentation
◆ SolarCalculator() [1/2]
|
inline |
Default constructor, uses Royal Observatory, Greenwich as default.
◆ SolarCalculator() [2/2]
|
inline |
Perform calculations using the given solar reference.
Member Function Documentation
◆ getRef()
|
inline |
Get the current location reference in use.
◆ setRef()
|
inline |
Set the location reference for calculations.
◆ sunrise()
◆ sunRiseSet()
@briefCalculate a sunrise or sunset figure for a given day.
- Parameters
-
isRise true for sunrise, false for sunset y Absolute year m Month number (1 - 12) d Day of month (1 - 31)
- Return values
-
int Minutes since midnight, -1 if there is no sunrise/sunset
◆ sunset()
The documentation for this class was generated from the following file: