Welcome to part two of writing a full vessel configuration file.
The first part was pretty easy don't you think ?
Now we're going to be spending quite a bit of time working in OMW to find the numbers we need for placing thruster flames on the various engine types. Before we get started on that I'd like to explain a few things about engines, .cfg layout, and the diffrent types of engines used in Orbiter ships.
Main Engines.
These are your primary engines for getting you into orbit UNLESS you are building a tailsitter. The direction of the these thruster flames depends entirely on the primary axis of thrust for your ship. In our case, it's 0 0 -1 because we want the flame to trail behind our engines. I have tried in vain to get more than one axis out of a vessel config for this but so far it's no dice.
Retro Engines.
These are your braking thrusters IF your ship has them. If not, braking can be handled by your RCS engines OR by turning your ship retrograde and using your main thrusters. Not all ships have them but ours does even if the thrusters are not apparent.
Hover Engines.
If you are building a tailsitter, these will act as your main engines and you will need to pitch down to achieve a higher foreward velocity when using them. In our case, they are considered secondary engines and will be used to help us get airborn from a landed position when dirtside.
All three engine types above are considered as PRIMARY engine types by Orbiter. Your RCS engines are called attitude thrusters and are broken down into two specific catagories to differentiate between the two modes of RCS opperation, ROTATION and TRANSLATION.
Now, I'm not a big user of RCS Thruster fire placement in my add ons because 1) it's a tedious process to find all the points and 2) in most cases, the flames are so small on small vessels that the effort for the visual effect just doesn't seem worth it.
That said, I will be covering these thrusters in depth because the info you put in this part of your .cfg file will save you the headach of looking for it later when you are creating a module for a vessel. I also want this tutorial to dovetail with Jons Module building work and if you want to be really accurate with your modules, you will need to know how to find these numbers.
Ok, lets get started.
Open up your QJTV.cfg file and then minimize the window.
Next, start up OMW and load your QJTV mesh then minimize it too.
We will begin with our Main engines. Our model has three of them so when you go back to the .cfg file, I want you to add this to it at the bottom after the last section.
; === Engine Referance points === ; engine name, position, thrust direction, length, and width of thruster flame
; Auxiliary engines are counted as main, retro, or hover engines depending on their location in this type of form.
MEngineRef1 =
MEngineRef2 =
MEngineRef3 =
We'll find the exact point for our center main engine first, then the port side, and lastly, our starboard side. Go back to OMW and move your mesh until the back of the engines are in the center view and zoom in. We will be looking for a point dead center of our engine and slightly behind in each case.
TIP: if you highlight the mesh groups for you exhaust nozzlesin OMW, it will be easier for you to find the numbers you want and be more accurate with placement. END TIP
That makes our exhaust position ......
MEngineRef1 = 0 7.934 -197.6
MEngineRef2 = -33.819 1 -197.6
MEngineRef3 = 33.819 1 -197.6
So far, so good. Now we add the direction of thrust and we get this.
MEngineRef1 = 0 7.934 -197.6 0 0 -1
MEngineRef2 = -33.819 1 -197.6 0 0 -1
MEngineRef3 = 33.819 1 -197.6 0 0 -1
At this point, I should point out that it is important to add a double space between EACH NUMBER GROUP or you will not see your thruster flames because Orbiter will not be able to read the numbers.
Now we will determine the lenth of our thruster flame by measuring the width of the exhaust port first. In our case, they are all the same but if they differ on another model, you must measure them all to get your numbers so they look right. Ours are roughly 12m in diameter. I like a two to one ratio for thruster flames so our length will be 24m.
MEngineRef1 = 0 7.934 -197.6 0 0 -1 24 12
MEngineRef2 = -33.819 1 -197.6 0 0 -1 24 12
MEngineRef3 = 33.819 1 -197.6 0 0 -1 24 12
Now we will find a good place for our Retro Engines so lets add this to our file then go look at our mesh again.
RetEngineRef1 =
Hmmmmmm, looking at the top view of our mesh, I think that the front of the Raptor bays is a good place to put them so lets take a closer look at this area of the ship. Hmmmmmm, maybe that's not such a good spot after all. I don't realy want them on the front because we would blowtorch the bridge so ............ We can still have retro engines without thruster flames because we input a value for them earlier in PART 1 so we will REMOVE RetEngineRef1 = from our thruster section. We will have useable retro engines but without thruster flames.
This is a big ship so we will need many Hover engines. Lets move on to the next part.
Add this under your Main engine referance points.
HEngineRef1 =
HEngineRef2 =
HEngineRef3 =
HEngineRef4 =
HEngineRef5 =
HEngineRef6 =
Hover engines are small powerful thrusters we use to help get our ship airborn or to keep it from crashing into the ground when we make an aerobrake manuever that has gone horridly wrong. When you build a module, you can give each type of engine it's own fuel tank but for a simple vessel configuration file we will have only one main tank to work from. That said, lets look at our mesh again and find a good spot for our hover engines. We will find our port side first and then use them as mirrored points on the Starboard side.
HEngineRef1 = -21.2 -27.3
HEngineRef2 = -21.2 -27.3
HEngineRef3 = -21.2 -27.3
HEngineRef4 = 21.2 -27.3
HEngineRef5 = 21.2 -27.3
HEngineRef6 = 21.2 -27.3
Have I lost you now ? By looking at the numbers above, two things become apparent. Our hover engines are in two groups and the left side mirrors the right side on the X axis. Our Y axis is the same throughout because our engines are located on the same relitave part of our ship. The final Z numbers will change somewhat because we have two groups ( left and right sides ) with three seperate locations along the length of our hull. Our final location numbers will look like this:
HEngineRef1 = -21.2 -27.3 12.217
HEngineRef2 = -21.2 -27.3 0
HEngineRef3 = -21.2 -27.3 -11.112
HEngineRef4 = 21.2 -27.3 12.217
HEngineRef5 = 21.2 -27.3 0
HEngineRef6 = 21.2 -27.3 -11.112
By carefuly looking at the numbers I've given you above, you will see better what I mean about "mirroring" your numbers for location points. Since these are Hover engines, our direction of thrust vector will be 0 -1 0. Using our main engines as a guide, we will make our hover thruster flames 3m wide and 6m long. That means our final data for hover engines will look like this:
HEngineRef1 = -21.2 -27.3 12.217 0 -1 0 6 3
HEngineRef2 = -21.2 -27.3 0 0 -1 0 6 3
HEngineRef3 = -21.2 -27.3 -11.112 0 -1 0 6 3
HEngineRef4 = 21.2 -27.3 12.217 0 -1 0 6 3
HEngineRef5 = 21.2 -27.3 0 0 -1 0 6 3
HEngineRef6 = 21.2 -27.3 -11.112 0 -1 0 6 3
Ok folks, now we're getting into a realy detailed section. Attitude ( RCS ) Thrusters and their placement. There are two types of attitude thrusters used by Orbiter. You have your ROTATION thrusters and your TRANSLATION thrusters. By using an index number, Orbiter keeps track of which mode you are in and which thrusters to draw flames for.
Thrusters need the folowing numbers.
Engine name
XYZ position
Axis of thrust ( X,Y,orZ )
Index ( 1 or 2 meaning rotation or translation )
Length of thruster flame
Width of said flame
A typical thruster would be written up like this.
AttRef1 = -37.445 -6.5 157.653 0 -1 0 1 1 1 ; Y-
BIG TIP
When you write an .ini file or build a module, you will need to write your attitude thrusters into groups so it is VERY helpful at this point if you add a comment to the end of each line of script here ( seperated by a semicolan ) to remind yourself which group or groups the thruster will be used with ! It will be a big time saver later. Trust me on this.
END TIP
Now you put what I've said here to the test. You are going to write in the rest of the attitude thruster data yourself using what I've given you so far as a guide to get you started. I would like to point out that it would also be very helpful for you to read the following tutorials to better gain an understanding of thrusters and how they are dealt with in Orbiter. You can find them in the handy referance pack I've made for developers avalible in the Tutorial section of the forum.
3D Model pdf
API_Referance pdf
Orbiter 2006 pdf ( page 73 )
Vinka's SC3 Tutorial pdf
Your QJTV.cfg file should now look like this:
; ====================================================
; === Configuration file for QJTV Training Vessel ===
; ====================================================
ClassName = QJTV
MeshName = QJTV
Size = 196.4
Mass = 1020600.5 ; empty mass [kg]
MaxFuel = 920000 ; max fuel mass [kg]
Isp = 6e9 ; fuel specific impulse [m/s]
MaxMainThrust = 6e6
MaxRetroThrust = 5e6
MaxHoverThrust = 4e6
MaxAttitudeThrust = 2e4
COG_OverGround = 2.54
CW = 0.09 -0.09 2.0 1.4
CrossSections = 101.058 77.12199 392.8074
RotResistance = 0.5 1.0 1.0
Inertia = 3460 4441 167 ; aka PMI
Trim = 0.3
LandingPoints = 0 -43.6 157.6 -34 -43.6 -162 34 -43.6 -162
CameraOffset = 0 -10.37 191
EnableCockpit = true ; show internal mesh
EnableFocus = true ; can you jump (F3) and pilot this ship? True or false
EnableXPDR = true ; Does it have a homing beacon? True or false
XPDR = .320 ; What is the default transponder/XPDR frequency if it is true?
; === Ship Attach Points === ; Type, position, direction of attachment, orientation, and ID.
BEGIN_ATTACHMENT
P 0 -28 0 0 0 -1 0 1 0 APW
END_ATTACHMENT
; === Docking Port === ;Dock xyz position, direction of approach, top of hatch, and hatch's ISD freq.
BEGIN_DOCKLIST
0 -6.938 195.519 0 0 1 0 1 0 108 ; Main
END_DOCKLIST
; === Engine Referance points === ; engine name, position, thrust direction, length, and width.
; Auxiliary engines are counted as main, retro, or hover engines depending on their location in this type of form.
MEngineRef1 = 0 7.934 -197.6 0 0 -1 24 12
MEngineRef2 = -33.819 1 -197.6 0 0 -1 24 12
MEngineRef3 = 33.819 1 -197.6 0 0 -1 24 12
HEngineRef1 = -21.2 -27.3 12.217 0 -1 0 6 3
HEngineRef2 = -21.2 -27.3 0 0 -1 0 6 3
HEngineRef3 = -21.2 -27.3 -11.112 0 -1 0 6 3
HEngineRef4 = 21.2 -27.3 12.217 0 -1 0 6 3
HEngineRef5 = 21.2 -27.3 0 0 -1 0 6 3
HEngineRef6 = 21.2 -27.3 -11.112 0 -1 0 6 3
AttRef1 = -37.445 -6.5 157.653 0 -1 0 1 1 1 ; Y-
Now I'm sure you'll be a bit tired of finding all those thruster positions and figuring things out the index number , so I've decided to make this a three part lesson and cover flight testing and usefull plugin modules for vessel configs in part 3.