Tony Peden writes:

 > We'll have to talk about how to implement this. Right now, it would
 > all be in /fdm/jsbsim[1,2,3...].  We need a non-FDM specific way of
 > handling both this sort of thing and xml-defined parameters.

Here's what I've been thinking of (for a while):

1. Add methods something like these:

   SGPropertyNode * FGSubsystem::getBranch ();
   void FGSubsystem::setBranch (SGPropertyNode * branch);

2. Whenever tying or referencing properties specific to a vehicle,
   session, or whatever, reference them relative to the branch:

     double throttle = getBranch()->getDoubleValue("controls/throttle[0]");

3. At the top level, manage a separate branch for each vehicle.

Perhaps an easier solution would be simply to swap property trees in
and out for each vehicle, like process pages in a CPU.  That makes it
hard to access global (non-vehicle-specific) state, though.


All the best,


David Megginson

Flightgear-devel mailing list

Reply via email to