2011/6/18 syd adams <adams....@gmail.com>:
> My more simple understanding was the actionpoint was the point where
> thrust was applied relative to the engine mass , like the
> documentation states.
>
> an <actionpt> subelement
>          to place the action point of the thrust at a different
>          position than the mass of the engine.
>

Sorry but your interpretation is incorrect. I have extracted below the
relevant code that shows that actionpt should be taken relative to the
aircraft global origin not relative to the engine position (it
actually overwrites the default position which is set at the engine
position).

src/FDM/YASim/FGFDM.cpp
413:    } else if(eq(name, "actionpt")) {
414:         v[0] = attrf(a, "x");
415:         v[1] = attrf(a, "y");
416:         v[2] = attrf(a, "z");
417:         ((Thruster*)_currObj)->setPosition(v);

src/FDM/YASim/Thruster.cpp
20: void Thruster::getPosition(float* out)
21: {
22:     int i;
23:     for(i=0; i<3; i++) out[i] = _pos[i];
24: }
25:
26: void Thruster::setPosition(float* pos)
27: {
28:     int i;
29:     for(i=0; i<3; i++) _pos[i] = pos[i];
30: }

src/FDM/YASim/Model.cpp
382:     for(i=0; i<_thrusters.size(); i++) {
383:         Thruster* t = (Thruster*)_thrusters.get(i);
384:         float thrust[3], pos[3];
385:         t->getThrust(thrust);
386:         t->getPosition(pos);
387:         _body.addForce(pos, thrust);
388:     }

src/FDM/YASim/RigidBody.cpp
139: void RigidBody::addForce(float* pos, float* force)
140: {
141:     addForce(force);
142:
143:     // For a force F at position X, the torque about the c.g C is:
144:     // torque = F cross (C - X)
145:     float v[3], t[3];
146:     Math::sub3(_cg, pos, v);
147:     Math::cross3(force, v, t);
148:     addTorque(t);
149: }

Bertrand.

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to