Practical Astronomy Algorithms in .NET/C#
Loading...
Searching...
No Matches
PASun Class Reference

Sun calculations. More...

Public Member Functions

double double double double double double sunDecSec ApproximatePositionOfSun (double lctHours, double lctMinutes, double lctSeconds, double localDay, int localMonth, int localYear, bool isDaylightSaving, int zoneCorrection)
 
double double double double double double sunDecSec PrecisePositionOfSun (double lctHours, double lctMinutes, double lctSeconds, double localDay, int localMonth, int localYear, bool isDaylightSaving, int zoneCorrection)
 
double double double double sunAngSizeSec SunDistanceAndAngularSize (double lctHours, double lctMinutes, double lctSeconds, double localDay, int localMonth, int localYear, bool isDaylightSaving, int zoneCorrection)
 
double double double double double double string status SunriseAndSunset (double localDay, int localMonth, int localYear, bool isDaylightSaving, int zoneCorrection, double geographicalLongDeg, double geographicalLatDeg)
 
double double double double string status MorningAndEveningTwilight (double localDay, int localMonth, int localYear, bool isDaylightSaving, int zoneCorrection, double geographicalLongDeg, double geographicalLatDeg, PATwilightType twilightType)
 
double double equationOfTimeSec EquationOfTime (double gwdateDay, int gwdateMonth, int gwdateYear)
 
double SolarElongation (double raHour, double raMin, double raSec, double decDeg, double decMin, double decSec, double gwdateDay, int gwdateMonth, int gwdateYear)
 Calculate solar elongation for a celestial body.
 

Public Attributes

double sunRAHour
 Calculate approximate position of the sun for a local date and time.
 
double double sunRAMin
 
double double double sunRASec
 
double double double double sunDecDeg
 
double double double double double sunDecMin
 
double sunDistKm
 Calculate distance to the Sun (in km), and angular size.
 
double double sunAngSizeDeg
 
double double double sunAngSizeMin
 
double localSunriseHour
 Calculate local sunrise and sunset.
 
double double localSunriseMinute
 
double double double localSunsetHour
 
double double double double localSunsetMinute
 
double double double double double azimuthOfSunriseDeg
 
double double double double double double azimuthOfSunsetDeg
 
double amTwilightBeginsHour
 Calculate times of morning and evening twilight.
 
double double amTwilightBeginsMin
 
double double double pmTwilightEndsHour
 
double double double double pmTwilightEndsMin
 
double equationOfTimeMin
 Calculate the equation of time. (The difference between the real Sun time and the mean Sun time.)
 

Detailed Description

Sun calculations.

Definition at line 9 of file PASun.cs.

Member Function Documentation

◆ ApproximatePositionOfSun()

double double double double double double sunDecSec ApproximatePositionOfSun ( double  lctHours,
double  lctMinutes,
double  lctSeconds,
double  localDay,
int  localMonth,
int  localYear,
bool  isDaylightSaving,
int  zoneCorrection 
)

Definition at line 30 of file PASun.cs.

◆ EquationOfTime()

double double equationOfTimeSec EquationOfTime ( double  gwdateDay,
int  gwdateMonth,
int  gwdateYear 
)

Definition at line 210 of file PASun.cs.

◆ MorningAndEveningTwilight()

double double double double string status MorningAndEveningTwilight ( double  localDay,
int  localMonth,
int  localYear,
bool  isDaylightSaving,
int  zoneCorrection,
double  geographicalLongDeg,
double  geographicalLatDeg,
PATwilightType  twilightType 
)

Definition at line 176 of file PASun.cs.

◆ PrecisePositionOfSun()

double double double double double double sunDecSec PrecisePositionOfSun ( double  lctHours,
double  lctMinutes,
double  lctSeconds,
double  localDay,
int  localMonth,
int  localYear,
bool  isDaylightSaving,
int  zoneCorrection 
)

Definition at line 64 of file PASun.cs.

◆ SolarElongation()

double SolarElongation ( double  raHour,
double  raMin,
double  raSec,
double  decDeg,
double  decMin,
double  decSec,
double  gwdateDay,
int  gwdateMonth,
int  gwdateYear 
)

Calculate solar elongation for a celestial body.

Solar elongation is the angle between the lines of sight from the Earth to the Sun and from the Earth to the celestial body.

Returns
solarElongationDeg – Solar elongation, in degrees

Definition at line 230 of file PASun.cs.

◆ SunDistanceAndAngularSize()

double double double double sunAngSizeSec SunDistanceAndAngularSize ( double  lctHours,
double  lctMinutes,
double  lctSeconds,
double  localDay,
int  localMonth,
int  localYear,
bool  isDaylightSaving,
int  zoneCorrection 
)

Definition at line 95 of file PASun.cs.

◆ SunriseAndSunset()

double double double double double double string status SunriseAndSunset ( double  localDay,
int  localMonth,
int  localYear,
bool  isDaylightSaving,
int  zoneCorrection,
double  geographicalLongDeg,
double  geographicalLatDeg 
)

Definition at line 129 of file PASun.cs.

Member Data Documentation

◆ amTwilightBeginsHour

double amTwilightBeginsHour

Calculate times of morning and evening twilight.

Parameters
localDayLocal date, day part.
localMonthLocal date, month part.
localYearLocal date, year part.
isDaylightSavingIs daylight savings in effect?
zoneCorrectionTime zone correction, in hours.
geographicalLongDegGeographical longitude, in degrees.
geographicalLatDegGeographical latitude, in degrees.
twilightType"C" (civil), "N" (nautical), or "A" (astronomical)
Returns
amTwilightBeginsHour – Beginning of AM twilight (hour part)

amTwilightBeginsMin – Beginning of AM twilight (minutes part)

pmTwilightEndsHour – Ending of PM twilight (hour part)

pmTwilightEndsMin – Ending of PM twilight (minutes part)

status – Calculation status

Definition at line 176 of file PASun.cs.

◆ amTwilightBeginsMin

double double amTwilightBeginsMin

Definition at line 176 of file PASun.cs.

◆ azimuthOfSunriseDeg

double double double double double azimuthOfSunriseDeg

Definition at line 129 of file PASun.cs.

◆ azimuthOfSunsetDeg

double double double double double double azimuthOfSunsetDeg

Definition at line 129 of file PASun.cs.

◆ equationOfTimeMin

double equationOfTimeMin

Calculate the equation of time. (The difference between the real Sun time and the mean Sun time.)

Parameters
gwdateDayGreenwich date (day part)
gwdateMonthGreenwich date (month part)
gwdateYearGreenwich date (year part)
Returns
equation_of_time_min – equation of time (minute part)

equation_of_time_sec – equation of time (seconds part)

Definition at line 210 of file PASun.cs.

◆ localSunriseHour

double localSunriseHour

Calculate local sunrise and sunset.

Returns
localSunriseHour – Local sunrise, hour part

localSunriseMinute – Local sunrise, minutes part

localSunsetHour – Local sunset, hour part

localSunsetMinute – Local sunset, minutes part

azimuthOfSunriseDeg – Azimuth (horizon direction) of sunrise, in degrees

azimuthOfSunsetDeg – Azimuth (horizon direction) of sunset, in degrees

status – Calculation status

Definition at line 129 of file PASun.cs.

◆ localSunriseMinute

double double localSunriseMinute

Definition at line 129 of file PASun.cs.

◆ localSunsetHour

double double double localSunsetHour

Definition at line 129 of file PASun.cs.

◆ localSunsetMinute

double double double double localSunsetMinute

Definition at line 129 of file PASun.cs.

◆ pmTwilightEndsHour

double double double pmTwilightEndsHour

Definition at line 176 of file PASun.cs.

◆ pmTwilightEndsMin

double double double double pmTwilightEndsMin

Definition at line 176 of file PASun.cs.

◆ sunAngSizeDeg

double double sunAngSizeDeg

Definition at line 95 of file PASun.cs.

◆ sunAngSizeMin

double double double sunAngSizeMin

Definition at line 95 of file PASun.cs.

◆ sunDecDeg

double double double double sunDecDeg

Definition at line 30 of file PASun.cs.

◆ sunDecMin

double double double double double sunDecMin

Definition at line 30 of file PASun.cs.

◆ sunDistKm

double sunDistKm

Calculate distance to the Sun (in km), and angular size.

Returns
sunDistKm – Sun's distance, in kilometers

sunAngSizeDeg – Sun's angular size (degrees part)

sunAngSizeMin – Sun's angular size (minutes part)

sunAngSizeSec – Sun's angular size (seconds part)

Definition at line 95 of file PASun.cs.

◆ sunRAHour

double sunRAHour

Calculate approximate position of the sun for a local date and time.

Calculate precise position of the sun for a local date and time.

Parameters
lctHoursLocal civil time, in hours.
lctMinutesLocal civil time, in minutes.
lctSecondsLocal civil time, in seconds.
localDayLocal day, day part.
localMonthLocal day, month part.
localYearLocal day, year part.
isDaylightSavingIs daylight savings in effect?
zoneCorrectionTime zone correction, in hours.
Returns
sunRAHour – Right Ascension of Sun, hour part

sunRAMin – Right Ascension of Sun, minutes part

sunRASec – Right Ascension of Sun, seconds part

sunDecDeg – Declination of Sun, degrees part

sunDecMin – Declination of Sun, minutes part

sunDecSec – Declination of Sun, seconds part

Definition at line 30 of file PASun.cs.

◆ sunRAMin

double double sunRAMin

Definition at line 30 of file PASun.cs.

◆ sunRASec

double double double sunRASec

Definition at line 30 of file PASun.cs.


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