Ejemplo n.º 1
0
        private void but_td_Click(object sender, EventArgs e)
        {
            if (MainV2.instance.FlightPlanner.drawnpolygon.Points.Count == 0)
            {
                CustomMessageBox.Show("Please draw a polygon for the fence in flightplanner");
                return;
            }

            Swarm.TD.Controller ctl = new Swarm.TD.Controller();

            var fencepolygon = new List <PointLatLng>(MainV2.instance.FlightPlanner.drawnpolygon.Points);

            fencepolygon.ForEach(a => { ctl.DG.Fence.Add((PointLatLngAlt)a); });

            double minalt = 2;
            double maxalt = 30;

            InputBox.Show("", "Fence Min Alt", ref minalt);
            InputBox.Show("", "Fence Max Alt", ref maxalt);

            ctl.DG.FenceMinAlt = minalt;
            ctl.DG.FenceMaxAlt = maxalt;

            ctl.Start();
        }
Ejemplo n.º 2
0
        private void but_td_Click(object sender, EventArgs e)
        {
            Swarm.TD.Controller ctl = new Swarm.TD.Controller();

            ctl.DG.Fence.Add(new PointLatLngAlt(-35.3616248404386, 149.16618347168));
            ctl.DG.Fence.Add(new PointLatLngAlt(-35.3635234668124, 149.166499972343));
            ctl.DG.Fence.Add(new PointLatLngAlt(-35.3638121941007, 149.164354205132));
            ctl.DG.Fence.Add(new PointLatLngAlt(-35.3617473338101, 149.1641664505));
            ctl.DG.Fence.Add(new PointLatLngAlt(-35.3616248404386, 149.16618347168));

            ctl.Start();
        }
Ejemplo n.º 3
0
        private void but_td_Click(object sender, EventArgs e)
        {
            Swarm.TD.Controller ctl = new Swarm.TD.Controller();

            var fencepolygon = new List <PointLatLng>(MainV2.instance.FlightPlanner.drawnpolygon.Points);

            ctl.DG.Fence.AddRange(fencepolygon.Cast <PointLatLngAlt>());

            double minalt = 2;
            double maxalt = 30;

            InputBox.Show("", "Fence Min Alt", ref minalt);
            InputBox.Show("", "Fence Max Alt", ref maxalt);

            ctl.DG.FenceMinAlt = minalt;
            ctl.DG.FenceMaxAlt = maxalt;

            ctl.Start();
        }