NikolaiVChr / f16

General Dynamics F-16 for Flightgear flight simulator
GNU General Public License v2.0
128 stars 40 forks source link

Gun sights don't match FG bullets deacceleration #597

Closed NikolaiVChr closed 1 hour ago

NikolaiVChr commented 6 months ago

This is due to a bug in FG where wrong unit is used in drag computation so they do not slow down as fast as they should.

Will temp. fix this by using wrong units in F-16 gun sights also.

In AIBallistic.cxx it does this calc with speed being in KT, but it should be in FPS:

speed -= (Cdm 0.5 rho speed speed _drag_area/_mass) dt;

rho is in slugs/ft3 _drag_area is in ft2 _mass is in slugs Cdm is unitless dt is in s

NikolaiVChr commented 6 months ago

Have committed a workaround for this.

NikolaiVChr commented 1 hour ago

This is fixed in 2024.1, so I need to make the fix depend on version.