예제 #1
0
        public void Given_alt100_pitch0_roll45_returns_coords_100m_to_E()
        {
            var result = new GimbalPoint().ProjectPoint(55.15, 24.13, 100, 0, 0, -45);

            Assert.AreEqual(55.15, result.Lat, 0.0001);
            Assert.AreEqual(24.13157204798, result.Lng, 0.0001);
        }
예제 #2
0
        public void Given_alt100_pitchN45_rollN45_returns_coords_to_SW()
        {
            var result = new GimbalPoint().ProjectPoint(55.15, 24.13, 100, 0, -45, 45);

            Assert.AreEqual(55.149101685, result.Lat, 0.0001);
            Assert.AreEqual(24.12842795202, result.Lng, 0.0001);
        }
예제 #3
0
        public void Given_alt100_pitch45_roll45_heading45_returns_coords_to_E()
        {
            var result = new GimbalPoint().ProjectPoint(55.15, 24.13, 100, 45, 45, -45);

            Assert.AreEqual(55.15, result.Lat, 0.0001);
            Assert.AreEqual(24.132223211, result.Lng, 0.0001);
        }
예제 #4
0
        public void Given_alt100_pitch45_roll45_returns_coords_to_NE()
        {
            var result = new GimbalPoint().ProjectPoint(55.15, 24.13, 100, 0, 45, -45);

            Assert.AreEqual(55.150898315284131, result.Lat, 0.0001);
            Assert.AreEqual(24.1315720479, result.Lng, 0.0001);
        }
예제 #5
0
        public void Given_alt100_pitch45_roll0_returns_coords_100m_in_front()
        {
            var result = new GimbalPoint().ProjectPoint(55.15, 24.13, 100, 0, 45, 0);

            Assert.AreEqual(55.150898315284131, result.Lat, 0.0001);
            Assert.AreEqual(24.13, result.Lng, 0.0001);
        }
예제 #6
0
        public void Given_alt0_heading0_pitch0_roll0_returns_same_coords()
        {
            var result = new GimbalPoint().ProjectPoint(55.15, 24.13, 0, 0, 0, 0);

            Assert.AreEqual(55.15, result.Lat, 0.0001);
            Assert.AreEqual(24.13, result.Lng, 0.0001);
        }
예제 #7
0
 private void but_gimbaltest_Click(object sender, EventArgs e)
 {
     if (MainV2.comPort.BaseStream.IsOpen)
         GimbalPoint.ProjectPoint();
     else
         CustomMessageBox.Show(Strings.PleaseConnect, Strings.ERROR);
 }
예제 #8
0
        public void Given_pitch_angle_90_or_more_returns_no_result(int angle)
        {
            var result = new GimbalPoint().ProjectPoint(55.15, 24.13, 100, 0, angle, 0);

            Assert.AreEqual(PointLatLngAlt.Zero, result);
        }