Beispiel #1
0
        /// <summary>
        /// When clicking on show on list in map page, map page calls this function to open the tables page and search for that message
        /// </summary>
        public void OpenFlightInList(CATALL message)
        {
            string Cat = message.CAT;

            if (Cat == "10")
            {
                activeSeecat10button();
                viewCat10 = new View();
                viewCat10.GetSearching(0, message);
                viewCat10.GetAll(listaCAT10, null, null, listaCATALL, TableCat10, null, null, null, TableCat10.Copy());
                viewCat10.GetForm(this);
                PanelChildForm.Navigate(viewCat10);
            }
            if (Cat == "21 v. 2.1")
            {
                activeSeeCat21button();
                viewCat21 = new View();
                viewCat21.GetSearching(1, message);
                viewCat21.GetAll(null, listaCAT21v21, null, listaCATALL, null, null, TableCat21v21, null, TableCat21v21.Copy());
                viewCat21.GetForm(this);
                PanelChildForm.Navigate(viewCat21);
            }
            if (Cat == "21 v. 0.23" || Cat == "21 v. 0.26")
            {
                activeSeecat23button();
                viewCat23 = new View();
                viewCat23.GetSearching(2, message);
                viewCat23.GetAll(null, null, listaCAT21v23, listaCATALL, null, TableCat21v23, null, null, TableCat21v23.Copy());
                viewCat23.GetForm(this);
                PanelChildForm.Navigate(viewCat23);
            }
        }
Beispiel #2
0
 /// <summary>
 /// When clicking on show on map on tables pages, tables pages calls this function to open the map and search for that message
 /// </summary>
 public void OpenFlightInMap(CATALL flight)
 {
     if (listaCATALL.Exists(x => x.num == Convert.ToInt32(flight.num)))
     {
     }
     else
     {
         listaCATALL.Add(flight);
     }
     ActiveMapButton();
     mapform = new MapView();
     mapform.GetForm(this);
     mapform.GetList(listaCATALL, Archivo.AirportCodesList);
     mapform.SearchFlightInMap(flight);
     mapstarted = true;
     PanelChildForm.Navigate(mapform);
 }
Beispiel #3
0
        /// <summary>
        /// Creates trajectories for all vehicles. Each trajectory is a list contaning all the messages from a vehicle
        ///
        /// Trajectories are not returned. The changes in trajectories are applied in the trajectories list of this class. Every time function is called trajectories are reseted
        /// </summary>
        private void CreateTrajectoriesLists()
        {
            SMRTrajectories  = new List <Trajectories>();
            MLATTrajectories = new List <Trajectories>();
            ADSBTrajectories = new List <Trajectories>();
            int i = 0;

            try
            {
                while (List[i].Time_Of_day <= time)
                {
                    CATALL message = List[i];
                    if (message.Latitude_in_WGS_84 != -200 && message.Longitude_in_WGS_84 != -200)
                    {
                        if (message.DetectionMode == "SMR" && CheckBoxSMR.IsChecked == true)
                        {
                            if (message.Target_Identification != null)
                            {
                                if (SMRTrajectories.Exists(x => x.Target_Identification == message.Target_Identification))
                                {
                                    SMRTrajectories.Find(x => x.Target_Identification == message.Target_Identification).AddPoint(message.Latitude_in_WGS_84, message.Longitude_in_WGS_84, message.Time_Of_day);
                                }
                                else
                                {
                                    Trajectories traj = new Trajectories(message.Target_Identification, message.Time_Of_day, message.Latitude_in_WGS_84, message.Longitude_in_WGS_84, message.type, message.Target_Address, message.DetectionMode, message.CAT, message.SAC, message.SIC, message.Track_number);
                                    SMRTrajectories.Add(traj);
                                }
                            }
                            else if (message.Target_Address != null)
                            {
                                if (SMRTrajectories.Exists(x => x.Target_Address == message.Target_Address))
                                {
                                    SMRTrajectories.Find(x => x.Target_Address == message.Target_Address).AddPoint(message.Latitude_in_WGS_84, message.Longitude_in_WGS_84, message.Time_Of_day);
                                }
                                else
                                {
                                    Trajectories traj = new Trajectories(message.Target_Identification, message.Time_Of_day, message.Latitude_in_WGS_84, message.Longitude_in_WGS_84, message.type, message.Target_Address, message.DetectionMode, message.CAT, message.SAC, message.SIC, message.Track_number);
                                    SMRTrajectories.Add(traj);
                                }
                            }
                            else if (message.Track_number != null)
                            {
                                if (SMRTrajectories.Exists(x => x.Track_number == message.Track_number))
                                {
                                    SMRTrajectories.Find(x => x.Track_number == message.Track_number).AddPoint(message.Latitude_in_WGS_84, message.Longitude_in_WGS_84, message.Time_Of_day);
                                }
                                else
                                {
                                    Trajectories traj = new Trajectories(message.Target_Identification, message.Time_Of_day, message.Latitude_in_WGS_84, message.Longitude_in_WGS_84, message.type, message.Target_Address, message.DetectionMode, message.CAT, message.SAC, message.SIC, message.Track_number);
                                    SMRTrajectories.Add(traj);
                                }
                            }
                        }
                        else if (message.DetectionMode == "MLAT" && CheckBoxMLAT.IsChecked == true)
                        {
                            if (message.Target_Identification != null)
                            {
                                if (MLATTrajectories.Exists(x => x.Target_Identification == message.Target_Identification))
                                {
                                    MLATTrajectories.Find(x => x.Target_Identification == message.Target_Identification).AddPoint(message.Latitude_in_WGS_84, message.Longitude_in_WGS_84, message.Time_Of_day);
                                }
                                else
                                {
                                    Trajectories traj = new Trajectories(message.Target_Identification, message.Time_Of_day, message.Latitude_in_WGS_84, message.Longitude_in_WGS_84, message.type, message.Target_Address, message.DetectionMode, message.CAT, message.SAC, message.SIC, message.Track_number);
                                    MLATTrajectories.Add(traj);
                                }
                            }
                            else if (message.Target_Address != null)
                            {
                                if (MLATTrajectories.Exists(x => x.Target_Address == message.Target_Address))
                                {
                                    MLATTrajectories.Find(x => x.Target_Address == message.Target_Address).AddPoint(message.Latitude_in_WGS_84, message.Longitude_in_WGS_84, message.Time_Of_day);
                                }
                                else
                                {
                                    Trajectories traj = new Trajectories(message.Target_Identification, message.Time_Of_day, message.Latitude_in_WGS_84, message.Longitude_in_WGS_84, message.type, message.Target_Address, message.DetectionMode, message.CAT, message.SAC, message.SIC, message.Track_number);
                                    MLATTrajectories.Add(traj);
                                }
                            }
                            else if (message.Track_number != null)
                            {
                                if (MLATTrajectories.Exists(x => x.Track_number == message.Track_number))
                                {
                                    MLATTrajectories.Find(x => x.Track_number == message.Track_number).AddPoint(message.Latitude_in_WGS_84, message.Longitude_in_WGS_84, message.Time_Of_day);
                                }
                                else
                                {
                                    Trajectories traj = new Trajectories(message.Target_Identification, message.Time_Of_day, message.Latitude_in_WGS_84, message.Longitude_in_WGS_84, message.type, message.Target_Address, message.DetectionMode, message.CAT, message.SAC, message.SIC, message.Track_number);
                                    MLATTrajectories.Add(traj);
                                }
                            }
                        }
                        else if (message.DetectionMode == "ADSB" && CheckBoxADSB.IsChecked == true)
                        {
                            if (message.Target_Identification != null)
                            {
                                if (ADSBTrajectories.Exists(x => x.Target_Identification == message.Target_Identification))
                                {
                                    ADSBTrajectories.Find(x => x.Target_Identification == message.Target_Identification).AddPoint(message.Latitude_in_WGS_84, message.Longitude_in_WGS_84, message.Time_Of_day);
                                }
                                else
                                {
                                    Trajectories traj = new Trajectories(message.Target_Identification, message.Time_Of_day, message.Latitude_in_WGS_84, message.Longitude_in_WGS_84, message.type, message.Target_Address, message.DetectionMode, message.CAT, message.SAC, message.SIC, message.Track_number);
                                    ADSBTrajectories.Add(traj);
                                }
                            }
                            else if (message.Target_Address != null)
                            {
                                if (ADSBTrajectories.Exists(x => x.Target_Address == message.Target_Address))
                                {
                                    ADSBTrajectories.Find(x => x.Target_Address == message.Target_Address).AddPoint(message.Latitude_in_WGS_84, message.Longitude_in_WGS_84, message.Time_Of_day);
                                }
                                else
                                {
                                    Trajectories traj = new Trajectories(message.Target_Identification, message.Time_Of_day, message.Latitude_in_WGS_84, message.Longitude_in_WGS_84, message.type, message.Target_Address, message.DetectionMode, message.CAT, message.SAC, message.SIC, message.Track_number);
                                    ADSBTrajectories.Add(traj);
                                }
                            }
                            else if (message.Track_number != null)
                            {
                                if (ADSBTrajectories.Exists(x => x.Track_number == message.Track_number))
                                {
                                    ADSBTrajectories.Find(x => x.Track_number == message.Track_number).AddPoint(message.Latitude_in_WGS_84, message.Longitude_in_WGS_84, message.Time_Of_day);
                                }
                                else
                                {
                                    Trajectories traj = new Trajectories(message.Target_Identification, message.Time_Of_day, message.Latitude_in_WGS_84, message.Longitude_in_WGS_84, message.type, message.Target_Address, message.DetectionMode, message.CAT, message.SAC, message.SIC, message.Track_number);
                                    ADSBTrajectories.Add(traj);
                                }
                            }
                        }
                    }
                    i++;
                }
            }
            catch { showHourAlert(true); }
        }