TaigaCam and camera stabilizer, pan test

3689406572?profile=original

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(&current_loc, &home) - g_gps->ground_course) / 10) + 500,900,2100));
APM_RC.OutputCh(CH_8, constrain(atan(((float)get_alt_distance(&current_loc, &home) / 100) / (float)get_distance(&current_loc, &home)) * 573 + 1000,900,2100));

 

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • very cool !
    great if I want to zoom on an obejct while flying :)
  • T3
    Nice to see you here Alpo!
  • Can you write the code for following the separate GPS point of interest? Good for AP.
This reply was deleted.