Hi guys, I am new to the forum and CC3D but not new in programming stabilization stuff.. I don't know if you realized, but I am desperately trying to get debugging working on my machine so I can start working on exactly that, lag, latency, whatever you call it. I think i know where the problem is but I haven't been able confirm any, cos I can't get the damn thing to debug..
Anyway I realized there is a lot, like between 0.1 and 0.4 secs of lag, which is unacceptable for my flying. The thing is that the lag is also in manual mode (I fly planes) which is bad! I know the processor is more then capable of crunching all the data, at an acceptional rate that is. This brings me to my point. I've been browsing the code and found this little comment
/**
* WARNING! This callback executes with critical flight control priority every
* time a gyroscope update happens do NOT put any time consuming calculations
* in this loop unless they really have to execute with every gyro update
*/
So how often is gyro updated? I know this can be crazy fast. Back in the days just when heli gyros came out and I started programming stabilization for my RC planes from scratch (now I am trying to port some the code here) I was (still am) processing gyro (main) cycle at 30Hz and I had the stablest plane around. There is no need to process any more often, it just doesn't make it any better. Use 50Hz at max, thats the rate servos are updated but highly doubt it would make any diff. Set the task priority at 30Hz and read the gyro data at the biginning of the cycle. Thats what I am trying to do but I can't get the thing to debug. Anyway, if anyone wants to help me out with it find my recent posts
So what is the update rate of the gyros?
Hope this is helpful info..
Cheers!