Writing UART driver for External IMU for Arducopter

Hi all, I am trying to integrate Microstrain 3DM-CV5-25 with arducopter. This is a UART type sensor. Please guide me for writing a library for this sensor and integrate to main code so that it can work as external IMU or external Compass.
I am stuck and need your guidance.

Thanks in advance.

That device seems to be a full AHRS, which means the natural role would be to replace the ArduPilot EKF. Is that what you intend, or do you mean to use it as an IMU/compass only?
If you want it as an IMU then you could write a new IMU driver in AP_InertialSensor library. It would be the first time we have a UART based IMU.
I’d also note that the specs of that device don’t actually look all that great. I’d be surprised if it performs better than the existing IMUs on the newer flight controllers that support ArduPilot. In particular, the IMU sample rate of 1kHz is very low. We sample the accelerometers on recent boards at 8kHz. That sample rate matters for avoiding issues with aliasing.

thank you sir. I would like to try full AHRS and see how copter response.
But If i use this as IMU/compass only then the sample rate is fine and where i have to write the driver then?