Hi Half Shell,
The complex controls engineering part has been realized with matlab. I guess, your friend uses some .m files, or perhaps a Simulink model (.mdl file). In the Simulink file, there is one part to simulate the behavior of the underwater robot, and there is the controller part which attempt to control the submarine.
Simulink is probably the most appropriate tool to simulate and tune the controls algorithms.
The most boring and complicate part of the project is to program a microcontroller. Since I had exactly the same problem, I built a toolbox for matlab/Simulink that make me able convert the simulink model into the binary .hex file, ready to be downloaded into a PIC24 or dsPIC.
Thanks to this toolbox, I only concentrate on the math part, and on the mechanical realization.
Please, try the toolbox (The evaluation version of the toolbox should be sufficient for this project). (You need matlab, Simulink and the toolbox Real Time Workshop, Real Time Workshop embedded coder and the one you can download here:
http://www.kerhuel.eu/RTWdsPIC/download.html )
And let me know if you encounter any problems.
Also, one example of realization:
http://www.kerhuel.eu/RTWdsPIC/examples/IMU.htmla forum for question about the toolbox is also available:
http://www.kerhuel.eu/forum/index.phpNote that I am still developing this toolbox, I would be glad if I can get your feedback.
Lubin
PS : My website has been cited by hazzer123. I would like to correct : this toolbox is not a Microchip and Mathworks collavoration