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));
Comment by Johann Van Niekerk on May 14, 2011 at 9:51am Hi Alpo
You have a nice setup, thank you for sharing the code.
Comment by Guntars on May 14, 2011 at 12:59pm
Comment by Rory Paul on May 14, 2011 at 3:22pm Comment
Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.203 members
24 members
207 members
58 members
1355 members
© 2013 Created by Chris Anderson.
Powered by

You need to be a member of DIY Drones to add comments!
Join DIY Drones