TaigaCam and Ardupilot tries to look home position all the time. Camera can turn about 100 degrees. In Ardupilot there is no compass, and therefore it calculates flight direction once per second according to gps. That's why camera turns slowly.
This pan-system needs only one line of code to Ardupilot. In plane there is also roll stabilizer, and it needs also only one line code.
If I should build a pan/tilt camera, I would first build a platform, that is always in level. Then I would install the pan/tilt camera on it. This system needs only 4 lines code to Ardupilot, and all free servo channels... In the main program there is fast_loop. To the end of this subroutine, just above }, I should add these lines. (I have not tested the last line = tilt)
APM_RC.OutputCh(CH_5, constrain(g.rc_6.radio_in - (dcm.roll_sensor / 10),900,2100));
APM_RC.OutputCh(CH_6, constrain(g.rc_7.radio_in + (dcm.pitch_sensor / 10),900,2100));
APM_RC.OutputCh(CH_7, constrain((wrap_360(get_bearing(¤t_loc, &home) - g_gps->ground_course) / 10) + 500,900,2100));
APM_RC.OutputCh(CH_8, constrain(atan(((float)get_alt_distance(¤t_loc, &home) / 100) / (float)get_distance(¤t_loc, &home)) * 573 + 1000,900,2100));
Comments
great if I want to zoom on an obejct while flying :)