Пример #1
0
        public void Test_Conversion_Of_Degrees_to_Radians(double a, double b)
        {
            ICoodrinateSupport C = new CoordinateSupport();
            var d = Math.Round(C.DegreeesToRadians(b), 10);

            Assert.AreEqual(a, d);
        }
Пример #2
0
        public void Test_Conversion_Of_Radians_To_Degrees(double a, double b)
        {
            ICoodrinateSupport C = new CoordinateSupport();
            var d = Math.Round(C.RadiansToDegrees(a), 1);

            Assert.AreEqual(b, d);
        }
Пример #3
0
        public void To_OSGB36(double a, double b, double c, double e, double f, double g)
        {
            ICoodrinateSupport q = new CoordinateSupport();
            ToOSGB36           k = new ToOSGB36(Shifts_, q);

            var             Outcome  = k.Calculate(a, b, c);
            EastingNorthing Expected = new EastingNorthing(e, f, g);

            Assert.AreEqual(Expected, Outcome);
        }
Пример #4
0
        public void Test_ToLatLon(double a, double b, double c, double e, double f, double g)
        {
            ICoodrinateSupport q = new CoordinateSupport();
            ToLatLon           k = new ToLatLon(Shifts_, q);

            LatLon Outcome  = (LatLon)k.Calculate(f, e, g);
            LatLon Expected = new LatLon(a, b, c);

            Assert.AreEqual(Expected.Latitude, Outcome.Latitude, 0.0001);
            Assert.AreEqual(Expected.Longtitude, Outcome.Longtitude, 0.0001);
            Assert.AreEqual(Expected.Height, Outcome.Height, 0.01);
        }