/// <summary> /// Obtains a vector in polar notation from the equatorial coordinates and the observation time. /// </summary> /// <param name="coord"></param> /// <param name="time"></param> /// <returns></returns> private Vector GetEVC(EquatorialCoordinate coord, double localSiderealTime) { double deltaTime = AstroConvert.HrsToRad((localSiderealTime - _timeZero)); Vector evc = new Vector(0.0, 0.0, 0.0); evc[0] = Math.Cos(coord.Declination.Radians) * Math.Cos(coord.RightAscension.Radians - (_k * deltaTime)); evc[1] = Math.Cos(coord.Declination.Radians) * Math.Sin(coord.RightAscension.Radians - (_k * deltaTime)); evc[2] = Math.Sin(coord.Declination.Radians); return(evc); }
public EquatorialCoordinate GetEquatorialCoords(AxisPosition axes, double localSiderealTime) { Vector EVC = new Vector(0.0, 0.0, 0.0); Vector HVC = GetHVC(axes); double deltaTime = AstroConvert.HrsToRad((localSiderealTime - _timeZero)); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { EVC[i] += _iT[i, j] * HVC[j]; } } return(new EquatorialCoordinate(Math.Atan2(EVC[1], EVC[0]) + (_k * deltaTime), Math.Asin(EVC[2]))); }