after my last fly in stable mode i update the i2c libs for compass and barometer , now is better of older versions so i can upgrade main core loop to 800 hz instead of standard 200 hz .
Above the resutls of my first automatic flight , i'm very happy of this first result .. i start to use the performances of our Multipilo32 Arm Cortex M4 processors.
More Performances = More stability.
500Hz is right (2ms is 500Hz, the error you get with this > is exactly 0.1% 1microsecond)
what kind of artifacts do you mean?
the gyro doesn't care how fast you measure it's analog output
but what kinda artefacts do you create when reading the idg500 too fast?
the sensivitiy is 2 milli volt per degree and second.
would be intersting just to test an idg500 breakout board ;-)
but 300 hz is right when reading christian dobler maester thesis. he is the createor of the last pixhawk hw.
i like the the 333 hz refresh rate :)
nonono, greater than 2ms doesn't mean 3ms ;)
but you are right, it should be >=
// Main loop at 800Hz (IMU + control)
if ((currentTime-mainLoop) > 2) // about 800Hz (every 2ms)
the if is satisfied when the differenz is 3 ms.
3 ms means a refreshrate of 333 hz.
that sounds reasonable to me.
as far as I know roberto uses I2C, so his output can be at somewhere around 4KHz
his input are the gyros, which can be about 2KHz, so he could go up to these 2KHz
radio side is not imported for flight stability (GPS only gives 10Hz, but main loop is running much faster)
what is the error rate at the higher frequence?
i have no idea when the chip reaches it's limit when reading to fast over the spi bus.
but when looking at the output side: aka esc's then i think the whole thing is overengineered.
the system system has to match: input and output.
This is the new code with adc.Update()
// Main loop
in my revision of code I change all the library because is totally different of 8bit revision. I change the AP_ADC and add a new function that i call Update , so in the main code i put his function where i need freesh gyro and acc data . So also the gyro is update at 800 hz.
The quality of fligh is better at this rate , in the next revision i would try to goin up until the limit of adc converter and check what happen.
At the moment i cannoct activate the i2c sensor if i going up until i don't activate dma for read i2c.
© 2023 Created by Roberto Navoni. Powered by
You need to be a member of FOXTEAM UAV CLAN to add comments!
Join FOXTEAM UAV CLAN