Util Object

ACP Utilities Object

Remarks

Intrinsic This object contains utility methods and properties, and the Console, Dome, Prefs, and Profile objects. Some of the methods and properties provide useful astronomical functions, others provide information about the system (as opposed to the scope), and stilll others provide useful conversions. Note that some functions have been designed within constraints of some scripting languages (e.g. JScript) which cannot pass results back through parameters.

Sexagesimal Conversions

The sexagesimal to real conversion methods such as DMS_Degrees() are flexible enough to convert just about anything that resembles sexagesimal. The way they operate is to first separate the input string into numeric "tokens", strings consisting only of the numerals 0-9, plus and minus, and period. All other characters are considered separators. Once the input string is parsed into tokens they are converted to numerics. If there are more than three numeric tokens, only the first three are considered, the remainder are ignored.

Left to right positionally, the tokens are assumed to represent units (degrees or hours), minutes, and seconds. If only two tokens are present, they are assumed to be units and minutes, and if only one token is present, it is assumed to be units. Any token can have a fractional part. Of course it would not be normal (for example) for both the minutes and seconds parts to have fractional parts, but it would be legal. So 00:30.5:30 would convert to 1.0 unit. Note that plain units, for example 23.128734523 are acceptable to the method.

The real to sexagesimal conversion methods such as Degrees_DMS() allow independent control of each delimiter and the number of decimal digits on the smallest part. Separate methods are provided for conversion to units (degrees or hours) and minutes, versus units, minutes and seconds. The delimiters and decimal precision are optional parameters and may be omitted by leaving the parameter blank. For example, to convert from degrees to degrees, minutes, and seconds, with 2 decimal digits on the seconds and the default delimiters, you would call Degrees_DMS(degs, , , ,2).

Date and Time Systems

For a detailed explanation of astronomical timekeeping systems, see A Time Tutorial on the NASA Goddard Spaceflight Center site, and the USNO Systems of Time site.
As used throughout the ASCOM 1.2 specification and ACP, an ActiveX Date value is expressed in local time, and a Julian date value is expressed in either UTC time (UJD) or Terrestrial time (TJD). There are exceptions, but this is the general rule.
ActiveX Date values
These are the Windows standard "date serial" numbers, and are expressed in local time. The fractional part of these numbers represents time within a day. They are used throughout applications such as Excel, Visual Basic, VBScript, and other ActiveX capable environments.
Julian dates
These are standard Julian "date serial" numbers, and are expressed in UTC time or Terrestrial time. The fractional part of these numbers represents time within a day. The standard ActiveX "Double" precision of 15 digits gives a resolution of about one millisecond in a full Julian dates. This is sufficient for the purposes of this program.
Hourly Time Values
These are typically used to represent sidereal time and right ascension. They are simple real numbers in units of hours.
UTC Time Scale
Most of the Util methods that accept date/time values (either Date or Julian) assume that the date/time is in Coordinated Universal Time (UTC). Where necessary, this time is converted internally to other scales. Note that UTC seconds are based on the Cesium atom, not planetary motions. In order to keep UTC in sync with planetary motion, leap seconds are inserted periodically. This program does not account for leap seconds. The error is at most 900 milliseconds.
UT1 Time Scale
The UT1 time scale is the planetary equivalent of UTC. It it runs smoothly and varies a bit with time, but it is never more than 900 milliseconds different from UTC. This program treats UTC and UT1 the same.
TT Time Scale
The Terrestrial Dynamical Time (TT) scale is used in solar system orbital calculations. It is based completely on planetary motions; you can think of the solar system as a giant TT clock. It differs from UT1 by an amount called "delta-t", which slowly increases with time, and is about 60 seconds right now (1998). You can convert Julian dates between UTC and TT using the methods Julian_TJD() and TJD_Julian().