public static Astronomical <TAngular> InstantaneousToApparentPlace <TAngular>(ICartesian3D InstantaneousTerrestrial, AngularUnit greenwichApparentSideralTime, AngleRange horizontalAngleRange) where TAngular : AngularUnit, new() { Matrix rZ = CalculateRotationMatrixAroundZ(greenwichApparentSideralTime.Negate()); return(InstantaneousTerrestrial.Rotate(rZ).ToAstronomicForm <TAngular>(horizontalAngleRange)); }
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> 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 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 Cartesian3D <T> LocalGeodeticToLocalAstronomic <T>(ICartesian3D localGeodetic, AngularUnit deltaAzimuth, AngularUnit kessi, AngularUnit eta) where T : LinearUnit, new() { Matrix rZ = CalculateRotationMatrixAroundZ(deltaAzimuth.Negate()); Matrix rY = CalculateRotationMatrixAroundY(kessi); Matrix rX = CalculateRotationMatrixAroundX(eta.Negate()); return(localGeodetic.Rotate(rX * rY * rZ).ChangeTo <T>()); }
public static Cartesian3D <T> InstantaneousToAverage <T>( ICartesian3D instantaneousTerrestrial, AngularUnit poleX, AngularUnit poleY) where T : LinearUnit, new() { //check if instantaneous was not Right Handed! Matrix Rx = CalculateRotationMatrixAroundX(poleY.Negate()); Matrix Ry = CalculateRotationMatrixAroundY(poleX.Negate()); return(instantaneousTerrestrial.Rotate(Ry * Rx).ChangeTo <T>()); }
public static Cartesian3D <T> AverageToInstantaneous <T>( ICartesian3D averageTerrestrial, AngularUnit poleX, AngularUnit poleY) where T : LinearUnit, new() { //check if average was not Right Handed! Matrix Rx = CalculateRotationMatrixAroundX(poleY); Matrix Ry = CalculateRotationMatrixAroundY(poleX); return(averageTerrestrial.Rotate(Rx * Ry).ChangeTo <T>()); }
public static Astronomical <TAngular> OrbitalToApparentPlace <TAngular>(ICartesian3D orbital, AngularUnit rightAscensionOfAscendingNode, AngularUnit inclination, AngularUnit argumentOfPerigee, AngleRange horizontalAngleRange) where TAngular : AngularUnit, new() { Matrix firstRZ = CalculateRotationMatrixAroundZ(rightAscensionOfAscendingNode.Negate()); Matrix rX = CalculateRotationMatrixAroundX(inclination.Negate()); Matrix secondRZ = CalculateRotationMatrixAroundZ(argumentOfPerigee.Negate()); return(orbital.Rotate(firstRZ * rX * secondRZ).ToAstronomicForm <TAngular>(horizontalAngleRange)); }
public static Cartesian3D <T> LocalAstronomicToLocalGeodetic <T>(ICartesian3D localAstronomic, AngularUnit initialAstronomicAzimuth, AngularUnit initialGeodeticAzimuth, AngularUnit kessi, AngularUnit eta) where T : LinearUnit, new() { Matrix rZ = CalculateRotationMatrixAroundZ(initialAstronomicAzimuth.Subtract(initialGeodeticAzimuth)); Matrix rY = CalculateRotationMatrixAroundY(kessi.Negate()); Matrix rX = CalculateRotationMatrixAroundX(eta); return(localAstronomic.Rotate(rZ * rY * rX).ChangeTo <T>()); }
public static Geodetic <TLinear, TAngular> AverageToGeodetic <TLinear, TAngular>( ICartesian3D averageTerrestrial, IEllipsoid ellipsoid, AngleRange longitudinalRange) where TLinear : LinearUnit, new() where TAngular : AngularUnit, new() { //check if cartesian is not Right Handed, do the appropreate task! ICartesian3D shiftedCoordinate = averageTerrestrial.Shift(ellipsoid.DatumTranslation); Matrix rotationMatrix = Transformation.CalculateEulerElementMatrix(ellipsoid.DatumMisalignment).Transpose(); return(shiftedCoordinate.Rotate(rotationMatrix).ToGeodeticForm <TLinear, TAngular>(ellipsoid, longitudinalRange)); }
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)); }