by nplayle » Mon Jul 08, 2013 5:16 am
Yes, I agree it's possible to get all the data from the logged parameters, but if you start tweaking the code to perform different functions it's desirable to log custom parameters. Or say if you were changing how the PID loops were structured - you can calculate what the desired velocity is, but you don't necessarily know that the code is actually using your calculated value.
Writing a script in matlab wouldn't be particularly difficult to do that, but I'd imagine most people don't have access to (or time to) write interpreters like that. Also (I haven't looked at this part of the code) don't the controllers use calculated Euler angles for control or is it direct from quaternions? If that's the case, you'd have a var with the data, it'd just have to be logged. Plus I'm thinking more along the lines of:
Say you're in position hold, but there's an offset, you're blown around by wind or something. The controller will generate a desired velocity and desired attitude to get the craft back to where it should be. These velocities arent really a function of any inputs (arguably GPS position but it's not really something you can calculate easily either), and would be hard to come up with. It also makes it harder to tune your gains because it's not immediately apparent which loop needs tuning. It would be neat to see a feature where you could specify what is logged to the card, but it would probably take a decent amount of work to implement.
I took a quick look at the code that does the logging. It'd probably take me a couple days do become familiar with it enough to add more parameters to it though. Which probably means I won't look into it much further for awhile unfortunately.