Esempio n. 1
0
        public static double AngularSeparation(CartesianCrood Pos1, CartesianCrood Pos2)
        {
            double CosD12 = Math.Sin(Pos1.Theta) * Math.Sin(Pos2.Theta) + Math.Cos(Pos1.Theta) * Math.Cos(Pos2.Theta) * Math.Cos(Pos1.Phi - Pos2.Phi);
            if (CosD12 > 1.0) CosD12 = 1.0;
            else if (CosD12 < -1.0) CosD12 = -1.0;

            return Math.Acos(CosD12);
        }
Esempio n. 2
0
 public static VECTOR AstroCoordToVector(CartesianCrood AnglePair)
 {
     return(new VECTOR
     {
         X = Math.Cos(AnglePair.Phi) * Math.Cos(AnglePair.Theta),
         Y = Math.Sin(AnglePair.Phi) * Math.Cos(AnglePair.Theta),
         Z = Math.Sin(AnglePair.Theta)
     });
 }
Esempio n. 3
0
 public static VECTOR AstroCoordToVector(CartesianCrood AnglePair)
 {
     return new VECTOR
     {
         X = Math.Cos(AnglePair.Phi) * Math.Cos(AnglePair.Theta),
         Y = Math.Sin(AnglePair.Phi) * Math.Cos(AnglePair.Theta),
         Z = Math.Sin(AnglePair.Theta)
     };
 }
Esempio n. 4
0
        public static double AngularSeparation(CartesianCrood Pos1, CartesianCrood Pos2)
        {
            double CosD12 = Math.Sin(Pos1.Theta) * Math.Sin(Pos2.Theta) + Math.Cos(Pos1.Theta) * Math.Cos(Pos2.Theta) * Math.Cos(Pos1.Phi - Pos2.Phi);

            if (CosD12 > 1.0)
            {
                CosD12 = 1.0;
            }
            else if (CosD12 < -1.0)
            {
                CosD12 = -1.0;
            }

            return(Math.Acos(CosD12));
        }