This project was started in , electronics and control loops. Because I always need a cool project to learn new things, it was clear that something that can fly had to be built.
The project started as a "tricopter-only" project, but as I wanted to build smaller vehicles with more payload capacity, I decided to make some quadrotor, hexacopter and Y6 hexacopter firmwares too. My main interest is to build very small MAVs that fly as good as larger ones (or even better) and that can be controlled by wireless video link. I also experimented with autonomous flight in GPS-denied areas (video), and with GPS assisted autonomous hover (video).
-- William

Contact: Shrediquette @ g m x . d e --- All content published under CC Attribution-Noncommercial-Share Alike 3.0 Germany

Some thoughts on FPV camera tilt compensation

Almost every 'serious' FPV racer is tilting the FPV camera up in order to have a better image during fast flight. Angles between 10 and 35 degrees seem to be common. E.g. I am using 25 degrees. But tilting the camera with respect to the multirotors horizontal plane has a side effect on the controls (maybe you never thought about it, because you are so used to flying with this side effect).

Just to make the effect easier to visualize: Imagine you drank a beer too much and now you suddenly think you are Charpu, Mr Steele or Mattystuntz. You mount your FPV camera with 90 degrees tilt (pointing up vertically) because your best friend told you that all the pros do it like this. In this case, your roll and yaw control will be interchanged: When you move your RC sticks to roll left, your copter will roll left, but looking through the FPV camera, it appears as if you are yawing to the left! And if you move your RC sticks to yaw left, your copter will of course yaw left, but the image from the FPV cam looks like you would roll to the right!

The strength of this effect is somewhat proportional to the camera tilt angle. But already at 25 degrees it can clearly be noticed. It doesn't really make sense to have control in the copters frame of reference when flying FPV. It does make more sense to shift the frame of reference to the FPV camera and to eliminate the effect of camera tilt: Moving the roll stick of the transmitter should roll the camera image only, it shouldn't add some undefined amount of yaw.

Luckily, it is easy to compensate these effects (you might even do this in your transmitter by adding some mixers). I however hardcoded this in my latest flightcontroller firmware. The code is like this:
Roll_output = cos(camera_tilt) * Roll_input - sin(camera_tilt) * Yaw_input
Yaw_output = sin(camera_tilt) * Roll_input + cos(camera_tilt) * Yaw_input
'camera_tilt' is the angle (in radians) that your FPV camera is tilted up with respect to the propeller disks. It is a constant. I am using 25 degrees of camera tilt (= 0.436 radians).
'Roll_input' is the roll rate that you steer with your remote control.
'Yaw_input' is the yaw rate that you steer with your remote control.
'Roll_output' is the setpoint for the multicopters roll rate.
'Yaw_output' is the setpoint for the multicopters yaw rate.
  
I am not familiar with other flight controllers, but I guess this feature might have been implemented already in some of them. Otherwise it really should be implemented...! 

Here is a video explaining the above:
http://shrediquette.blogspot.de/2016/01/explanation-video-fpv-camera-tilt.html

8 comments:

  1. Very interesting!

    I'm thinking of trying this out using betaflight with a mix in the transmitter. However, I think expo configured in the flightcontroller for roll, pitch and yaw would not work well together with this. What do you think?

    ReplyDelete
  2. You can do it in Cleanflight through the board alignment settings such as align_board_pitch.

    ReplyDelete
    Replies
    1. It might work ok on small angles, but I thinks William is correct that this translates the board alignment to the frame (thrust angle).

      Delete
  3. Are you sure that this sets the rotation of the inputs to the board and not the boards alignment to the frame...?

    ReplyDelete
  4. I can see that you a an expert at ur field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business.
    military vehicles for sale

    ReplyDelete
  5. Hi,
    Can this feature be activated by a switch? So I could deactivate it for landing?

    ReplyDelete
  6. Has anybody tried out set roll_yaw_cam_mix_degrees = as seen here: https://github.com/borisbstyle/betaflight/wiki/Betaflight-specific-CLI-commands

    I have yet to find time to try it, but seems to accomplish in betaflight exactly what you've accomplished here. Thoughts?

    ReplyDelete
  7. I am very grateful for this enlightening article. I am new to this issue, but for me it elucidated several questions. Congratulations on your knowledge on the subject. Thank you very much.
    aGemini 2 Activation Numbe

    ReplyDelete