APM Hardware (IMU and GPS) declaration


I managed to load Arduplane to special arduino working environment. Even managed to upload it to my Arduino Mega2560 board. But now i have another problem. I don’t know how to define IMU and GPS which i am using on the Ardupilot project. When i connect arduino board (with uploaded Ardupilot) with mission planner, the AH display says “BAD/NO TERRAIN DATA” and GPS not working too.

For your informacion i’m using this imu :
dx.com/p/elecfreaks-octopus- … YWbffmqqko

and this GPS :
dx.com/p/ublox-neo-6m-gps-mo … YWcJ_mqqko
The GPS serial port is set to 9600 baud; UBX protocoll.

I’ve red this tread : dev.ardupilot.com/wiki/apmcopter … libraries/
and what i understand is that it need to have a library for OCTOPUS 9DOF which feed data to ardupilot core.

I have an libraries which communicating by I2C to OCTOPUS 9DOF but i don’t know how to import them to APM code. I use those libraries for my own little UAV project. They worked fine for me.

I need help to get the hardware to work with the Ardupilot.
Also I need help with pin mapping the arduino mega2560. Which pin is input for reciever PPM, which is output for servos and e.t.g.

Thank you for your time ! CHEERS!