Exemplo n.º 1
0
        /// <returns>aTraverse</returns>
        public virtual double RecalculateDelta_g(bool revert = true)
        {
            //return basin.gHpure * 1000;
            double a;
            double aTraverse;
            double aVertical;
            var    aMeridian = EllipsoidAcceleration.Centrifugal(this, out a, out aTraverse, out aVertical);

            // range: 0..0.0034
            var newDeflectionAngleTan = (gHpure + aMeridian) / (gVpure /*+ aVertical*/);

            //todo try to rid of newDeflectionAngle and calculate without Atan, Tan
            var newDeflectionAngle = Math.Atan(newDeflectionAngleTan);

            // range -0.1..0m
            //return (basin.GoodDeflectionAngle - newDeflectionAngle) * basin.r;
            // range: 0..0.0034
            //return Triangles.TansSum(-basin.ThetaTan, newDeflectionAngle)*1000;

            Delta_g_meridian = (revert && Vartheta < 0)
                ? Math.PI - newDeflectionAngle
                : newDeflectionAngle;

            // range -0.1..0.1m
            //return (basin.Delta_gq - newDelta_g) * basin.r;

            return(aTraverse);
        }
Exemplo n.º 2
0
        public void Centrifugal()
        {
            Assert.AreEqual(90, new UnitVector3D(1, 0, 0).AngleTo(new UnitVector3D(0, 1, 0)).Degrees);
            Assert.AreEqual(0, new UnitVector3D(1, 0, 0).DotProduct(new UnitVector3D(0, 1, 0)));
            Assert.AreEqual(1, new UnitVector3D(1, 0, 0).DotProduct(new UnitVector3D(1, 0, 0)));

            double a, aTraverse, aVertical;

            Assert.AreEqual(0, EllipsoidAcceleration.Centrifugal(basin0), .01);
            Assert.AreEqual(.024, EllipsoidAcceleration.Centrifugal(basin31), .01);
            Assert.AreEqual(0, EllipsoidAcceleration.Centrifugal(basin95, out a, out aTraverse, out aVertical), .000001);
            Assert.AreEqual(.0339, a, .0001);
            Assert.AreEqual(0, aTraverse);
            Assert.AreEqual(.0339, aVertical, .0001);

            EllipsoidAcceleration.AxisOfRotation = new UnitVector3D(1, 0, 0);
            Assert.AreEqual(-.003, EllipsoidAcceleration.Centrifugal(basin0, out a, out aTraverse, out aVertical), .001);
            Assert.AreEqual(.034, a, .01);
            Assert.AreEqual(-.003, aTraverse, .001);
            Assert.AreEqual(.0331, aVertical, .0001);
            Assert.AreEqual(-.017, EllipsoidAcceleration.Centrifugal(basin31, out a, out aTraverse, out aVertical), .001);
            Assert.AreEqual(.024, a, .01);
            Assert.AreEqual(.005, aTraverse, .001);
            Assert.AreEqual(.0157, aVertical, .0001);
            Assert.AreEqual(0, EllipsoidAcceleration.Centrifugal(basin95), .01);
        }
Exemplo n.º 3
0
        public override double?GetAltitude(MeridianCoor basin)
        {
            var aH = EllipsoidAcceleration.Centrifugal(basin);

            //var aV = a * Math.Sin(basin.Theta);

            return(aH * 1000);
        }
Exemplo n.º 4
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;
        }
Exemplo n.º 5
0
        public void Centrifugal_Y()
        {
            double a, aTraverse, aVertical;

            EllipsoidAcceleration.AxisOfRotation = new UnitVector3D(0, 1, 0);
            Assert.AreEqual(-.003, EllipsoidAcceleration.Centrifugal(basin0, out a, out aTraverse, out aVertical), .001);
            Assert.AreEqual(.034, a, .01);
            Assert.AreEqual(.003, aTraverse, .001);
            Assert.AreEqual(.0331, aVertical, .0001);
            Assert.AreEqual(-.002, EllipsoidAcceleration.Centrifugal(basin7, out a, out aTraverse, out aVertical), .001);
            Assert.AreEqual(.024, a, .01);
            Assert.AreEqual(-.005, aTraverse, .001);
            Assert.AreEqual(.0331, aVertical, .0001);
        }
Exemplo n.º 6
0
        public void Centrifugal_aMeridian_BugOfCone()
        {
            double a, aTraverse, aVertical;

            EllipsoidAcceleration.AxisOfRotation = new UnitVector3D(1, 0, 0);
            Assert.AreEqual(-.003, EllipsoidAcceleration.Centrifugal(basin77, out a, out aTraverse, out aVertical), .001);
            Assert.AreEqual(.017, a, .01);
            Assert.AreEqual(.017, aTraverse, .001);
            Assert.AreEqual(.0174, aVertical, .0001);

            EllipsoidAcceleration.AxisOfRotation = new UnitVector3D(0, 1, 0);
            Assert.AreEqual(-.003, EllipsoidAcceleration.Centrifugal(basin77, out a, out aTraverse, out aVertical), .001);
            Assert.AreEqual(.017, a, .01);
            Assert.AreEqual(-.017, aTraverse, .001);
            Assert.AreEqual(.0174, aVertical, .0001);
            Assert.AreEqual(-.001, EllipsoidAcceleration.Centrifugal(basin31, out a, out aTraverse, out aVertical), .001);
            Assert.AreEqual(.024, a, .01);
            Assert.AreEqual(-.005, aTraverse, .001);
            Assert.AreEqual(.0331, aVertical, .0001);
        }