Skip to content

Getting Vehicle Area for LVD Drag Force Calculations

Kerbal Space Agency edited this page Aug 15, 2019 · 2 revisions

Launch Vehicle Designer allows you to input the square area of the launch vehicle to help it calculate the amount of drag that will be enacted upon the rocket during ascent. There's a way to be very exact about this value if you wish and I will walk you through the steps to get it using the following tools:

KVV - Kronal Vessel Viewer (KSP mod)
Paint.NET (external application - can likely be replaced by image editor of choice)

We will be gathering area data for this rocket:

Get your workspace setup by loading up KSP, entering the VAB, loading up your launch vehicle and then displaying KVV like so:

Ugh that is garish. Disable the Color Adjust by clicking the Active checkbox just under the button and then click the FXAA button. Disable the FXAA as well so it is easier for Paint.NET to find the edges and also to give you more room to view the rocket in the window. The Orthographic option should be on by default up at the top, but if for some reason it is not, enable it. We now have this:

Now press 3 on your keyboard to toggle over to the Rotate Gizmo and while holding the Shift key click on any part of the vehicle, which will automatically select the root part and allow you to adjust the orientation of the entire craft. Make sure your rotation snap is set to 90° and then use either the red or blue handles to flip the rocket 90° so that it appears sideways in the KVV window like this (using the red handle here):

Now we're going to use these buttons at the top of the KVV window:

Use the rotate buttons (1) to spin the rocket around (its orientation may flip back to vertical, no matter) until it is nose-on to you. This can take a bit of finesse because KVV currently (though it has been requested) does not have the ability to snap to a viewing angle, so you may pass vertical and have to make really light mouse taps to make very small adjustments to get the rocket vertical. It takes practice, but you'll get better at it. Use the arrow buttons (2) and zoom buttons (3) to move the rocket around the view and get a closer look to make sure it's square. Here's the final result - a little rotated, which will be an issue later you want your scale object straight but right down the nose:

Next you need to add a scale object. This can be any part you know the exact size of, like the 1m truss that comes with the stock game. Here I use the launch stick from Sounding Rockets mod because it's easier to block out in later steps. I've attached it to the rocket (this may change the KVV view - just zoom out and use the arrow keys to re-center if needed) then used the Offset Gizmo to move it out of the way but still in view:

Okay now go ahead and press that Screenshot button at the top-right of the KVV window and check your /Screenshots folder in your KSP installation. Because you adjusted the view around it's possible the screenshot didn't capture the whole rocket and your scale part. If not, use the arrow/zoom keys to adjust the view accordingly and keep trying until you get everything in the screenshot. Here's mine:

Okay it's time to go to Paint.NET (or any image editor of choice) and load the image. The reason I like the launch stick is because it's 4m long so each of the yellow/black sections is 1m. This means after I open it in Paint.NET I can crop it down to just what I need to work with:

Make sure Paint.NET is the active window and press S four times to select the Magic Wand tool. Click anywhere on the blue background and you should get a selection bounds around your scale object and the rocket. If any portion of either the scale object or the rocket is also being shown as selected, tweak down the Tolerance box until nothing else but the background is selected:

Now for my case since I'm using the launch stick, I need to make sure only 1m of it is selected and I also had to tweak it a bit to be level since the view was slightly rotated:

Now that the selection is ready, press Ctrl+I to invert it and then Del to remove the rocket and the scale object to leave only the background. Here I also removed the remainder of the launch stick after this step:

I now have an empty area 1m wide. If I select the Magic Wand tool again and click inside to select that area I can then press M to select the Pixel Move tool, which will bring up grab handles around the selection box. Looking in the bottom of the window I can see the width of the selection box in pixels, now I just drag down then selection to match the height to the width and I have a 1m^2 box. You may have to zoom in (Ctrl+mouse wheel) if you have trouble getting an exact match on the height:

Now look to the right of the WxH readout at the bottom and you will see an Area measurement that gives you the square pixels inside that box. See where this is going? Make sure the Magic Wand tool is selected (S four times) and now click on the empty space inside the rocket:

246,248 (rocket area) / 263,169 (1m^2) = 0.935702913m^2! You can now plug this number into the appropriate LVD window via Launch Vehicle menu->Edit Initial State->Edit Drag Properties:

What's the Drag Coefficient? That is covered in this article.

Now this rocket has several stages, like it will drop all 4 of those radial boosters shortly after launch, which will slim it down a good deal. Simply keep everything as-is in the VAB and just delete any parts that will be staged, then repeat the process above to create a new drag cutout. Another option would be to just simply take the current cutout and press K to enable the Color Picker, select the background color and then B to select the paintbrush (may want to adjust the size in the toolbar) and just paint out the parts so the selection size is smaller. It depends on how complex the rocket cutout is, and also whether or not you want a quick reference for each stage. Just be aware if you delete parts you likely have to redo the entire cutout because the resulting screenshot size will change and that will throw off the scale of the 1m^2 box.

Happy launching! If you have any questions, pop on over to the KSPTOT forum thread or ask me on twitter.