Sun Class Function Manual


ALT

| HOME | BACK |

Purpose

To calculate altitude of the sun, an angle in a vertical plane measured from the horizon up to the sun, as appear to the observer at a particular point on the earth, specified by latitude and longitude. 

Please pay attention that the time in the Date object, which is a member data of the Sun object, is considered the GMT (Greenwich Mean Time).

The result angle is in degree.

Class

Sun

Usage

{double} ret  =  object.ALT({double} argm1, {double} argm2)

argm1 = latitude of the observer (in degree)

argm2 = longitude of the observer (in degree)

Example:

->my_sun = Sun(Date(2001, 9, 15, deg(10.30)))

->print my_sun.alt(40,-99)

   -20.68638

->

See also (class function)

azi

| HOME | BACK |


AZI

| HOME | BACK |

Purpose

To calculate azimuth of the sun, an angle in a horizontal plane measured from the north clockwise to to the sun, as appear to the observer at a particular point on the earth, specified by latitude and longitude. 

Please pay attention that the time in the Date object, which is a member data of the Sun object, is considered the GMT (Greenwich Mean Time).

The result angle is in degree.

Class

Sun

Usage

{double} ret  =  object.AZI({double} argm1, {double} argm2)

argm1 = latitude of the observer (in degree)

argm2 = longitude of the observer (in degree)

Example:

->my_sun = Sun(Date(2001, 9, 15, deg(10.30)))

->print my_sun.azi(40,-99)

   67.18106

->

See also (class function)

alt

| HOME | BACK |


DATE

| HOME | BACK |

Purpose

To report the current date of the sun object.  The result is a Date object, which also has information of time in it.

Class

Sun

Usage

{double} ret  =  object.DATE()

Example:

->my_sun = Sun(Date(2001, 9, 15, deg(10.30)))

->print my_sun.date()

      15/9/2001 Time: 10 30 00.0000000

->

See also (class function)

init

| HOME | BACK |


DECL

| HOME | BACK |

Purpose

To report the current declination angle of the sun object.

Please pay attention that the time in the Date object, which is a member data of the Sun object, is considered the GMT (Greenwich Mean Time).

The result angle is in degree.

Class

Sun

Usage

{double} ret  =  object.DECL()

Example:

->my_sun = Sun(Date(2001, 9, 15, deg(10.30)))

->print my_sun.decl()

  2.91575

->

See also (class function)

init

| HOME | BACK |


DIAMETER

| HOME | BACK |

Purpose

To report the current diameter of the sun object.

Please pay attention that the time in the Date object, which is a member data of the Sun object, is considered the GMT (Greenwich Mean Time).

The result angle is in degree.

Class

Sun

Usage

{double} ret  =  object.DIAMETER()

Example:

->my_sun = Sun(Date(2001, 9, 15, deg(10.30)))

->print my_sun.diameter()

  0.53105

->

See also (class function)

init

| HOME | BACK |


DIST

| HOME | BACK |

Purpose

To report the current distance, between the sun and the earth, of the sun object.

Please pay attention that the time in the Date object, which is a member data of the Sun object, is considered the GMT (Greenwich Mean Time).

The result angle is in Astronomic Unit (AU).

Class

Sun

Usage

{double} ret  =  object.DIST()

Example:

->my_sun = Sun(Date(2001, 9, 15, deg(10.30)))

->print my_sun.dist()

  1.00556

->

See also (class function)

init

| HOME | BACK |


EQOFTIME

| HOME | BACK |

Purpose

To report the current value of the equation of time of the sun object.  Equation of time is the difference of hour angle, in arc, between the mean sun and the apparent (real) sun.

Please pay attention that the time in the Date object, which is a member data of the Sun object, is considered the GMT (Greenwich Mean Time).

The result angle is in degree (arc).

Class

Sun

Usage

{double} ret  =  object.EQOFTIME()

Example:

->my_sun = Sun(Date(2001, 9, 15, deg(10.30)))

->print my_sun.eqoftime()

  1.20354

->

See also (class function)

init

| HOME | BACK |


HOURANG

| HOME | BACK |

Purpose

To calculate hour angle of the sun, an angle in the equatorial plane measured from the observer anti-clockwise to to the sun (left hand system), as appear to the observer at a particular point on the earth, specified by a longitude. 

Please pay attention that the time in the Date object, which is a member data of the Sun object, is considered the GMT (Greenwich Mean Time).

Hour angle of the sun does not depend on latitude of the observer.

The result angle is in degree (arc).

Class

Sun

Usage

{double} ret  =  object.HOURANG({double} argm1)

argm1 = longitude of the observer (in degree)

Example:

->my_sun = Sun(Date(2001, 9, 15, deg(10.30)))

->print my_sun.hourang(-99)

   239.70354

->

See also (class function)

alt

| HOME | BACK |


INCDANG

| HOME | BACK |

Purpose

To calculate incident angle between the sun and the surface normal of the earth terrain at a particular point on the earth, specified by latitude and longitude. 

Please pay attention that the time in the Date object, which is a member data of the Sun object, is considered the GMT (Greenwich Mean Time).

The result angle is in degree (arc).

Class

Sun

Usage

{double} ret  =  object.INCDANG({double} argm1,{double} argm2,{double} argm3,{double} argm4)

argm1 = latitude of the observer (in degree)

argm2 = longitude of the observer (in degree)

argm3 = slope of the terrain (in degree)

        (default = 0)

argm4 = aspect (azimuth of the max slope) of the terrain (in degree)

        (default = 0)

Example:

->my_sun = Sun(Date(2001, 9, 15, deg(10.30)))

->my_sun.incdang(15,99,10,90)

ans =        38.78312

->

See also (class function)

alt

| HOME | BACK |


INIT

| HOME | BACK |

Purpose

To initialize a sun object.

Please pay attention that the time in the Date object, which is a member data of the Sun object, is considered the GMT (Greenwich Mean Time).

Class

Sun

Usage

{void} object.INIT({double} argm1)

Example:

->the_date = Date(2001, 9, 15, deg(10.30))

->my_sun = sun()

->my_sun.init(the_dtae)

->

See also (class function)

 

| HOME | BACK |


RA

| HOME | BACK |

Purpose

To report the current right ascension of the sun object.  Right ascension is the angle in the equatorial plane from vernal equinox to the sun (right hand system).

Please pay attention that the time in the Date object, which is a member data of the Sun object, is considered the GMT (Greenwich Mean Time).

The result angle is in degree (arc).

Class

Sun

Usage

{double} ret  =  object.RA()

Example:

->my_sun = Sun(Date(2001, 9, 15, deg(10.30)))

->print my_sun.ra()

  173.25319

->

See also (class function)

init

| HOME | BACK |