Ejemplo n.º 1
0
 public D1BDHeader(object commonInfoFor1BD, object qualityCheckInfoFor1BD,
                   object scaleInfoFor1BD, object radiantionConvertArgsInfoFor1BD,
                   object geographEnvelopeInfoFor1BD,
                   object simluateRemoteMeasureMeasureInfoFor1BD,
                   object nomalHeaderInfo, bool isBigEndian)
 {
     _commonInfoFor1BD                = (CommonInfoFor1BD)commonInfoFor1BD;
     _qualityCheckInfoFor1BD          = (QualityCheckInfoFor1BD)qualityCheckInfoFor1BD;
     _sacleInfoFor1BD                 = (ScaleInfoFor1BD)scaleInfoFor1BD;
     _radiantionConvertArgsInfoFor1BD = (RadiantionConvertArgsInfoFor1BD)radiantionConvertArgsInfoFor1BD;
     _geographLocationInfoFor1BD      = (GeographLocationInfoFor1BD)geographEnvelopeInfoFor1BD;
     _simluateRemoteMeasureInfoFor1BD = (SimluateRemoteMeasureInfoFor1BD)simluateRemoteMeasureMeasureInfoFor1BD;
     _nomalHeaderInfo                 = (NomalHeaderInfo)nomalHeaderInfo;
     _isBigEndian = isBigEndian;
 }
Ejemplo n.º 2
0
        public override object Create(Stream fileStream, BinaryReader binaryReader, int offset, int endOffset)
        {
            fileStream.Seek(offset - 1, SeekOrigin.Begin);
            RadiantionConvertArgsInfoFor1BD rInfo = new RadiantionConvertArgsInfoFor1BD();

            if (_isBigEndian)
            {
                rInfo.SunFilterRadiantionCH1    = ToLocalEndian_Core.ToUInt32FromBig(binaryReader.ReadBytes(4)) / 10f;
                rInfo.EquivalentFilterWidthCH1  = ToLocalEndian_Core.ToUInt32FromBig(binaryReader.ReadBytes(4)) / 1000f;
                rInfo.SunFilterRadiantionCH2    = ToLocalEndian_Core.ToUInt32FromBig(binaryReader.ReadBytes(4)) / 10f;
                rInfo.EquivalentFilterWidthCH2  = ToLocalEndian_Core.ToUInt32FromBig(binaryReader.ReadBytes(4)) / 1000f;
                rInfo.SunFilterRadiantionCH3A   = ToLocalEndian_Core.ToUInt32FromBig(binaryReader.ReadBytes(4)) / 10f;
                rInfo.EquivalentFilterWidthCH3A = ToLocalEndian_Core.ToUInt32FromBig(binaryReader.ReadBytes(4)) / 1000f;
                rInfo.CenterWaveNumberCH3B      = ToLocalEndian_Core.ToUInt32FromBig(binaryReader.ReadBytes(4)) / 100f;
                rInfo.C1ConstCH3B         = ToLocalEndian_Core.ToUInt32FromBig(binaryReader.ReadBytes(4)) / 100000f;
                rInfo.C2ConstCH3B         = ToLocalEndian_Core.ToUInt32FromBig(binaryReader.ReadBytes(4)) / 1000000f;
                rInfo.CenterWaveNumberCH4 = ToLocalEndian_Core.ToUInt32FromBig(binaryReader.ReadBytes(4)) / 1000f;
                rInfo.C1ConstCH4          = ToLocalEndian_Core.ToUInt32FromBig(binaryReader.ReadBytes(4)) / 100000f;
                rInfo.C2ConstCH4          = ToLocalEndian_Core.ToUInt32FromBig(binaryReader.ReadBytes(4)) / 1000000f;
                rInfo.CenterWaveNumberCH5 = ToLocalEndian_Core.ToUInt32FromBig(binaryReader.ReadBytes(4)) / 1000f;
                rInfo.C1ConstCH5          = ToLocalEndian_Core.ToUInt32FromBig(binaryReader.ReadBytes(4)) / 100000f;
                rInfo.C2ConstCH5          = ToLocalEndian_Core.ToUInt32FromBig(binaryReader.ReadBytes(4)) / 1000000f;
            }
            else
            {
                rInfo.SunFilterRadiantionCH1    = ToLocalEndian_Core.ToUInt32FromLittle(binaryReader.ReadBytes(4)) / 10f;
                rInfo.EquivalentFilterWidthCH1  = ToLocalEndian_Core.ToUInt32FromLittle(binaryReader.ReadBytes(4)) / 1000f;
                rInfo.SunFilterRadiantionCH2    = ToLocalEndian_Core.ToUInt32FromLittle(binaryReader.ReadBytes(4)) / 10f;
                rInfo.EquivalentFilterWidthCH2  = ToLocalEndian_Core.ToUInt32FromLittle(binaryReader.ReadBytes(4)) / 1000f;
                rInfo.SunFilterRadiantionCH3A   = ToLocalEndian_Core.ToUInt32FromLittle(binaryReader.ReadBytes(4)) / 10f;
                rInfo.EquivalentFilterWidthCH3A = ToLocalEndian_Core.ToUInt32FromLittle(binaryReader.ReadBytes(4)) / 1000f;
                rInfo.CenterWaveNumberCH3B      = ToLocalEndian_Core.ToUInt32FromLittle(binaryReader.ReadBytes(4)) / 100f;
                rInfo.C1ConstCH3B         = ToLocalEndian_Core.ToUInt32FromLittle(binaryReader.ReadBytes(4)) / 100000f;
                rInfo.C2ConstCH3B         = ToLocalEndian_Core.ToUInt32FromLittle(binaryReader.ReadBytes(4)) / 1000000f;
                rInfo.CenterWaveNumberCH4 = ToLocalEndian_Core.ToUInt32FromLittle(binaryReader.ReadBytes(4)) / 1000f;
                rInfo.C1ConstCH4          = ToLocalEndian_Core.ToUInt32FromLittle(binaryReader.ReadBytes(4)) / 100000f;
                rInfo.C2ConstCH4          = ToLocalEndian_Core.ToUInt32FromLittle(binaryReader.ReadBytes(4)) / 1000000f;
                rInfo.CenterWaveNumberCH5 = ToLocalEndian_Core.ToUInt32FromLittle(binaryReader.ReadBytes(4)) / 1000f;
                rInfo.C1ConstCH5          = ToLocalEndian_Core.ToUInt32FromLittle(binaryReader.ReadBytes(4)) / 100000f;
                rInfo.C2ConstCH5          = ToLocalEndian_Core.ToUInt32FromLittle(binaryReader.ReadBytes(4)) / 1000000f;
            }
            base.Create(fileStream, binaryReader, offset, endOffset);
            return(rInfo);
        }