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 SolarRefgetRef () 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]

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.

Member Function Documentation

◆ 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
isRisetrue for sunrise, false for sunset
yAbsolute year
mMonth number (1 - 12)
dDay of month (1 - 31)
Return values
intMinutes 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: