private void ReadSimpleSegment(List<FlightDataContentSegment> segments,
            FlightBinaryDataContentSegmentDefinition seg, BitArray bitArray)
        {
            var s3 = DateTime.Now;

            FlightDataContentSegment content = new FlightDataContentSegment()
            {
                DataTypeStr = seg.DataTypeStr,
                SegmentName = seg.SegmentName
            };

            //每个Index长度是4(byteCount)
            long currentPos = m_Reader.BaseStream.Position;
            if (seg.DataTypeStr == DataTypeConverter.FLOAT)
            {
                var s1 = DateTime.Now;
                float floatVal = m_Reader.ReadSingle();
                var s2 = DateTime.Now;
                TestSpan1 += s2.Subtract(s1);
                if (currentPos + seg.BytesCount != m_Reader.BaseStream.Position)
                    m_Reader.BaseStream.Position = currentPos + seg.BytesCount;
                content.Value = floatVal;// floatVal.ToString();
                TestSpan2 += DateTime.Now.Subtract(s2);

            }
            else if (seg.DataTypeStr == DataTypeConverter.INT32)
            {
                int intVal = m_Reader.ReadInt32();
                content.Value = intVal;// intVal.ToString();
                if (currentPos + seg.BytesCount != m_Reader.BaseStream.Position)
                    m_Reader.BaseStream.Position = currentPos + seg.BytesCount;
            }
            else if (seg.DataTypeStr == DataTypeConverter.LONG)
            {
                long longVal = m_Reader.ReadInt64();
                content.Value = longVal;// longVal.ToString();
                if (currentPos + seg.BytesCount != m_Reader.BaseStream.Position)
                    m_Reader.BaseStream.Position = currentPos + seg.BytesCount;
            }
            else if (seg.DataTypeStr == DataTypeConverter.DATETIME)
            {
                content.Value = 0;// string.Empty;
                if (currentPos + seg.BytesCount != m_Reader.BaseStream.Position)
                    m_Reader.BaseStream.Position = currentPos + seg.BytesCount;
            }
            else
            {
                byte[] strs = m_Reader.ReadBytes(seg.BytesCount);
                content.Value = 0;// new string(System.Text.Encoding.GetEncoding("ASCII").GetChars(strs));
                if (currentPos + seg.BytesCount != m_Reader.BaseStream.Position)
                    m_Reader.BaseStream.Position = currentPos + seg.BytesCount;
            }
            TestSpan3 += DateTime.Now.Subtract(s3);

            segments.Add(content);
        }
        //DEBUG : 写死机型1,暂时没办法
        private static FlightBinaryDataDefinition CreateDefinition(
            FlightBinaryDataDefinition flightBinaryDataDefinition, FlightParameters parameters)
        {
            FlightBinaryDataDefinition definition = new FlightBinaryDataDefinition()
            {
                AircraftModel = flightBinaryDataDefinition.AircraftModel,
                HeaderDefinition = flightBinaryDataDefinition.HeaderDefinition,

                FrameDefinition = new FlightBinaryDataContentFrameDefinition()
                {
                    BytesCount = parameters.BytesCount
                }
            };

            System.Collections.Generic.List<FlightBinaryDataContentSegmentDefinition> defs
            = new System.Collections.Generic.List<FlightBinaryDataContentSegmentDefinition>();

            Dictionary<int, List<FlightParameter>> tempList1 = new Dictionary<int, List<FlightParameter>>();

            foreach (var temp1 in parameters.Parameters)
            {
                if (tempList1.ContainsKey(temp1.Index))
                {
                    tempList1[temp1.Index].Add(temp1);
                }
                else
                {
                    tempList1.Add(temp1.Index, new List<FlightParameter>());
                    tempList1[temp1.Index].Add(temp1);
                }
            }

            var temp2 = from k in tempList1
                        orderby k.Key ascending
                        select k;

            foreach (var p in temp2)
            {
                if (p.Value.Count < 2)
                {
                    foreach (var p2 in p.Value)
                    {
                        FlightBinaryDataContentSegmentDefinition def = new FlightBinaryDataContentSegmentDefinition()
                        {
                            BytesCount = 4,
                            DataTypeStr = p2.ParameterDataType,
                            SegmentName = p2.ParameterID
                        };
                        defs.Add(def);
                    }
                }
                else
                {
                    var list = from o in p.Value
                               orderby o.SubIndex
                               select
                      new FlightBitDataContentSegmentDefinition()
                         {
                             BitsCount = 1,
                             BytesCount = -1,
                             DataTypeStr = o.ParameterDataType,
                             SegmentName = o.ParameterID
                         };

                    FlightBinaryDataContentSegmentDefinition def = new FlightBinaryDataContentSegmentDefinition()
                    {
                        BytesCount = 4,
                        DataTypeStr = list.First().DataTypeStr,
                        SegmentName = list.First().SegmentName
                    };
                    def.BitsDefinition = list.ToArray();
                    defs.Add(def);
                }
            }

            definition.FrameDefinition.Segments = defs.ToArray();

            return definition;
        }
        private void ReadComplexSegment(List<FlightDataContentSegment> segments,
            FlightBinaryDataContentSegmentDefinition seg, BitArray bitArray)
        {
            var single = m_Reader.ReadSingle();
            var toInt = (int)single;
            List<int> bitValues = new List<int>();

            for (int i = 0; i < 16; i++)
            {
                int bitValue = BaseFunction.GetBit(toInt, i);
                bitValues.Add(bitValue);
            }

            for (int j = 0; j < Math.Min(seg.BitsDefinition.Length, bitValues.Count); j++)
            {
                var seg2 = seg.BitsDefinition[j];
                FlightDataContentSegment resultSeg = new FlightDataContentSegment()
                {
                    DataTypeStr = seg2.DataTypeStr,
                    SegmentName = seg2.SegmentName,
                };

                if (seg2.BitsCount == 1)
                {
                    resultSeg.Value = bitValues[j];
                }
                segments.Add(resultSeg);
            }
        }