Flight simulator hardware detection system based on WPF
Technical field
The present invention relates to fly simulation training technical field, especially a kind of flight simulator hardware detection based on WPF
System.
Background technique
Flight simulator is one and generates corresponding what comes into a driver's picture, sound special efficacy and movement feedback according to pilot operator
Real-time emulation system.When pilot operates various devices (control stick, pedal, throttle, button etc.) or teacher in analog capsule cabin
When operating related control button on instructor station, these operating control devices will generate corresponding voltage signal, connect through input
Mouth becomes to be sent to computer after digital quantity, and computer passes through preset management program and relevant to the digital quantity received
Mathematical model is calculated, and the result then calculated writes control by the api interface of flight simulation software, corresponding
Aircraft handling state drives relevant instrument to indicate corresponding aircraft state, and phase is presented in related indicator light on drive control panel
Corresponding state, sound equipment issue and operate consistent sound, and motion platform is in corresponding motion state.
Flight simulator is a kind of equipment of trained pilot, generally by cockpit, interface equipment and each quasi-instrument, what comes into a driver's
System and training computer composition.Computer is the control centre of flight training simulator.Student is sitting in driving in training
Various operations can be carried out in cabin: being opened electric switch, push-and-pull throttle, operated flight bar and rudder, can also obtain various data, it is like flying
Scanning frequency degree, stroke, position, height, wind direction, wind speed etc..And visual system can provide object simulation locating for student, student is grasping
When making just as being sitting in aircraft, feels underriding, faces upward capable and coiling action, it can be seen that various scenery above and below aircraft (cloud,
Mist, river, building), various flight environment of vehicle can also be set, and with all round exercise technology, learning and mastering difficulty is larger and dangerous
Various operations.As long as therefore simulated conditions are true to nature, by can drive an airplane after student's graduation of fly simulation training at once
Lift-off manoeuvre.Previous flight simulator focuses on the realization of the fidelity and multiple functions of flight simulator, in flight simulator
Maintenance and repair in terms of it is not excessive notice, thus be designed beautifully, easy to use, perfect in shape and function, the simulation convenient for operation
Device hardware detection system will produce great pushing effect to the maintenance of flight simulator.
Maintenance simulator, which generally requires, now sends the actual place of maintenance personal to the equipment of profession to debug and tie up
It protects the time and cost is relatively high;In the presence of should not safeguard, failure should not confirm, solve that the time is long, process is unreasonable for existing simulator
Etc. problems.
WPF (Windows Presentation Foundation) is user circle based on Windows that Microsoft releases
Surface frame frame belongs to a part of .NET Framework 3.0.It provides unified programming model, language and frame, really
The work of separating interface designer and developer are accomplished;It provides completely new multimedia interactive graphical user circle simultaneously
Face.
Udp protocol full name is User Datagram Protocol, it is used to handle data packet as Transmission Control Protocol in a network, is
A kind of connectionless agreement.In osi model, at the 4th layer --- transport layer, upper one layer in IP agreement.
Summary of the invention
In view of the above-mentioned deficiencies in the prior art, the purpose of the invention is to provide a kind of flight based on WPF
Simulator hardware detection system supports long-range use, and solving existing simulator should not safeguard, failure should not confirm, solve the time
Problem long, process is unreasonable.
A kind of flight simulator hardware detection system based on WPF, including switch panel, circuit breaker panel, throttle panel,
Instrument face plate, operation panel five are most of;Eight byte data agreements are set according to UDP service agreement, where first character section is
The zone number of panel, second byte are keypad numerals, and third byte is data, remaining byte is left a blank for use.
Preferably, first character section be where panel zone number, it is specific as follows: switch panel zone number be 1,
Circuit breaker panel zone number is 2, and throttle panel zone number is 3, instrument face plate zone number is 4, operation panel region is compiled
Number be 5.
Preferably, second byte is keypad numerals, specific as follows: the keypad numerals of total electric switch are 3, beacon ray light
For key marked as 6, the keypad numerals of airspeed-indicator are 5.
Preferably, third byte is data number, specific as follows: the state of lamp is 1 bright, and 0 goes out;Switch state 1
It opens, 0 closes;Throttle lever data are 0-100.
Preferably, first part's switch panel is opened comprising simulator electronics switch, total switch, aeronautical light
It closes, auxiliary fuel switch, the state of switch and lamp can make respective feedback according to the hardware operation to switch panel;Second part
Circuit breaker panel includes tail-off, BRKR Breaker;Tail-off have 5 kinds of gears: OFF, LEFT, RIGHT, BOTH,
START, BRKR Breaker, which has, presses and jumps out two states;Part III throttle panel is opened comprising throttle lever, mixing ratio bar, wing flap
It closes, the adjustable flight simulator accelerator gear of throttle lever, mixing ratio bar cooperates throttle lever to use, throttle lever and mixing ratio rod volume
Journey is all 0-100, and wing flap switch possesses 4 gears: 0,10,20,30;Part IV instrument face plate include airspeed-indicator, altimeter,
Posture instrument, their effect are successively flying speed, the flying height, flight attitude for indicating flight simulator;Part V behaviour
Making panel includes operating stick, pedal, can make to the state of operating stick and pedal and clearly feed back.
Due to the adoption of the above technical scheme, the invention has the advantages that: flight simulator hardware detection systems can be to simulation
The state of each component of device hardware, which is made, clearly to be fed back, and can quickly detect the component damaged, is flight simulation
The maintenance and maintenance of device provide huge convenience.
Detailed description of the invention
Fig. 1 is data protocol format chart of the present invention;
Fig. 2 is general structure schematic diagram of the invention;
Fig. 3 is the state screenshot of present invention instruction 16100000;
Fig. 4 is the state screenshot of present invention instruction 42000000.
Specific embodiment
The embodiment of the present invention is described in detail below in conjunction with attached drawing, but the present invention can be defined by the claims
Implement with the multitude of different ways of covering.
A kind of flight simulator hardware detection system based on WPF, below in conjunction with attached drawing, the present invention is described in detail.
Embodiment 1:
If Fig. 1 is data protocol format chart, data protocol is made of 8 bytes, and type is all shaping, and first character section is
(such as switch panel zone number is 1 to the zone number of place panel, circuit breaker panel zone number is 2, and throttle panel zone is compiled
Number for 3, instrument face plate zone number be 4, operation panel zone number is that 5), second byte is keypad numerals (such as total electric switch
Keypad numerals be 3, for the key of beacon ray light marked as 6, the keypad numerals of airspeed-indicator are 5 etc.), third byte be data (such as
The state of lamp is 1 bright, and 0 goes out;Switch state 1 is opened, and 0 closes;Throttle lever data are left a blank for use for 0-100), remaining byte.It is every in this way
Data protocol instructions can a device on an accurate simulator, simulator detection system can be accurately to each data
Instruction is fed back.
Such as instructing 16100000, (the first byte 1 indicates that field panel number is that 1, second byte 6 indicates to compile in field panel
Number for 6 key, third byte 1 indicate that the state of this key is 1, back 50 is the supplement based on 8 byte protocols) table
Show beacon ray light switch connection, it can be seen that beacon lamp switch is located at the state connected, such as Fig. 3 on 1 panel of region;Also such as instruct
42000000 (the first byte 4 indicate field panel number be 4, second bytes 2 indicate the key that number is 4 in field panels,
0 expression this key-press status of third is 0, below 50 be the supplement based on 8 byte protocols) indicate that wing flap is in 0 gear, can be with
Observe that wing flap is in 0 file location, such as Fig. 4 on 3 panel of region.
Fig. 2 is the overall construction drawing of flight simulator hardware detection system of the present invention, is clear that it is mainly wrapped
It is most of containing five.First part's switch panel (figure label 1) includes simulator electronics switch, total switch, various
Aeronautical light, auxiliary fuel switch etc., the state of switch and lamp can make respective feedback according to the hardware operation to switch panel.The
Two part circuit breaker panels (figure label 2) include tail-off, various BRKR Breaker;Tail-off has 5 kinds of gears,
BRKR Breaker, which has, presses and jumps out two states, functions as discharge cock, for example it is jumped when spare battery voltage is excessive
Switch can be jumped out, and spare storage battery can fail.Part III throttle panel (figure label 3) includes throttle lever, mixing ratio bar, wing flap
Switch;The adjustable flight simulator accelerator gear of throttle lever, mixing ratio bar cooperate throttle lever to use, their range is all 0-
100, when the hardware of manipulation simulator, the corresponding progress bar of the present invention can be changed therewith;Wing flap switch possesses 4 gears
(0,10,20,30).Part IV instrument face plate (figure label 4) includes airspeed-indicator, altimeter, posture instrument, their effect according to
Secondary is flying speed, the flying height, flight attitude for indicating flight simulator.Part V operation panel (figure label 5) packet
Containing operating stick, pedal, the state of operating stick and pedal can be made and clearly feed back.Flight simulator hardware detection system is logical
The parsing to data protocol is crossed, the state of each component of simulator hardware can be made and clearly feed back, it can be quick
It detects the component damaged, provides huge convenience for the maintenance and maintenance of flight simulator.
The above description is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all utilizations
Equivalent structure or equivalent flow shift made by description of the invention and accompanying drawing content is applied directly or indirectly in other correlations
Technical field, be included within the scope of the present invention.