From Till:
i started the project at the end of february with a simple idea: move all
3d-model loading to the DatabasePager-thread. my first attempts looked
promising, though they were a little too optimistic (or naive?). the patch
has evolved a lot since.
currently it does the following things:
1. revive SGModelLib, move functions for xml-model-loading there
2. replace all calls to sgLoad3dModel with calls to either
SGModelLib::loadModel() or SGModelLib::loadPagedModel()
almost all models will be loaded by the DatabasePager. the few exceptions are:
your own plane, shared models in scenery, random objects, AIBallistic models.
3. simplify mode-loading functions (avoid passing around fg_root)
4. avoid supurious MatrixTransform nodes in loaded models
5. fix some memory leaks
This patch contains bugfixes from my previous patch
(i made mistakes when using "diff" utility last time):
1. Now ATC do not tells us to go around because of
traffic on RWy, when that traffic is WE.
2. Now ATC don't say that we must follow ourself
(like "GFS, number two, follow GFS on final").
And new Tower-ATC features:
1. Requesting departure clearance. When you are
on taxiway, you can request departure clearance.
Tower will answer with something like:
"Line up runway two eight right".
TODO: check if any AI-Planes on final and tell
something like: "After the landing AI-CALLSIGN
line up runway two eight right".
2. Requesting take-off clearance. If you are on
runway, you can tell to ATC that you are ready
for take-off. So, Tower will tell you that you
are cleared for take-off (or immediate take-off).
3. Reporting landing gear position on final by pilot.
If you are on aircraft, which landing gear can
be UP, when reporting final you will tell
"Gear down, ready to land".
4. Reporting landing gear position on final by ATC.
When i was newbie and was flying on Cessna 310, i
ALWAYS forgot landing gears on final. Now if you are on
final and forgot landing gear, Tower will tell you:
"LANDING GEAR APPEARS UP" or "Check wheels down and
locked". So you will have some time to push gear
down or execute missed approach ;)
5. ATIS phonetic ID in requesting landing message.
In FG pilots says: "for full stop with ATIS" everytime
(when airport doesn't have ATIS too). But in real life
pilot saying phonetic ID of ATIS message. Now we have:
"for full stop, information alpha ... / ... zulu".
If airport doesn't have ATIS, pilot don't say this.
TODO: add this feature to AI-Planes too.
6. Advising weather condition in airport by Tower.
If you are requesting take-off or landing in airport
that doesn't have ATIS service, Tower will tell you
about wind direction and speed, visibility and QFE.
7. Reporting downwind if missed approach. When some AI-Plane
is on final FG's ATC tell you to "continue approach".
And then you lost radio transmission. Now ATC says:
"continue approach and report left/right downwind".
And now we have "Report Downwind" entry (button)
in "ATC Communication" form.
version
* Delete ai list objects in ~ATC/AIMgr.cxx:AIMgr::~AIMgr()
* Delete colors in GUI/new_gui.cxx: NewGui::~NewGui.cxx
* Delete memory allocated to the class member "route" in
Instrumentation/gps.cxx
* Delete all globals (except a few "unsafe" ones that still cause segfaults
and need further examination.
* Use an SGShared pointer for navaid memory allocation, so that pointers to
individual navaid objects can be included safely in multiple navaid lists
src/AIModel/AIAircraft.cxx src/ATC/AILocalTraffic.cxx
src/FDM/flight.cxx src/FDM/flight.hxx src/FDM/groundcache.cxx
src/FDM/groundcache.hxx src/Main/fg_init.cxx src/Main/main.cxx
src/Scenery/hitlist.cxx src/Scenery/hitlist.hxx
src/Scenery/scenery.cxx src/Scenery/scenery.hxx
Make use of the attached SGMaterial reference userdata on scenegraph
leafs. Make the SGMaterial pointer available to the ground query
routines.
SGPropertyNode to guarded ones. This is also done for JSBSim/JSBSim.hxx,
for which JSB had given explicit permission a while ago. I postponed that
back then, but now is the time.
even be more than once in the same list. We need to remove all such instances,
or the a pointer to TowerPlaneRec may become invalid and cause crashes.
The proper fix would, of course, be to be careful with state changes and
to prevent *any* duplication of entries. [OK'ed by David]
because a dialog button can get pressed when its callback isn't available
any more. Ideally, we would close the dialog or update its buttons when
this happens. But this requires bigger changes.
/sim/messages/{atc,pilot,ai-plane,ground,approach}
These can the be used for differenct screen.log colors and for different
voices. (Aircraft & tutoruals may want to write to /sim/messages/copilot)
I had massive problems with tower.cxx, so I decided to doublecheck all
containers and iterators in order and found lot of potential problems.
Now I can fly with "debug on" of KSFO for minutes without problems.
The fix for AIMgr is from Mathias, but I reworked it. So blame me, not him.
Erik Hofman:
This patch contains an update to net_ctrls.hxx that adds an extra 100 bytes
(or an equivalent of 25 (u)int32_t types) of reserved space. This could be
used to make the protocol forward and backward compatibel within a certain
scope. Be sure to read the instructions at the begining of the header file
when addinf new variables.
The prototype of update_metar_properties does not match overridden func.
trafficmgr: iterators below begin() and after end().
tower.cxx : iterator incrementing beyond end().
* in some cases more specific sg exception types were used in place
of the more generic one, e.g., sg_io_exception instead of sg_exception
when the context of the error was an IO error
* in some cases, the error message was made more specific
* minor style fix for exception rethrowing --- using throw; whenever
a re-throw is made; sometimes optimizing away the exception symbol name
in the catch handler at all
* more specific catch handlers added in some places -- e.g.,
an sg_io_exception caught ahead of sg_exception