CAMERA YAW Question

Hi,

I was trying to use the Channel Output 6 of  UDB - RED Board - to control a Camera. My purpose is to keep the camera fixed at the launcing point during all the UAV mission. I was trying my first tests with the Yaw axis. I understand the camera yaw angle is 0 when the it is alligned to the y axis of the plane, as the camera should be free to move 360 degrees. My first consideration is that if the launching point is the beginning of the runway, as soon as the uav takes off the camera should make a quick -180 degrees turn in order to keep the launch point "locked", but actually it did not happen.

I was not able to appreciate relevant yaw servo extensions; the maximum extension I noticed was about 30 degres and I was not even sure that the camera direction was correct (I used the HIL plugin with X-Plane simulator so long).

Here is the configuration I used in options.h and waypoints.h files:

 

#define CAMERA_YAW_OUTPUT_CHANNEL            CHANNEL_6

 

#define CAM_YAW_SERVO_THROW                   360
#define CAM_YAW_SERVO_MAX                   180 
#define CAM_YAW_SERVO_MIN                  -160
#define CAM_YAW_OFFSET_CENTRED                10

 

const struct waypointDef waypoints[] = {
     { { -2050, -220, 120 } , F_NORMAL,CAM_VIEW_LAUNCH },   //Waypoint 0
     { { -2300, 1225, 120 } , F_NORMAL, CAM_VIEW_LAUNCH },  //Waypoint 1
     { { 965, 1505, 120 } , F_NORMAL , CAM_VIEW_LAUNCH } , //Waypoint 2
     { { 1446, 119, 120 } , F_NORMAL , CAM_VIEW_LAUNCH } , //Waypoint 3

   };

 

 

Any suggestions?!

 

Thank you.

 

Alberto

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

Join diydrones

Email me when people reply –

Replies

  • Developer

    Alberto,

     

    The HS55 would need this in options.h as it only moves by 90 degrees insteady of 360 ...

    #define CAM_YAW_SERVO_THROW               90
    #define CAM_YAW_SERVO_MAX                   45
    #define CAM_YAW_SERVO_MIN                  -45
    #define CAM_YAW_OFFSET_CENTRED               0

     

    So with that servo, it is limited to looking 45 degrees to the right of the plane, and 45 degrees to the left of the plane.

     

    I'm using a GWS Sail Winch servo. There is one on this page. It has it's limitations and is not perfect, but it will give you about 350 degrees of movement.

     

     

  • Developer

    Alberto,

     

    Can you make a link to the Camera yaw servo that you are using ? I only ask becauase there are very few sevos that have a complete throw of 360 degrees ?

     

    Which version of MatrixPilot are you using ?  (there have been a number of improvements to camera targetting since 2.5.1

    was created last August 2010).

    I would like to confirm that you are currently doing this in HILSIM ? (I have actually never yet used the HILSIM). The reason I ask, is that in real life flight, it takes up to 20 seconds for the yaw axis of the DCM algorithm to be correctly calibrated to the Earth, if you are not using a magnetometer. This is because the plane does not know which way it is heading until it start so receve information from a moving GPS (Course Over the Ground  , COG).  But in the HILSIM, I do not know how that is handles. Marcus Fahlen in Norway is using the camera targetting with HILSIM, so we should contact him if that is what you are using.

     

    Best wishes, Pete

     

This reply was deleted.

Activity