Just for Ref.
Hi , Sergey Gridasov.
1st of all . good job on your idea.
Historically , Arduino Mega2560(8bit) is not enough to mission APM(like PX4) sometimes.
So we could consider STM32F4(PX4 , 32bit) , especially LowLevel OS(like NuttX for RTOS) and communication protocol -multi situation.
and STM32F1 board is used on PX4 co - processor (backup safety)
also , you can figure out middle point which is considered how much take something resource limiting lying down.
and additionally hard coding and porting to your target board like STM32F303K8 and Shied board.
thanks for your frontier spirit and inspiration.