Now camera has pitch and roll stabilizer. In some shots camera looks plane. Camera can tilt 90 degrees to one direction and 45 to other, you can see the limits in sharp turns. It was windy day, 4 - 8 m/s or 14 - 29 km/h or 8 - 16 knots.
Program codes are in this blog
Comments
Thank you for replay, yes, I have ch 5,6,7 open, so I can play with diferent numbers.I just bought autopilot,so
first time I'm going to use only one channel for roll compensation.Following that will build frame for roll and pitch with 2 servos.
Output channel numbers are different, but probably you have noticed this.
(dcm.roll_sensor * 0.1) and (dcm.roll_sensor / 10) are same. Sometimes second is better, because we are using integers.
I can adjust camera roll with RC channel 6, that's why I have that g.rc_6.radio_in. If that input channel 6 is not connected, the value will be 1500.
Ok, Thank you for help, now all work :-
I add first time as you recommend in your description
APM_RC.OutputCh(CH_7, constrain(g.rc_7.radio_in - (dcm.pitch_sensor * 0.1),900,2100));
Here is the screenshot from codes. This is from version 2.12, but in the new version they are in the same place.
First line is roll, and second is pitch. I can adjust camera roll with RC channel 6.
Good job man I really like it.
Probably as good as it can get with hobby servos. The next step is software correction, but you would have to keep the image free of all parts of the aircraft.