Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  ENVI API  >  ENVI Classic Data Control  >  ENVI_COMPUTE_SUN_ANGLES

ENVI_COMPUTE_SUN_ANGLES

ENVI_COMPUTE_SUN_ANGLES

Use this function to compute solar elevation and solar azimuth angles for a given time, latitude, and longitude. This function returns a two-element array of double-precision values representing solar elevation and azimuth, respectively, for the selected input values.

Syntax


Result = ENVI_COMPUTE_SUN_ANGLES (Day, Month, Year, GMTtime, Lat, Lon)

Arguments


Day

Use this keyword to specify the day of year for the desired solar angles. Day is an integer value, 1 through 31.

Month

Use this keyword to specify the month for the desired solar angles. Month is an integer value, 1 through 12.

Year

Use this keyword to specify the year for the desired solar angles. Year is an integer value of the form yyyy.

GMTtime

Use this keyword to specify the Greenwich Mean Time (GMT) for the desired solar angles. GMTtime is a floating-point value, 0 through 2400. For example, a value of 1430.0 represents a GMT time of 14:30.

Lat

Use this keyword to specify the latitude for the desired solar angles. Lat is a floating-point number in degrees. North is positive and South is negative.

Lon

Use this keyword to specify the longitude for the desired solar angles. Lon is a floating-point number in degrees. East is positive and West is negative.

Example


The following code computes solar elevation and azimuth angles for 34 degrees north, 117 degrees west on July 4, 1984, 22:45 GMT.

angles = envi_compute_sun_angles(4, 7, 1984, 2245., $  
   34., -117.)
print, 'Sun elevation= ', angles[0]
print, 'Sun azimuth= ', angles[1]

API Version


3.2



© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us