Tuesday, February 26, 2008

Hardware, Rocket Hardware

If I learned any lesson from last years attempt its KISS keep it simple stupid.
A 4 engine vehicle with 39 valves is not going to fly reliably. Toward that end this years vehicle is going to be much simpler. Today I got a package...



The more I work on this stuff the smarter John Carmack gets... these are 6 5086 spun aluminum hemispheres from AMS industries.




They are 30" ID 0.1875 inch at the base 0.171 thick at the edges. 19 lbs each half. This should conservatively give me a burst pressure between 600 and 800 PSI. I'm shooting for 500, so I may lighten them a bit. The edge thinning is a lot less than AMS said it would be so I could have gone down a size in the thickness and saves some weight.

Given KISS what is the simplest system that will do the level 1 prize?
A Peroxide monoprop.
Everyone who works with peroxide spends inordinate time playing with cat packs. So I'm going to test a liquid catalyst like the Germans used 65 years ago. Using 85% peroxide I'm well under the melting temperature of 316 stainless so no cooling is needed I can just use a stainless chamber. I can also buy No clog spray nozzles in 316 from McMaster Carr and use off the shelf spray nozzles. The big question I have is with a liquid catalyst, what do I need to L* or chamber length? So I got a simple experiment I hope to run this weekend, its a long Stainless tube with 316 stainless pipe fittings welded in one end. In the pipe fittings I screw in off the shelf low clog spray nozzles and install thermocouples down the length of the tube to see what length is necessary to get maximum decomposition temperature.

Monday, February 18, 2008

Bittersweet day

My son and I spent the day cleaning out the garage in anticipation of getting back to rockets.
Part of this involved taking the carcass of the origional Unreasonable rocket to the aluminum scrap dealer. We both agree that a 4 engine vehicle is just too complex, but its still sad to take brackets, fittings and tanks one worked hundreds of hours on back to the scrap dealer.

Saturday, February 16, 2008

Progress and thoughts...

I flew the helicopter in attitude hold mode today.
It worked perfectly. the autopilot flys a lot better than I do. On flight #2 the commercial off the shelf RC regulator failed and the servos acted very erratic.I set it down with no damage. More debugging Sunday.

My son and I spent the day at FAR, we went out to clean up our storage space, work on the site and watch a large 5K liquid test firing. The work on the site is the real sexy part of rocket development. I spent my morning repairing the outhouse door jamb and installing godzilla's own door closer. Maybe the Mojave winds wont rip the outhouse door off, again.

After a full day of checkout the large test was a no light with a frozen LOX valve. We were not involved other than as spectators. My son has been working with some people doing peroxide rockets of various forms,and the grass on that side of the fence looks a lot greener.... Use cheap nitrogen for a presurant gas, all your valves and plumbing are at room temperature, dense, reasonably clean. Possibly auto igniting in bi-prop mode after decomposition.... hummm....

Monday, February 04, 2008

Quick Update

I've been very busy with "Other" mostly trying to catch up on work. I've been doing some work on the helicopter and I've flown it a few times, but no big news to report on that front. I've started testing with the DGPS and I've come to the conclusion that I need better antennas to make the RTK work. My one successful RTK test with the antennas on my roof took 46 minutes to resolve the integers, and then the solution was accurate to within 6" at 10Hz for 10 hours. The average RTK solution between the antennas was 20.02" with actual measured truth being 19.75". My son has come back down from the bay area to work on some rocket projects, both unreasonable and other..... I can't talk about "other" other than to say it is a paying gig. I'm glad to have him home.

I also find it frustrating that its sunny all week when I can't fly, then it rains all weekend where I can't fly.(Actually it stopped raining during the super bowl and I choose to watch that) This week is not going to be "unreasonably " productive as I have a lot of stuff going on.

Monday, January 28, 2008

Sunday, Loops and Simulation

The Simulated weather for Sunday was Rain all day. The Reality was that after 10am it did not really rain again until 4:00pm. So I went flying. I'm currently working on altitude hold, but the wind was really gusty gusting from 5 to 20mph. A helicopter takes less energy to fly when moving than when it is hovering. If you try to hover in one spot with gusty winds the helicopter balloons up and down as the wind speed increases and decreases. This makes it very hard to sort out the altitude hold loop as you are never sure if the up and down is wind or oscillation's. I could hover lower and get a better handle on how the altitude loop gain is but until I have it hovering at high (recoverable) altitude I'm not going to play with the altitude hold down low. The altitude hold will have to wait until a calmer day.



So since I could not do altitude hold I thought I'd work on heading hold. In flying around with the magnetic heading hold engaged the helicopter seems relatively stable but the tail wandered a few degrees each way. I always thought that it was some local magnetic variation, that may contribute, but in looking at the data the tail target vs actual error is often 3 to 6 degrees and it wanders a bit. It seems to hold an offset. The standard way to fix this in a control loop is to add some integral error term and the result is The oscillation's you see on the left. So I turn down the I term (to 5% of the P term) and turn up the D term and its better, but still not ideal. You can still see some 3 to 4 second oscillations when steady and a fair bit of overshoot when perturbed. I'd been doing the default PID tuning of turning the P gain up to the point where it just starts to oscillate and taking the Ziegler-Nichols values you can find on the web. I conceptually understand what is going on, but this is straining my control system theory. (My only official control theory class was all done as laplace transforms in 1983) Early in my professional career(1985 to 1991) I did a fair number of analog and mixed analog/digital control systems, but always with a adult supervision from a controls person. Since 1991 I've mostly been a software coder. So in trying to relearn all of this I have a several specific questions that I'd love have any lurking control theory guys help me with.

Most control theory books, articles and tuning discussions assume you have a linear plant. In reality most of my "Plants" will be integral in nature. IE I do not control the thing I'm trying to close the loop on directly, I really control the acceleration or rate. So there are one or two physical integrals between my control input and the thing I want to control. See the example to the left.
If I just close the loop around the whole thing, its going to be really unstable. So my plan was to have Target Position yield Target Velocity Target Velocity yield target Pitch and Target Pitch yield Pitch Rate. This would have hard limits for each intermediate step. IE max velocity will be 5m/sec, regardless of the position error. Clearly every intermediate step in this will have a proportional gain term, any advice on which ones should have integral terms and when I should reset the integrals to zero?





I'm also struggling with a stupid simple question I have about PID terminology. You can express a PID as

control= P*(error+I*integral+D*difference_or_rate)

or You can express a PID loop as

control = (P*Error)+(I*Integral )+(D*difference_or_rate)

When you look at the standard Ziegler-Nichols chart :
for PID P = .6Gu I=2/PU D=PU/8 Is this for the first form or the second? When you measure Pu I assume Pu is the oscillation period in samples (this is a discrete system), or have I made a wrong assumption here?

Lastly is the guidance for standard linear PID tuning even valid for this sort of plant? If not can one provide some guidance on tuning such loops?

Sunday, January 27, 2008

It Never Rains in Southern California


Notice the Probability of precipitation line...90% at 1AM 100% for the rest of the day. No FLying today.

Saturday, January 26, 2008

Pavlov's Pilot

After two outings where I hit the altitude hold switch and I crashed, I was hesitant to test again. I reluctantly went out to test fly the helicopter today and on the second flight I got up the courage to hit the altitude hold switch and things seemed to work. I failed to get data from the second flight for some reason, probably has to do with the software in the Telemetry box not logging restarts correctly, but I'm not exactly sure why I got no data. I'm ready to test again in the morning.

Last Crash

The last crash was a bit violent. You can see the crushed tin that held the formerly working GPS.



I did not take a picture of the crashed helicopter, but here are some of the broken pieces extracted from the trash.



I was planning to replace the GPS with the new smaller differential capable GPS so I
packaged that in an altoids tin, its about 1/3 the size of the old GPS.

Here it is rebuilt and ready to try again. To get a concept of the amount of work, the main frame on the helicopter is flat carbon fiber plate, in the broken pieces picture you can see that both side plates were broken.

Friday, January 25, 2008

Another Altitude hold crash...

I crashed again this morning before work. I know that I had all the mode switches in the right place in the right order. This is very frustrating!!! ARGHHHHHHH
A brief look at the data implies that the Gain was just WAYYYY to high, but it should be identical to the flight gain where the helicopter did perfect altitude hold. This time in addition to th parts listed form the last crash I broke the tail boom and side frames. I see at least 8 hours of work to be flying again. I'm going to have to find a way to sneak up on this one as its getting expensive.

Thursday, January 24, 2008

New GPS boards...

The adapter board to wire up the new GPS arrived on Tuesday,
I finally got to assemble them today. I've got to make a shield can for the helicopter and an antenna mount for the Telemetry suitcase and I can start testing with the differential GPS. Tonight the GPS is hooked up to the antenna on my roof and I'll record 12 hours at 10Hz and see how much things move around. the picture below shows that my house has moved 4.36M in altitude and 1.29 and 2.77 in lat and lon since I started the GPS recording positions 4 hours ago.
Not too bad for an unaided GPS iin the rain partially under a tree.

Some simple Trig

Last night after I finished reassembling the helicopter I did some software work on the helicopter simulator . The sim is a full 3D 6DOF helicopter simulator with display. I downloaded it about 9 months ago and it works well. It was part of the source forge helicopter autopilot project. I've been using it to develop control laws for the real helicopter. Last night I changed my simulator control laws from having yaw always north facing to putting in a full transform from North, East to Forward Right for the position and velocity feedback loops. My helicopter sim now flies the full NG-LLC flight profile while doing slow 2 deg/sec rotations the whole time. It all works so the next stop for this code is the "real world " helicopter.

Wednesday, January 23, 2008

Crash Gordon and the Helicopter(s).

My Son came down from the bay area to visit this weekend so I did not get much unreasonable work done.

Crash #1 On Sunday we were going to a play in balboa park and I had 30 minutes to kill. so I was flying the little fully manual trex 450 in the driveway. While I was doing this my wife came out and started moving the garbage cans toward the curb. I was in the way so I landed the trex next to the truck, shut down and preceded to take off the neck strap on the transmitter so I could help with the trash, in the process of doing this I hooked the throttle hold switch with the neck strap and the helicopter spattered itself all over the side of the truck. Its a good thing the trash cans were not yet at the curb, I had additional material!

Background for Crash #2.
On the last reported test flight altitude hold worked very well, but I had not yet tested clmb and descent. So I made two minor software changes, I added limits to the vertical velocity. (Vertical velocity had just been the differential term in the alt hold PID, but I spluit that in half so I could explictly limit vertical velocity. )I reprogrammed the mode switch to facilitate testing this. The Mode switch has three settings mode 0, 1,2 Mode 0 has always been manual.
Mode 1 was rudder heading hold, mode 2 was Altitude and Rudder hold. I changed this so both Mode 0 and Mode 1 were manual and Mode 2 was automatic Rudder and altitude.
I also recorded the target Altitude , Heading and initial collective value when going from mode 0 to mode 1. The idea being that I could set my target altitude by toggling from 0 to 1 then manually deviate from this position and go to it when switching to mode 2.


I went and test flew this combination on Tuesday Morning. In the process of adding the velocity limits I'd changed a feed back sign and altitude hold went the wrong way... I started above my target and when engaged the helicopter accelerated up at ever increasing rates. I tried this twice and figured out what was wrong and called it a day after 45 seconds of flying.


I changed the software sign last night and went out this morning to test the change.

Crash #2
I did my usual preflight routine I made sure that all the controls on the helicopter moved in the correct direction. (In past S/W version this was also a test to insure I was in mode 0, because in mode 1 rudder would not respond) So I brought the helicopter to a stable hover about 30 feet in front of me at about 15 to 20 feet of altitude. I then proceeded to flip the mode fro0m mode 0 to mode 1, alas it was already in mode 1 and I went to mode 2. Realize that while manually flying a helicopter you can't look down at the transmitter to check switch positions. It must have gotten bumped into mode 1 while I was hooking up the main propulsion battery or starting the video camera. So when it went from Mode 0 to Mode 1 it was at altitude 0 and full down collective. So when I went to mode 2 its target altitude was 0 and its initial guess for the collective position was full down. This is a fully acrobatic helicopter so full down collective is at least 3 negative gees. Before I could react the helicopter was on the ground, hard.

Broken parts: Both skids,flybar, flybar paddles, both blades, GPS antenna mount, one blade grip ball end, battery tray and the Jesus bolt. (the bolt that holds the main rotor to the airframe is called the Jesus bolt) total damage about $120.00 with the majority of that being the blades.
I had spares of most of the parts. Tonights task was to reassemble the helicopter. Its done, but not tested yet, I'm letting the glue on the GPS antenna mount dry while I type this.
(After glue dried tested all electronics and systems all check out ok, ready for blade tracking in the AM weather permitting.)

Saturday, January 19, 2008

Two controls down, two (hard ones )to go

I flew the helicopter this morning.
First time with altitude hold. The Autopilot does a MUCH better job of altitude hold than I do. Next Up (Sunday?) Pitch and Roll. this was also the first flight with airborne video, I'm not going to post the video because the camera was oscillating up and down and watching it makes one sea sick.
(I also pointed it too far down so 8 minutes of the dirt in a dirt parking lot would not be worth much.) I'll try to improve the angle and the mount before the next flight. The Ultimate Camera Helicopter would be: (http://www.bergenrc.com/ObserverTurbine.php, or maybe http://www.bergenrc.com/Observer.php)

The next steps will be

1)Pitch and Roll to Elevator and Alieron PIDs, where the RC system provides commanded pitch and roll angles.

2)Vforward and Vright velocities provide Desired Pitch and Roll where the RC system
provides desired Vforward and Vright.

3)GPS position hold -> Gives desired Vnorth and Veast ->yielding desired Vforward and Vright.

Friday, January 18, 2008

Smart helicopters...

A good read on automating a helicopter.
http://sun-valley.stanford.edu/papers/Conway:95.pdf

Control Stratagey

The four things I can control are: Rudder, Collective, Elevator, Aileron.

My scheme for control is to use a set of PID loops.
Most likely some of these will only have P gain, but the concept is to use the following:(Copied from code) The PIDs marked with * in the comments will be different in the rocket.


OnePidElement Yaw_to_Rudder; //Takes IMU yaw and drives rudder *
OnePidElement Alt_to_VSpeed; // target altitude drives desired vspeed.
OnePidElement VSpeed_To_Collective;// desired vspeed drives collective.*
OnePidElement Pitch_To_Elevator;//desired pitch drives Elevator.*
OnePidElement Roll_To_Alieron;// desired roll drives Alieron.*
OnePidElement V_Forward_To_Pitch;//desired Vforward drives pitch.
OnePidElement V_Right_To_Roll; //desired Vright and drives roll
OnePidElement Long_to_V_East; //desired Longitude and drives VEast.
OnePidElement Lat_to_V_North; //desired Lattitude and drives VNorth;

And one more conversion function:
void ConvertDirection(double V_North, //Desired V_North input
double V_East,//Desired V_East input
double Yaw,//Current True YAW corrected for magnetic deviation input,
double &V_Forward,// Converted V_Forward target out
double & V_Right, //Converted V_Right target out
);

OnePidElement is an object that holds the a PIDGainConstants object and the current integration state.

The Yaw to rudder , Pitch to Elevator and Roll to Alieron PIDs will be run for each IMU sample.
All other PID's will be run for each GPS data set.
I'm not planning to integrate the accelerometers. (Yet)
An example would be:
Elevator=Pitch_To_Elevator.DoServoPidAdjust(target_pitch, imu.pitch , imu.x_rate);

Each OnePidElement contins a PID gainObject that has the following gain limit elements:
double p_gain;//Proportional Gain
double i_gain;//Integrator Gain;
double d_delta_gain; //Sample to Sample delta gain
double d_meas_gain; //Rate as measured by IMU or GPS
double max_i_windup;// Maximum integrator value limit.
double min_i_windup;//Minimum integrator value limit.
double max_out_limit;//Maximum allowable value or adjustment
double min_out_limit;//Minimum allowable value or adjustment

In fact I have two D terms in my PID. One is change in the sampled values (IE the delta term from sample n-1 to n) and the directly measured rate. The directly measured differential/change rates are from the IMU and GPS.

I'm currently working on the interface to selectively change these PID constants in flight. This might be easier if I switch to a two person operation, one to fly the helicopter and one to twiddle the gains. For Now I'm just going to work one axis/ PID at a time.

Above all of this is the rather simple executive that generates the sequence of target lat,lon and altitude. At this point that excutive just tried to freeze the vehicle in space when activated. (IE use the current Yaw, Alt ,Lat,Lon as the target)

(Sorry for the crummy code formatting blogger does not seem to like formatting code in a reasonable way)

Wednesday, January 16, 2008

The urge to have a science project.

One has to be careful that time and money are allocated correctly. For several years I've been contemplating developing a lower cost GPS Differential/RTK system using commercial receivers.
While an open source solution would be a nice to have, it really makes no sense. I can purchase off the shelf differential GPS solutions that are inexpensive given any realistic valuation of my time. Rather than spend months developing a GPS solution I've decided to just purchase one off the shelf. I'm going to use the hemisphere GPS crescent oem board with their RTK and 20 Hz options. I'll integrate the RTK base into my Telemetry suitcase and the rover goes on the Rocket/Helicopter. This is just so much easier than developing a either a GPS solution or a fancy interial/GPS Kalman filter. The data sheet accuracy for the RTK solution is 2cm. If it can keep that in a dynamic environment that will be amazing, even the specified L-diff solution at 28cm is plenty good enough.

Tuesday, January 15, 2008

A Quick test flight.

I fully checked out the power system and added a completely 100% separate regulator for the receiver. I re did the bearings in the blade grips and I then flew the helicopter this morning before work. The flight was uneventful. I left the telemetry receiver sitting in the front seat of the truck and this caused telemetry dropouts. Up to now the telemetry reception has been 100% perfect. The display software was ignoring the checksums and size checks, after todays flight I need to fix that as partial data frames make for really strange data. This will be tonights task. The next test flight will test altitude hold.

P.S. any GPS internals experts out there reading the blog? I would like to put together a low cost open source L1 code differential solution and or carrier phase RTK solution. I think this would be a very valuable tool for a lot of interesting robot, uav, helicopter, rocket etc... projects.
I even willing to subsidize the effort with some $.

Sunday, January 13, 2008

(Update) A Day of testing.

(Update I found the receiver problem, read to end)
I drove out to Mojave Friday night and spent all day Saturday at FAR. There was a TV program shooting pictures of large high power rockets and that was kind of cool to watch. It took them all day to do some background video and two flights. The flights went perfectly. I had often contemplated inviting some TV to our tests, but after watching them all day I don't think I could handle the time impact, its much more intrusive than I would have expected.

In any case I set up shop in the propellant mixing shed and did some flight testing. My previous helicopter testing I'd writte some code, drive somewhere to test it, go home to review the data and do it again. Saturday I had the laptop in a reasonably comfortable dim space 10 steps from where I could fly the helicopter. (Dim is necessary because you can't really read a laptop in bright sun). I made a lot more progress than I would have the traditional way. It was really nice to be able to change code do a 30 second flight review data and then change code again all inside 10 minutes. It was not perfect, the smallest screen I usually do development on is a nice 24" LCD. Doing development on the laptop fees cramped, but the quick cycle time is a big win.

Flight #1I verified that the CCPM code on the helicopter worked correctly in flight. I also verified that the heading hold code developed on the lazy susan works properly in flight.

Flight #2 I fixed the heading hold gain and removed it from the adjustable gain lever in preparation for doing altitude hold. I also did some hard vertical climbs and descents to gather some altitude data. On review the GPS altitude data was really choppy. I added an integration of the GPS velocity to the variables calculated and modified the data review code to allow me to zero this and display it. (The display code is a lot more complicated than the flight code and hence harder top work with on the Laptop)

Flight #3 Integrated GPS velocity was much better, still not perfect, the data had a downward bias. Sat down and looked carefully at the GPS data, GPS altitude was jumping in 4 m steps, very strange. I had not yet looked at the GPS position data, it looks reasonable, but Id not carefully examined it. So I paced off a 20M square oriented to true norht in the dirt and marked the corners.

Hand carry #1 I then carefully hand carried the helicopter over the 20 M square. First at waist height, then with the helicopter held as high as I could over my head. On review I got zero data. So I swap out the sd card in the data logger and do a 30 second run .I got data this time. A note on the data collection process. The Laptop can display all the data in real time, but the useful mode is to command the telmetry suitcase to shut down. Take the SD card out of the telemetry suitcase, put it into the reader, copy it into the laptop data directory, rename it to something meaningful, and write a summary in the lab notebook of what the flight test was while you still remember, then review the data on the laptop. I need to streamline this process.


Hand Carry #2
I carrnyone watching would think I'd gone crazy and was out waltzing with my helicopter. On review thy the helicopter around the 20 m square spinning 360 degrees at each corner (so I can see the heading change on the data to know where the corners were.) Ae GPS position data just isn't right. The altitude data is also doing 4M jumps. Only the GPS data is suspect, everything else is fine. The GPS data goes from the GPS to the onboard computer in binary form then its converted to be computer endian and packaged into another structure and set out telemetry. So I add another telemetry frame type to ship the raw unconverted GPS binary data to down the telemetry stream without touching it at all. I then modify the data display program to have duplicate fields for all the GPS data. (The PC is the same endian as the GPS no conversion necessary).

Hand Carry #3 Same path around the 20M square spinning at each corner.The two data sets do not AGREE!!!!! ARGHHHH. In looking at the endian conversion on the PC telemetry side I'd used HTONL host to network long it works as expected because the PC does not store data in the expected network byte order. On the Netburner side the natural storage is network byte order so HTONL is a no op on the platform. SO I'd written my own byte swap. It had typo/ error, where the 3rd byte of the float got the 4th byte duplicated. On the 8 byte doubles the 3rd got the 4th and the 7th got the 8th. So I fix this.


Hand Carry #4 The Data sets match, and the altitude is sensitive enough and not jumpy. It even detects me setting the helicopter on the ground , on the work table and holding it over my head! Cool.


Flight #4 Lift off and the helicopter is shaking/ vibrating really badly. Land immediately. One tail rotor blade had split, probably hit the sand on the flight #3 landing. Change tail rotor blades.


Flight 6.7.8.9.10.11 etc... Helicopter is still vibrating, main blade tracking is really off. I do a short flight and try to adjust the tracking. I have some people trying to help me spot which blade is high the red or blue tip. The tracking just seems random, either I'm making to big adjustment or something else is wrong. Still vibrating badly. On the 6th or 7th hop helicopter goes from low hover down to land abruptly, not damaging hard, but more abrupt, and uncommanded by me.

Helicopter is sitting on the ground upright and running and I have no control. Thats easy I've set up so the motor controller is not run by my computer system it's run directly by the RC receiver so in the worst case I can shut it down without relying on software. no dice, the system does not shutdown???? I continue to fiddle with the transmitter, I shut it off. (RC receiver failsafe should shut it down... it does not) Flip the transmitter on and off. Walk around the helicopter trying fiddeling with the transmitter. It shuts down. Quickly go over and disconnect the main power battery. Back on the work bench table I test the receiver battery pack and it seems very low. All the parts of the rotor head seem ok, so I suspect that the rotor blades are failing in some way. I remove the rotor baldes and run the helicopter on the bench. Very smooth and no vibration. I take my spare blades and using a sharpie paint a black stripe on one tip. I install a fresh receiver battery and the new blades. All the controls work, I check all the cable bundels for a loose connector or other problem. All looks good.

Flight N+1 I set the helicopter down on the ground and command the motor to start. I immediately loose control. The Motor is running the helicopter has negative collective commanded so its firmly on the ground but I have no control. I start fiddeling with the transmitter on-off nothing the helicopter will not shut down. After about 5 minutes of this I crawl up to the front of the helicopter reach in and disconnect the power battery.

Is it the transmitter or the receiver?
I take out the small Trex 450 and fly it, it's perfect. The problem is not the transmitter.
Start packing up. I put everything away tables back in my container. Clean up pack etc.
I pack up everything but the little Trex. So I fly that some just for fun. I did my first helicopter rolls in real life!. I've done them on the simulator a lot, but this was the first time in real life. I pack up. Its 4:45 pm I arrive back home at 9:30 PM (Traffic in LA was bad) I unpack the car. All in all a great day.

I suspect that my receiver problem is related to this.

I apologize to all that this has become the unreasonable helicopter blog. But we should be back to rockets in the next 4 to 6 weeks.


I did some more testing today outside the garage. The on/off stick on problem persists even
when I changed the receiver. It goes away if I power the receiver separately.It seems that there is a loose or flaky power problem with the system. I'm going to put the receiver on a separate power source. I also rebuilt the bearings in the blade grips and replaced the plastic blade grips with metal and now the rotor tracks perfectly. In any case I now have a spare receiver and I've done the rework recommended in the link to my earlier suspected problem.

Thursday, January 10, 2008

Data Review.

I modified the data display software tonight to back out the Collective, Pitch and Roll commands from the CCPM servo data. I then reviewed the free flights I did on the 3rd. Toward the end of the flight I did deliberate abrupt pitch, roll and climb maneuvers so I could look at the data and see how much servo movement corresponded with how much vehicle movement. The picture below is a screen capture of the data display. Sevro Roll is the Roll command (red) Roll (Blue) is the actual vehicle roll and the ragged (magenta) line is the raw measured gyro rate.

They all look reasonable. As did pitch , servo pitch and X rate. The Vertical velocity tracked collective reasonable well, but the altitude seemed to wander a lot more. Click on the picture for a bigger view.


Its 11:00 pm and this was another 4 1/2 hour evening.

Fly as you train, train as you fly.

I've been flying RC airplanes for a very long time, but I did not ever fly a helicopter until about two years ago. I bought the real flight simulator and made a serious, 15 minutes an evening , effort to learn to fly the helicopter. I did this every evening for months. I did not buy a helicopter until I could fly the simulator with full realism and gusty wind 10 times out of ten for A full tank of gas without crashing. Once I could do 10 of 10 I bought a helicopter jkit and started trying to fly in the real world. This illustrates a subtle point the picture below shows me sitting in my computer chair flying the sim.
The only problem is that if you then take a picture of me holding the real transmitter
like I fly the real helicopter there are differences.



With the transmitter on my lap I hold the sticks with my fingers, standing with the tranmitter dangling I naturally fly with my thumbs. On the simulator I can easily do 720 degree piroettes
without out gaining or loosing altitude ot position stability. I real life this is not so easy.
So I've started practicing with the simulator standing in front of the computer with the simulator controller hanging from a strap. Even subtle differences between things make a difference. Especially if it is in trained muscle memory.


The next helicopter Step.

Basic control laws are going to be:
1)Desired course/way points ->generates desired position.
2)Current position(gps) and desired position ->Generate desired velocity.
3)Desired velocity +Actual velocity(gps) ->Generate desired pitch/roll attitude.
4)Desired Pitch Roll Attitude +Actual pitch roll attitude(imu) -> Generate (virtual) Elevator and Aileron signals.

Separately we control heading (alwayas points true north) and altitude. (Heading control is done and works)

Note that all of thsi software will be identical on the rocket, except the very last part
>>>Desired Pitch Roll Attitude +Actual pitch roll attitude -> Generate Elevator and Aileron signals.

I've had all this working with the helicopter simulator for 6 or more months. I'm just a bit cautious and chicken when it comes to flying it in the real helicopter. I'm going to work my way up the list backwards. This brings me to todays waffling decision. As presently set up the helicopter is about 4K of hardware and 100 hours of work. I'm a bit cautious with it.
I worked out the yaw control with a lazy Susan. Today I gathered all the parts necessary to
build a mount for the helicopter that would allow it to move about 15 degrees
in pitch and roll and 360 degrees in yaw freely. It would take me about 4 hours to assemble all of this. This only helps with Step 4 all the other steps have to be done in free flight anyway, so is it worth building the pivot mount??? My strategy is as follows Beyond the basic flight controls I have the software set up to respond to two of the RC transmitter controls (outlined in red below)


Aux 2 is a three position switch that selects three software modes. 0,1,2
Mode 0 is full manual control.
Mode 1 enables the autopilot parts that presently work. (currently only the yaw)
Mode 2 enables the new component we want to test.

"Lever" is a slide lever on the side of the helicopter that I have setup to control a software
variable that goes from 0 to 100. The intent is to have this lever control the gain of the control loop I'm currently working on. The problem is that both of these are on the wrong side of the transmitter for the next step as the cyclic control is what I'm trying to automate and also the right hand stick. My real problem is that I actually need to start flying the helicopter regularly.
I also do most of my work in the evening so I need to fly it at night and its not safe to fly by myself. (The big Trex600 could cause serious injury if it went out of control and went for the pilot) I've flown the vehicle a couple of times in the dirt parking lot near the DelMar fairgrounds
(The security guard thought the helicopter was cool, but told me that if anyone asks I'm not supposed to be there.) I could start flying at one of the regular RC model flying clubs, but the fact that the system has a GPS and could, with the proper software, fly beyond the pilots direct line of sight makes in in violation of the RC club safety rules. I think it would be rude to jeopardize a long standing RC club and its flying field by violating the rules.