SofaTf2a Method

Convert hours, minutes, seconds to radians.

Definition

Namespace: ASCOM.Tools
Assembly: ASCOM.AstrometryTools (in ASCOM.AstrometryTools.dll) Version: 3.0.0-rc.1+86c25ce733aebb4d8b1b8a62e84770ea5e972bea
C#
public static short Tf2a(
	char s,
	short ihour,
	short imin,
	double sec,
	ref double rad
)

Parameters

s  Char
sign: '-' = negative, otherwise positive
ihour  Int16
Hours
imin  Int16
Minutes
sec  Double
Seconds
rad  Double
Angle in radians

Return Value

Int16
Status: 0 = OK, 1 = ihour outside range 0-23, 2 = imin outside range 0-59, 3 = sec outside range 0-59.999...

Remarks

Notes:
  1. The result is computed even if any of the range checks fail.
  2. Negative ihour, imin and/or sec produce a warning status, but the absolute value is used in the conversion.
  3. If there are multiple errors, the status value reflects only the first, the smallest taking precedence.

Version Information

.NET Standard

Supported in: 2.0

See Also