CalcAirmass
The CalcAirmass function calculates the airmass, or relative optical path length through the Earth's atmosphere, for an observation. The calculation is based on the object coordinates, observing site coordinates, and the UT date and time of the observation.
nAirmass = CalcAirmass( sRa, sDec, sLong, sLat, sDate, sTime )
sRa, sDec are strings giving the right ascension and declination coordinates of the observation.
sLong, sLat are strings giving the longitude and latitude of the observing site. Longitude is measured positive west from the Greenwich meridian.
sDate, sTime are strings giving the date and UT time of the observation.
nAirmass is the calculated airmass.
Airmass is returned as 0.0 when the object is below the horizon.
All 6 input parameters are string values. The right ascension, sRa, is specified in HMS format. sDec, sLong, and sLat are angles specified in DMS format. Date and Time are specified as YMD and HMS format strings. The string format can use a variety of delimiters, including spaces, commas, colons, and other relevant characters.
Be sure that the time of the observation includes the time reference (i.e., beginning, middle, or end of the observation). For example, if the UT is "05:15:34" at the start of a 60 second exposure and you want the airmass to be effective at the middle of the exposure, then specify the time string as being 30 seconds later, or "05:16:04".
The following script computes the airmass:
|
-- HMS string |
|
-- DMS string |
|
-- DMS string |
|
-- DMS string |
|
|
|
|
|
-- compute the airmass |
|
-- Result: Airmass = 1.197916 |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.