Ejemplo n.º 1
0
        public void RotateECEFRightAt0Test()
        {
            Vector3 p1 = new Vector3(0, 0, 0);
            Vector3 p2 = new Vector3(0, 1, 0);
            Vector3 e1 = EarthConverter.LatLongAltToECEF(p1);
            Vector3 e2 = EarthConverter.LatLongAltToECEF(p2);
            Vector3 de = e2 - e1;
            Vector3 dr = EarthConverter.RotateECEF(de, 0, 0);

            VectorAssertions.AreEqual(new Vector3(0, 0, 110000), dr, 1400);
        }
Ejemplo n.º 2
0
        public void RotateECEFUpAtNZTest()
        {
            Vector3 p1 = new Vector3(-37, 174, 0);
            Vector3 p2 = new Vector3(-36, 173, 100);
            Vector3 e1 = EarthConverter.LatLongAltToECEF(p1);
            Vector3 e2 = EarthConverter.LatLongAltToECEF(p2);
            Vector3 de = e2 - e1;
            Vector3 dr = EarthConverter.RotateECEF(de, p1.X, p1.Y);

            VectorAssertions.AreEqual(new Vector3(110490, -1496, -90160), dr, 100);
        }