...While it's good everybody has input and concerns, you are a known flier and won't put something out there that's doesn't meet your pretty high standards and I trust that. Gopher it dude!
Thanks, Fyrwrxz. I've already gotten some good feedback I'll incorporate into the design. Rest assured you guys aren't slowing me down.
Is it possible to provide color coded dots instead of labels? Put the color schematic on the back of the unit or on a field card ?
Im learning so so much from you guys its better than school.
Tom
Color coding would be a good way to mark each position in a small space, but unfortunately anything but white on green increases the board cost several times over.
I'm learning more than I did in school too, so that makes 2 of us.
This thread prompted me to drag out the code I had played with a few years ago to compute attitude from gyro data. I thought I might be getting reasonable results but I didn't really like the code so I set it aside.
This time around I found some references I hadn't seen before and now I think I have something that works. (I am probably wrong.
It is a quaternion implementation and requires no trig functions. Each update requires 15 multiplications so it can run pretty fast.
Even checking for the angle requires no trig functions. You could of course use an acosine to get a human friendly form but for this application it isn't required.
Attached is a sample plot produced from this
data.
Cool. At work we use quaternions for spacecraft attitude. I should look into that more before I make the final call between doing it with a direction cosine matrix or the quaternions. Bill Premerlani and Frank Hermes have a very easy-to-follow white paper on the DCM implementation that I know will work. But I think 15 multiplies is less than the DCM method, but once you have the DCM it takes less to calculate a control output. If I remember correctly, the quaternions also don't need to be re-normalized as often, or perhaps at all.
Your graph looks pretty reasonable, though it looks like the apogee charge went off when the estimated flight angle was 50 degrees. Was the apogee charge early, or is that just accumulated error in the attitude propagation?
One final feature I just realized would be really nice for failure analysis, especially as systems get more complex would be some sort of indicator that the maximum angle had been exceed and it had locked out, so in case the sustainer doesn't fire, it would be easy to check and see whether the tilt meter did it's job (or got a misreading) or if the altimeter never tried to fire the igniter.
Something as simple as a different series of beeps or flashes would work.
You would have to know when the flight angle limit was exceeded relative to when the firing circuit triggered, since you would expect the flight angle limit to be exceeded sometime on any flight that doesn't tail-slide. If I incorporate a check for an open firing switch, then it would also be able to tell when the timer or altimeter tried to fire the charge, if it uses low-side switching. It might be cool to flash out the flight angle that was estimated at the time ignition was detected.
Oh, and one more thing. The way I see it, you have two options for the unpowered switch. Either have it always open, and only closed while the tiltmeter says it is safe, but if power were to fail for some reason, the sustainer would not light. Or, you could have it always closed, and just opened if the tiltmeter things it isn't safe. This would lead to less accidental failures, but also lower chances of catching a catastrophic event. My leaning would be towards the former.
The former is both more natural to implement, and more in keeping with the purpose of the device, IMO. When the power is off, the switch is naturally open, and I would keep it that way until the microcontroller is powered on, performs a self-test (using the built-in self test capabilty for the gyro), measures a near-vertical orientation on the accelerometer and constant, small rates on the gyro. Then zero out the gyro rates and verify that they're small. Also check to make sure the output isn't shorted. Then (still pre-launch) set the state of the switch according to whether the accelerometer says the rocket is within the angle setpoint. Then as soon as liftoff is detected, transfer control of the switch to the propagated gyro attitude. The switch will stay closed until the flight angle threshold is exceeded, and it will stay open from then on until the next time the device is powered on.