Rigidbody physics can be a very complex subject and something I have not had to dig too deep into in the past. This changed when I decided it was time to start making some progress on the high fidelity flight dynamics model I want to implement for the flight simulator. One of the goals with this is to use one physics model through the whole simulation from taxiing, take off, flight and back to landing. I don’t want just the flying to be very accurate but also the ground simulation.
Implementing a basic flight dynamics model is not too complicated and faking the ground physics is easy. Then when you take off and land you can switch between the two as needed. But this is not very realistic. So to implement real ground physics we need to simulate suspension and wheels. Gravity is a force pulling the aircraft down towards the earth and when the wheels touch the ground it will cause an opposite force. End result is that the aircraft stays on the ground. This of course also applies to other vehicles and in fact everything.
Simulating this in a physically correct way gets a bit more complicated than it may seem at first. An aircraft taxiing on ground is similar to a car. You have friction between the wheels and the ground and a suspension that absorbs forces from bumps or in the case of an aircraft, also when touching down on landing.
I was considering using an available physics library like Bullet but ultimately decided to write my own physics engine for this. I figured that the time it takes to learn how to use and fit a ready made physics library to the rest of the simulator, I may as well write it myself and then I can customize it to my needs and I also know how it all works. Writing my own rigid body physics engine from scratch meant refreshing old college physics and math and also reading a ton of physics papers found on the net.
With all that said, I have implemented the first part of the physics. The aircraft stands on its three landing gear legs and wheels and applying engine thrust will make it move forward and pick up speed.
The flight dynamics part will be the next step and I can’t wait to get the airplane airborne.