F-22 (Black VR 1.04)
Introducing the F22 Raptor. This is based off the F22 by GuyFolk although I have heavily reworked the physics of the flight model to be able to achieve what the real Raptor can accomplish and what its airframe and thrust vectoring should theoretically be capable of.
I've worked hard to cut the parts down so it runs smooth on mobile and Quest 2. Feel free to peruse the variable setters and funky trees code to understand how I have coded the engines, control surfaces and thrust vectoring nozzles.
My Goal with this release was not accurate replication but rather a low part, ergonomic, VR friendly and functional cockpit with good forward visibility and an aircraft which does not compromise on capabilities or flight physics.
Weapons also reflect this ethos as the traditional armament is x2 sidewinders and x6 AMRAAMs. AMRAAMs have been given multi role capabilities.
Notable achievements with this model include:
1) Corrected YawRate Expression
This expression equates to YawRate + correction factor which accounts for gravity and naturally promote coordinated turns. It allows the zero point for YawRate to correlate with the zero point for Angle Of Slip during stable flight AND now also during banked turns. The maths behind the correction factor is based on the principle of equating parabolic path of projectile motion due to gravity and angular acceleration in a circular path. This is then modified to be relevant at all roll, pitch, attack and slip angles by additional trigonometry.
2) Reworked logic for control surfaces
Using Guyfolk's code as a solid foundation, I have reworked the majority of surfaces. Now the aircraft better responds to Roll and Yaw inputs even at the extremes of high alpha flight. This was quite challenging. Additionally for smooth predictable operation at all speeds, control surface deflection should multiply by the inverse of IAS squared for consistent forces. Similarly thrust vectoring should by multiplied by the inverse of the output thrust (Engine Thrust variable outputs are important here). There are ofcourse exceptions but these are all a good base to start with.
3) AoA limiter
With new thrust vectoring logic, the fine tuned AoA limits for different speeds and thrust levels is replaced with different logic. This can be fine tuned later.
4) G limiter
Code is not perfect but generally limits Vertical G to 9-12G. I preferenced a smooth limiter than an accurate hard limiter with oscillations and instability. This can be tweaked.
5) Differential Thrust Activator
Use this to drop power to the inside engine when extreme rudder is applied. Use this with or without AoA Limiter to perform impressive aerobatics maneouvres. ALSO whether mode is active or inactive, the aircraft will also apply differential thrust when there is yaw instability to help stabilise the aircraft (unless this is requested by the pilot).
6) Landing Auto Throttle
This is enabled by default. Just keep the airbrake on approach and use the stick to adjust your glideslope. a PID controller will keep the Engines active to maintain a ~130knot approach. Flare before touch down to a Pitch Angle of ~12 degrees and plane will slowly kiss the runway.
7) Suspension
Reworked Spring and damper rates to cope with uneven bumps
8) Ground stability and manoeuvrability
Use Roll and/or Yaw controls whilst on the ground. Tire slip angles are calculated to feedback to steering system for smooth steering. at higher speed whilst on the ground, control surfaces automated to provide roll stability to resist wing strikes.
9) Variable setters for Pitch, Roll, Yaw, and Throttle.
This allows adjusting exponential gains for each input axis. Sensitivity slider (VTOL) controls the sensitivity of the flight controls.
10) Throttle Thumbstick Disable
Throttle control from keyboard or thumbstick is disabled by default to allow for smooth independent rudder control in VR without inadvertent engine shutoff or afterburner activation. It also allows simultaneous Throttle and air brake application for tight min radius turns.
11) Radar/Nav System
This has been incorporated into the compass for locating targets and destinations. Destinations with runways also denote the orientation of the runway. you can cycle between desination waypoints by clicking on the compass in the cockpit.
12) HUD
This is purposely kept simple to be relevant in VR. A velocity vector and virtual horizons would need to be projected at a distance of infinity which is not possible (if anyone knows please chime in). So for readability and not obscuring targets, I've left the in game Gunsight/Target Lead and added only absolutely necessary items:
IAS (knots)
Alt AGL (ft) numerical + graphical elements to aid landing
Vertical Velocity (ft/s)
AoA (visual bars that turn red when AoA>90)
AoS (turn indicator at bottom of HUD)
Note this aircraft is an process of evolution and there are some redundant sections in the code for various control surfaces aimed as mental triggers for future improvements.
Enjoy this best in VR and If you find a smoother flying aircraft please let me know as I am always interested in improving the flight model.
If you perform any cool maneouvres, please take a video and link in the comments!
Update 1.01
-Increased Wing Loading for greater realism
-> higher alpha at speed
-> higher take off and landing velocities
-Reworked thrust vectoring algorithm
-Moved forwared center of lift (made possible by better thrust vectoring)
-Some bodywork tweaks
-Simplified weapons (now back to x6 AMRAAMs but they are multi-role)
-Added Nav/Targetting system (click on compass to cycle waypoints)
-Further reduced parts
Update 1.02
-Organised Vertical Stabiliser code and tweaked for more natural feel at high AoA
Update 1.03
-Cosmetic Fixes (Engine Air Intake)
-Much improved Landing Auto Throttle
-Updated Vertical Stabiliser FBW code
Previously there was a line of code in the vertical stabiliser functioning as a multiplier for the centering force aiming to bring the aircraft back to zero slip following a disturbance. This would differentiate if slip angle was non zero due to skid vs slip and modify accordingly for responsive turn entry and smooth turn exit. I have updated this expression to account for high alpha rolling turns (a.k.a Barrel Rolls) in addition to stable banked turns. Now, RollRate Roll and RollAngle (previously only RollAngle) will affect this multiplier. This should make the aircraft feel more natural and more willing to turn in more situations.
MAJOR UPDATE 1.04
Previous ISSUES:
Inaccurate Mach Number
Instability that occurs off throttle and at low airspeed
Good but still suboptimal FBW at high alpha
- Previous release includes 2 baseline functions to control yaw
- (These are disabled when rudder input is applied)
1. restore angle of slip to zero (proportional to angle of slip)
2. resist changes to angle of slip (proportional to rate of change of angle of slip)
- This was great for keeping the aircraft:
- flying
- maximising lift at all speeds
- preventing flat spins
- However it was bad for:
- aiming the gun under high AoA
- never achieved "gimbal like" stabilisation in high AoA
These issues occurred because a roll input under high alpha would cause the aircraft to rotate about the velocity vector axis and not the aircraft's fuselage.
MAJOR Vertical Stabiliser FBW tweaks:
- In this version, I have changed the baseline functions to aim for different outcomes:
1. Restore AoS to zero in proportion to AoS (like before but values tweaked)
2. Resist changes to YawRate when no rudder input
- (corrected YawRate Expression)
3. Resist changes to AoS when rudder active
- (above corrected YawRate expression is modified using AngleOfAttack)
- Naturally, to keep AoS zero, L Roll requires L Yaw input also when in high AoA
- This change allows the stabilising functions to remain active even with Yaw input
- The final result is the best of both worlds:
1. Excellent "gimbal like" Pitch and Roll control when no Yaw input
2. Max Yaw keeps v small AoS when during high AoA rolling turns
- (aka barrel rolls or pirouette)
3. Aggressive Yaw still possible for PSM maneouvres still possible
- (activate differential thrust mode for this)
4. Smooth transitions between above modes using:
- smooth functions
- skidded turn identifier expression (see Update 1.03)
Other Tweaks:
-Fixed Instability that occurs off throttle and at low IAS (hor and vert stabs)
-Added HUD elements during landing to visualise Gear to Ground Distance
-Flashing main display to indicate warnings with:
-Landing Gear
-Deactivated AoA Limiter
-Removed un-necessary destination waypoints in NAV
-Fixed Mach expression
-Cosmetic improvements to body
- slimmer air intakes and adjacent fuselage
Cosmetic improvements to cockpit
- HUD glass and fairing redesign
- colour tweaks
- canopy transparency increased
Specifications
General Characteristics
- Predecessor F-22 'Raptor' update 1.11
- Successors 2 airplane(s)
- Created On Windows
- Wingspan 45.1ft (13.7m)
- Length 61.8ft (18.8m)
- Height 17.2ft (5.2m)
- Empty Weight 42,303lbs (19,188kg)
- Loaded Weight 57,024lbs (25,865kg)
Performance
- Power/Weight Ratio 3.285
- Wing Loading 68.8lbs/ft2 (336.1kg/m2)
- Wing Area 828.5ft2 (77.0m2)
- Drag Points 2191
Parts
- Number of Parts 459
- Control Surfaces 4
- Performance Cost 1,915
Love this - very satisfying to fly and it’s great to have such a fully featured plane that runs so well on my Quest2. Love the animated gun port and shells.
The VR oriented cockpit is cool, if I could make some suggestions for next versions it would be helpful to have some targeting and weapon selection buttons inside. I’d also like a refuelling capability as that’s satisfying to do in VR.