Hello there,

I have been working on this flight controller since october (on and off) and had my first real flight yesterday. I use a teensy 3.2 that has a KINETIS K64 Cortex M4 without FPU at around 100MHz. I use platformio for compiling and flashing. The IMU sensor is an MPU9150 mounted on a PCB with an EM7180 SENtral coprocessor that does the fusion for me at 1kHz. I update the ESC's at 400Hz with PWM signals which are driven by the internal hardware timers. A cascaded PID loop runs to generate a signal for the motors.

However, most of this, including C++, is new to me. I am pretty sure that I do some things in a less-than-optimal way. For one thing, I use floats, which is slow but currently acceptable for me because I do not have a good fixed point implementation for this platform.

I do not know where to proceed - I have baro data, is that sufficient to implement altitude hold? Or fuse it with accelerometers? What about position hold? I have a GPS sensor. What about MAVlink? Would it make sense to implement this here?

Just looking for some (both negative and positive) feedback. Code lives here:

https://github.com/barafael/raPID

All the best and thank you!

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Activity