I built a TRex 450 with an APM mounted as suggested by Randy but am thinking about changing it and mounting it in a different way that would result in the APM being upside down. My question is, can I easily correct this by modifying the code? Is it just a matter of changing the sign for a number of the signals? I noticed there is a config parameter for changing the orientation of the magnetometer, but I didn't see anything for the orientation of the APM.
There's no easy way to do this I'm afraid. It's definitely possible though but you'd need to modify perhaps the AP_IMU_Oilpan.h file in the AP_IMU library or maybe somewhere in the DCM lib when it consumes the accelerometer and gyro data..but I can't tell you exactly what you'd need to change. If the APM is upside-down I think you need to reverse the pitch gyro values and all three (x,y,z) accelerometer values.
Ah nicely done. Yes, that makes sense and that might very well be enough. I think normally in the rest of the code we use DCM which has already processed the sensor values.
Congrats! well done!
Yes, great stuff! Just made this mod to mount an apm1 under my 3DR frame. Works tremendously. :) The filename has changed but grepping on GYROY etc will turn it up.
Is this configuration (inverted AMP) option added to the mission planner setup yet or is it going to be added if not already?