public static Cartesian3D <TLinear> ApparentPlaceToInstantaneous <TLinear>(IAstronomical apparentPlace, AngularUnit greenwichApparentSideralTime) where TLinear : LinearUnit, new() { ICartesian3D tempCoordinate = apparentPlace.ToCartesian <TLinear>(); Matrix rZ = CalculateRotationMatrixAroundZ(greenwichApparentSideralTime); return((Cartesian3D <TLinear>)tempCoordinate.Rotate(rZ)); }
public static Astronomical <T> HorizontalAngleToLocalAstronomic <T>(IAstronomical horizontalAngle, AngularUnit astronomicalLatitude) where T : AngularUnit, new() { ICartesian3D tempCoordinate = horizontalAngle.ToCartesian <Meter>(); Matrix rZ = CalculateRotationMatrixAroundZ(new Radian(Math.PI)); Matrix rY = CalculateRotationMatrixAroundY(astronomicalLatitude.Subtract(new Radian(Math.PI)).Negate()); return(tempCoordinate.Rotate(rZ * rY).ToAstronomicForm <T>(horizontalAngle.HorizontalAngleRange)); }
public static Astronomical <T> HorizontalAngleToApparentPlace <T>(IAstronomical horizontalAngle, AngularUnit localApparentSideralTime) where T : AngularUnit, new() { ICartesian3D tempCoordinate = horizontalAngle.ToCartesian <Meter>(); Matrix rZ = CalculateRotationMatrixAroundZ(localApparentSideralTime.Negate()); Matrix reflection = CalculateReflectionMatrix(); return(tempCoordinate.Rotate(rZ * reflection).ToAstronomicForm <T>(horizontalAngle.HorizontalAngleRange)); }
public static Astronomical <T> LocalAstronomicToHorizontalAngle <T>(IAstronomical localAstronomic, AngularUnit astronomicalLatitude) where T : AngularUnit, new() { ICartesian3D tempCoordinate = localAstronomic.ToCartesian <Meter>(); Matrix rZ = CalculateRotationMatrixAroundZ(new Radian(Math.PI)); Matrix rY = CalculateRotationMatrixAroundY(astronomicalLatitude.Subtract(new Radian(Math.PI))); return(tempCoordinate.Rotate(rY * rZ).ToAstronomicForm <T>(localAstronomic.HorizontalAngleRange)); }
public static Cartesian3D <TLinear> ApparentPlaceToOrbital <TLinear>(IAstronomical apparentPlace, AngularUnit rightAscensionOfAscendingNode, AngularUnit inclination, AngularUnit argumentOfPerigee) where TLinear : LinearUnit, new() { ICartesian3D tempCoordinate = apparentPlace.ToCartesian <TLinear>(); Matrix firstRZ = CalculateRotationMatrixAroundZ(rightAscensionOfAscendingNode); Matrix rX = CalculateRotationMatrixAroundX(inclination); Matrix secondRZ = CalculateRotationMatrixAroundZ(argumentOfPerigee); return((Cartesian3D <TLinear>)tempCoordinate.Rotate(secondRZ * rX * firstRZ)); }