Util Class

Provides a set of utility functions for ASCOM clients and drivers

Definition

Namespace: ASCOM.Utilities
Assembly: ASCOM.Utilities (in ASCOM.Utilities.dll) Version: 7.1.3+4851.c5da65c2b
C#
public class Util : IDisposable
Inheritance
Object    Util
Implements
IDisposable

Constructors

Util Create a Utility object

Properties

BuildNumber Platform build number
JulianDate Current Julian date
MajorVersion Platform major version number
MinorVersion Platform minor version number
PlatformVersion Current Platform version in Major.Minor form
SerialTrace Enable/disable serial I/O tracing
SerialTraceFile Change the serial trace file (default C:\SerialTrace.txt)
ServicePack Platform service pack number
TimeZoneName The name of the computer's time zone
TimeZoneOffset UTC offset (hours) for the computer's clock
UTCDate The current UTC Date

Methods

ArrayToVariantArray Convert an array of .NET built-in types to an equivalent Variant arrray (array of .NET Objects)
ConvertPressure Convert atmospheric pressure from one altitude above mean sea level to another
ConvertUnits Convert from one set of speed / temperature / pressure rain rate units to another
DateJulianToLocal Convert Julian date to local-time Date
DateJulianToUTC Convert Julian date to UTC Date
DateLocalToJulian Convert local-time Date to Julian date
DateLocalToUTC Convert local-time Date to UTC Date
DateUTCToJulian Convert UTC Date to Julian date
DateUTCToLocal Convert UTC Date to local-time Date
DegreesToDM(Double) Convert degrees to sexagesimal degrees and minutes with default delimiters DD° MM'
DegreesToDM(Double, String) Convert degrees to sexagesimal degrees and minutes with the default minutes delimiter MM'
DegreesToDM(Double, String, String) Convert degrees to sexagesimal degrees and minutes
DegreesToDM(Double, String, String, Int32) Convert degrees to sexagesimal degrees and minutes with the specified number of minute decimal places
DegreesToDMS(Double) Convert degrees to sexagesimal degrees, minutes and seconds with default delimiters DD° MM' SS"
DegreesToDMS(Double, String) Convert degrees to sexagesimal degrees, minutes and seconds with with default minute and second delimiters MM' SS"
DegreesToDMS(Double, String, String) Convert degrees to sexagesimal degrees, minutes and seconds with default second delimiter SS"
DegreesToDMS(Double, String, String, String) Convert degrees to sexagesimal degrees, minutes and seconds
DegreesToDMS(Double, String, String, String, Int32) Convert degrees to sexagesimal degrees, minutes and seconds with specified second decimal places
DegreesToHM(Double) Convert degrees to sexagesimal hours and minutes with default delimiters HH:MM
DegreesToHM(Double, String) Convert degrees to sexagesimal hours and minutes with default minute delimiter MM (null string)
DegreesToHM(Double, String, String) Convert degrees to sexagesimal hours and minutes
DegreesToHM(Double, String, String, Int32) Convert degrees to sexagesimal hours and minutes with supplied number of minute decimal places
DegreesToHMS(Double) Convert degrees to sexagesimal hours, minutes, and seconds with default delimiters of HH:MM:SS
DegreesToHMS(Double, String) Convert degrees to sexagesimal hours, minutes, and seconds with the default second and minute delimiters of MM:SS
DegreesToHMS(Double, String, String) Convert degrees to sexagesimal hours, minutes, and seconds with the default second delimiter SS (null string)
DegreesToHMS(Double, String, String, String) Convert degrees to sexagesimal hours, minutes, and seconds
DegreesToHMS(Double, String, String, String, Int32) Convert degrees to sexagesimal hours, minutes, and seconds with the specified number of second decimal places
DewPoint2Humidity Calculate the relative humidity (%) given the ambient temperature (°Celsius) and dew point (°Celsius)
Dispose Disposes of resources used by the profile object
DMSToDegrees Convert sexagesimal degrees to binary double-precision degrees
HMSToDegrees Convert sexagesimal hours to binary double-precision hours
HMSToHours Convert sexagesimal hours to binary double-precision hours
HoursToHM(Double) Convert hours to sexagesimal hours and minutes with default delimiters HH:MM
HoursToHM(Double, String) Convert hours to sexagesimal hours and minutes with default minutes delimiter MM (null string)
HoursToHM(Double, String, String) Convert hours to sexagesimal hours and minutes
HoursToHM(Double, String, String, Int32) Convert hours to sexagesimal hours and minutes with supplied number of minute decimal places
HoursToHMS(Double) Convert hours to sexagesimal hours, minutes, and seconds with default delimiters HH:MM:SS
HoursToHMS(Double, String) Convert hours to sexagesimal hours, minutes, and seconds with default minutes and seconds delimiters MM:SS
HoursToHMS(Double, String, String) Convert hours to sexagesimal hours, minutes, and seconds with default second delimiter of null string
HoursToHMS(Double, String, String, String) Convert hours to sexagesimal hours, minutes, and seconds
HoursToHMS(Double, String, String, String, Int32) Convert hours to sexagesimal hours, minutes, and seconds with specified number of second decimal places
Humidity2DewPoint Calculate the dew point (°Celsius) given the ambient temperature (°Celsius) and relative humidity (%)
IsMinimumRequiredVersion Tests whether the current platform version is at least equal to the supplied major and minor version numbers, returns false if this is not the case
ToIntegerCollection Convert an integer safearray to an ArrayList collection that can be used in scripting languages
ToStringCollection Convert a string safearray to an ArrayList that can be used in scripting languages
WaitForMilliseconds Pauses for a given interval in milliseconds.

See Also