public static void DecodeCAT48I070(byte[] Data)
        {
            // A new instance of the CAT48I070 data
            CAT48I070Types.CAT48I070Mode3UserData MyCAT48I070 = new CAT48I070Types.CAT48I070Mode3UserData();

            // Get an instance of bit ops
            Bit_Ops BO = new Bit_Ops();
            BO.DWord[Bit_Ops.Bits0_7_Of_DWord] = Data[CAT48.CurrentDataBufferOctalIndex + 2];
            BO.DWord[Bit_Ops.Bits8_15_Of_DWord] = Data[CAT48.CurrentDataBufferOctalIndex + 1];

            //////////////////////////////////////////////////////////////////////////////////
            // Decode Code validation
            if (BO.DWord[Bit_Ops.Bit15] == true)
                MyCAT48I070.Code_Validated = CAT48I070Types.Code_Validation_Type.Code_Not_Validated;
            else
                MyCAT48I070.Code_Validated = CAT48I070Types.Code_Validation_Type.Code_Validated;

            //////////////////////////////////////////////////////////////////////////////////
            // Decode Code Garbling
            if (BO.DWord[Bit_Ops.Bit14] == true)
                MyCAT48I070.Code_Garbled = CAT48I070Types.Code_Garbled_Type.Code_Garbled;
            else
                MyCAT48I070.Code_Garbled = CAT48I070Types.Code_Garbled_Type.Code_Not_Garbled;

            //////////////////////////////////////////////////////////////////////////////////
            // Decode Code Smothed or from Transponder
            if (BO.DWord[Bit_Ops.Bit13] == true)
                MyCAT48I070.Code_Smothed_Or_From_Transponder = CAT48I070Types.Code_Smothed_Or_From_Transporder_Type.Code_Not_Extracted;
            else
                MyCAT48I070.Code_Smothed_Or_From_Transponder = CAT48I070Types.Code_Smothed_Or_From_Transporder_Type.Code_From_Transpodner;

            //////////////////////////////////////////////////////////////////////////////////
            // Decode Code value
            int A = DetermineOctalFromTheeBoolean(BO.DWord[Bit_Ops.Bit9], BO.DWord[Bit_Ops.Bit10], BO.DWord[Bit_Ops.Bit11]);
            int B = DetermineOctalFromTheeBoolean(BO.DWord[Bit_Ops.Bit6], BO.DWord[Bit_Ops.Bit7], BO.DWord[Bit_Ops.Bit8]);
            int C = DetermineOctalFromTheeBoolean(BO.DWord[Bit_Ops.Bit3], BO.DWord[Bit_Ops.Bit4], BO.DWord[Bit_Ops.Bit5]);
            int D = DetermineOctalFromTheeBoolean(BO.DWord[Bit_Ops.Bit0], BO.DWord[Bit_Ops.Bit1], BO.DWord[Bit_Ops.Bit2]);

            MyCAT48I070.Mode3A_Code = A.ToString() + B.ToString() + C.ToString() + D.ToString();

            //////////////////////////////////////////////////////////////////////////////////
            // Now assign it to the generic list
            CAT48.I048DataItems[CAT48.ItemIDToIndex("070")].value = MyCAT48I070;
            //////////////////////////////////////////////////////////////////////////////////

            // Leave it at the current index for the next decode
            CAT48.CurrentDataBufferOctalIndex = CAT48.CurrentDataBufferOctalIndex + 2;
        }
Esempio n. 2
0
        public static void DecodeCAT48I070(byte[] Data)
        {
            // A new instance of the CAT48I070 data
            CAT48I070Types.CAT48I070Mode3UserData MyCAT48I070 = new CAT48I070Types.CAT48I070Mode3UserData();

            // Get an instance of bit ops
            Bit_Ops BO = new Bit_Ops();

            BO.DWord[Bit_Ops.Bits0_7_Of_DWord]  = Data[CAT48.CurrentDataBufferOctalIndex + 2];
            BO.DWord[Bit_Ops.Bits8_15_Of_DWord] = Data[CAT48.CurrentDataBufferOctalIndex + 1];

            //////////////////////////////////////////////////////////////////////////////////
            // Decode Code validation
            if (BO.DWord[Bit_Ops.Bit15] == true)
            {
                MyCAT48I070.Code_Validated = CAT48I070Types.Code_Validation_Type.Code_Not_Validated;
            }
            else
            {
                MyCAT48I070.Code_Validated = CAT48I070Types.Code_Validation_Type.Code_Validated;
            }

            //////////////////////////////////////////////////////////////////////////////////
            // Decode Code Garbling
            if (BO.DWord[Bit_Ops.Bit14] == true)
            {
                MyCAT48I070.Code_Garbled = CAT48I070Types.Code_Garbled_Type.Code_Garbled;
            }
            else
            {
                MyCAT48I070.Code_Garbled = CAT48I070Types.Code_Garbled_Type.Code_Not_Garbled;
            }

            //////////////////////////////////////////////////////////////////////////////////
            // Decode Code Smothed or from Transponder
            if (BO.DWord[Bit_Ops.Bit13] == true)
            {
                MyCAT48I070.Code_Smothed_Or_From_Transponder = CAT48I070Types.Code_Smothed_Or_From_Transporder_Type.Code_Not_Extracted;
            }
            else
            {
                MyCAT48I070.Code_Smothed_Or_From_Transponder = CAT48I070Types.Code_Smothed_Or_From_Transporder_Type.Code_From_Transpodner;
            }

            //////////////////////////////////////////////////////////////////////////////////
            // Decode Code value
            int A = DetermineOctalFromTheeBoolean(BO.DWord[Bit_Ops.Bit9], BO.DWord[Bit_Ops.Bit10], BO.DWord[Bit_Ops.Bit11]);
            int B = DetermineOctalFromTheeBoolean(BO.DWord[Bit_Ops.Bit6], BO.DWord[Bit_Ops.Bit7], BO.DWord[Bit_Ops.Bit8]);
            int C = DetermineOctalFromTheeBoolean(BO.DWord[Bit_Ops.Bit3], BO.DWord[Bit_Ops.Bit4], BO.DWord[Bit_Ops.Bit5]);
            int D = DetermineOctalFromTheeBoolean(BO.DWord[Bit_Ops.Bit0], BO.DWord[Bit_Ops.Bit1], BO.DWord[Bit_Ops.Bit2]);

            MyCAT48I070.Mode3A_Code = A.ToString() + B.ToString() + C.ToString() + D.ToString();

            //////////////////////////////////////////////////////////////////////////////////
            // Now assign it to the generic list
            CAT48.I048DataItems[CAT48.ItemIDToIndex("070")].value = MyCAT48I070;
            //////////////////////////////////////////////////////////////////////////////////

            // Leave it at the current index for the next decode
            CAT48.CurrentDataBufferOctalIndex = CAT48.CurrentDataBufferOctalIndex + 2;
        }
Esempio n. 3
0
        private string BuildExportedData()
        {
            string Data         = "";
            int    TargetNumber = 1;

            if (TypeOfExporter == ExporterType.GePath)
            {
                // On load determine what SSR codes are present end populate the combo box
                if (MainASTERIXDataStorage.CAT01Message.Count > 0)
                {
                    foreach (MainASTERIXDataStorage.CAT01Data Msg in MainASTERIXDataStorage.CAT01Message)
                    {
                        CAT01I070Types.CAT01070Mode3UserData Mode3AData = (CAT01I070Types.CAT01070Mode3UserData)Msg.CAT01DataItems[CAT01.ItemIDToIndex("070")].value;
                        if (Mode3AData != null)
                        {
                            if (Mode3AData.Code_Validated == CAT01I070Types.Code_Validation_Type.Code_Validated)
                            {
                                if (Mode3AData.Mode3A_Code == (string)this.comboBox1.Items[this.comboBox1.SelectedIndex])
                                {
                                    // Get Lat/Long
                                    CAT01I040Types.CAT01I040MeasuredPosInPolarCoordinates LatLongData = (CAT01I040Types.CAT01I040MeasuredPosInPolarCoordinates)Msg.CAT01DataItems[CAT01.ItemIDToIndex("040")].value;
                                    // Get Flight Level
                                    CAT01I090Types.CAT01I090FlightLevelUserData FlightLevelData = (CAT01I090Types.CAT01I090FlightLevelUserData)Msg.CAT01DataItems[CAT01.ItemIDToIndex("090")].value;

                                    double LevelInMeeters = 0.0;
                                    if (FlightLevelData != null)
                                    {
                                        try
                                        {
                                            LevelInMeeters = (FlightLevelData.FlightLevel * 100.00) * SharedData.FeetToMeeters;
                                        }
                                        catch
                                        {
                                        }
                                    }

                                    Data = Data + "P" + TargetNumber.ToString() + "," + "SSR" + Mode3AData.Mode3A_Code + "_" + TargetNumber.ToString() + "," + LatLongData.LatLong.GetLatLongDecimal().LongitudeDecimal.ToString() +
                                           "," + LatLongData.LatLong.GetLatLongDecimal().LatitudeDecimal.ToString() + "," + LevelInMeeters.ToString() + Environment.NewLine;

                                    TargetNumber++;
                                }
                            }
                        }
                    }
                }
                else if (MainASTERIXDataStorage.CAT48Message.Count > 0)
                {
                    foreach (MainASTERIXDataStorage.CAT48Data Msg in MainASTERIXDataStorage.CAT48Message)
                    {
                        CAT48I070Types.CAT48I070Mode3UserData Mode3AData = (CAT48I070Types.CAT48I070Mode3UserData)Msg.CAT48DataItems[CAT48.ItemIDToIndex("070")].value;
                        if (Mode3AData != null)
                        {
                            if (Mode3AData.Code_Validated == CAT48I070Types.Code_Validation_Type.Code_Validated)
                            {
                                if (Mode3AData.Mode3A_Code == (string)this.comboBox1.Items[this.comboBox1.SelectedIndex])
                                {
                                    // Get Lat/Long in decimal
                                    CAT48I040Types.CAT48I040MeasuredPosInPolarCoordinates LatLongData = (CAT48I040Types.CAT48I040MeasuredPosInPolarCoordinates)Msg.CAT48DataItems[CAT48.ItemIDToIndex("040")].value;
                                    // Get Flight Level
                                    CAT48I090Types.CAT48I090FlightLevelUserData FlightLevelData = (CAT48I090Types.CAT48I090FlightLevelUserData)Msg.CAT48DataItems[CAT48.ItemIDToIndex("090")].value;

                                    double LevelInMeeters = 0.0;
                                    if (FlightLevelData != null)
                                    {
                                        try
                                        {
                                            LevelInMeeters = (FlightLevelData.FlightLevel * 100.00) * SharedData.FeetToMeeters;
                                        }
                                        catch
                                        {
                                        }
                                    }

                                    Data = Data + "P" + TargetNumber.ToString() + "," + "SSR" + Mode3AData.Mode3A_Code + "_" + TargetNumber.ToString() + "," + LatLongData.LatLong.GetLatLongDecimal().LongitudeDecimal.ToString() +
                                           "," + LatLongData.LatLong.GetLatLongDecimal().LatitudeDecimal.ToString() + "," + LevelInMeeters.ToString() + Environment.NewLine;

                                    TargetNumber++;
                                }
                            }
                        }
                    }
                }
                else if (MainASTERIXDataStorage.CAT62Message.Count > 0)
                {
                    foreach (MainASTERIXDataStorage.CAT62Data Msg in MainASTERIXDataStorage.CAT62Message)
                    {
                        CAT62I060Types.CAT62060Mode3UserData Mode3AData = (CAT62I060Types.CAT62060Mode3UserData)Msg.CAT62DataItems[CAT62.ItemIDToIndex("060")].value;

                        if (Mode3AData != null)
                        {
                            if (Mode3AData.Mode3A_Code == (string)this.comboBox1.Items[this.comboBox1.SelectedIndex])
                            {
                                // Get Lat/Long in decimal
                                GeoCordSystemDegMinSecUtilities.LatLongClass LatLongData = (GeoCordSystemDegMinSecUtilities.LatLongClass)Msg.CAT62DataItems[CAT62.ItemIDToIndex("105")].value;

                                double FlightLevelData = 0.0;
                                if (Msg.CAT62DataItems[CAT62.ItemIDToIndex("136")].value != null)
                                {
                                    try
                                    {
                                        // Get Flight Level
                                        FlightLevelData = (double)Msg.CAT62DataItems[CAT62.ItemIDToIndex("136")].value;
                                    }
                                    catch
                                    {
                                    }
                                }

                                double LevelInMeeters = (FlightLevelData * 100.00) * SharedData.FeetToMeeters;
                                Data = Data + "P" + TargetNumber.ToString() + "," + "SSR" + Mode3AData.Mode3A_Code + "_" + TargetNumber.ToString() + "," + LatLongData.GetLatLongDecimal().LongitudeDecimal.ToString() +
                                       "," + LatLongData.GetLatLongDecimal().LatitudeDecimal.ToString() + "," + LevelInMeeters.ToString() + Environment.NewLine;

                                TargetNumber++;
                            }
                        }
                    }
                }
            }
            else
            {
                // On load determine what SSR codes are present end populate the combo box
                if (MainASTERIXDataStorage.CAT01Message.Count > 0)
                {
                    foreach (MainASTERIXDataStorage.CAT01Data Msg in MainASTERIXDataStorage.CAT01Message)
                    {
                        CAT01I070Types.CAT01070Mode3UserData Mode3AData = (CAT01I070Types.CAT01070Mode3UserData)Msg.CAT01DataItems[CAT01.ItemIDToIndex("070")].value;

                        if (Mode3AData != null)
                        {
                            if (Mode3AData.Code_Validated == CAT01I070Types.Code_Validation_Type.Code_Validated)
                            {
                                if (Mode3AData.Mode3A_Code == (string)this.comboBox1.Items[this.comboBox1.SelectedIndex])
                                {
                                    // Get Lat/Long
                                    CAT01I040Types.CAT01I040MeasuredPosInPolarCoordinates LatLongData = (CAT01I040Types.CAT01I040MeasuredPosInPolarCoordinates)Msg.CAT01DataItems[CAT01.ItemIDToIndex("040")].value;
                                    // Get Flight Level
                                    CAT01I090Types.CAT01I090FlightLevelUserData FlightLevelData = (CAT01I090Types.CAT01I090FlightLevelUserData)Msg.CAT01DataItems[CAT01.ItemIDToIndex("090")].value;

                                    double LevelInMeeters = 0.0;
                                    if (FlightLevelData != null)
                                    {
                                        try
                                        {
                                            LevelInMeeters = (FlightLevelData.FlightLevel * 100.00) * SharedData.FeetToMeeters;
                                        }
                                        catch
                                        {
                                        }
                                    }

                                    Data = Data + LatLongData.LatLong.GetLatLongDecimal().LongitudeDecimal.ToString() +
                                           "," + LatLongData.LatLong.GetLatLongDecimal().LatitudeDecimal.ToString() + "," + LevelInMeeters.ToString() + Environment.NewLine;
                                }
                            }
                        }
                    }
                }
                else if (MainASTERIXDataStorage.CAT48Message.Count > 0)
                {
                    foreach (MainASTERIXDataStorage.CAT48Data Msg in MainASTERIXDataStorage.CAT48Message)
                    {
                        CAT48I070Types.CAT48I070Mode3UserData Mode3AData = (CAT48I070Types.CAT48I070Mode3UserData)Msg.CAT48DataItems[CAT48.ItemIDToIndex("070")].value;
                        if (Mode3AData != null)
                        {
                            if (Mode3AData.Code_Validated == CAT48I070Types.Code_Validation_Type.Code_Validated)
                            {
                                if (Mode3AData.Mode3A_Code == (string)this.comboBox1.Items[this.comboBox1.SelectedIndex])
                                {
                                    // Get Lat/Long in decimal
                                    CAT48I040Types.CAT48I040MeasuredPosInPolarCoordinates LatLongData = (CAT48I040Types.CAT48I040MeasuredPosInPolarCoordinates)Msg.CAT48DataItems[CAT48.ItemIDToIndex("040")].value;
                                    // Get Flight Level
                                    CAT48I090Types.CAT48I090FlightLevelUserData FlightLevelData = (CAT48I090Types.CAT48I090FlightLevelUserData)Msg.CAT48DataItems[CAT48.ItemIDToIndex("090")].value;

                                    double LevelInMeeters = 0.0;
                                    if (FlightLevelData != null)
                                    {
                                        try
                                        {
                                            LevelInMeeters = (FlightLevelData.FlightLevel * 100.00) * SharedData.FeetToMeeters;
                                        }
                                        catch
                                        {
                                        }
                                    }
                                    Data = Data + LatLongData.LatLong.GetLatLongDecimal().LongitudeDecimal.ToString() +
                                           "," + LatLongData.LatLong.GetLatLongDecimal().LatitudeDecimal.ToString() + "," + LevelInMeeters.ToString() + Environment.NewLine;
                                }
                            }
                        }
                    }
                }
                else if (MainASTERIXDataStorage.CAT62Message.Count > 0)
                {
                    foreach (MainASTERIXDataStorage.CAT62Data Msg in MainASTERIXDataStorage.CAT62Message)
                    {
                        CAT62I060Types.CAT62060Mode3UserData Mode3AData = (CAT62I060Types.CAT62060Mode3UserData)Msg.CAT62DataItems[CAT62.ItemIDToIndex("060")].value;

                        if (Mode3AData != null)
                        {
                            if (Mode3AData.Mode3A_Code == (string)this.comboBox1.Items[this.comboBox1.SelectedIndex])
                            {
                                // Get Lat/Long in decimal
                                GeoCordSystemDegMinSecUtilities.LatLongClass LatLongData = (GeoCordSystemDegMinSecUtilities.LatLongClass)Msg.CAT62DataItems[CAT62.ItemIDToIndex("105")].value;

                                double FlightLevelData = 0.0;
                                if (Msg.CAT62DataItems[CAT62.ItemIDToIndex("136")].value != null)
                                {
                                    try
                                    {
                                        // Get Flight Level
                                        FlightLevelData = (double)Msg.CAT62DataItems[CAT62.ItemIDToIndex("136")].value;
                                    }
                                    catch
                                    {
                                    }
                                }

                                double LevelInMeeters = (FlightLevelData * 100.00) * SharedData.FeetToMeeters;

                                Data = Data + LatLongData.GetLatLongDecimal().LongitudeDecimal.ToString() +
                                       "," + LatLongData.GetLatLongDecimal().LatitudeDecimal.ToString() + "," + LevelInMeeters.ToString() + Environment.NewLine;

                                TargetNumber++;
                            }
                        }
                    }
                }
            }

            return(Data);
        }
Esempio n. 4
0
        private void EarthPlotExporter_Load(object sender, EventArgs e)
        {
            // Each time the form is opened reset code lookup
            // and then populate based on the latest received
            // data
            for (int I = 0; I < SSR_Code_Lookup.Length; I++)
            {
                SSR_Code_Lookup[I] = false;
            }

            // On load determine what SSR codes are present end populate the combo box
            if (MainASTERIXDataStorage.CAT01Message.Count > 0)
            {
                foreach (MainASTERIXDataStorage.CAT01Data Msg in MainASTERIXDataStorage.CAT01Message)
                {
                    CAT01I070Types.CAT01070Mode3UserData MyData = (CAT01I070Types.CAT01070Mode3UserData)Msg.CAT01DataItems[CAT01.ItemIDToIndex("070")].value;
                    int Result;
                    if (MyData != null)
                    {
                        if (int.TryParse(MyData.Mode3A_Code, out Result) == true)
                        {
                            SSR_Code_Lookup[Result] = true;
                        }
                    }
                }
            }
            else if (MainASTERIXDataStorage.CAT48Message.Count > 0)
            {
                foreach (MainASTERIXDataStorage.CAT48Data Msg in MainASTERIXDataStorage.CAT48Message)
                {
                    CAT48I070Types.CAT48I070Mode3UserData MyData = (CAT48I070Types.CAT48I070Mode3UserData)Msg.CAT48DataItems[CAT48.ItemIDToIndex("070")].value;

                    int Result;
                    if (MyData != null)
                    {
                        if (int.TryParse(MyData.Mode3A_Code, out Result) == true)
                        {
                            SSR_Code_Lookup[Result] = true;
                        }
                    }
                }
            }
            else if (MainASTERIXDataStorage.CAT62Message.Count > 0)
            {
                foreach (MainASTERIXDataStorage.CAT62Data Msg in MainASTERIXDataStorage.CAT62Message)
                {
                    CAT62I060Types.CAT62060Mode3UserData MyData = (CAT62I060Types.CAT62060Mode3UserData)Msg.CAT62DataItems[CAT62.ItemIDToIndex("060")].value;

                    int Result;
                    if (MyData != null)
                    {
                        if (int.TryParse(MyData.Mode3A_Code, out Result) == true)
                        {
                            SSR_Code_Lookup[Result] = true;
                        }
                    }
                }
            }

            this.comboBox1.Items.Clear();
            for (int I = 0; I < SSR_Code_Lookup.Length; I++)
            {
                if (SSR_Code_Lookup[I] == true)
                {
                    this.comboBox1.Items.Add(I.ToString().PadLeft(4, '0'));
                }
            }

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

            this.labelNumberofCodes.Text = this.comboBox1.Items.Count.ToString();
        }
Esempio n. 5
0
        private void comboBoxSSRCode_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.listBoxDataBySSRCode.Items.Clear();

            if (SSR_Code_Lookup.Length > 0)
            {
                // On load determine what SSR codes are present end populate the combo box
                if (MainASTERIXDataStorage.CAT01Message.Count > 0)
                {
                    foreach (MainASTERIXDataStorage.CAT01Data Msg in MainASTERIXDataStorage.CAT01Message)
                    {
                        CAT01I070Types.CAT01070Mode3UserData MyData = (CAT01I070Types.CAT01070Mode3UserData)Msg.CAT01DataItems[CAT01.ItemIDToIndex("070")].value;

                        if (MyData.Mode3A_Code == this.comboBoxSSRCode.Items[this.comboBoxSSRCode.SelectedIndex].ToString())
                        {
                            ASTERIX.SIC_SAC_Time SIC_SAC_TIME = (ASTERIX.SIC_SAC_Time)Msg.CAT01DataItems[CAT01.ItemIDToIndex("010")].value;

                            // Display time
                            string Time = SIC_SAC_TIME.TimeofReception.Hour.ToString().PadLeft(2, '0') + ":" + SIC_SAC_TIME.TimeofReception.Minute.ToString().PadLeft(2, '0') + ":" +
                                          SIC_SAC_TIME.TimeofReception.Second.ToString().PadLeft(2, '0') + ":" + SIC_SAC_TIME.TimeofReception.Millisecond.ToString().PadLeft(3, '0');
                            this.listBoxDataBySSRCode.Items.Add("Rcvd Time: " + Time);

                            CAT01I040Types.CAT01I040MeasuredPosInPolarCoordinates PositionData = (CAT01I040Types.CAT01I040MeasuredPosInPolarCoordinates)Msg.CAT01DataItems[CAT01.ItemIDToIndex("040")].value;
                            this.listBoxDataBySSRCode.Items.Add("\tDistance:\t" + PositionData.Measured_Distance);
                            this.listBoxDataBySSRCode.Items.Add("\tAzimuth:\t" + PositionData.Measured_Azimuth.ToString());
                            string Lat, Lon;
                            PositionData.LatLong.GetDegMinSecStringFormat(out Lat, out Lon);
                            this.listBoxDataBySSRCode.Items.Add("\tLat/Long:\t" + Lat + "/" + Lon);

                            // Display Data
                            CAT01I090Types.CAT01I090FlightLevelUserData FL_Data = (CAT01I090Types.CAT01I090FlightLevelUserData)Msg.CAT01DataItems[CAT01.ItemIDToIndex("090")].value;
                            this.listBoxDataBySSRCode.Items.Add("\tMode Validated:\t" + FL_Data.Code_Validated.ToString());
                            this.listBoxDataBySSRCode.Items.Add("\tMode Garbled:\t" + FL_Data.Code_Garbled.ToString());
                            this.listBoxDataBySSRCode.Items.Add("\tFL:\t" + FL_Data.FlightLevel.ToString());

                            this.listBoxDataBySSRCode.Items.Add("    ");
                        }
                    }
                }
                else if (MainASTERIXDataStorage.CAT48Message.Count > 0)
                {
                    foreach (MainASTERIXDataStorage.CAT48Data Msg in MainASTERIXDataStorage.CAT48Message)
                    {
                        CAT48I070Types.CAT48I070Mode3UserData MyData = (CAT48I070Types.CAT48I070Mode3UserData)Msg.CAT48DataItems[CAT48.ItemIDToIndex("070")].value;

                        if (MyData.Mode3A_Code == this.comboBoxSSRCode.Items[this.comboBoxSSRCode.SelectedIndex].ToString())
                        {
                            ASTERIX.SIC_SAC_Time SIC_SAC_TIME = (ASTERIX.SIC_SAC_Time)Msg.CAT48DataItems[CAT48.ItemIDToIndex("010")].value;

                            // Display time
                            string Time = SIC_SAC_TIME.TimeofReception.Hour.ToString().PadLeft(2, '0') + ":" + SIC_SAC_TIME.TimeofReception.Minute.ToString().PadLeft(2, '0') + ":" +
                                          SIC_SAC_TIME.TimeofReception.Second.ToString().PadLeft(2, '0') + ":" + SIC_SAC_TIME.TimeofReception.Millisecond.ToString().PadLeft(3, '0');
                            this.listBoxDataBySSRCode.Items.Add("Rcvd Time: " + Time);

                            // Display Data
                            CAT48I240Types.CAT48I240ACID_Data ACID_String = (CAT48I240Types.CAT48I240ACID_Data)Msg.CAT48DataItems[CAT48.ItemIDToIndex("240")].value;
                            if (ACID_String != null)
                            {
                                this.listBoxDataBySSRCode.Items.Add("\t" + "Callsign:" + ACID_String.ACID);
                            }
                            else
                            {
                                this.listBoxDataBySSRCode.Items.Add("\t" + "Callsign: N/A");
                            }

                            CAT48I040Types.CAT48I040MeasuredPosInPolarCoordinates PositionData = (CAT48I040Types.CAT48I040MeasuredPosInPolarCoordinates)Msg.CAT48DataItems[CAT48.ItemIDToIndex("040")].value;
                            this.listBoxDataBySSRCode.Items.Add("\tDistance:\t" + PositionData.Measured_Distance);
                            this.listBoxDataBySSRCode.Items.Add("\tAzimuth:\t" + PositionData.Measured_Azimuth.ToString());
                            string Lat, Lon;
                            PositionData.LatLong.GetDegMinSecStringFormat(out Lat, out Lon);
                            this.listBoxDataBySSRCode.Items.Add("\tLat/Long:\t" + Lat + "/" + Lon);

                            CAT48I090Types.CAT48I090FlightLevelUserData FL_Data = (CAT48I090Types.CAT48I090FlightLevelUserData)Msg.CAT48DataItems[CAT48.ItemIDToIndex("090")].value;
                            this.listBoxDataBySSRCode.Items.Add("\tMode Validated:\t" + FL_Data.Code_Validated.ToString());
                            this.listBoxDataBySSRCode.Items.Add("\tMode Garbled:\t" + FL_Data.Code_Garbled.ToString());
                            this.listBoxDataBySSRCode.Items.Add("\tFL:\t" + FL_Data.FlightLevel.ToString());
                            this.listBoxDataBySSRCode.Items.Add("    ");
                        }
                    }
                }
                else if (MainASTERIXDataStorage.CAT62Message.Count > 0)
                {
                    foreach (MainASTERIXDataStorage.CAT62Data Msg in MainASTERIXDataStorage.CAT62Message)
                    {
                        CAT62I060Types.CAT62060Mode3UserData MyData = (CAT62I060Types.CAT62060Mode3UserData)Msg.CAT62DataItems[CAT62.ItemIDToIndex("060")].value;

                        if (MyData.Mode3A_Code == this.comboBoxSSRCode.Items[this.comboBoxSSRCode.SelectedIndex].ToString())
                        {
                            ASTERIX.SIC_SAC_Time SIC_SAC_TIME = (ASTERIX.SIC_SAC_Time)Msg.CAT62DataItems[CAT62.ItemIDToIndex("010")].value;

                            // TIME
                            string Time = SIC_SAC_TIME.TimeofReception.Hour.ToString().PadLeft(2, '0') + ":" + SIC_SAC_TIME.TimeofReception.Minute.ToString().PadLeft(2, '0') + ":" +
                                          SIC_SAC_TIME.TimeofReception.Second.ToString().PadLeft(2, '0') + ":" + SIC_SAC_TIME.TimeofReception.Millisecond.ToString().PadLeft(3, '0');
                            this.listBoxDataBySSRCode.Items.Add("Rcvd Time: " + Time);
                            // TRACK NUMBER
                            int TrackNumber = (int)Msg.CAT62DataItems[CAT62.ItemIDToIndex("040")].value;
                            this.listBoxDataBySSRCode.Items.Add("\t" + "TRACK#:" + TrackNumber.ToString());
                            // CALLSIGN
                            CAT62I380Types.CAT62I380Data CAT62I380Data = (CAT62I380Types.CAT62I380Data)Msg.CAT62DataItems[CAT62.ItemIDToIndex("380")].value;
                            if (CAT62I380Data != null)
                            {
                                this.listBoxDataBySSRCode.Items.Add("\t" + "Callsign:" + CAT62I380Data.ACID.ACID_String);
                            }
                            // POSITION
                            GeoCordSystemDegMinSecUtilities.LatLongClass LatLongData = (GeoCordSystemDegMinSecUtilities.LatLongClass)Msg.CAT62DataItems[CAT62.ItemIDToIndex("105")].value;
                            string Lat, Lon;
                            LatLongData.GetDegMinSecStringFormat(out Lat, out Lon);
                            this.listBoxDataBySSRCode.Items.Add("\tLat/Long:\t" + Lat + "/" + Lon);
                            // FLIGHT LEVEL
                            double FlightLevel = (double)Msg.CAT62DataItems[CAT62.ItemIDToIndex("136")].value;
                            if (Msg.CAT62DataItems[CAT62.ItemIDToIndex("136")].value != null)
                            {
                                this.listBoxDataBySSRCode.Items.Add("\tFL:\t" + FlightLevel.ToString());
                            }
                            else
                            {
                                this.listBoxDataBySSRCode.Items.Add("\tFL:\t" + "N/A");
                            }
                            this.listBoxDataBySSRCode.Items.Add("    ");
                        }
                    }
                }
            }
            else
            {
                this.listBoxDataBySSRCode.Items.Add("No data was acquired !!!");
            }
        }