Well, in principle yes, actually, no ^^. One of the major issues is that you can not really make calculations that have a higher degree than 1 framerate independent. Any linear change can be made framerate independent by multiplying by deltaTime. However the position change which is based on the velocity change would be a quadratic movement. The effect is that with lower framerates the distances moved over the same amount of time would be greater compared to a high framerate.
That’s the main reason why physics are run on a fixed timer ( in sync with FixedUpdate) so you get the same results regardless of the framerate.
So if you run this in FixedUpdate it would be similar to Unity’s Physics. However you have an error in the way you apply the acceleration. There is no mass involved. The gravity value is an acceleration that is independent of mass.
On the surface of earth we have a gravitational acceleration of about 9.81 m/s². Yes, the gravitational force depends on both masses. However the mass of the object cancels when you calculate the acceleration it receives
F = G * M * m / d²
“d” the distance from the earth center is essentially constant since it doesn’t really change much, even when you go up a few km. The acceleration can be calculated by
F = m * a
// therefore
a*m = G * M * m / d²
a = G * M / d²
As you can see “m” the mass of the object cancels on both sides. So G * M / d² gives us a constant acceleration near the surface of the earth and it’s about 9.81m/s²
Note it’s possible to make a pure quadratic behaviour framerate independent with a small trick. However since you also want drag in the mix, that would not help at all. So you really need to do the physics calculations in a fixed timestep. If you need a higher precision simulation you can either crank up the fixed timestep, or use my CustomFixedUpdate class.
Finally keep in mind the way Unity applies drag is a very crude and simple solution to simulate drag. It does not resemble anything in the real world. Real world drag depends on several factors. The projected area in the movement direction through the air, the form coefficient and the velocity squared. Unity’s drag is just a simple percentage fall off.
You may have your reasons to implement your own physics, however I highly doubt it would be anything better. Unity uses Nvidia PhysX for 3d physics. It’s a highly optimised and reliable physics simulation for games. Yes, it does not resemble real world physics because that’s almost never needed. If you really want to create a realistic behaviour, you have a long way ahead. Proper physics simulation is incredible complicated ^^. Especially when it comes to rotational inertia.