Gyroscope

Hurrah, my Joystick (MS SideWinder Force Feedback 2) works in UPBGE!
And looking around in the Cockpit is now also possible.

You can use a joystick for the helicopter by setting
the property “use_joystick” on the object “ZSE” to True

(Better use a joystick and not a gamepad because you want to control the pitch without a centering force)

For a Microsoft SideWinder Force Feedback 2 to be recognized by Blender add this SDL2 code:
030000005e0400001b00000000000000,SideWinder Force Feedback 2 Joystick,platform:Windows,a:b7,b:b4,x:b6,y:b5,leftshoulder:b2,rightshoulder:b3,leftstick:b0,rightstick:b1,leftx:a2,lefty:a3,rightx:a0,righty:a1,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,
to the file:
UPBGE-0.30-windows-x86_64->3.0->datafiles->gamecontroller->gamecontrollerdb.txt

Or for your joystick create a SDL2 code with one of these Tools:
https://generalarcade.com/gamepadtool/
https://github.com/AntiMicroX/antimicrox
and edit your joystick axes in the movement.py in this .blend.

View:
    Key 1: Focus on Gyro
    Key 2: Focus on Gyro2
    Key 3: Focus on Helicopter
    Key 4: FirstPerson-View
     
    Key F: Fly-by Camera
            CTRL+MouseWheel or PgUp/PgDown or JoyButon 7/8: Zoom
            CTRL+Mouse or Arrow Keys or JoyHat: rotate Camera
            MiddleMouseButton or JoyButton 2: From Top-View            
            Or when in FirstPerson-Modus switch back to FirstPerson-View (from Map-View)
                
    Key G: Ground Camera
            1st View = Map (accident Cars are marked)
            hit G again to switch between 4 different Views 
            SHIFT+G previous View
            
    Key H: Helicopter Cockpit Camera
            CTRL+Mouse or Arrow Keys or JoyHat: Look around
            MiddleMouseButton or JoyButton 2: Center View
    
    ENTER key: restart scene
    
Controls:       
    Precession machine:
        A/D:  rotate red part

    Gyro:
        Controls:
        Space key: Spin and apply lift
        Mouse: rotate direction
        
        Rope:
        Left Mouse Button: attach rope
        Right Mouse Button: detach rope
        MouseWheel Down: make rope longer
        MouseWheel Up: make rope shorter
        
    Helicopter:
        Controls:
        R: start/stop Rotor-Engine
        W/S or JoyThrottle: main Rotor Collective pitch 
        A/D or JoyZ-Axis: tail rotor left/right
        Mouse or Joy-Axes: main Rotor cyclic control   
        Q or JoyButton 6: Auto-Hover On/Off         (also turns on Auto-Stabilizer.                                    
        E or JoyButton 5: Auto-Stabilizer On/Off   
        
        When in Hover-Mode the Collective pitch is controlled completely by Autopilot:
         W/S: in-/decrease target height       
        
        Rope:
        Left Mouse Button or JoyButton 3: make rope shorter and hide rope
        Right Mouse Button or JoyButton 4: show rope and make rope longer
        Space Key or JoyButton 1: attach or detach magnet to target
        T: Extra Top-View On/Off
        
    FirstPerson-View:
        Controls:
        Mouse: View
        W/A/S/D: Move
        Shift: Run
        Space: Jump
                
        Rope:
        Left Mouse Button: attach rope
        Right Mouse Button: detach rope
        MouseWheel Down: make rope longer
        MouseWheel Up: make rope shorter        
          
Visualization of Forces:
    set the properties of object 'ZSE'
        show_gyro_force
        show_heli_force
    to True or False
    
Sensibilty of Helicopter Controls:
    set the properties of object 'Bell'
    
    
Credits:
Helicopter model by SHINN THANT
https://blendswap.com/blend/15976

drone City by Voxelatio
https://blendswap.com/blend/27360

Low Poly Car Pack by Hexalore
https://blendswap.com/blend/28523

Sounds:
    https://www.pacdv.com/sounds/
    https://freesound.org