Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cGeoSunRise Class Reference

#include <cGeospatial.h>

Inheritance diagram for GrayLib::cGeoSunRise:
GrayLib::cGeospatial GrayLib::cTypeF< double > Gray::cTypeLimit< double >

Public Member Functions

 cGeoSunRise (void)
 
 ~cGeoSunRise (void)
 
HRESULT Set (const cTimeDouble &t, const cGeoPos &p, TZ_TYPE nTimeZoneOffset)
 
 UNITTEST_FRIEND (cGeospatial)
 
- Public Member Functions inherited from GrayLib::cTypeF< double >
const float k_MinPos
 
const double k_MinPos
 
const float k_MaxSqrt
 
const double k_MaxSqrt
 
const float k_Epsilon
 
const double k_Epsilon
 
const float k_PI
 
const double k_PI
 
const float k_PI2
 
const double k_PI2
 
const float k_PIHalf
 
const double k_PIHalf
 
const float k_e
 
const double k_e
 
const float k_Log2e
 
const double k_Log2e
 
const float k_Log10e
 
const double k_Log10e
 
const float k_Ln2
 
const double k_Ln2
 
const float k_Ln10
 
const double k_Ln10
 

Public Attributes

double m_Declination
 radians More...
 
double m_DayLength
 double hours. More...
 
double m_SunAltAtNoon
 sun altitude at noon in radians. More...
 
double m_tCivilAM
 AM time in the day. double hours. dawn. More...
 
double m_tSunRise
 AM time in the day. double hours. More...
 
double m_tSolarNoon
 double hours. true noon. More...
 
double m_tSunSet
 PM time in the day. double hours. More...
 
double m_tCivilPM
 PM time in the day. double hours. dusk. More...
 

Protected Member Functions

double FNrange (double x)
 
double f0 (double lat, double declin)
 
double f1 (double lat, double declin)
 

Additional Inherited Members

- Public Types inherited from GrayLib::cGeospatial
typedef cVecT2< double > VEC_t
 
- Static Public Member Functions inherited from GrayLib::cGeospatial
static double GRAYCALL GetDistMeters (const cGeoPos &p1, const cGeoPos &p2)
 
static cGeoPos GRAYCALL AddDistMeters (const cGeoPos &p1, double dx, double dy)
 
- Static Public Member Functions inherited from Gray::cTypeLimit< double >
static bool isNumSigned () noexcept
 
- Static Public Attributes inherited from GrayLib::cGeospatial
static const double k_EarthRadiusMeters = 6371000.0
 = 6371000.0; More...
 
static const double k_SunDia = 0.53
 = 0.53; // Sun radius degrees. (for daylight time) More...
 
static const double k_AirRefr = 34.0 / 60.0
 = 34.0 / 60.0; // atmospheric refraction degrees (for daylight time) More...
 
- Static Public Attributes inherited from GrayLib::cTypeF< double >
static const double k_MinPos
 The min value that is positive and > 0. AKA FLT_MIN and DBL_MIN. More...
 
static const double k_MaxSqrt
 The square root of <= k_Max. Not Max+1. More...
 
static const double k_Epsilon
 smallest positive value such that (1.0+FLT_EPSILON != 1.0) More...
 
static const double k_PI
 PI as a float or double. like M_PI, D3DX_PI. More...
 
static const double k_PI2
 PI times 2. M_PI. More...
 
static const double k_PIHalf
 Half PI. More...
 
static const double k_e
 M_E = 2.718281828... More...
 
static const double k_Log2e
 M_LOG2E = log2(e) = 1/ln(2) More...
 
static const double k_Log10e
 M_LOG10E = log10(e) = 1/ln(10) More...
 
static const double k_Ln2
 M_LN2 = ln(2) = 1/log2(e) More...
 
static const double k_Ln10
 M_LN10 = ln(10) = 1/log10(e) More...
 
- Static Public Attributes inherited from Gray::cTypeLimit< double >
static const double k_Min
 Min value TYPE can represent. negative if signed type. NOT EPSILON (near zero). e.g. INT_MIN, -FLT_MAX. More...
 
static const double k_Max
 Max positive value. Can equal this value. inclusive. AKA INT_MAX, FLT_MAX, DBL_MAX. More...
 
static const BYTE k_TypeFlags
 CTYPE_FLAG_TYPE_ = float, signed, etc ? More...
 

Detailed Description

Constructor & Destructor Documentation

◆ cGeoSunRise()

GrayLib::cGeoSunRise::cGeoSunRise ( void  )

◆ ~cGeoSunRise()

GrayLib::cGeoSunRise::~cGeoSunRise ( void  )

Member Function Documentation

◆ f0()

double GrayLib::cGeoSunRise::f0 ( double  lat,
double  declin 
)
protected

Calculating the hourangle Correction: different sign at S HS

◆ f1()

double GrayLib::cGeoSunRise::f1 ( double  lat,
double  declin 
)
protected

Calculating the hourangle for twilight times Correction: different sign at S HS

◆ FNrange()

double GrayLib::cGeoSunRise::FNrange ( double  x)
protected

the function below returns an angle in the range 0 to 2*k_PI

◆ Set()

HRESULT GrayLib::cGeoSunRise::Set ( const cTimeDouble t,
const cGeoPos p,
TZ_TYPE  nTimeZoneOffset 
)

Set the time and position on earth and figure out sunrise/sunset times for that Day/Place. Get the days to J2000 (UTC) http://en.wikipedia.org/wiki/Julian_year_%28astronomy%29 nTimeZoneOffsetHours = -5 = EST timezone offset. hours

◆ UNITTEST_FRIEND()

GrayLib::cGeoSunRise::UNITTEST_FRIEND ( cGeospatial  )

Member Data Documentation

◆ m_DayLength

double GrayLib::cGeoSunRise::m_DayLength

double hours.

◆ m_Declination

double GrayLib::cGeoSunRise::m_Declination

radians

◆ m_SunAltAtNoon

double GrayLib::cGeoSunRise::m_SunAltAtNoon

sun altitude at noon in radians.

◆ m_tCivilAM

double GrayLib::cGeoSunRise::m_tCivilAM

AM time in the day. double hours. dawn.

◆ m_tCivilPM

double GrayLib::cGeoSunRise::m_tCivilPM

PM time in the day. double hours. dusk.

◆ m_tSolarNoon

double GrayLib::cGeoSunRise::m_tSolarNoon

double hours. true noon.

◆ m_tSunRise

double GrayLib::cGeoSunRise::m_tSunRise

AM time in the day. double hours.

◆ m_tSunSet

double GrayLib::cGeoSunRise::m_tSunSet

PM time in the day. double hours.


The documentation for this class was generated from the following files: