Esempio n. 1
0
        private void Start()
        {
            CoordConverter.SetRefLatLon(new LatLonCoord(32.055304, 34.7564563));
            _publishedEntity.State.EntityId.Entity = (ushort)UnityEngine.Random.Range(0, ushort.MaxValue);

            ExerciseConnection.Instance.Subscribe <DetonationPDU>(ReceivedDetonationPDU);
            CustomEventReportsManager.Instance.Subscribe <SampleEventReport>(ReceivedSampleEventReport);
        }
Esempio n. 2
0
        public void GeodToDatabase()
        {
            CoordConverter.SetRefLatLon(Real.DatabaseRefLatlon);
            var database = CoordConverter.GeodeticToDatabase(Real.Geod);

            Debug.Log(database.X + " -> " + Real.Database.X);
            Debug.Log(database.Y + " -> " + Real.Database.Y);
            Debug.Log(database.Z + " -> " + Real.Database.Z);

            Assert.AreEqual(Real.Database.X, database.X, 0.015);
            Assert.AreEqual(Real.Database.Y, database.Y, 0.015);
            Assert.AreEqual(Real.Database.Z, database.Z, 0.015);
        }
Esempio n. 3
0
        public void DatabaseToGeod()
        {
            CoordConverter.SetRefLatLon(Real.DatabaseRefLatlon);
            var geod = CoordConverter.DatabaseToGeodetic(Real.Database);

            Debug.Log(geod.Lat + " -> " + Real.Geod.Lat);
            Debug.Log(geod.Lon + " -> " + Real.Geod.Lon);
            Debug.Log(geod.Alt + " -> " + Real.Geod.Alt);

            Assert.AreEqual(Real.Geod.Lat, geod.Lat, 0.001);
            Assert.AreEqual(Real.Geod.Lon, geod.Lon, 0.001);
            Assert.AreEqual(Real.Geod.Alt, geod.Alt, 0.001);
        }
Esempio n. 4
0
        public void DatabaseToGeoc()
        {
            CoordConverter.SetRefLatLon(Real.DatabaseRefLatlon);
            var geoc = CoordConverter.DatabaseToGeocentric(Real.Database);

            Debug.Log(geoc.X + " -> " + Real.Geoc.X);
            Debug.Log(geoc.Y + " -> " + Real.Geoc.Y);
            Debug.Log(geoc.Z + " -> " + Real.Geoc.Z);

            Assert.AreEqual(Real.Geoc.X, geoc.X, 0.015);
            Assert.AreEqual(Real.Geoc.Y, geoc.Y, 0.015);
            Assert.AreEqual(Real.Geoc.Z, geoc.Z, 0.015);
        }