【正文】
再輸出到 P1 口 temp=P1。 //將 P1 口獲得的數(shù)據(jù)賦給 temp 變量 // delay(2)。 //延時(shí) OE=0。 results= temp * 196。 results= results/10。 } void T0_CLK() interrupt 1 { CLK=!CLK。//產(chǎn)生時(shí)鐘 脈沖,時(shí)鐘周期大約為 250us } while(1) { if(P3_2==1) { bai1=azimuth/100。 shi1=(azimuth%100)/10。 ge1=azimuth%10。 bai2=pitch/100。 shi2=(pitch%100)/10。 ge2=pitch%10。 bai3=roll/100。 shi3=(roll%100)/10。 ge3=roll%10。 P2=0xfe。 dula1=1。 P0=table[bai1]。 dula=0 。 delay(20)。 第 44頁 西華大學(xué)畢業(yè)設(shè)計(jì)說明書 P2=0xfd。 dula1=1。 P0=table[shi1]。 dula=0。 delay(5)。 P2=0xfb。 dula1=1。 P0=table[ge1]。 dula1=0。 delay(5)。 P2=0xfe。 dula2=1。 P0=table[bai2]。 dula2=0 。 delay(20)。 P2=0xfd。 dula2=1。 P0=table[shi2]。 dula2=0。 delay(5)。 P2=0xfb。 dula2=1。 P0=table[ge2]。 P1=0xfe。 第 45頁 西華大學(xué)畢業(yè)設(shè)計(jì)說明書 dula3=1。 P0=table[bai3]。 dula=0 。 delay(20)。 P1=0xfd。 dula1=1。 P0=table[shi3]。 dula3=0。 delay(5)。 P1=0xfb。 dula3=1。 P0=table[ge3]。 } } } void init() { azimuth=0。 EA=1。 EX0=1。 IT0=1。 } void delay(uint z) { uint Hex,Hey。 for(Hex=z。Hex0。Hex) for(y=125。Hey0。Hey)。 第 46頁 西華大學(xué)畢業(yè)設(shè)計(jì)說明書 } void wbzd0() interrupt 0 { α++。 if(α==9999) { azimuth=0。 } } 第 47頁 西華大學(xué)畢業(yè)設(shè)計(jì)說明書 附錄三 :英文文獻(xiàn) the direction finding instrument used in navigation: pass Types of passes There are two widely used and radically different types of pass. The magic pass contains a mag that interacts with the earth39。s magic field and aligns itself to point to the magic poles.[6] Simple passes of this type show directions in a frame of reference in which the directions of the magic poles are due north and south. These directions are called magic north and magic south. The gyro pass (sometimes spelled with a hyphen, or as one word) contains a rapidly spinning wheel whose rotation interacts dynamically with the rotation of the earth so as to make the wheel precess, losing energy to friction until its axis of rotation is parallel with the earth39。s. The wheel39。s axis therefore points to the earth39。s rotational poles, and a frame of reference is used in which the directions of the rotational poles are due north and south. These directions are called true north and true south, respectively. There are other devices which are not conventionally called passes but which do allow the true cardinal directions to be determined. They are said to work like a pass, or as a pass, without actually being a pass. For example, a Global Positioning System (GPS) satellite receiver determines its own position on the ground, as true latitude and true longitude. If the receiver is being moved, even at walking pace, it can follow the change of its position, and hence determine the pass bearing of its direction of movement, and thence the directions of the cardinal points relative to its direction of movement. Some GPS receivers have two antennas, fixed some distance apart to the structure of a vehicle, usually an aircraft. The exact latitudes and longitudes of the antennas can be determined simultaneously, which allows the directions of the cardinal points to be calculated relative to the heading of the aircraft (the direction in which its nose is pointing), rather than to its direction 第 48頁 西華大學(xué)畢業(yè)設(shè)計(jì)說明書 of movement, which will be different if there is a crosswind. A much older example was the Chinese southpointing chariot, which worked like a pass by directional dead reckoning. It was initialized by hand, possibly using astronomical observations . of the Pole Star, and thenceforth counteracted every turn that was made to keep its pointer aiming in the desired direction, usually to the south. The earth39。s magic poles do not coincide with the rotational poles, and the positions of the magic poles change over time on a timescale that is not extremely long by human standards. Significant movements happen in a few years. (Over millions of years, the directions of the true poles also shift, because of continental drift.) For an observer at any point on the earth39。s surface, there is an angle, called the magic declination (or magic variation), between the directions of magic north and true north. The magic declination is different at different points on the earth, and changes with time. Close to the equator, the magic declination is no more than a few degrees, but in arctic and Antarctic latitudes it can be much greater. Some magic passes include means to pensate for the magic declination, so that the pass shows true directions, relative to the earth39。s rotational poles. The user of such a pass has to know the local value of the magic declination, and adjust the pass accordingly. Magic pass The magic pass consists of a magized pointer (usually marked on the North end) free to align itself with Earth39。s magic field. A pass is any magically sensitive device capable of indicating the direction of the magic north of a pla39。s magosphere. The face of the pass generally highlights the cardinal points of north, south, east and west. Often, passes are built as a stand alone sealed instrument with a magized bar or needle turning freely upon a pivot, or moving in a fluid, thus able to point in a northerly and southerly direction. The pass greatly improved the safety and efficiency of travel, especially ocean travel. A pass can be used to calculate heading, used with a s