Home

Multi-Sim - Radical Novelties

image

Contents

1. Command 0x00000000 32 bit integer Base 0 Seconds 32 bit integer 4 Minutes 32 bit integer 8 Hours 32 bit integer T12 Day 32 bit integer 16 Month 32 bit integer 20 Year 32 bit integer 24 Trim Command The trim command sends the trim data to the simulation and commands it to find the angle of attack speed control surface deflections and throttle setting needed to make the airplane fly straight and level Trim strategy values placed in the Trim Strategy field are e 0 By angle of attack e 1 By airspeed e 2 By elevator deflection angle When the simulation receives the trim command it initializes itself resetting the simulated time to zero and placing the airplane at its initial position in space in its initial direction of flight In the command message only the relevant trim command field needs to be filled in If the trim strategy is angle of attack for example then the Angle of Attack field must contain a valid value Both Airspeed and Elevator Angle are ignored X Y and Z are the spatial locations where the airplane will be placed at time zero Note that Z altitude So if you desire a starting altitude of 5 000 ft Z must be set to 5000 Heading is the compass direction that you d like the airplane to be pointed at the start of flight It A value of 0 will align the airplane s body fixed x axis with the spatial X axis A value of 5 90 will align the body
2. 0 000 deg sec Delta A 0 000 deg Delta R 0 000 deg Thrust 0 000 lb Power 0 000 HP Figure 2 The Multi Sim Window Multi Sim is a very easy program to use The executable file name is Multi Sim exe In Windows Explorer go to the folder where you saved Multi Sim and double click on Multi Sim exe The program should come up very quickly and you will see the Multi Sim window Figure 2 The first time you start Multi Sim Windows will inform you that the program is trying to access the network and will ask whether you want to allow it If you are certain that you will only connect to the simulation from a program on the same computer you can allow Windows to block it Otherwise select the boxes so that Windows will allow Multi Sim to have access to your local network and or the internet The Multi Sim window is broken up into three main areas At the upper left you ll see the status fields Figure 3 These Server IP address 192 168 2 2 provide information about the status of Multi Sim itself The Status Ready first line reports the IP address of the computer This is useful if Time remaining 23 36 you are running Multi Sim on one computer and a cab on Pata update rate 1 00 sec another The cab will have to know the IP address of the computer running Multi Sim The next line shows the simulation s status When it reads Ready Multi Sim is idle and waiting for a cab to connect over TCP
3. e w The inertial velocity of the vehicle along the body fixed z axis SEC The term inertial here as well as the nature of the body fixed accelerations and velocities can be a little confusing The values all act along the body fixed axes and reflect the motion of the vehicle through non moving three dimensional space They are not relative to the air But at the same time the body fixed axes are free to rotate in space And so for example while the value of u can be constant if the body is rotating then the velocity of the vehicle isn t constant and the path of the vehicle through space isn t a straight line u v and w are essentially instantaneous velocities 13 p The angular acceleration of the vehicle about its body fixed x axis ka Ot ra The angular acceleration of the vehicle about its body fixed y axis ka 3 ra The angular acceleration of the vehicle about its body fixed z axis ka SEC ad e p The angular velocity of the vehicle about its body fixed x axis roll rate ea e q The angular velocity of the vehicle about its body fixed y axis pitch rate E e r The angular velocity of the vehicle about its body fixed z axis yaw rate ka Again these values act about the body fixed axes but at the same time reflect the rotation of the axis system in space So the angular velocities for example aren t equal to the rate of change of the orientation of the vehicle but do contribute to
4. T The velocity of the vehicle s center of mass in the spatial Z direction L e X The position of the vehicle s center of mass along the spatial X axis ft e Y The position of the vehicle s center of mass along the spatial Y axis ft e Z The position of the vehicle s center of mass along the spatial Z axis ft 14 e Altitude Height along the negative Z axis ft sa ar and e together form the velocity vector of the vehicle At any given moment it has a velocity through space given by these three components With the velocity and the flat Earth axis system we can describe the orientation or attitude of the vehicle The orientation of the vehicle is described using the Euler Angles y 0 and i A ae The heading angle rate ka 00 ra e a The orientation angle rate Fa 0 rad e Si The roll rate at e w The first Euler rotation about the body fixed z axis heading angle rad e 0 The second Euler rotation about the body fixed y axis longitudinal orientation angle rad e The third Euler rotation about the body fixed x axis roll angle When the pitch angle is low bank angle rad The Euler angles are the same angles that are read from an aircraft s artificial horizon or attitude indicator Each combination of the Euler angles specifies a unique orientation of the vehicle in space But the three rotations aren t commutative That is the user must apply them in the correct order or the final
5. 0 1 141 56108 141 561138 0 3 141 561231 0 4 141 561355 0 5 141 561504 0 6 141 561675 0 7 141 561865 0 8 141 562072 0 9 141 562295 m o i 1 N 9 901076 9 900892 0 003455 0 003415 0 003346 0 003266 0 003186 9 900815 9 900756 9 900717 b oOQOOOODODoIDDDODOoOo That said try playing You can t break the simulation or the cab Try trimming the airplane to different speeds and then running it through the maneuvers You ll find that the airplane can react differently to the same maneuver when it enters the maneuver at different speeds For example try trimming the airplane to 47 kts and then executing the rudder doublet At that speed the airplane has a divergent spiral mode You can see it in a scatter plot of X vs Y or X vs altitude 12 Axis Systems and Physical Values The simulation uses a collection of axis systems internally to do its work It s critically important that a user understand these axis systems before writing software to control the simulated aircraft Here we ll discuss these axis systems as well as the physical values that the simulation returns to describe the aircraft s current state Multi Sim calculates the aerodynamic and body forces like thrust gravity buoyancy ground loads etc on the vehicle using a set of body fixed axes These axes have their origin at the vehicle s center of mass and their orientation is fixed to the geometry
6. IP When a cab connects it will say Connected The demo version of Multi Sim will run for 30 minutes at a time The third line shows the amount of time left before the user must close the program and restart it The last line reports the rate at which the simulation 1s updating its data fields Displaying the aircraft s data in the data fields takes time and computing power slowing the simulation s computations and response times The update rate is set to a default value of 1 second when you start the program meaning the simulation will update the data fields every simulated second If you want the simulation to run faster you can set this value higher 60 seconds for example Then the data will be updated every simulated minute The Sim Time value in the data fields 1s updated every simulated second regardless of the update setting If you want to see the data updated at very small intervals you can set this value to fractions of a second But it will slow the simulation down dramatically Figure 3 Multi Sim Status Fields Below the status fields is the simulation s message window Figure 4 Here you will see notices posted by the simulation as it does its work When the simulation is first started 1t automatically initializes all of its internal variables The simulation also does this when a cab commands the simulation to trim the simulated aircraft It initializes all of the vehicle values and resets the simulated time
7. Rudder Angle R radians 64 bit float 28 Throttle Setting Fraction 0 0 1 0 64 bit float 36 Advance Response After receiving the advance command the simulation marches the airplane s responses ahead in time the specified amount Then it sends back a complete compliment of aircraft data You ll note that the 20 control inputs are returned with the rest of the data In the standard versions of Multi Sim the control actuators can be simulated This means that the controls actual positions may not match the control input values In the demo version of the program the controls move instantaneously so these values will always match the commanded values Command 0x00000001 32 bit integer Base 0 Simulation Time sec 64 bit float 4 u Velocity ft sec 64 bit float 12 v Velocity ft sec 64 bit float 20 w Velocity ft sec 64 bit float 28 p Angular Velocity rad sec 64 bit float 36 q Angular Velocity rad sec 64 bit float 44 r Angular Velocity rad sec 64 bit float pon y Euler Angle radians 64 bit float 60 0 Euler Angle radians 64 bit float 68 Euler Angle radians 64 bit float 76 X Spatial Position ft 64 bit float 84 Y Spatial Position ft 64 bit float 92 Altitude ft 64 bit float 100 Angle of Attack a radians 64 bit float 108 Angle of Sideslip B radians 64 bit float 116 Flightpath Angle y radians 64 bit float 124
8. fixed x axis with the spatial Y axis Command 0x00000002 32 bit integer Base 0 Trim Strategy Ox0 1 2 32 bit integer 4 Angle of Attack radians 64 bit float 8 Airspeed ft sec 64 bit float 16 Elevator Angle radians 64 bit float 24 X ft 64 bit float 32 Y ft 64 bit float 40 Z ft 64 bit float 48 Heading radians 64 bit float 56 Trim Response After finding the trim settings for the airplane initializing the simulation to zero time and placing the airplane in its initial position and heading the simulation sends the trim response back to the client If the simulation was able to find a trim solution the Trim Result field will contain a TRUE 1 value Again note that there are some trim settings that aren t valid The simulation won t find a solution in those cases and will return a FALSE 0 value While finding the trim settings the simulation will also find the throttle position required for straight and level flight It s possible to enter valid trim settings that require more power than is available In those cases the throttle setting will be greater than 100 The throttle setting is scaled linearly with power The simulation includes an engine model and 19 maximum power decreases with air density altitude So a throttle setting of 75 at 5 000 feet will yield less power than the same setting at sea level The sideslip angle will be zero for any airplane that is symmetrical acros
9. is done the values on the simulation will stop changing Most of the maneuvers fly for 2 simulated minutes Note how they are completed in a second or two of real time While flying the maneuver the cab 141 562295 saves all of the aircraft data values out to a comma separated H2 11 141 562787 300717 value file named FlightData csv In the same folder as tw e meru Figure 9 CSV Data in a Spreadsheet the executable file You can load this data into any Program spreadsheet program and look at it See Figure 9 Try graphing some of the values with respect to time using a scatter plot See Figure 10 In graphic form you see the response of the airplane to control inputs and the bare airframe dynamics of the airplane after it has been displaced from its trimmed state Even for the experienced pilot or Aerospace Engineer the plots can be very illuminating Each time you trim the airplane the simulated time is set to zero and any residual motion from a previous flight is erased You e TEEN can string multiple maneuvers together by clicking on the Tale Double flying buttons without retrimming But keep in mind that the maneuvers are open loop Nobody is on duty keeping the airplane from entering a very bad attitude aS a a a ae ee on n q 0 00052 0 001329 0 002076 0 002668 9 901109 0 003078 9 901062 0 003323 p 9 899873 0 0 0 0 0 0 9 90098 0 0 003436 0 0 0 0 0 9 900525 9 900904 u
10. of the body See Figure 11 The x axis points forward out the nose of the aircraft the y axis points out the right wing and the z axis points down out of the aircraft s belly These axes remain fixed to the aircraft rotating and translating with it as it moves y through space Note that the labels of these axes are lower case The aircraft is acted on by many forces and moments both aerodynamic and inertial These forces and moments rarely align with the body fixed axes So the simulation sums the individual forces and moments and then finds the components of those values down each of the body fixed axes Once it has completed that process it can calculate the linear and angular accelerations of the vehicle When a cab commands the simulation to calculate forward in time using the advance command the simulation returns a full set of vehicle data Some of the values are measured along and about the body fixed axes Z Figure 11 The Body Fixed Axis System Ou e F The inertial acceleration of the vehicle along its body fixed x axis LA The inertial acceleration of the vehicle along its body fixed y axis A Ow w A e FI The inertial acceleration of the vehicle along its body fixed z axis 5l e u The inertial velocity of the vehicle along its body fixed x axis L sec e v The inertial velocity of the vehicle along its body fixed y axis L SEC
11. the simulation how to move the control surfaces and throttle of the vehicle at the beginning of each calculation cycle The simulation provides for this by operating as an Internet server Any program or device can connect to the simulation as a client as shown in Figure 1 TCP IP Command Messages TCP IP Response Messages Your Computer Program Multi Sim Figure 1 The simulation client server paradigm The simulation has a small set of commands that it can execute When a client program connects it can send any of those commands along with the necessary data to the simulation in a TCP IP message After executing the command the simulation sends a TCP IP response message containing the pertinent data back to the client In this way the simulation works in lockstep with your program advancing the aircraft in time using your current control inputs The simulation 1s able to advance a specified amount of time into the future And so your program can command the simulation to advance small increments in time when fine input or output resolution 1s needed or it can command it to advance large increments in time when no control input is needed In many flight simulation scenarios where the vehicle is an airplane it s often convenient to begin simulating with the airplane in the air already flying rather than having it take off from the ground and then fly to a prescribed point in space To make this possible the
12. to zero You ll see a message posted when this happens In Figure 4 you ll also note the message Wind axis forces and moments This indicates that the aircraft data file provides aerodynamic values that were measured in the wind axes and the simulation is making its aerodynamic calculations based on that measurement scheme The standard versions of Multi Sim allow a user to select and load vehicle data files This message gives the user confidence that the simulation 1s applying the data correctly When a cab connects the system announces Beginning session with xxx xxx xxx xxx reporting the IP address of the connecting cab When the cab disconnects the 0 Initializing 1 Wind axis forces and moments 2 Initialized Figure 4 The Multi Sim Message Window system announces Closing session When a cab sends the advance command the system doesn t post any kind of notice That would slow down computation and response Instead it simply advances the simulation ahead in time and then updates the data fields The simulation s data fields Figure 5 display ae the current state of the vehicle The values General speed 0 000 kis ee ee a a Positional A e Systems and Physical Values section The Daye values are collected into five groups The first Longitudinal FE A e group provides general information the A e e simulation time and the vehicle s scalar speed Ke The se
13. Multi Sim Multi Purpose Engineering Flight Simulation User s Manual For Multi Sim Demo Version v1 0D Radical Novelties Colorado USA Copyright 2014 Richard C Wagner This document may be reproduced and distributed freely provided it remains unmodified and that this copyright notice is preserved Contact multi sim dradicalnovelties com Table of Contents TACAOUTE HO 0 ie ki apik ki abi kaa ko s bi len les 4 SVSLEND OVER VIC W kola sasa kl ana kalot donan aks a 5 D M VEKSTON FCA CS sage asa a en etat kinan e ia 6 PRU Oe Sci ga fe dwa oo dans aki eta aaa re es a de ase 7 The Simulated VENIE LO wan av santi ou aa kapa aaa k aaa ii 9 Hitting the Ground Running The Open Loop Cab 10 Axis Systems and Physical ValUCS rreereeoooreoooee 13 Trining ME AA Cra oi ccvssesasdesanadd go an le bi baa de won katia a 17 Utilizing Multi Sim Command and Message Formats 18 CIES YOU Starte dasste is at ya sok a oo anan ob 23 System Regue EN SI ele dec e io ee asid n a 25 Introduction Thank you for downloading a copy of the Multi Sim demo The Multi Sim flight simulation was created as an engineering tool Its purpose 1s to provide a flexible easy to use surrogate for a real aerospace vehicle like an airplane missile rocket or even a blimp or dirigible The simulation is designed to be controlled through a network interface simply by sending it formatted binary commands The network interface allo
14. SA eA celersiion ra ft sec 64 bit float 132 y Axis Acceleration x ft sec 64 bit float 140 z Axis Acceleration ft sec 64 bit float 148 x Angular Accel w rad sec 64 bit float 156 y Angular Accel od rad sec 64 bit float 164 z Angular Accel r rad sec 64 bit float 172 Heading Rate a rad sec 64 bit float 180 Pitch Rate rad sec 64 bit float 188 Roll Rate rad sec 64 bit float 196 21 Spatial Velocity 3a ft sec 64 bit float 204 Spatial Velocity ar ft sec 64 bit float 212 Spatial Velocity vi ft sec 64 bit float 220 Aileron Angle A radians 64 bit float 228 Elevator Angle E radians 64 bit float 236 Rudder Angle oR radians 64 bit float 244 Thrust Ib 64 bit float T292 Power ft lb sec 64 bit float 260 Throttle Setting fraction 0 0 1 0 64 bit float 268 22 Getting You Started The main reason we wrote the Open Loop Cab 1s to provide you with a set of source code files that will get you started writing your own cabs to fly the simulated airplane There are two sets of source code files to work with They are located in the Forth Source Code and C Source Code folders in the Multi Sim distribution The Forth and C cabs are written in a parallel fashion using files of the same name and within them functions with the same name and functionality C Version On the C side the primary files are e DataValues h e NetworkSupport h e Commands h To prov
15. at the airplane is trimmed Note how the speed Del E power and throttle fields have been filled in If the airplane was asymmetrical across its x z plane or 1f its engine was off center the Beta Delta A and Delta R fields would also have finite values in them What you see in the fields is the unique set of trim settings for the airplane at the angle of attack that you entered Now try entering a value of 5 degrees in the Alpha field and again click Trim by Alpha The cab should tell you that the airplane is gt UNTRIMMED lt This is because the angle of attack is so low that the airplane can t support its own weight at any airspeed Note the corresponding message in the message window of the simulation Re enter the first value you used and trim again If you want you can enter values into the position and heading fields first enter a value into one of the Trim by fields and then click on that button The simulation will trim the airplane and put it at the position you requested Note how the simulation informs you that it is initializing and trimming the airplane and how the values in the simulation s data field match the values in the cab s fields The airplane is now flying and the simulation 1s ready to advance its responses forward in time When the airplane is trimmed the Flying buttons are activated Now you can click on one of them and the cab will fly the airplane Each button flies the airplane through a differ
16. cated airspeed So at an altitude of say 5 000 ft the indicated airspeed will be ower than the true airspeed If the airplane being simulated is asymmetrical across its x z plane or if the airplane has a thrust line that doesn t pass through its center of mass Multi Sim will also find rudder and aileron deflection settings to ensure that it is flying straight and level They are returned with the rest of the data Multi Sim s trim command allows a user to trim the airplane to his wishes It takes the strategy to be used along with the pertinent data and then trims the airplane It returns all of the trim settings along with the thrust power and throttle position required to fly at those settings The user must take note of the throttle setting returned It can be greater than 100 Also note the importance of transferring the trim settings from your program s trim response data structure to its data structure for the advance command This is necessary to ensure that the simulated airplane begins flying with the correct control settings Last note that there are settings for which there is no trim solution If for example you ask for too low an angle of attack there may be no airspeed at which the airplane will be able to fly The same is true for too nose down a value for elevator deflection The trim response contains a success field that indicates whether the simulation was able to find a valid trim solution 17 Utilizing Mult
17. cient for your work please call us and we can arrange to make a version that matches your vehicle in every detail We find the system to be very useful and when there 1s time to play even fun We hope you will too System Overview While much of the general high level information provided in the following parts of this manual applies to all versions of the simulation the details are specific to the demo version If you are using a non demo version of the system please refer to its specific manual The simulation does its work by first calculating the forces and moments on the vehicle Next it applies those forces and moments to the six degree of freedom rigid body equations of motion Those equations yield accelerations of the body in space The simulation integrates those accelerations into velocities and the velocities into displacements using a very accurate integrator Once these steps are accomplished the motion of the vehicle has been calculated advanced a short time into the future The simulation can then repeat the process calculating updated forces and moments with the vehicle in its new orientation location and speed and then following through by calculating the vehicle s updated motion It does this over and over time marching the motion of the aircraft as far into the future as we like The cyclic nature of the calculations provides a mechanism for another program to control the simulated vehicle It simply needs to tell
18. cond group provides positional data DE eee The third group provides what is commonly Lateral Directional n m menn e ED T0000 eye considered longitudinal data The fourth pelea R 0 000 deg group provides lateral directional data And Powel a pac Saat the fifth group provides power related data Figure 5 Multi Sim Data Fields The left hand columns of each group contain the pertinent values The right hand columns contain the rates the first derivatives with respect to time of some of the values Multi Sim s menu Figure 6 contains only a few items Selecting File allows a user to select and load a vehicle data file containing aerodynamic and mass properties values This is disabled in the demo version Selecting Simulation then Set data update rate brings up a dialog box allowing the user to change Multi Sim s data update rate from the default value of 1 simulated second Enter any value greater than zero Finally the About box gives details on the system s origin and copyright information E Multi Sim Flight Simulation File Simulation About Censer IP addrece 1947 188 Figure 6 Multi Sim s Menu The Simulated Vehicle The demo version of the simulation models a single vehicle the Cessna 172 See Figure 7 The 172 is a single engine four seat airplane created by Cessna Aircraft Corp and is commonly used for both training and transportation Some of the data f
19. e where the controls reside Demo Version Features e 6 degree of freedom non linear dynamic model e Simulates one aircraft the Cessna 172 e Flat Earth spatial model e International Standard Atmosphere model e Altitude sensitive engine model e Aircraft controls deflect instantaneously e No ground reaction model e No wind model No sensor or actuator models Single program instance e 30 minute time limit Running Multi Sim ti 1 Si M i a L 1 m Multi Sim Flight Simulation ka st LO resi File Simulation About Server IP address 192 168 2 2 Aircraft Data Status Ready Sim Time 0 000 sec Time remaining 29 38 Speed 0 000 kts Data update rate 1 00 sec X pos 0 000 ft X vel 0 000 ft sec 0 Initializing Y pos 0 000 ft Y vel 0 000 ft sec 1 Wind axis forces and moments Altitude 0 000 ft By Gees ae 0 000 ft sec 2 initialized Alpha 0 000 deg n an ae 0 000 ft sec du dt 0 000 ft sec 2 Seer 0 000 ft sec dw dt 0 000 t sec 2 ee ae 0 000 deg sec dq dt 0 000 deg sec 2 Theta 0 000 deg dTheta dt 0 000 deg sec Gamma 0 000 deg Delta E 0 000 deg Beta 0 000 deg Forssaan 0 000 ft sec dv dt 0 000 ft sec 2 Diore ie 0 000 deg sec dp dt 0 000 deg sec 2 Pa fam ti 0 000 deg sec dr dt 0 000 deg sec 2 Phi iani 0 000 deg dPhi dt 0 000 deg sec Pai ecean 0 000 deg dPsi dt
20. ent maneuver e No Control Input flies the airplane straight and level a good test to see if the simulation really found accurate trim settings for the airplane e Stick Rap flies the airplane straight and level for 3 seconds Next the pilot pushes the stick forward deflecting the elevator 8 degrees down holding it there for one second then returns it back to its original position Then the airplane flies for an additional 116 seconds with the controls held in place e Elevator Doublet flies the airplane straight and level for three seconds Next the pilot pulls the stick back deflecting the elevator 4 degrees up and holds it for one second Next he pushes the stick forward deflecting the elevator 4 degrees down from its trim position and holds again for one second Then he returns the stick to its trim position and the airplane flies for an additional 115 seconds e Aileron Doublet flies the airplane straight and level for three seconds Next the pilot pushes the stick to the left deflecting the ailerons 4 degrees and holds it for one second Next he pushes the stick to the right deflecting the ailerons 4 degrees the other direction and holds again for one second Then he returns the stick to its trim position and the airplane flies for an additional 115 seconds e Rudder Doublet flies the airplane straight and level for three seconds Next the pilot steps on the right rudder pedal deflecting the rudde
21. ge of airspeeds from stall to its maximum speed At any given speed the airplane will be flying with a unique combination of its flight parameters angle of attack elevator deflection and thrust or power These are the trim settings for that airspeed To initiate a simulation run with the airplane flying straight and level at least one of these settings must be specified and then the rest can be calculated Multi Sim has a built in set of routines that provide this functionality There are three strategies for trimming the airplane based on which parameter is specified The user can specify the trim airspeed and then Multi Sim will find the angle of attack elevator deflection and thrust that will result in the airplane being trimmed at that airspeed The user can also specify the angle of attack and Multi Sim will find the trim airspeed elevator deflection and thrust Last the user can specify elevator deflection and Multi Sim will find the airspeed angle of attack and thrust By Airspeed Specified Found Found Found By Angle of Attack Found Specified Found Found By Elevator Angle Found Found Specified Found Note that the airspeed we talk about here is true airspeed or the geometric speed with which the airplane is moving through the air Indicated airspeed is the speed of the airplane measured using dynamic pressure which is a function of air density The lower the density the lower the indi
22. h Version On the Forth side the primary files are e Network Support FTH e Data Values FTH e Commands FTH FlightSim FTH To provide the Open Loop Cab program they are augmented by e Windows Globals FTH e ASCII Float FTH e Open Loop FTH e Client GULFTH The Forth version of the cab was compiled under VFX Forth from MicroProcesor Engineering Ltd in Southampton UK http www mpeforth com MPE offers a trial version of VFX for free Go to http www mpeforth com arena htm trial and scroll down to VFX Forth for Windows The source code for the open loop cab is all written to be ANS Forth compliant so you should be able to use it under your favorite Forth system without any changes FligthSim FTH 1s the load file for the program There you will see two VFX library files being loaded NDP387 FTH which supplies floating point words and SOCKETIO FTH which supplies 24 TCP IP networking words You ll need to find and load the same library words on your own Forth system Network Support FTH provides a small set of words that are used to connect to the simulation send messages to the simulation and receive responses Data Values FTH 1s a very important file It creates a set of structures that form the messages for the simulation commands and responses Buffers of the appropriate size are created for each message Then the structures are used to address each individual field within the buffers The buffers are loaded wit
23. h data and passed to the VFX TCP IP writesock word to send a command Empty buffers are passed to readsock to receive the response from the simulation Commands FTH is also an important file It provides a set of high level words that form command messages send them to the simulation then receive response messages These are the words that you can use to write your own cab They are simple to use and there are only a few of them NetworkSupport FTH DataValues FTH and Commands FTH are the only files you need to write your own cab Simply load them before your own code and call the words within Commands FTH Open Loop FTH 1s included as an example It provides the routines that fly the airplane in the Open Loop Cab There you will see good examples of how to use the command words in Commands FTH to trim and fly the simulated airplane Windows Globals FTH loads any Windows API functions that aren t included in the VFX Forth kernel by default Finally Client GUI FTH comprises the Windows GUI for the Open Loop Cab It s provided in case you re interested in writing your own GUI The Forth version of the cab employs a main window for its GUI In the C version of the cab you will find a GUI with identical functionality but written using a dialog box and no main window The dialog box technique requires a great deal less code System Requirements e Windows XP Vista 7 and 8 Intel 80x86 processor with numeric coprocessor 25
24. i Sim Commands and Message Formats This is what Multi Sim 1s all about allowing you to control the simulated vehicle Multi Sim operates as a TCP IP server To communicate with the simulation a client application must connect using a TCP connection The demo version of the simulation operates on TCP Port Number 20248 or Ox4F 18 This port number seems to be available on most Windows XP Vista 7 and 8 systems After establishing a TCP connection with the simulation a client is free to send command messages and receive response messages The messages and their formats follow Note that all values in these messages are sent little endian That is each value in the message is stored into its field least significant byte first Integer values are all 32 bits 8 bytes Floating point values are all 64 bit 8 byte doubles The simulation always copies the command value and includes it in its response as the first field This allows a client to determine which response message it is receiving if necessary In each of the following message diagrams memory addresses increase down the page Hello Command The hello command is a simple command that aids in the development and debugging of client programs The command itself consists of a single value a 32 bit zero Command 0x00000000 32 bit integer Base 0 Hello Response The simulation responds by sending the time and date reported by the host computer
25. ide the Open Loop Cab program they are augmented by e ProgrammerAids h e OpenLoop h e main cpp The C version of the Open Loop Cab was written and compiled using Code Blocks and its gcc compiler and was written with a Windows GUI As the files exist in the directory if you have Code Blocks loaded on your computer you should be able to double click on Flight Simulation Client cbp and the project will open It should compile without any issues Some of the command functions display information or report error conditions using Windows message boxes These require the handle of a parent window which you ll see passed If you aren t compiling for Windows simply remove the MessageBox calls and remove the window handle parameter from the function declarations main cpp 1s the top level file and is also used as a load file You only need to look at it to see what libraries are being loaded and to get the correct order of compilation for the files listed above The code within the file is all related to the Windows GUI for the cab and is only relevant if you want to see how that was written DataValues h is very important This is where the data structures are created that form the command and response messages to and from the simulation Read the notes at the top of the file and you should be able to understand what 1s going on below Note how all of the fields are defined for each message The Windows TCP IP send and recv functions expect to be pa
26. it The demo version of the simulation assumes a flat Earth spatial model See Figure 12 This provides a three dimensional axis system in space The X and Y axes form a horizontal plane and the X and Z axes form a vertical plane Altitude The axes don t rotate in space and each extends to infinity Essentially we ve created a flat Earth that extends off in all directions Note that the Z axis points vertically down toward the ground and altitude has an opposite sense So an altitude of say 1 000 feet is equal to a Z value of 1 000 A x Weight always acts along the Z axis The axis system has a 0 0 0 definite origin at 0 0 0 On a spherical Earth this point has p to be established rather arbitrarily Also note the upper case Y axis labels The flat Earth model is useful and valid for any aircraft that doesn t fly at high speed or for long distances The demo version of Multi Sim doesn t have a ground Figure 12 Flat Earth Axis System reaction model So you can fly the airplane through an altitude of 0 if you want to When the simulation returns a full set of data after completing the advance command there is a set of data that references the flat Earth spatial model OX e Si The velocity of the vehicle s center of mass in the spatial X direction a OY e Si The velocity of the vehicle s center of mass in the spatial Y direction ra OZ
27. l time or faster If you are simulating multiple aircraft simulating real congested airspace or testing the control of swarms of vehicles for example you won t need extra hardware The simulation s speed is also central to keeping it out of your way If you re using the simulation to develop a control system the simulation s fast response and low resource consumption allows your system the time it needs to do its processing Multi Sim runs so fast in fact that there is no problem with running your control system on the same computer On the other hand because Multi Sim is designed to operate over a network interface you can also run the simulation on one computer and your control system on another There is no difference It also makes no difference whether your program runs on a desktop or embedded system The simulation s software was written in such a manner that the authors can easily add new dynamic component models Along with modeling the bare airframe dynamics of the flight vehicle it can model any sensor or actuator on the vehicle including their representative errors It can also model the motions and effects of auxiliary systems like control actuators gimbals landing gear speed brakes etc The simulation s software was designed to be modular And so adding or deleting models or even changing the physics of the models is straight forward Custom versions of the simulation are our specialty If an off the shelf version isn t suffi
28. of the vehicle through the air The air flows over the vehicle in the direction opposite these velocities The vehicle rarely points in the same direction as its spatial velocity vector meaning the v and w velocity components are rarely zero And this means that the velocity of the wind over the vehicle is at some angle to the body fixed x axis We describe the relationship between the vehicle and its velocity vector with the following angles e a The angle of attack of the vehicle rad e B The sideslip angle rad In the side view of Figure 14 note the angle between the vehicle s body fixed x axis and its velocity vector This is the angle of attack of the aircraft The vehicle s lift drag and pitching moment are functions of this angle On the top view of Figure 13 the angle between the vehicle s body fixed x axis and its velocity vector is the sideslip angle The sense of the sideslip angle is chosen to be positive when it results in the vehicle experiencing a positive velocity along its y axis Thus a positive angle of P results from the nose of the vehicle swinging left The lateral force rolling moment and moment about the z axis are functions of this value e y The flightpath angle of the vehicle rad Also in Figure 14 note the angle between the vehicle s velocity vector and the horizon This is the flightpath angle of the vehicle 16 Trimming the Aircraft An airplane can fly straight and level over a ran
29. or the model used in the simulation 1s listed below The aerodynamic and mass properties data were estimated by Jan Roskam in his book Airplane Flight Dynamics and Automatic Flight Controls Part I DAR Corporation Lawrence KS 1995 ISBN 1884885179 Figure 7 Cessna 172 e Wingspan 35 8 ft Length 26 9 ft e Weight 2 300 Ibs Engine Lycoming O 320 horizontally opposed four cylinder e Power 160 hp at sea level e Stall speed 47 kts e Cruise speed 122 kts 75 power e C G Loc 3 5 ft from the datum center of range at 2 300 Ibs e Aileron deflection A is positive for a positive moment about the x axis that is a roll to the right Maximum deflection is 20 degrees e Elevator deflection dE has the same sense as rotation about the body fixed y axis positive for the trailing edge of the elevator to move down Maximum deflection is 28 to 23 degrees e Rudder deflection R has the same sense as rotation about the body fixed z axis positive for the trailing edge of the rudder to move left Maximum deflection is 16 degrees Hitting the Ground Running The Open Loop Cab Multi Sim comes with an example client program the Open Loop Cab This simple cab program allows a user to experience what it s like to use Multi Sim trimming and then flying a simulated muti sim open toop cab airplane The Open Loop cab provides a set of 4 controls you can use to first trim the simulated Connect
30. orientation will be wrong To find the vehicle s orientation first assume that the vehicle is aligned with the flat Earth axis system its body fixed x axis is aligned with the Earth X axis its body fixed y axis is aligned with the Earth Y axis and its body fixed z axis is aligned with the Earth Z axis Now the vehicle is rotated about its body fixed z axis by the value y This Figure 15 Aircraft Attitude Front View establishes the heading angle of the vehicle the angle between the Earth X axis and the body fixed x axis Next the vehicle is rotated about its body fixed y axis by 8 This establishes its pitch angle the angle between the vehicle s longitudinal axis and the horizon Last the vehicle is rotated about its body fixed x axis by At low values of 0 this establishes the vehicle s bank angle or the angle between the vehicle s lateral axis and the horizon But at higher pitch angles this becomes less well defined and is simply the roll angle After the vehicle has been rotated through the three angles in order it is in the current orientation The sense of each of these angles is illustrated in Figures 13 14 15 and 15 The demo version of the simulation contains no wind model This means that the air mass is fixed in space and the velocity of the vehicle through the air 1s identical to the velocity of the vehicle through space This also means that the component inertial velocities u v and w reflect the motion
31. r 4 degrees to the right and holds it for one second Next he steps on the left rudder pedal deflecting the rudder 4 degrees to the left and holds again for one second Then he centers the rudder and the airplane flies for an additional 115 seconds e Loop is actually a semi open loop maneuver The pilot flies the airplane straight and level for three seconds Next he pushes the throttle full forward and pulls back on the stick deflecting the elevator up to an angle of 15 degrees He holds the stick until the airplane completes a single loop then returns the throttle and stick to their trim positions flying the 11 airplane for 10 more seconds Trim the airplane to at least 120 kts before entering this maneuver A lower entry speed results in the airplane stalling The results are unrealistic since the aerodynamic data for the 172 don t include post stall values e Aileron Roll is also a semi open loop maneuver The pilot flies the airplane straight and level for 3 seconds Next the pilot pushes the stick to the right deflecting the ailerons 15 degrees He holds the stick there until the airplane has rolled 360 degrees then he centers the stick and flies the airplane for another 10 seconds When you click on one of the buttons the cab will begin flying the airplane Note how the data values begin changing on the simulation The button you clicked will say working until the maneuver is complete When the flight
32. s its x z plane But it will be a finite value for an airplane that isn t so Command 0x00000002 32 bit integer Base 0 Trim Result OxFFFFFFFF or 0 32 bit integer 4 Angle of Attack a radians 64 bit float 8 Angle of Sideslip P radians 64 bit float 16 Airspeed ft sec 64 bit float 24 Aileron Angle 0A radians 64 bit float 32 Elevator Angle SE radians 64 bit float 40 Rudder Angle R radians 64 bit float 48 Thrust Ibs 64 bit float 56 Power ft lb sec 64 bit float 64 Throttle Setting Fraction 0 0 1 0 64 bit float aa Advance Command The advance command is used to fly the simulated airplane It gives the simulation a full set of control inputs along with a time to calculate into the future The simulation takes the control inputs applies them to the airplane then marches the airplane s response forward in time the specified amount The advance time can be any floating point value greater than zero If you need to see the airplane s attitude and apply control inputs at fine intervals then use small values like 0 1 seconds If you are leaving the controls fixed for a long period of time say 60 seconds and also don t wish to see the attitude values until then you can use any larger value Command 0x00000001 32 bit integer Base 0 Advance Time seconds 64 bit float 4 Aileron Angle 0A radians 64 bit float 12 Elevator Angle E radians 64 bit float 20
33. simulation provides a trim command An airplane flying straight and level does so with unique combinations of its flight variables angle of attack airspeed control surface deflections and thrust or power The trim command takes angle of attack airspeed or elevator deflection and finds the other trim settings required to ensure that the airplane will be flying straight and level when the simulation is started The demo version of the simulation has no ground reaction model and so each flight must begin in the air The demo version of the simulation executes three commands The first the hello command is a good test to see whether a client 1s able to communicate with the simulation Upon receipt of the hello command the simulation responds by sending a message containing the time and date of the computer on which it is running The second command trim tells the simulation to trim the aircraft by an angle of attack airspeed or elevator deflection strategy The simulation runs its trim routines then sends a message containing all of the trim settings back to the client The last command advance sends the current control settings to the simulation along with the amount of time to march into the future The simulation advances the aircraft model the prescribed amount then returns a full set of aircraft data back to the client We refer to Multi Sim client programs as cabs Like the cab of a truck or a train they ar
34. ssed a character array filled with data to be sent or an empty array with space to place a received message We need to send and receive integer and floating point data however We accomplish this by creating character arrays of appropriate length for the messages and then assigning pointers into those arrays marking the field for each integer or floating point value 23 NetworkSupport h provides a set of functions that send messages to the simulation and receive responses Commands h is also an important file It provides a set of high level functions that first form command messages send the command to the simulation and then receive the response These are the functions that you can use to write your own cab They are simple to use and there are only a few of them DataValues h NetworkSupport h and Commands h are the only files you need to write your own cab Simply load them before your own code and call the functions within Commands h OpenLoop h is included as an example It provides the routines that fly the airplane in the Open Loop Cab There you will see good examples of how to use the command functions in Commands h to trim and fly the simulated airplane ProgrammerAids h is a support file for the GUI Here you ll find a small set of functions that are largely used for unit conversions And finally main cpp embodies the GUI that allows you to run the routines in OpenLoop h from a window actually a dialog box Fort
35. to Server localhost _ IP address airplane then using a second set of controls you can fly the simulated airplane through a collection aa of open loop maneuvers See Figure 8 As the 0 000 airplane is being flown through the maneuvers EEFT the cab saves the aircraft data to a file so you can ETT view and graph it using any spreadsheet program Beta 0 000 deg Delta 0 000 deg Delta R 0 000 deg The Open Loop Cab provides three services Power 105 141 HP First it allows you to become familiar with the Throttle 121 992 ki 2 X position 0 0 way Multi Sim works giving you a tool that you A A ae can use to exercise the simulation Second for mute T the interested individual it provides a very good Bearing 0 0 tool to use for learning the bare airframe flight dynamics of an airplane and how an airplane responds to control inputs Last and most importantly the cab provides both an example of how to write a cab for Multi Sim and because it comes with source code provides a set of basic files that you can build upon when writing your own cab whatever its functionality might be Figure 8 The Open Loop Cab Running the Cab You will find two copies of the cab in the Multi Sim distribution package In Windows Explorer go to the folder where you saved the Multi Sim files Note the two sub folders Forth and C Yo
36. u ll find a copy of the cab named Open Loop Cab exe in each folder The copy in the Forth folder is written in the Forth programming language and the copy in the C folder is written in the C programming language They are functionally identical Pick one and start it by double clicking on it Next go back to the main folder and start Multi Sim by double click on Multi Sim exe Position the two windows on your monitor so that you can easily see both You ll see that most of the buttons on the cab are deactivated Click on the Connect to Server button This will start a TCP IP session with the simulation When the simulation accepts the connection the trim keys will be activated and the button you just clicked will say Disconnect The word localhost in the IP Address field indicates that the cab will try to connect to the server on the same computer If you want you can run the simulation on another computer Then just enter the IP address displayed in the status field of the simulation in the address field on the cab Click connect and it should be able to connect to the simulation across the network Once the cab has connected you can trim the airplane and ready it for flight Enter a value between 0 and 10 degrees in the Trim by Alpha field Now click on Trim by Alpha The cab will send the 10 trim command to the simulation telling it to trim the airplane to the value you entered The cab should now tell you th
37. ws any other program to control both the simulation and the aircraft that it models The standardized open interface makes the simulation available for a multitude of uses from simple flight dynamics studies to the core of a manned flight simulator It s just a matter of what kind of program you write to connect to it In general Multi Sim can model any aerospace vehicle provided that the vehicle s aerodynamic and mass properties data are known There are different versions of the system for aircraft lighter than air craft rockets and missiles etc Each can model multiple vehicles using user selected data files We include a small selection of data files with each copy Often one of those vehicles will act as an acceptable surrogate for your vehicle If you have the aerodynamic and mass properties data for your vehicle you can also create your own data file to model your vehicle accurately If you don t have data for your vehicle Radical Novelties can generate it for you under contract Multi Sim was written to operate extremely fast On a 2 13 GHz laptop with a Pentium P6200 processor running on a single core it runs at almost 2 500 times real time 5 minutes of flight can be simulated in only one eighth of a second If you re creating an autonomous control system this allows you to fly complete mission scenarios in fractions of real time Or you can run multiple copies of the simulation simultaneously on a single computer still running rea

Download Pdf Manuals

image

Related Search

Related Contents

  okamura_divo2_12pcat_141023_s_ol.indd    Manual de uso de pizarra interactiva  Allied Telesis AT-AR750S router  Bedienungsanleitung als PDF Datei  LCD Data Projector  Wireless WAll TrANsMiTTer ZW Ws Wireless sYsTeM Z  Hoover Shampoo- Polisher Carpet Cleaner User Manual  

Copyright © All rights reserved.
Failed to retrieve file