[ODE] Flight model using ODE

Ville Ranki ville.ranki at tut.fi
Sat Oct 2 21:10:23 MST 2004


Hello, 
I'm beginning to write a flight and generic dynamics
model for my open source sim. What i would like is a 
component based physics model that can be described
best with code example:

Fuselage fuselage = new Fuselage(type, etc..);
Wing lWing = new Wing(geometry, profile, etc..);
Wing rWing = new Wing(geometry, profile, etc..);
fuselage->add(lWing);
fuselage->add(rWing);
lWing->add(new LandingGear(position, suspension, etc..));
rWing->add(new LandingGear(position, suspension, etc..));

while(running) {
  fuselage->updateAerodynamics(); // recursively adds aerodynamic forces
                                  // with aBodyAddForce ()
/*** then the normal ODE loop stuff:
     2. Adjust the joint parameters as necessary. 
     3. Call collision detection. 
     4. Create a contact joint for every collision point, and put it in
        the contact joint group. 
     5. Take a simulation step. 
     6. Remove all joints in the contact joint group. 
***/
}

I have no prior experience on ODE but i think i have
the basic idea how it works. Has anyone done anything like this 
before? I'd like to hear any hints and maybe even see 
existing code on the subject.

I'm using OSG as the scene graph. My idea is to do a 
class hierarchy based on composite pattern that encapsulates 
the ODE dynamics model and OSG visualization. User could create
a vehicle (limited only by implemented components) and it would 
automatically have a visual appearance as well as dynamics model. 

-- 
-- Ville Ranki          
   ville.ranki at tut.fi              040-757 2533
   http://www.vip.fi/~cosmo/


More information about the ODE mailing list