Nothing is ever perfect. Or even as right as we might like. But I've been holding out on you, my friends, focused as I was until lately on moderating, I haven't been taking the final steps to share my code, photos and images of my aircraft, and other files I've been working on, such as this X-Plane model of an ArduPlane based on the Bixler.
Well, I hung up that moderator hat to focus on contributing in other ways. I wish I could say that gave me the free time to polish this model to the point that it is where I'd like it to be for a general release, but the truth is that I simply added more projects to my plate. I'm not going to let it slide anymore, so this is getting released as it is, and as condemnation and criticism shames me sufficiently, I'll fix it up and release more often.
The model originally came with a 1.5MB, 20 page "developers" guide that spelled out in painful detail the scaling and specific characteristics of the plane. I haven't updated it, it is even more boring than this post, and it isn't required to get flying, so please allow me to bring your attention to the most important aspects of using this model first. Then I'll add some details for those of you who are interested afterwards (and if you really like to slog through overlong explanations, ask me and I'll send you the documentation, in all its outdated gorry...err ... glory.)
Installing
Simply unzip the model files in your "X-Plane/Aircraft" directory. Make sure you are using X-Plane 9.70 or higher.
Before You Fly
Assuming you plan to fly Hardware-in-the-Loop, follow the instructions in the manual, but use the following adjustments.
- Increase the number of flight models per frame. In X-plane, find the menu item for "Operations & Warnings", and increase the flight model per frame to at least 3.
- In APM Planner, Simulation, change the throttle gain to "5000."
- In APM Planner, load the attached Parameter file, then recalibrate your radio and setup your modes according to your preferences.
That is all you really need, but here are some more details for those of you who are interested.
Runways, Grass, and Landing Gear
As you can tell from the video, in keeping with the physical model, there is no landing gear on the plane. A Bixler is typically hand launched, but X-Plane does not include a virtual hand to throw the plane. In reality, there are hidden, invisible skids on this model, to allow the plane to "sit" on the ground properly. Just give the plane full throttle and get it off the ground before it heads for the rough grass, and it should lift off fine. If you get off course, go off the runway, or get turned too severely, it will get "stuck" (as it would in real life.) I've reduced the friction of the "skids" just enough that it will take off from the belly, which is more than it will usually do in real life, but I did not think you'd mind if, on this point, I departed from reality. Most of the time I perform full automatic missions, from take off to landing. If the wind is too strong, or if the mission script is not right, the plane will sometimes go astray and get stuck in the grass. As with after a landing, you simply re-open the plane (or re-open the airport) and you are set for another run.
A Brief Note on Scale
The X-Plane simulator does a fantastic job approximating flight in fantastic detail, and this model was prepared to leverage quite a few features, including drag of the onboard gear, Reynolds numbers, realistic weight, center of gravity, motor and propeller performance, and at one time (now disabled) I even added battery life into the model. However, with models under 5 lbs / 2.2 Kg, the simulator tends to crash. Well, sometimes the plane crashes and sometimes the entire simulator crashes. There are two things done here to address this issue, and it has been very reliable for myself and for everyone who has so far reported back to me. The first is to increase the flight modes per frame (see above) and the second is to scale the airplane such that it is at least 5 lbs. I have adjusted every aspect of the plane to balance a realistic simulation with this scaling requirement. Thus the plane is scaled at 1.7x (size) and about 3x in terms of weight to maintain the correct relationship between wing area and weight in scaling. Proportional changes to Reynolds, motor power, propeller dimensions were all adjusted in concert in an attempt to be as authentic as possible. If you want the specific numbers you can mine the model or ask me and I'll send you more details.
Trimmed, Level Flight
I hope the pilots here will forgive me, this is a note for folks with less hands on experience. Planes are designed and trimmed for specific flight speeds. Many planes flown with more throttle will tend to pitch up and climb, and if the forward airspeed is below the designed speed, they will tend to pitch down slightly and lose altitude. Pilots correct this by trimming the plane, and the APM could do this with the P_to_T parameter (which I have not explored, and which I have also not set in my real life Bixler parameter files... nor have I seen any real life parameter files yet that have this set.)
So it is helpful to know that I designed this plane to fly level at about .480 throttle. If you find it pitches up or down and does not fly exactly level in the simulator, take a peek at your throttle setting. I normally display the throttle data on the screen during flight, and you can do this easily as well. Look at items #25 and #26 in your X-Plane Data Input & Output. The circled items below are essential for HiL, but the items I did not circle are recommended for onscreen feedback.
A Big Thank You
I want to say thank you to a few people who either directly contributed or cannot be left out of any list of thanks related to ArduPlane (and, sadly, I will leave people out, my apologies.) A big thank you to:
Chris Anderson, Doug Weibel, Jose Julio, Jordi Munoz, Jason Short, Andrew Tridgell, Michael Oborne, Paul Mather, Bill Premerlani, and everyone else who shaped ArduPlane and, without whom, this work would neither be possible nor of any value. And a special thanks to Knut Lagies, Didier, Robert Elgin, Yury, David Buzz, Thomas Berndt, Justin Beech, Colin Bouriquet, Michael Brown, George Dimitoglou, Kevin Finisterre, David Jones, Mike, Carlos Moreira, Linux Penzlien, Pavel Skotak, Eric aka Eagle, Dusan Trenic, and Stephen Wong for flying a previous version of this model and providing feedback.
A Note on Reproducibility and PID Tuning
These PIDs work well for me. However, since each HiL computing environment is different, variations in the resources of the OS, running processes, and especially background tasks such as an Antivirus scan can dramatically affect the latency of control and sensor data to/from the APM. If these PIDs do not work for you, check that you don't have resource hogs tying up your memory or CPU, and please do share your PIDs as you get them dialed in better for your environment.
Here is a previous video (very cheezy; I was having fun with an iMovie template) announcing the plane, provided for your amusement.
What about X-Plane 10? Flexible Wings?
Yes, I have produced a variety of different models, including an X-Plane 10 model leveraging the nifty bendy wing features (and in real life, the Bixler's wings flex like crazy.) However, as X-Plane 10 was brand-spanking new at the time, there were issues in using it for HiL that, combined with the additional cost and lack of backward compatibility, caused me to give up this sexy feature and restrict myself to an X-Plane 9 model. You can open and fly this in X-Plane 10, and you can also open and upgrade it to a native X-Plane 10 model using Plane-Maker yourself. If there is enough demand, I'll explore flexible wings and X-Plane 10 again. I have also made 3 channel planes and other variations. If you are really that excited about a variation, please let me know.
And Now, the Files (attached)
Comments
While looking at MP and on the Simulation tab and looking at "AdruPilot Output", everything changes to my stick inputs except throttle. Throttle is stationary at .998.
Sorry for blowing up this thread, I'm just trying to give you the information you need.
And correct me if I'm wrong but isn't Flight Data and/or Flight Planner suppose to show the plane at the airport I have loaded? That isn't happening as well.
Yes, the imputs change in MP when looking at Radio Calibration. Everything responds except throttle. When I have it stabilized in the air, and max throttle the plane seems to descend and when I give no throttle it will ascend very minimally.
And it's doing exactly as you say, rolls and descends with no stick input.
In manual, once it is up in the air, if you don't provide stick input, and the trottle is below the point at which it flys mostly level (~45-48%) then it will roll slightly, and descend. This is what many EasyStars do also with similar control inputs.
Please correct my assumptions.
I have set up a HWIL simulation with X-Plane 10 and mission planner and everything works fine except for a few things..
1. Throttle does not seem to work. "Start each flight with engines running" must be checked for flight to occur due to no throttle response.
2. When in flight, it seems to only want to circle or loiter. I've changed all the modes to manual and the plane circles around and loses altitude.
Any help would be much appreciated
I just removed the ailerons in Plane Maker, left the tx-rx-APM cables as for a 3 channel, but did upload the easystar.param file. Everything seemed to work fine, plane reacted to rudder, autopilot and stabilise worked well.
Couldn't find that legacy documentation for wiring 3 channel planes. Must improve google skills.
Mike, fantastic, I can do that. I will dive into the wiring 3 channel planes, and how to tie that in with the simulation, and post my findings/write an how-to.
Yes. Open the model using the included "Plane Maker" application. Locate the "wings" sections, and uncheck the ailerons. However, you should pay close attention to legacy documentation for wiring 3 channel planes. Essentially, in HiL, you will need to rewire your rudder channel to your ailerons/channel 1 on the APM. That is my best understanding of 3CH operation. Search around DIYDrones some for better information about this.
Really great, works perfectly and looks awesome.
And straight away a noob question:
In real life, I have an easystar without ailerons, so it would be really great to be able to do simulated flights with fixed ailerons. Is there an easy way to fix the ailerons on your model?
Hi Mike,
Thank you so much, I really appreciate it. I am presently doing some development using xplane with MatrixPilot HILSIM, and I have added your HiLStar17 to my fleet of aircraft. Very nice.
Best regards,
Bill