Hi,
This topic is rather unusual and I hope someone here has experience with this.
I have a hexacopter and I am looking to construct an autopilot system. My choice of using an iPhone is due to lack to computational power in Arduino or even Pi. Regular autopilot systems operate using feedback control from GPS, Gyroscope and Accelerometer, however my ambition is to use control theory to achieve more precise control over manoeuvres.
This process involves building differential equations for the object in question i.e. motor torque vs rpm, prop drag vs rpm, arbitrary moment of inertia, vs relative air pressure... list goes on. Using all of these equations in combination with feedback control will result in ability to execute a most efficient path to achieve at a desired result without losing control of the vehicle, not to mention other fun stuff that can be done. Possibilities are endless, well ΔxΔp≤ℏ/2, anyway..
see here: The astounding athletic power of quadcopters | Raffaello D'Andrea - YouTube
Most of my work will involve mathematical and computational work however I have hit a major hurdle. I am unable to use iPhone to calculate all the above as there is not a reliable way to communicate.
As starters I need the Arduino to interface with 6 ESC's, 10 Ultrasonic Sensors, several temperature probes and battery voltage and current measuring instruments. All that will need to be transmitted to iPhone.
iPhone will then take input from its internal GPS, Gyro, Accelerometer, Tesla Meter and the previously known model of the vehicle to calculate the next change in motor throttle and signal back to the Arduino to act accordingly.
All this needs to be repeated again in under 20-25ms to be able to avoid a runaway arbitrary oscillation.
I have an Arduino Mega which will be the interfacing board. Not yet sure if it can hold here.
In my testing iPhone is able to solve 15 differential equations with 50 different initial conditions and arrive at the result in under 10ms even without optimisation and running on CPU only so iPhone is promising.
So in summary.
What is the best way to communicate between Arduino and iPhone that has low latency and decent transmission rate?
Is Arduino Mega able to handle all these accessories?
Any other guidance is appreciated.
Thanks