예제 #1
0
 public void GravitationalSomigliana()
 {
     Assert.AreEqual(EllipsoidAcceleration.GWithAOnEquator, EllipsoidAcceleration.GravitationalSomigliana(0));
     Assert.AreEqual(EllipsoidAcceleration.GWithAOnEquator, EllipsoidAcceleration.GravitationalSomigliana(Math.PI * 2));
     Assert.AreEqual(EllipsoidAcceleration.GOnPoles, EllipsoidAcceleration.GravitationalSomigliana(Math.PI / 2), .00000000000001);
     Assert.AreEqual(EllipsoidAcceleration.GOnPoles, EllipsoidAcceleration.GravitationalSomigliana(-Math.PI / 2), .00000000000001);
     Assert.AreEqual(EllipsoidAcceleration.GOnPoles, EllipsoidAcceleration.GravitationalSomigliana(3 * Math.PI / 2), .00000000000001);
 }
예제 #2
0
        internal override void PreInit(HealpixManager man)
        {
            base.PreInit(man);
            LambdaSin         = Math.Sin(Lambda.Value);
            LambdaMinusPi2Sin = Math.Sin(Lambda.Value - Math.PI / 2);
            LambdaCos         = Math.Cos(Lambda.Value);
            BetaSin           = Math.Sin(Beta.Value);
            BetaCos           = Math.Cos(Beta.Value);

            /*
             * var thetaTan = Ellipsoid.CalcThetaTan(Beta.Value);
             * var varphi = Ellipsoid.CalcVarPhi(thetaTan);
             * Theta = Math.PI / 2 - varphi; // faster than Atan(thetaTan) and Atan(thetaTan)<0 when thetaTan>Pi/2
             */

            // new
            Theta = Beta.Value;
            var thetaTan = Math.Tan(Theta);
            var varphi   = Math.PI / 2 - Theta;

            // end of new

            InitROfEllipse(man, Ellipsoid.Radius(varphi));
            Vartheta = Ellipsoid.CalcVarTheta(thetaTan);

            // vertical to ellipsoid surface
            var g = EllipsoidAcceleration.GravitationalSomigliana(varphi);
            //return g * 100;
            double a, aTraverse, aVertical;
            var    aMeridian = EllipsoidAcceleration.Centrifugal(this, out a, out aTraverse, out aVertical);
            // vertical to ellipsoid surface
            var aVert = Math.Abs(a * Math.Sin(Vartheta));

            // horizontal to ellipsoid surface
            //var aHoriz = a * Math.Cos(Vartheta);

            // vertical to sphere
            gVpure = (g + aVert) * Math.Cos(GoodDeflectionAngle); //Triangles.CalcGPureToCenter
            //return gVpure*10000;
            // horizontal to sphere
            // max: .03299
            // horizontal to sphere
            var gHor = (g + aVert) * Math.Sin(GoodDeflectionAngle);
            //gToCenterByThetaCos = gVpure / Math.Abs(Math.Cos(Theta));
            //return basin.GoodDeflectionAngle * 1000;
            // vertical to sphere
            var aV = a * Math.Sin(Theta);

            //return aV * 100;*/
            //return aH * 100;
            gHpure = gHor - aMeridian;

            Delta_g_meridian = GoodDeflectionAngle;
        }