Copter gimbal control problem

Hi everyone!
I have a gimbal camera, which doesn’t support sbus, mavlink.It’s only support a custom serial protocol, But I want this gimbal worked with arduCopter, I have few ideas.

  1. Read the PWM output through a arduino, then convert to angle data send to the gimbal, But I don’t how to calculate the angle with the pwm value

  2. I notice that mavlink support a gimbal protocol. It’s should possible to read the angle data through the mavlink, Just like the Storm32, But I’m not good at code.
    Any idea will be very helpful.
    Thanks!

Probably the easiest thing to do is replace the control board with an alexmos board like something from SimpleBGC.