コード例 #1
0
        public frmSeaScanUAVMain()
        {
            InitializeComponent();

            activeImageBox = imgCapture;
            tbMain.SelectedIndex = 0;

            mpMissionMap.MapProvider = GMapProviders.GoogleSatelliteMap;

            mpMissionMap.CacheLocation = Application.StartupPath;
            mpMissionMap.Zoom = Properties.Settings.Default.initZoom;
            udZoom.TextBoxText = Properties.Settings.Default.initZoom.ToString();

            mpMissionMap.ZoomAndCenterMarkers(null);
            mpMissionMap.RoutesEnabled = true;
            routes = new GMapOverlay(mpMissionMap, "routes");

            sampledPoints = new GMapOverlay(mpMissionMap, "samples");
            locationLimits = new GMapOverlay(mpMissionMap, "location boundaries");

            route = new GMapRoute(trackPoints,"route");

            route.Stroke = new Pen(Color.FromArgb(144, Color.Blue));
            route.Stroke.Width = 4;
            route.Tag = "track";

            routes.Routes.Add(route);
            mpMissionMap.Overlays.Add(routes);
            mpMissionMap.Overlays.Add(sampledPoints);
            mpMissionMap.Overlays.Add(locationLimits);

            WebServiceConsumer webService = WebServiceConsumer.GetInstance();

            List<Location> locations = webService.GetLocations("all", false, false);
            foreach(Location loc in locations)
            {
                cbLocations.Items.Add(loc);

            }

            if (cbLocations.Items.Count > 0)
            {
                cbLocations.SelectedIndex = 0;
            }

            List<User> users = webService.GetUsers();
            foreach (User user in users)
            {
                cbUsers.Items.Add(user);
            }

            if (cbUsers.Items.Count > 0)
            {
                cbUsers.SelectedIndex = 0;
            }

            List<Camera> cameras = webService.GetCameras();
            foreach (Camera cam in cameras)
            {
                cbCameras.Items.Add(cam);
            }

            if (cbCameras.Items.Count > 0)
            {
                cbCameras.SelectedIndex = 0;
            }

            List<Airframe> planes = webService.GetAirframes();
            foreach (Airframe plane in planes)
            {
                cbAircraft.Items.Add(plane);
            }

            if (cbAircraft.Items.Count > 0)
            {
                cbAircraft.SelectedIndex = 0;
            }

            targetTypes = webService.GetTargetTypes();
            foreach (TargetType tt in targetTypes)
            {
                if (tt.ID == 1) //nav marker target
                {
                    navTarget = tt;
                    break;
                }
            }

            histogramView = new HistogramView(redChannel, blueChannel, greenChannel);
        }
コード例 #2
0
        public MissionPoint AddMissionPoint(Coordinate3D coord, TargetType type, string annotation)
        {
            MissionPoint mp = null;
            if (mission != null)
            {

                index++;
                mp = new MissionPoint(mission.ID, index, coord.Lat, coord.Lon, coord.Alt, type, CurrentMissionTime, annotation);
                mission.AddMissionPoint(mp);

                if (index > 1)
                {
                    mission.DistanceFlown += CalcDistance(lastCoord, coord);
                }

                lastCoord = new Coordinate3D(coord.Lat, coord.Lon, coord.Alt);
            }

            return mp;
        }
コード例 #3
0
 private void cboTargetTypes_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         Target = cboTargetTypes.SelectedItem as TargetType;
     }
     catch (Exception ex)
     {
         Target = null;
     }
 }