RC Aircraft Precision Balancer and Work Stand

This morning I whipped together a “precision aircraft balancer” (like the Great Planes “C.G. Machine”.)  I built it out of $5.57 worth of PVC pipe and connectors from Fleet Farm and it probably took me an hour at the most.

The Plan

Here is my concept drawing:


Shopping List

Here you are looking at $5.57 worth of PVC parts purchased locally.  The one flaw in the original design is that no one locally sold those 3-way corner connectors.  Maybe they don’t even exist?  So I made an on the fly design change while I was shopping.  The new design uses a “T” connector and a 90 degree elbow with 1.5″ long pieces of pipe connecting them.  The parts list is: 8 x 90-degree elbows, 4 x “T” connectors, 14′ of 1/2″ PVC pipe (in 2 10′ sections.)  I went with 1/2″ PVC and that is plenty strong for my needs, but 3/4″ PVC would work just as well and make the stand a bit beefier.



Cut the straight sections and fit it together.  There is no rocket science, but do remember “measure twice, cut once”.  Here you can see the parts starting to come together.  How exciting! 🙂


Finally here it is all put together:



You might imagine that if the parts are only friction fit together, the two rails could flop over if you placed a heavy model on top.  So what I did was use PVC cement to glue the joints between the “T” connector and the 90 degree elbow connectors at the base.  I left everything else just friction fit so I could potentially take it apart for transport/storage.

Finished Stand

Finally, here is the payoff picture of the stand in action!!!  Yes, those are Christmas decorations that have not found an off season storage location.


There are a variety of modifications that could be made to the design

  • Add pipe insulation to the top rails to help protect your more fragile models
  • Go with bigger PVC (like 3/4″) to make a beefier stand.
  • Drill a vertical hole into the top rail to insert a peg.  (A bolt with a rounded head with a nut screwed most of the way in makes a nice drop in peg.)  Make marks on the top rail in your favorite units.  Now you have a “Precision C.G. Machine” and saved yourself $50 at the hobby shop.  Personally I would suggest locating the peg about 1/4 to 1/3 from the rear along the top rail (not dead center) so it’s easy to just place the aircraft forward and use it as a stand without removing the pegs.
  • If you add balancing pegs, make them drop in/removable and tether them to the rail with dental floss so you can use the device as a stand without worrying about scratching or denting your model with the balance pegs.
  • Adjust the dimensions.  I built this for a flying wing with a 16″ wide fuselage so I made my stand really wide.  I also made it pretty tall to accommodate setting the aircraft on it inverted (leaving room for the vertical fins.)  If you have a different aircraft in mind, it might make sense to adjust some of the dimensions … but don’t make it too tall and skinny or it’s likely to blow over in the wind at the field.
  • Do an image search for Escher and instead of making an aircraft stand, try to build some sort of perspective/perpetual work of art.

Python Airfoil Manipulation Library

For lack of a better title …

I am creating a set of python libraries for designing and modeling aircraft.  Rather than spend a couple months learning a complicated and expensive CAD tool, why not spend that time learning python?  It makes perfect sense to me. 🙂

Scripted modeling (versus interactive point and click modeling) is a different mind set, but the advantage is you can make a change to the script and rerun it and that change cascades through all the parts and drawings and layout sheets.  In a gui based CAD system if you need to change the radius of an alignment hole that runs through all your wing ribs, you might have to painstakingly edit each and every rib, right?  What if you want to move a stringer, or add an lightening hole, or increase the wing chord by 10%? Those can be daunting tasks in a typical cad system.  But in a scripted modeling system you may just need to change a number, or add a couple lines of code, and rerun the script and you are done.

Here are a few pictures to illustrate the sorts of things I am up to.  If you are a model builder I think you will immediately see what is going on.  Please click on the illustration for larger fully detailed versions.

The following image shows blending two different airfoils: NACA 63(3)618 into NACA0015.  Also shown is the ability size the airfoil to any scale and rotate it to any angle of incidence.


The next image shows (1) the ability to read in a standard airfoil plot, (2) fit a smooth spline interpolation through the original data set, (3) resample the airfoil at any resolution and step size, and (4) do an adaptive fit of the higher resolution data that conforms to a specific error tolerance.  Data reduction and fitting can be important for to keep file sizes from growing too large and for reducing cut times.


The final image shows features that are important to modelers.  The ability to cut in spars of any width and height that are flush with either the top or the bottom.  The ability to cut out stringers that are either vertical or tangent to the surface of the airfoil.  The ability to cut out a leading edge diamond and automatically orient it for the best fit and minimal sanding.  And finally the ability to cut lightening holes and add build alignment tabs.


Another capability the library currently has (not shown in the illustrations) is the ability to skin an airfoil by some width.  The library will shave off that amount in a sweeping arc that follows the original contour of the airfoil.  This would be appropriate (for example) if you planned to sheet your wing with 1/16″ balsa.  You can shave off that 1/16″ from the ribs so that when you do the final sheeting, you will be back to the exact airfoil dimensions you intended.  You can also shave off portions of the airfoil if you plan to only sheet a part of the wing and leave part of it as an open framework.

If you are curious what the python code to create these images looks like, you can go to the links below, but for example here are some basic lines of code you can add to your script:

Load an airfoil, do a smooth spline interpolation, and resample it at 1000 steps:

root = airfoil.Airfoil("naca633618", 1000, True)

Blend two different airfoils together with some weighted percentage:

rib = airfoil.blend( root, tip, percent )

Add a lightening hole at a specific location and radius:

rib.add_hole( hx, hy, hr)

Next up: the next major component of this system that I hope to tackle is laying out the top down plans of the wing. The output would be an svg (or pdf) file that you could send to a large format plotter and print out the exact wing plan for construction.

If you are interested in taking a closer look at this project, I have setup a git repository with all the code and demos at the following link:

The project README file (which includes quite a bit more background and details) can be read here:

Resolution 3: Design Evolution to First Flight

Here is a photo blog showing the progress from initial rough prototype, to final design, to mold making, to test flying the first production aircraft:

Resolution 3: Design to First Flight

This is a project that was sponsored by NOAA to develop a fully marinized small UAS that could be deployed from a variety of small vessels, recovered in the water, and used for marine debris detection or wild life surveys.

The “Resolution 3” purpose built UAS airframe is just one of the really cool products to evolve out of this project.

Real-time UAS Simulation and Visualization

Real-time UAS Simulation and Visualization

In previous posts I’ve described the process of carefully modelling the basic geometry and mass properties of a UAS in YASim to provide a real time flight dynamics simulation of the aircraft in FlightGear.  I also described how we carefully modelled the blended body shape of our UAS using airfoil plots and spline curves.  These curves were then imported into MoI and used as the basis to generate a smooth, flowing, organic surface shape.  MoI is able to export the model as a 3d triangle mesh in a variety of formats including 3ds.

Model Cleanup

FlightGear can directly import 3ds models and render them in the simulator.  However, I found that my model needed be cleaned up in several respects.  All of this discussion relates to Blender – a very capable open-source 3d modeling tool. This isn’t intended to be a blender tutorial, but a brief overview of the steps involved in preparing a model for use within FlightGear

  1. Surface smoothing: If you click on the above thumbnail you will see that the basic model imported from MoI is “faceted” or in other words, the triangle surfaces are flat and you don’t see the intended smooth curved surface.  One of the first steps required is to select each “Object” and select “Set Smooth” in the “Buttons Window”.  Repeat for each object in the model.
  2. Inside-out surfaces: I decided for simplicity, I would export the model in the .ac3d format (a text based format) for final use in FlightGear.  When I did the export I discovered many of the surfaces where inside out — the face normals were pointing in rather than out.  This causes the surface to be displayed inside out and shaded wrong in FlightGear.  So the next step required is to turn on the display of face normals, select each object individual (right mouse click), enter “Edit Mode” <tab> key, and flip the face normals if needed.
  3. Orientation: FlightGear allows you to add an xml wrapper around your model to adjust the orientation of your model (flip it by 90 degrees for example) in case the model was developed for a different coordinate frame layout.  However, since I was doing all the prep work anyway, I rotated the heading of my model by 90 degrees in blender so I didn’t need any extra transforms when drawing the model inside FlightGear.
  4. Scaling: For convenience and due to the scale of this design, all the original work was done in inches.  This transfered to the MoI model and thus to the blender and flightgear models as well.  However, FlightGear requires units of meters so the model was grossly oversized when imported into the simulator.  Blender has a scale function, so I selected the entire model and scaled it by a factor of 0.0254 to convert from inches to meters.
  5. Control Surfaces: this aircraft is a flying wing and has as very simple control system.  Each wing has a strip elevon that runs the length of the wing.  Aileron and elevator inputs are mixed (summed) to produce the actual control surface deflection.  In the real UAV, this mixing is accomplished in the flight control software.  On an RC airplane this mixing would be done inside the pilot’s transmitter on the ground.  In FlightGear, the mixing is done through the YAsim xml config file.  Blender has a cut function accessed by typing “Shift-K”.  I went into top view mode, drew lines for the control surface cuts and cut the mesh to create the elevons.

Textures and Painting and UV Unwrapping

This could be the subject of a book just by itself, but let me give a really quick summary.

Blender has a cool feature called “UV Unwrap” which is found in the “Mesh” menu when you are in “Edit Mode”.  There are several unwrap options, but I found “Unwrap (Smart mode)” worked the best for my purposes.  The following image shows how blender unwraps the mesh (in this case the wings and elevons.)  In the bottom panel I selected “UV/Image Editor” and it shows the unwrapped mesh image.

Now here’s the cool thing.  You can save this image out to a file and then import it back in.  Blender will use the imported image to texture the file exactly as it has been unwrapped.  So with this template image you would see a model that looks like a wireframe.  I then loaded up the images in blender and labeled each panel with a big number.  Inside FlightGear (or osgviewer) I could then identify which number corresponded to which panel (top left, bottom right, etc.)  I further edited the template file to include this extra information.  The result when drawn in FlightGear looks like this:

Now I have my “paint kit”.  I can load up the templates in gimp (or photoshop), create a new layer, and draw my color schemes and markings over the top.  For the wing panels, I did a quick hack of a coast guard-ish color scheme which looks like this:

I then export just the marking/paint layer back out to my texture files that the model references and the “finished” result looks like this:

This is still a work in progress.  I have yet to animate the control surfaces.  I also need to add a spinning propeller.  The paint scheme is just a quick example and could use many many improvements.

With the paint kit established, a variety of paint schemes can be developed.  Here are two more examples:

Official ATI scheme:

A gray camouflage scheme:


There are many steps required to model a new aircraft design in FlightGear.  Primarily this involves creating a flight dynamics (physics) model and a 3d model of the design.  Each step requires several sub-steps and there is always room for improvements and refinements.  This is an example of an R/C scale UAV.  Full scale aircraft are much more complicated involve detailed cockpits, many more animations, much more complicated 3d meshes, and much more work texturing and painting.  Hopefully I have provided a taste of what’s involved.  With a little effort any one can jump in and learn the tools to build simulated aircraft.  But it does take time and patience.

Finally, here is a (sorry, kind of crude) youtube video showing the model flying inside FlightGear:

3D Modelling with MoI

3D Modelling with MoI

MoI (Moment of Inspiration) is a really interesting 3d modelling tool.  There are two things that separate it from other tools in my view.

1. It has a very simple and intuitive interface.

2. It has powerful and intuitive primatives for drawing and manipulating curves and 3d surfaces. For example MoI allows you to define 2d (or even 3d) curves and then stretch a 3d curved surface between your curved lines–possibly with additional guide curves to control the shape.  Like with any tool, it takes a little thought, practice, and planning to break down the structure and represent it using primatives, but MoI allows you to quickly create and edit some very complex and almost “organic” shapes.

You may refer to my previous post related to modeling with perl.  I used a perl script (math + airfoil data + spline curves) to carefully define exact lengthwise slices along the fuselage.  I then imported these curves into MoI and stretched a “network” surface over them.  It’s about a 10 minute job in MoI and I have a beautifully smooth curved fuselage.

I adjusted my perl script to also generate the exact airfoil profile at the wingtip and imported that curve in the correct 3d location.  This allowed me to quickly built an entire wing using the “sweep” function.  I then added a motor tube (which is just an extruded circle to make a cylinder.)

I used a similar approach to create a nice curvy winglet.  from the picture you can see I designed two different styles of winglets.  I think I like the looks of the drooping winglets better.  I don’t know yet what we’ll end up with on the real aircraft.  We’ll probably design the wing tip so we can mount any winglet design that we’d like.  You can also see in the background that I was playing around with designing a shaped vertical stab.  These will mount inboard and be the primary yaw stabilizer.  It took me no more than 10 minutes to create each winglet shape in MoI.

The ultimate goal is to create an accurate 3d mesh of the aircraft.  This will be combined with the dynamics model to produce a realistic and visually compelling real time simulation of the design in FlightGear.  MoI has several mesh export options and allows you to tune the mesh density so it is a perfect front end design tool for really nice 3d models.

MoI is a really awesome 3d design tool.  I can’t speak highly enough about it.  I am merely a novice at 3d modeling, you can browse the MoI forum and find many incredibly brilliant designs that the experts are creating. MoI is a commercial application, but if you are building “organic” shapes with curved surfaces, it is worth every penny.

Physics Modelling

Dynamics (Physics) Modelling and Flight Simulation

There are many great tools available to help engineers design and develop new aircraft and flight control systems.  One such tool is the flight simulator.  More specifically: an open source flight simulation such as FlightGear. Being open-source FlightGear is flexible and adaptable and can be used to solve or explore new scenarios that a proprietary software applications may never have anticipated.

FlightGear + YASim

Here I describe the process of modelling a flying wing in FlightGear using the built in “YASim” physics engine.

A brief word on yasim (wiki documentation): YASim is a physics engine that inputs a physical description of the airframe, the wing and tail surfaces, engines, landing gear, weight and balance, etc. In addition you input cruise performance numbers and approach performance numbers. YASim has a built in solver that computes approximate lift/drag curves for your model and then physically models the individual components in real time to produce the overall dynamic behavior of the vehicle.

For this example we are modelling a flying wing. To do this in yasim, I defined the inboard 3/4 of the flying wing as the main wings, and the outboard 1/4″ of the flying wing as the tail. Yasim allows you to define any number of surfaces in any arrangement, but this approach works out pretty well.

Visualization (Blender)

Notice that yasim “mirrors” the wing and hstab automatically so you only define one side in the configuration file. Visualizing your yasim configuration can be very helpful and can help eliminate math mistakes and typos. Here is a link to a Blender YASim import plugin. The image above shows the result of importing the flying wing configuration into blender.


Once the basic model has been crafted, it can be flown inside FlightGear.  If you have provided correct geometry, correct weight and balance information, correct propulsion information, and correct cruise and approach performance values, YASim will create a model that flies very much like the real thing.  However, YASim makes many internal assumptions and isn’t perfect, and most of the time we don’t have perfect data for our aircraft.  So once the initial model is created it is worth flight testing and adjusting various parameters to tune the model towards real world performance.

For instance, control surface effectiveness can be tuned to get the correct rotational rates.  Engine power can be tuned to get the correct rate of climb.  Because YASim is designed around a solver that computes lift and drag for your design, if you increase the power of your engine, yasim will reduce lift and increase drag so that your specified cruise speed will still be met.  Essentially this gives you an aircraft that is draggier but has better climb performance.  In my case, our wing has an incredibly efficient glide ratio, so I ended up reducing power substantially from my initial guess.  This created a wing with much less drag and much more lift.  Climb performance was reduced, acceleration is slowed, but now it will glide forever just like in real life.

Design Testing

Because YASim uses the physical geometry of the design to compute forces and moments at each surface and then sums all of these up to produce the overall flight dynamics of the aircraft, it is possible to make changes to the airframe in simulation and observe the effects in the simulator.  For instance, the flying wing design in this example has twin vertical stabilizers.  If I want to test the effect on lateral (yaw) stability of moving these surfaces fore or aft, I can do that in YASim.  A quick tweak to the config file is all that it takes to adjust the location of a surface.  I leveraged the FlightGear autopilot + a simple nasal script to fly a scripted flight pattern.  Basically I stabilize in straight and level flight.  Then I input 1 second of full right aileron deflection, followed by 2 seconds of full left aileron deflection, followed by leveling the wings.  Through this maneuver I plot the “side slip” angle (beta).  This gives me an indication how straight the aircraft tracks through the maneuver with different vertical stab locations.

In the above graph the line number (0.48, 0.58, etc.) corresponds to the distance of the vstab behind the nose in meters (this design has a wing span of about 2.3m.)  As you can see the further rearward the vstabs are placed, the more stable the design becomes (the straighter it tracks and the more quickly it recovers.)  You may also see that as the vstabs are pushed towards the CG (about 0.37m behind the nose) the stability starts to diverge rapidly.  But as the vstabs are pushed back to about 0.68m behind the nose, the stability increases, but we are starting to hit diminishing returns.  According to yasim, we could push the vstab further back and get more stability, but perhaps not a lot more.

Other Uses for  Simulation Modelling

Besides basic flight dynamics modelling and validation, a simulator can be very useful in many other areas of aircraft development.  Flight control systems can be prototyped and tested.  Higher level flight control systems (route following, circle holds, autonomous landings, etc.) can be effectively prototyped and developed within a simulator. Even payload systems can be modeled and prototyped inside a simulator.  Any work that can be done at an engineer’s desk in the comfort of their office will be far more productive than in the field under harsh conditions when the pressure is on.  And when something developed in simulation works exactly right in the real world on the first try it is just very very cool!


This is just a simple example, but it shows some of the power that a flight simulator can bring to the arena of aircraft design.  Simulators are never perfect so you have to keep in mind how far you can push them and what data you can trust to pull out of them.  As a design evolves and as you gain real world flight experience with the actual design, you can validate the simulator against real flight data and adjust and improve the simulation model.  This design cycle leads to a positive feedback loop which creates a more and more realistic simulation model that yields more and more useful simulation results.

3D Modelling … with … Perl?!?

3D modeling with perl?!?  What the…?  Huh?!?

Are you insane?  Yes, but in a nice sort of way (I hope!) 🙂

Since I’ve already admitted to being insane, you won’t mind if I explain the back story that let up to my evil plot.  I work with a small high tech company (ATI out of Wasilla Alaska … and yes if you were wondering, but no I haven’t met her myself.)  Some of the things we do is develop a variety of UAS related technologies.  One project involves developing a marinized (water proof) UAS that can be launched from a small vessel and recovered in the water and generally operated with minimal infrastructure.

One of the guys on the project has wonderful artist talent and he hand carved the center section of our blended body flying wing design.  It really looks sweet once it’s all together and in the air, but here is a close up of just the center section.


Well one thing leads to another and we decided we wanted to draw this up on the computer so we could cut molds, visualize and test design changes, etc.

But how the heck do you draw something like this.  The only straight edges on it is where the wings plug in.  The rest of it is totally free form and all blendy and curvy.  I don’t see any cubes or spheres or cones jumping out at me.  You are probably thinking of a few obvious approaches … make a mold from the prototype, laser scan it, etc. and sure those work for what they do, but they have draw backs … and we want the entire design on the computer and in a way we can play with it virtually.

As I started staring at the design and trying to analyze it’s structure and look at the outlines it occurred to me that the 3-view edges could be modeled pretty nicely with spline curves.  I thought that if I could represent the outlines correctly, then I could create slices and march down the length (or width) sizing and blending my slices based on the 3-view outlines.  At the end if I could only find a way to stitch the slices together, I would have a 3d model.  That was the insane plan!

Spline Curves

Here is a very simple spline curve.  I could have used as many intermediate points as I wanted, but here I just have a start point, an end point, and one intermediate point.  The curve will pass through all three points.  In addition I can “clamp” the slope at each end.  The following is a plot of a sample spline curve.  With just a simple system like this I was able to model all the curves on our fuselage!

Top View

The following plot shows the right half of the fuselage from a top view (the front is to the left in this plot.)  The leading edge is modeled with one curve, the straight edge at the top is where the wing plugs in, and the trailing edge is modeled with it’s own curve.  Simple, and it’s already starting to look like something!

I don’t have a picture, but I did something very similar for the front view … one lazy curve from the top of the wing to the center, and a more aggressive curve from the bottom of the wing sloping quickly down and then flattening out along the bottom to maximize the volume inside.

Creating Slices

Next I’ll walk you through the process of creating slices.  One thing I haven’t mentioned yet is I have the outline of the wing’s airfoil as a set of coordinates normalized from 0.0 to 1.0.  This way I can easily scale the airfoil to any size I want.  The way the model is setup, the slice that butts up against the wing has to be an exact match to the airfoil, but as I step towards the center, I need the slices to more and more take on the side view shape.

So lets start simple.  At each slice point I lookup up the leading and trailing edge positions from the top view curves.  I use these points to simply size and scale the airfoil.  I’m not worried about height or blending into the fuselage shape yet.  When I plot out my different size airfoils they look like this … cool.  But notice that the the leading edge of each airfoil size is horizontally the same as each other which doesn’t represent our model and makes the center of the shape much taller than at the wings.

The next step is to raise or lower each slice (and size it vertically) so that in addition to following the correct leading and trailing edge profiles, the slices also follow the correct top and bottom profiles.  Here is what it looks like:  Ignore the lines in the center, those are just an artifact of dumping all the slices into a single line plot.  This is improving but there are still some things to notice.  Obviously there is a problem at the trailing edge and also the thickest part of the airfoil is moving forward.  We want the thickest part of the airfoil to stay in the same place as we move inboard with our slices.

In this next plot we divide the airfoil shape at it’s thickest point so we have a front and a back.  As we march inwards (longer airfoils) we keep the center point fixed and streeeech out the front portion. (again ignore the horizontal line garbage.)  The front of our model is starting to look really good!  The trailing edge needs work.

In the next plot I simply align the trailing edge height of every slice to match the trailing edge of the wing.  This cleans up the model even more and it’s really starting to look like something.  However, we are still using the airfoil shape in the back half and we need to blend that into the center line shape so we have more volume in our center section.

The next plot shows the correct center section outline in the bottom rear (the top rear still needs work.)  It’s hard to see from this plot but the bottom rear portion of the slices close to the wing match the wing airfoil shape and as we march inwards, they slowly blend into the correct fuselage shape.  We need to do the same thing with the top rear of the slices.

The following plot is almost identical to the previous one except the top rear (left) has been curved outwards to make more internal volume.  Again we match the airfoil shape near the wing and blend to the fuselage shape as we move inboard.  This is the final plot.  All our slices are looking really good!

Going 3D!

The next task is to figure out how to stitch all the slices together to make a 3d surface mesh.  Here are a couple technical details.  I output the AC3D format because it’s a well supported (in the open-source world at least) and has an easy and well documented ascii format and structure.  I won’t say too much about it.  Basically I walk through each slice and create triangles that connect the points up with the neighbor slice.  You can see the resulting structure from the following 3d pictures.

Because the model and the slices are all script generated, I can easily set how many slices to create and for each slice how many “chops” front to back I create.  With a tap of the keyboard I can generate an incredibly finely detailed model to send to a CNC machine, or a more coarse model for real time visualization or simulation.

All the curves and dimensions are paramaterirzed, so if I want to change the length of the nose or the tail, adjust the overall depth, fiddle with the shape of the curves … it is all very easy and quick to do.

Here is the final 3d shape that is beautiful, sexy, and blendy and very closely matches the artist’s original hand carved prototype.  (I just show the left half, because you know, mirroring the other side is just a bunch of busy work.)

Feel free to click on any of the plots or pictures in this post to get the full size version.

So there you go, a slick little 3d model generated by a perl script that lovingly captures the artists original concept and in a few areas goes a step further with curving and blending the shapes together.