Thanks for the additional info Paul! This is really helping. From your previous suggestions, I ran a series of 5 tests to see if I could determine which integrators needed to be set to zero or could be turned down to eliminate the drift I am seeing on the bench. Would you (please) look at the summary of the results I attached? The XLSX file contains a summary of the parameters I changed for each test. The Word doc gives a summary of what I was trying to test for and what I thought I saw (to be honest, its hard to interpret the results from black box testing, not knowing the design of the system).
Some of the results from the testing: 1) I can eliminate drift if I keep TEC_INTEG_GAIN set to 0 (Pitch and Roll IMAX were also still 0, but I was able to dial back in I and D for Pitch and Roll). 2) Something appears to suddenly wake up Nav_Pitch to go from 0 to non zero. You are right, it seems to follow Baro Altitude, but there is something else also affecting it. 3) RCOUT seems to follow the patterns of NavPitch 4) Seems I also need to turn down Steering Parameters (maybe since the speed is so slow, they also kick in?).
Please take a look and let me know what you think. The ultimate goal isn't really to eliminate the servo drift (I don't care if they are railed when the plane drops). The bigger goal is to make sure the plane recovers once dropped (the integrations go away). I suspect that I will need to dial back in TEC_INTEG_GAIN and others, but I don't know enough about how the system works in order to set all the parameters. Last time I tried it, it almost cost me my plane from a 1000 foot drop! Is there a way I can know that the drift will bleed off once the plane begins to fly even if he servos are off-center?
I have couple of related questions (see below) however, they all seem to come from the fact I can's seem to find a good explanation of the system control for the plane configuration. Either from a design point of view or a practical "here's how things are related and should be set up" (Yes, I've read the getting started pages). I have the link to all the parameters,
http://plane.ardupilot.com/wiki/arduplane-parameters/, but there is little explanation as to how they relate to one another. For example, I didn't' know how the plane behaves as you described given the setting of LIM_PITCH_MAX and LIM_PITCH_MIN. Is here a place I can go to for a more in-depth explanation of the design? I'm a software engineer so I'm used to a little insight into the design.
Some of the other questions are:
1) How does Nav_Pitch ultimately affect RCOUT (what is NavPitch?). I looked through the code and found SEVERAL places that affect its value. My testing keeps showing that RCOUT gradually follows NavPitch.
2) How does TEC_INTEG_GAIN affect RCOUT.
3) What's the relationship between the TECS algorithm and the other algorithms found in the code affecting pitch/roll (in Attitude.pde, Arduplane.pde, AP_PitchController.pde etc). Is there a PID loop controller and also a TECS potential energy/kinetic energy algorithm for speed and height? How are these related. Again, is there a system diagram that shows how the various control loops are related? I'm guessing that I can't shut off TEC_INTEG_GAIN for real flights, but I don't know.
A couple comments on your recent (appreciated!) suggestions:
1) Thanks for the suggestion on the LIM_PITCH Settings. Do I also need to set ARSPD_FBW_MAX and ARSPD_FBW_MIN to correspond to glide speeds? (not sure how PITCH limit settings relate to ARSPD limit settings if the plane goes too fast or slow at a MIN or MAX pitch. I intend to do gliding tests and record the glide pitch and speeds and set these values. Sound OK?
2) Yes, I'm running without an airspeed sensor (hopefully). If I need one, I'll add it but for now, I was trying to stay simple.
3) Yes, the D values (and I values need to come back and hopefully I showed that that can be done without getting drift back (although I didn't try to dial back in the IMAX param).
4) The reason I was dropping in auto mode was that I was trying to use the code as-is (no programming modifications) and I thought that the only way to do timed things like "Release from balloon now" was to set it on a mission with delays and set-servo commands.. Also, the plane will be about 22 miles away when it drops, so it needs to execute commands all by itself (no radio). So I don't know how I could send it up with FBW and have it time a drop and time a change to another mode such as auto. If I've missed something, I'd really like to know.
5) The plane will be dropped horizontally, not vertically down, so I was hoping to avoid the -90 degree problem (although in the vacuum of space, who knows).
6) Good suggestion on starting a wiki page. Yes, there is a discussion group on DIYDrones for balloon project. I need to check in more with them (I've posted this issue on it but without response so far). It would be really helpful to get descriptions of the system design so we could discuss our options more intelligently.
Thanks again for ALL your help! I'm really excited to get this project moving again.
Rick