Tuesday, August 23, 2011

FlightGear gravity for AIBallistic

In my 2.4ish code the AIBallistic code is mixing metric gravity with English units for vertical speed and buoyancy (someone's ready for that NASA job!). The result is that bombs (and other things) don't fall fast enough, and some things, like drag 'chutes, are falling up now. I started to make adaptations in my models, but now believe it's best to keep the models as they are, awaiting a future fix.

Since my code is close-to-but-not-quite 2.4, I'm wondering if anybody else is getting the same results with official 2.4?

UPDATE: The bug is still in the current GIT repository, so it's probably in 2.4 as well.

UPDATE: I'll fix the bug locally and leave the models alone (line 862 of src/AIModels/AIBallistic.cxx). I'll still call them "2.4" compatible. Sorry, but I don't have time to make another category of models to match the buggy code. I'll post the fix details here when I get back from my trip so you can rebuild your FlightGear with it.


  1. Line 861 of src/AIModel/AIBallistic.cxx, put in the conversion factor:

    double gravity = SG_METER_TO_FEET * (Environment::Gravity::instance()->getGravity(pos));

  2. This comment has been removed by the author.

  3. If you need your ex-girlfriend or ex-boyfriend to come crawling back to you on their knees (even if they're dating somebody else now) you have to watch this video
    right away...

    (VIDEO) Want your ex CRAWLING back to you...?