1 System Overview
The device collects geographic information through GPS and attitude information through electronic compass. Based on the geographic information collected by GPS and the position of communication satellites, the device calculates the standard azimuth, pitch, and polarization parameters required for satellite alignment, and also calculates the local and current magnetic declination data. By collecting electronic compass data, the device obtains preliminary azimuth, pitch, and polarization data, where pitch and polarization are the actual pointing values of the antenna, but the azimuth value is measured with magnetic north as the standard. The magnetic declination data obtained by GPS amends the azimuth value obtained from the electronic compass with magnetic north as the standard, and obtains relatively accurate real azimuth data with true north as the standard. The system structure is shown in Figure 1, and the multi-threaded application process structure based on the EVC4 platform is shown in Figure 2.
2 Hardware Design
In the design of this device, S3C2440 is selected as the main controller to form the hardware platform, and its rich external interfaces and high-speed processing capabilities are used to achieve the purpose of real-time data collection, timely data processing, fast data transmission, and no additional interface equipment. Since the device needs to measure many parameters, GPS and electronic compass uniformly use RS 232 interface to ensure the accuracy of measurement data and interface consistency. The power supply is uniformly powered by +5 V lithium battery power supply.
3 Software Design
This device uses ARM9 as the main controller, Windows CE.net operating system as the system platform, and EVC4 development environment as the development tool. The software adopts multi-threaded structure, MFC and API programming technology to collect sensor data in real time, calculate the corrected azimuth value, and achieve the purpose of accurate star alignment.
3.1 Overall Program Design
The program of this device adopts a multi-threaded structure. On the basis of the main thread (user interface thread), two auxiliary threads (worker threads) are added. The auxiliary threads are responsible for processing data acquisition, and the main thread is responsible for interface response, data fusion, and data display. Thread processing uses API instead of MFC programming, which increases the versatility of the program. The program also uses Suspend-Thread to suspend the thread, ResumeThread to resume the thread, and Exit-Thread to exit the thread.
Thread synchronization uses critical section (also called key section, i.e. CRITI-CAL SECTION) measures. First, declare a global variable with CRITICAL_SECTION, then call InitializeCriticalSec-tion to initialize, use EnterCriticalSection to enter the critical section, use LeaveCriticalSection to leave the critical section, and use Delete-CriticalSection function to delete the critical section. The key part code is as follows:
3.2 HMR3000 Programming
The data output format of the electronic compass meets the NMEA0183 communication protocol specification. The $PTNTHPR statement is selected according to the needs, and it is updated 30 times per second, which basically meets the requirements of real-time measurement. The data format of the $PTNTHPR statement is:
$PTNTHPR,,,,,,*hh
The meaning of each field is: azimuth value, azimuth state, pitch value, pitch state, roll value, roll state, and hh is the checksum. The data collection program extracts the corresponding parameter value from the output statement based on the judgment that the status of each parameter is normal. The thread function code is as follows:
3.3 GPS module programming
The data output format of the GPS module also meets the NMEA0183 communication protocol specification. Select the $GPRMC statement according to the needs and the default update rate. The data format of the $GPRMC statement is:
$GPRMC,,,,,,,,,,,,,*hh.
The meaning of each field is: azimuth value, azimuth state, pitch value, pitch state, roll value, roll state. The data collection program extracts the corresponding parameter value from the output statement based on the judgment that the state of each parameter is normal. The thread function code is as follows:
3.4 Calculation of the Theoretical Values of Satellite Parameters
An important step in satellite communication is to accurately align the satellite communication antenna with the communication satellite. Three parameters are required for satellite alignment: azimuth, pitch, and polarization. The following are the calculation formulas for the three parameters, where ψc is the longitude of the satellite beam center, ψs is the longitude of the satellite, ψg is the longitude of the receiving location, and θ is the latitude of the receiving location.
Satellite communication antenna azimuth calculation formula:
The polarization angle is usually between the calculated values of equations (3) and (4). To simplify the calculation, equation (3) is often used as the polarization angle calculation formula. The longitude and latitude of the receiving location are obtained through GPS acquisition. Combined with the satellite longitude, the mathematical functions provided by C language can be used to easily calculate the three parameters required for accurate antenna alignment: azimuth, pitch, and polarization. Provide theoretical standard values for the alignment operation, simplify the alignment operation to compare the theoretical standard values, adjust the antenna, make the actual value completely consistent with the theoretical value, and thus complete the alignment task.
3.5 Azimuth Correction Program Design
The electronic compass measures the actual pointing value of the antenna. Since the electronic compass measures the azimuth value based on the geomagnetic field, this azimuth value is actually based on the magnetic north, while the theoretical value is based on the true north. Therefore, there is a difference between the electronic compass measurement value and the theoretical calculation value, which is the magnetic declination. In order to make the azimuth value measured by the electronic compass represent the azimuth value based on the true north, the magnetic declination must be corrected based on the data measured by the electronic compass.
According to the IGRF2005 geomagnetic field model, the magnetic declination calculation program provided by NOAA's NG-DC is used to calculate the magnetic declination data covering my country's territory and its surrounding areas one by one. The latitude is 10°~50° north latitude and the longitude is 70°~140° east longitude, forming a 41×71 two-dimensional array. The magnetic declination data is extracted based on the longitude and latitude data, and the data is calculated with the collected compass data to correct the compass azimuth value, thereby obtaining a relatively accurate azimuth value representing the direction of the object. Part of the code is shown below:
The azimuth data obtained from the electronic compass is corrected for magnetic declination to form true azimuth data based on true north, thus providing a basis for comparison with theoretical star alignment parameters.
4 Application and Results
The device cleverly uses the GPS module and the electronic compass module. On the basis of collecting the module data separately, it uses the geographic information to perform table lookup operations, obtains the local magnetic declination, and uses the magnetic declination to correct the azimuth to obtain more accurate azimuth pointing data. This device uses the S3C2440ARM9 chip as the main CPU and Windows CE. Net as the operating system platform; the electronic compass uses Honeywell HMR3000, the GPS uses GARMINGPS25LVS, the mushroom head antenna, a single +5 V power supply, and the output interface is RS 232. The system has high accuracy, good real-time performance, and an intuitive interface, and has broad application prospects. A certain type of satellite communication equipment, with an antenna diameter of 1 m, works in the Ku band. The approximate calculation formula for its half-power beam width is: θ=70λ/D, and the half-power beam width θ=1.75° is obtained; the angle indication error of the electronic compass corrected by the magnetic declination is ψ=±0.5°, θ≥ψ, which meets the application requirements. In 2009, the magnetic declination of Urumqi was -2.93°. If the magnetic declination correction is not added, the total error is 2.93°+0.5°=3.43°, which exceeds the half-power beam width and cannot complete the satellite mission. The interface after the program is run is shown in Figure 3.
5 Conclusion
After use, it has been proved that the device can be used to measure the position and attitude of objects with an azimuth accuracy of ±0.5° and an inclination and rolling longitude of ±0.1° after being corrected for magnetic declination. After actual use and measurement in Kunming, Kashgar, Beijing and other places, the effect is good, and the average star-pointing time has been reduced from the original uncertainty to less than 2 minutes (the actual measurement average time is 1.4 minutes), and the improvement effect is obvious. Precautions during use: Since this device uses an electronic compass and uses the principle of calculating the azimuth based on the magnetic field based on the magnetic resistance sensor information, this device is required to be kept as far away as possible from large hard iron materials such as frame buildings, iron mines, iron fences, iron doors and windows during use to avoid the influence of hard iron materials on magnetic lines of force, which may cause large measurement errors.
Previous article:Electronic load network monitoring system based on ARM
Next article:Signal Acquisition System Designed with ARM7 and UC/OS-II
Recommended ReadingLatest update time:2024-11-16 16:20
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Xunwei i.MX6ULL development board-Transplant OpenCv2.4.9-QT program compilation
- [Me and Arteli] DIY an AT32 board, full of favorability
- Microcontroller selection
- Made a tool to use serial port IAP to realize batch online upgrade program
- Things that electronic hardware engineers need to know
- MSP430 watchdog usage notes && how to use the watchdog monitoring program to run away in low power mode
- EEWORLD University ---- Automotive/Industrial Millimeter Wave Radar Sensors
- When designing an isolation system using a linear optocoupler, the isolation strength is required to reach 1800 volts. What should be considered during the design?
- First day of work in 2021
- TL335x-EVM development board processor, FLASH, RAM, FRAM