예제 #1
0
        /////////////////////////////////////////////
        /* Initialize method variables             */
        /////////////////////////////////////////////
        void initializeVariables()
        {
            msg_header_block  = new HeaderBlock();                    // Array to hold Message Header Block data.
            description_block = new DescriptionBlock();               // Array to hold Product Description Block data.
                                                                      // Array to hold the Product Symbology Block data.

            msg_header_block_offset  = 30;
            description_block_offset = 48;
        }
예제 #2
0
        /////////////////////////////////////////////
        /* Parse the Product Description Block     */
        /* into an array and return it.            */
        /////////////////////////////////////////////
        public DescriptionBlock parsePDB()
        {
            DescriptionBlock description_block = new DescriptionBlock();

            fs.Seek(description_block_offset, SeekOrigin.Begin);

            description_block.Divider               = readHalfWord(true);                  //HW 10
            description_block.Latitude              = (double)readWord() / 1000;           //HW 11 - 12
            description_block.Longitude             = (double)readWord() / 1000;           //HW 13 - 14
            description_block.Height                = readHalfWord(true);                  //HW 15
            description_block.Code                  = readHalfWord(true);                  //HW 16
            description_block.Mode                  = readHalfWord();                      //HW 17
            description_block.VolumeCoveragePattern = readHalfWord();                      //HW 18
            description_block.SequenceNumber        = readHalfWord();                      //HW 19

            description_block.ScanNumber        = readHalfWord();                          //HW 20
            description_block.ScanTime          = readTimeStamp();                         //HW 22 - 23
            description_block.GenerationTime    = readTimeStamp();                         //HW 25 - 26
            description_block.ProductSpecific_1 = readHalfWord();                          //HW 27
            description_block.ProductSpecific_2 = readHalfWord();                          //HW 28
            description_block.ElevationNumber   = readHalfWord();                          //HW 29

            description_block.ProductSpecific_3 = readHalfWord() / 10;                     //HW 30
            description_block.Threshold[0]      = readHalfWord();                          //HW 31
            description_block.Threshold[1]      = readHalfWord();                          //HW 32
            description_block.Threshold[2]      = readHalfWord();                          //HW 33
            description_block.Threshold[3]      = readHalfWord();                          //HW 34
            description_block.Threshold[4]      = readHalfWord();                          //HW 35
            description_block.Threshold[5]      = readHalfWord();                          //HW 36
            description_block.Threshold[6]      = readHalfWord();                          //HW 37
            description_block.Threshold[7]      = readHalfWord();                          //HW 38
            description_block.Threshold[8]      = readHalfWord();                          //HW 39

            description_block.Threshold[9]      = readHalfWord();                          //HW 40
            description_block.Threshold[10]     = readHalfWord();                          //HW 41
            description_block.Threshold[11]     = readHalfWord();                          //HW 42
            description_block.Threshold[12]     = readHalfWord();                          //HW 43
            description_block.Threshold[13]     = readHalfWord();                          //HW 44
            description_block.Threshold[14]     = readHalfWord();                          //HW 45
            description_block.Threshold[15]     = readHalfWord();                          //HW 46
            description_block.ProductSpecific_4 = readHalfWord();                          //HW 47
            description_block.ProductSpecific_5 = readHalfWord();                          //HW 48
            description_block.ProductSpecific_6 = readHalfWord();                          //HW 49

            description_block.ProductSpecific_7  = readHalfWord();                         //HW 50
            description_block.ProductSpecific_8  = readHalfWord();                         //HW 51
            description_block.ProductSpecific_9  = readHalfWord();                         //HW 52
            description_block.ProductSpecific_10 = readHalfWord();                         //HW 53
            description_block.Version            = readByte();                             //HW 54
            readByte();
            description_block.SymbologyOffset = readWord();                                //HW 55 - 56
            description_block.GraphicOffset   = readWord();                                //HW 57 - 58
            description_block.TabularOffset   = readWord();                                //HW 59 - 60
            this.description_block            = description_block;
            return(description_block);
        }