Glider with GPS guided recovery

The Rocketry Forum

Help Support The Rocketry Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Back in December 2010 I posted the source code for the program that runs on the microcontroller. I thought hard before posting it, and this is what I ended up with (the following is a cut-and-paste from https://nerdfever.com/?p=1116, posted 12/3/2010):

The code I’m posting today, like the earlier “Rev3″ code, does not include the navigation code. But it does include everything else - logging altimeter, parachute deployment, GPS, servo control, etc. Because of the “abuse potential” of the nav code (think of navigating things to places where they ought not to be), I don’t intend to make the nav source code public. Once it’s working well, I might be interested in working with reputable vendors to sell hardware that includes this function, but if I do, it’ll have some protections in place against abuse. The main protection I’m considering is to limit the target location the system will aim for – it has to be a place the unit has physically been since it was powered up (you won’t be able to program in some other location). That way, if you’re not allowed to go somewhere with a handful of blinking rocket electronics, you can’t land the rocket there either. I’d like feedback on this idea. (Yes, anything can be hacked if you put enough effort into it, but my goal is to make it harder to hack the system than for “bad guys” to build their own – there are, after all, books on the subject…)

I hope this makes you feel at least a little more comfortable with what Boris and I are doing. FWIW, nobody other than myself has access to the navigation code

Yes, that definitely makes a difference. And is a far different tone about respecting these issues than came across in a previous message. The fact that it can NOT be programmed for any particular GPS coordinates, that is has to physically "be there" first, makes a big difference. Though I can think of a way that could be thwarted, but then you can probably very easily address that in the programming, once realizing the loophole.

I will follow up in private e-mail with some other comments and ideas. Might be a day or two before I can write it.

- George Gassaway
 
Dave,

I’ve sent you a private e-mail with comments and ideas. As well as the original comments and questions I had in my first message.

If you do not get the e-mail, please let me know here.

- George
 
After discussion with Dave, we decided to use the same Hitec HS-82MG servos recommended for the Delta Star.
https://www.servocity.com/html/hs-82mg_servo.html

Framed a hole for their placement with the same 1/4" x 1/4" basswood used for wing edges.

Also epoxied a bulkhead 6" back from the front of the body tube. Recovery will go in front of this, reaching into nose cone.

Behind bulkhead is 12" space for electronics, allowing some flexibility in their placement. This should facilitate achieving desired CG.

IMG_6006.jpg

IMG_6010.jpg
 
Applied one layer of 1.3 oz fiberglass to the fins/wings and lower body. Two layers from the electronics hatch forward.

Wings were greatly stiffened and hardened.

Pictured bare airframe went from 20oz to 24oz with the addition of this thin FG shell.

IMG_6012.jpg

IMG_6014.jpg
 
Recently bought more West Systems 206 slow epoxy. Last gallon lasted me two years as my projects are not huge.

The pumps I had purchased last time never seemed to work very well. This time I removed the inner caps, drilled two small holes in each one and then re-inserted them. This allowed me to pour directly from the cans into my two small squirt bottles without making a mess.

IMG_6017.jpg
 
Formed the elevons from 1/8" basswood. Made them 2" wide as previously noted and applied one layer 1.3 oz FG.

Applied two layers FG to the electronics hatch cover.

IMG_6019.jpg
 
After discussion with Dave, we decided to use the same Hitec HS-82MG servos recommended for the Delta Star.
https://www.servocity.com/html/hs-82mg_servo.html

Servos arrived today - here they are. Tiny little things. (Quarter is for scale.)

I ordered 3 so I'll have a hot spare in case something breaks.

I've started work on updating the software for the glider.

--Dave

IMG_3714_800px.jpg
 
I've been thinking about how to mix the pitch and yaw inputs (from the computer) to produce left and right servo outputs.

I came up with 2 schemes; I'm not sure which is better.

For inputs to the algorithm you have:

Pitch: -1 to +1 (+1 is pitch up)
Yaw: -1 to +1 (+1 is yaw left)

For outputs you need:

Left servo: -1 to +1 (+1 is elevon up)
Right servo: -1 to +1 (+1 is elevon up)

My 2 methods are:

A)

Left = (Pitch + Yaw)/2
Right = (Pitch - Yaw)/2

B)

Left = min(+1, Pitch + Yaw)
Right = max(-1, Pitch - Yaw)

Any thoughts on that? I'm leaning toward (a).
 
I've been thinking about how to mix the pitch and yaw inputs (from the computer) to produce left and right servo outputs.

I came up with 2 schemes; I'm not sure which is better.

For inputs to the algorithm you have:

Pitch: -1 to +1 (+1 is pitch up)
Yaw: -1 to +1 (+1 is yaw left)

For outputs you need:

Left servo: -1 to +1 (+1 is elevon up)
Right servo: -1 to +1 (+1 is elevon up)

My 2 methods are:

A)

Left = (Pitch + Yaw)/2
Right = (Pitch - Yaw)/2

B)

Left = min(+1, Pitch + Yaw)
Right = max(-1, Pitch - Yaw)

Any thoughts on that? I'm leaning toward (a).

Did you mean roll, rather than yaw? This is a 2-elevon plane with no rudder, right?

I'd fly it with a receiver under RC control first, and learn experimentally what mixes are appropriate. Slope flying is good for this if you have an appropriate hill and wind for this. I know on my flying wings, they are very pitch-sensitive, so you want about 4x more throw in the differential direction for roll control as you do for moving them together for pitch.
 
Did you mean roll, rather than yaw? This is a 2-elevon plane with no rudder, right?

I'd fly it with a receiver under RC control first, and learn experimentally what mixes are appropriate. Slope flying is good for this if you have an appropriate hill and wind for this. I know on my flying wings, they are very pitch-sensitive, so you want about 4x more throw in the differential direction for roll control as you do for moving them together for pitch.

It's got dihedral, so yaw and roll are mixed. It has a rudder, but we are only controlling the elevons (not the rudder) so we have essentially 2-axis control - pitch and roll/yaw.

That sounds like good advice re the 4x more roll.

Here's what I emailed Boris today:

Maybe we need a gradual test plan to avoid crashing the thing. So I was thinking of the following:

Test 1 - Small motor (500' or so). No left/right steering - steer straight. Experiment with pitch until we find the pitch setting that gives a nice stable glide (no stalling). Repeat until successful.

Test 2 - Small motor (500' or so). With fixed pitch setting (from step 1), gradually test increasing left/right steering commands to determine the maximum steering input that flies stably without flipping over. Repeat until successful.

Test 3 - Guided flight.

Any thoughts on that?
 
Last edited:
It's got dihedral, so yaw and roll are mixed. It has a rudder, but we are only controlling the elevons (not the rudder) so we have essentially 2-axis control - pitch and roll/yaw.

That sounds like good advice re the 4x more roll.

Here's what I emailed Boris today:



Any thoughts on that?
Not sure if you have an RC transmitter, but a receiver can be small and cheap for test flights. You can get the CG and elevon throws nailed down a lot quicker with RC (particularly hand launch or slope flying) than you could with launching for each autopilot flight. Also useful for rescuing the plane when you get to the autopilot testing.
 
Dave,

Method "A" looks good to me. Not sure I follow what "B" is describing.

I agree with your suggestion to launch on moderate power to get flights well under 1000ft to start with.

Also like Adrian's suggestion to characterize control sensitivity by using full RC control for the first few flights.

Is there a way to fly under full RC control and record actuator throws?

That would be very helpful in precisely calibrating control logic.
 
Not sure if you have an RC transmitter, but a receiver can be small and cheap for test flights.

I do have RC gear, but the autopilot hardware includes a telemetry system that does the same job (follow the link for details), so there's no need for an extra bit of hardware in the glider.

We can log (and report back by telemetry) the exact position of the servo when it's flying right.
 
Is there a way to fly under full RC control and record actuator throws?

That would be very helpful in precisely calibrating control logic.
I think that most R/C transmitters output the PPM signals to their trainer ports and it should be possible to capture and record this. See, for example, https://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1228137503 Though it may be simpler to fly it a little under manual control, adjusting the servo travel, and just get a feel for the dynamics without this possibly complex side project.

Obviously huge amounts of work have been done in the UAV community for autonomous GPS-guided flight control. See https://diydrones.com/notes/ArduPilot for example.
 
Last edited:
Method "A" looks good to me. Not sure I follow what "B" is describing.

OK. The problem is that we'd ideally like to have the full servo throw range (-1 to +1) for both pitch and yaw, but since we're mixing for elevons, we can't really do that - we have to compromise.

With "A", the pitch authority is in the range -0.5 to +0.5. Same for yaw.

With "B", we can get the full range of pitch authority or yaw authority (-1 to +1), but not at the same time.

Suppose we wanted to command full "up" pitch and full right roll.

With "A", we'd start with both elevons at position +0.5, which is as far up as we can get them. Then for the yaw we move the left elevon down by 0.5, and the right one up by 0.5 - that puts the left elevon at 0 (flat), and the right one at +1 (full up).

With "B", we'd start with both elevons at position +1. Then we'd move the left elevon down by 1 for yaw (to 0 - same as it was in A), and the right elevon up by 1 to 2 - except we don't have that much travel, so it stays at 1. So we get the left elevon at 0 (flat), and the right one at +1.

So in that example A and B give the same result.

But if we wanted full UP pitch and steer straight, then we get a different result - +0.5 on both for A, and +1 on both for B.

And if we wanted flat pitch but full right roll, again it's different. We'd get left elevon at at -0.5 and right at +0.5 for A, but -1 and +1 for B.

Does that make any sense?

Also like Adrian's suggestion to characterize control sensitivity by using full RC control for the first few flights.

Is there a way to fly under full RC control and record actuator throws?

That would be very helpful in precisely calibrating control logic.

Agreed. Yes, we can record everything. (It already does that, but for only 1 servo channel now. I'll change it to log both.)
 
I've been thinking about how to mix the pitch and yaw inputs (from the computer) to produce left and right servo outputs.
It depends on the physical orientation of the servos, and whether the control arms for the elevons (and pushrods) are above or below the wing.

Usually, servos and control horns for a delta wing are mounted in a mirror image of each other.

And I will assume the pushrods and control horns for the elevons will be above the wings, since there would be a risk of damage on landing if they were on bottom.

When that is the case, then for pitch up you need both servos to move their output arms forward, to pull on the control horns on the elevons. One of those two servos will need to rotate the opposite way in order to do that. That is, while one rotates clockwise, the other needs to rotate counter-clockwise (if viewed from the aspect of a top view of the output shaft of each servo)

Conversely, for roll control for a left roll input, you need the left servo to pull forward for left aileron "up", and the right servo to push rearward for right aileron "down". But in that case, both servos would rotate the same way (either both clockwise or both counter-clockwise).

So, you need to figure out the physical servo placement and orientation, which "side of the arm" of each servo will be used for the pushrod connection, the control horns, and resulting movement, before programming anything. There are at least 8 (perhaps 16) possible combinations, and only one is right

And once you do have it programmed, be sure you ground test it to make sure the elevons move the correct ways. Not just for pitch, but for roll. With this I guess a nice way to test the roll response will be to take it a few dozen feet from where it is set to "land", and point the model at say 90 degrees left of that point, and see if it wants to roll right (correct), or wants to roll left (wrong way).

A few other things. It would be useful to program the model, when in liftoff mode, to deflect the elevons about 3 degrees or so of roll. One elevon up about 3 degrees, and one down about 3 degrees. This will make it roll on boost. So that if the boost trim was not dead perfect, it would roll to even that out rather than to pitch up or pitch down due to a slight pitch trim problem.

Also, when you do make the first flight, it would be a good thing to use only enough engine power to take it to 600-1000 feet, to a height that is enough to test out whether it is in the ballpark for trying to control and steer itself, or not. If it does not try to control itself correctly, and you boosted it REALLY high, it could get lost in woods or such.

And for something that has nothing to do with control, but basic glider 101. Keep track of the glide CG location. Because different engines will mean different tailweight, and you'd have to compensate in some way or another. Also to be sure that in boost mode, that the propellant mass in the back (which will not be there for glide) does not make it so tail-heavy that it makes the glider marginally stable, or possibly even unstable. This is one of those tricky things about rear-engined Rocket Gliders, the propellant mass in the back that either tends to either harm the boost stability, or if the boost CG in far enough forward, then it usually means the glide CG is nose-heavy.

My R/C 2X SkyDart suffered this, and after some hairy tail-heavy boosts, ended up moving the CG a bit more forward so the boosts were easier, but the glide was nose-heavy. On a couple of other models, including an X-1, I solved that by adding a water ballast tank to the nose, with the water starting to leak out at liftoff:
https://homepage.mac.com/georgegassaway/GRP/Scale/X1.htm

BTW - attached are two photos of a Zagi flying Wing that I converted for rocket boost (G12 reloads). You can see in the pics how the servos, pushrods, and control horns are mounted. Take note how the servos are mirrored, the output shafts face towards the wingtips. If the servos were mounted the other way, with the output shafts facing inwards, then the pitch response would be backwards, as would the aileron control.

Also, if the servos were “flipped”, still facing outwards towards the tips, but the output shafts near the front rather than near the rear, everything would also be reversed!

- George Gassaway

Zagi_1.jpg

Zagi_2.jpg
 
Last edited:
Dave,

I see what you mean about methods A and B.

As the two elevons are fairly large (2" x 10" each) and the servos are relatively powerful, my gut tells me A should work well and may be more predictable.

Any more RC experienced input on this is very welcome.
 
Weighed the complete airframe, including NC, hatch cover and elevons: 30oz

Recovery, including 36" chute and 12" Nomex adds 3.8oz

Projecting 2oz for both servos and linkage hardware and 10oz for main electronics.

Putting the main electronics in the forward half of the 12" electronics bay, Rocksim predicts (sim updated with measured and projected weights and CG) for G to mid H motors:

1) stability margins of 1.4 to 1.0
2) flight weights of 46 to 53oz
3) altitudes of 700 to 2000ft

1 and 2 are likely accurate and are right on target.
3 is probably moderately optimistic.
 
I've updated the software to log the position of both servos during flight (log is stored in flash on the PIC32; downloaded after flight), and added the code that will deploy the parachute when the glider reaches the proper height.

This is now set at 60 meters (200 feet) above the pad altitude; once we get some flight experience maybe we can reduce that number, but let's start with a safe value.

I still need to test the parachute deployment code in the simulator.

I'm starting to populate the new PCB that will go in the glider; this is a new "Rev 4.2.2"; with very minor tweaks compared to my existing Rev 4.2.1 board - I added some pins for a charging port (so I don't have to unplug the battery to charge it), a "development" plug to hold the power on (without the magnet), and fixed a couple silk-screen errors.

IMG_3715_crop.jpg

IMG_3716_crop.jpg
 
I've updated the software to log the position of both servos during flight (log is stored in flash on the PIC32; downloaded after flight), and added the code that will deploy the parachute when the glider reaches the proper height.

This is now set at 60 meters (200 feet) above the pad altitude; once we get some flight experience maybe we can reduce that number, but let's start with a safe value.

I still need to test the parachute deployment code in the simulator.

I'm starting to populate the new PCB that will go in the glider; this is a new "Rev 4.2.2"; with very minor tweaks compared to my existing Rev 4.2.1 board - I added some pins for a charging port (so I don't have to unplug the battery to charge it), a "development" plug to hold the power on (without the magnet), and fixed a couple silk-screen errors.
that is awesome.
Just, one question... do you have some way for this thing to reverse servo's or right itself if inverted?

Being if you launch it upwards, Gps sensors dont typicly know thier own orientation, so if its upside down it wouldnt know? if it was to turn inverted at apogee, what is your contingency?
 
Clay, That is a good question.

Our plan is for the rocket to use its elevons to adjust its pitch from straight up to a forward glide/dive as it passes through apogee. This should start the rocket's glide off in a controlled upright position. As the glider has 5% dihedral we would not attempt sustained upside down flight.

By programming a light and smooth touch for the automated controls, we hope to minimize the risk of inversion or any other naughty glider behavior.

If the rocket gets inverted during glide, the slightly lifted position of the elevons during glide should cause the rocket to keep lifting its nose until it has regained an upright position.

Dave, am I correct in assuming that the control electronics will not be able to detect the rocket's orientation?
 
Last edited:
Our plan is for the rocket to use its elevons to adjust its pitch from straight up to a forward glide/dive as it passes through apogee. This should start the rocket's glide off in a controlled upright position.

We don't control the orientation as it pitches over at apogee - it could end up right-side up, upside-down, or anywhere in-between.

We just have to count on the dihedral flipping it upright. In theory it should be unstable upside-down. (The 1/3 scale model seemed OK on this.)

If the rocket gets inverted during glide, the slightly lifted position of the elevons during glide should cause the rocket to keep lifting its nose until it has regained an upright position.

Or the dihedral should flip it (more likely, I think).

Dave, am I correct in assuming that the control electronics will not be able to detect the rocket's orientation?

Yes, that's correct.

We do have the option to steer manually (by radio) if we have to, and regardless of whatever unstable condition it might get in, the parachute is programmed to pop at 200 feet AGL.

But the main plan is to let the dihedral keep it upright, and then steer only gently to avoid flipping it.

I finished populating the PCB today - I found a nasty QC problem in the PCB manufacturing - see 3rd pic. I can fix this with an x-acto knife, but it shouldn't happen. (The silk-screen alignment is sloppy, too, but that's not such a big deal.) Board was made by BatchPCB.com - all my previous boards from them have been perfect; this is the first time I've gotten lousy boards from them.

IMG_3720_crop_front.jpg

IMG_3718_crop_back.jpg

IMG_3721_crop.jpg
 
Last edited:
Prepped the shoulder of the LOC 3.1" nose cone by:
> cutting off its base
> cutting a slot in the shoulder to allow entry for the external Kevlar strap

Prepped the tip on the NC by:
> drilling small holes at the tip for epoxy bonding
> wrapping tip with light FG and letting it partly set up, then
> pouring 1/2 oz epoxy inside tip to retain one end of a Kevlar strap

IMG_6037.jpg
 
Test fit a RoadRunner G80 into a 38mm to 29mm adapter to confirm selection of retention washer and nuts.

RockSim predicts about 700ft altitude, will likely get less.

Plan to use these motors for initial test flights and work up to more power later.

IMG_6044.jpg
 
Using 36" chute with 12" Nomex protection and short Kevlar straps for recovery system.

One Kevlar strap is bonded to inside of NC tip as previously noted.

Other strap is securely bonded to CR and motor tube at base of rocket. This strap will be lightly taped to outside of rocket for liftoff as pictured.

This will allow for final recovery under chute to orient the control surfaces away from the ground for touch down.

Rail buttons also pictured. Screws retaining them are just loose enough to allow rail buttons to rotate. This reduces friction between rocket and rail at liftoff and prolongs life of buttons.

CP and safe CG point are marked on rocket and can be seen in these pictures. CP was calculated in RockSim and both values were confirmed in arrow straight flight tests with the 1" prototype.

IMG_6058.jpg

IMG_6059.jpg

IMG_6061.jpg
 
Last edited:
Delivered rocket glider to Dave today, got to see his impressive workshop for the first time.

Rocket is 3.1" in diameter, 43" long and has a 23" wing span.

With air frame, nose cone, complete recovery, elevons, electronics bay hatch cover and 29mm adapter weight is 35.6 oz.

Motor and electronics not included in this weight.

Pictured: 3.1" project and 1" prototype rocket gliders flying in formation :)

IMG_6062.jpg

IMG_6066.jpg
 
Some business distractions prevented me from working on the glider for a few days, but today I got a little work done.

The servos were disassembled, inserted into the holes for them, and reassembled. That went smoothly; not sure if I should use the supplied rubber grommets or not, or wood screws vs. machine screws with nuts.

The PCB is finished and working; I also modified another "808" camera and hooked it up - not sure yet if I'll find a good place for it to look out during flight.

Today I made up a battery pack for it (2 x 1000 mAH LiIon cells in series) and wired that up.

Boris's idea is to mount the electronics inside a coupler tube that fits smoothly into the body tube. I mounted the PCB and battery onto a piece of 1/8" aircraft plywood, and cut the plywood to fit neatly into the coupler tube.

You can see the electronics sitting in the bay (with no coupler tube); they fit neatly that way; I'm tempted to dispense with the coupler, but without it the fiberglass bay door doesn't fit so well.

The servo leads need lengthening still. Right now the CG is about 5 mm aft of the mark with all the stuff installed into the glider. Once I add the spacer into the bay, ejection stuff, and bay endplate, the CG ought to be just about on target.

So it's coming along. Tomorrow I hope to get to a hobby store and buy some threaded rod, clevises (clevisii?), etc. to hook up the servos to the elevons.

For now I'm thinking of using Staples packing tape as hinges (one piece of tape on each side) to attach the elevons - anyone have thoughts on that?

IMG_3723_with_grommets.jpg

IMG_3727_top_view.jpg

IMG_3729_ebay.jpg

IMG_3730_ebay_sideview.jpg

IMG_3734_battery.jpg
 
A few more pictures - fit check of the electronics into the coupler tube, tube installed into bay, bay with cover on, bottom of glider showing length of servo leads & CG/CP.

IMG_3737_fitcheck.jpg

IMG_3740_tube.jpg

IMG_3741_covered.jpg

IMG_3742_bottom.jpg
 
Back
Top