示例#1
0
        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));
        }
示例#2
0
        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));
        }
示例#3
0
        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));
        }
示例#4
0
        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));
        }
示例#5
0
        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));
        }