Calculation of apparent time of sunrise and sunset.
More...
#include <SolarCalculator.h>
Calculation of apparent time of sunrise and sunset.
Note: Months are 1-based
◆ SolarCalculator() [1/2]
SolarCalculator::SolarCalculator |
( |
| ) |
|
|
inline |
Default constructor, uses Royal Observatory, Greenwich as default.
◆ SolarCalculator() [2/2]
SolarCalculator::SolarCalculator |
( |
const SolarRef & |
ref | ) |
|
|
inline |
Perform calculations using the given solar reference.
◆ getRef()
const SolarRef& SolarCalculator::getRef |
( |
| ) |
const |
|
inline |
Get the current location reference in use.
◆ setRef()
void SolarCalculator::setRef |
( |
const SolarRef & |
ref | ) |
|
|
inline |
Set the location reference for calculations.
◆ sunrise()
int SolarCalculator::sunrise |
( |
int |
y, |
|
|
int |
m, |
|
|
int |
d |
|
) |
| |
|
inline |
◆ sunRiseSet()
int SolarCalculator::sunRiseSet |
( |
bool |
isRise, |
|
|
int |
y, |
|
|
int |
m, |
|
|
int |
d |
|
) |
| |
@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()
int SolarCalculator::sunset |
( |
int |
y, |
|
|
int |
m, |
|
|
int |
d |
|
) |
| |
|
inline |
The documentation for this class was generated from the following file: