On Fri, Aug 13, 2010 at 3:24 AM, Ron Jensen wrote: > In yesterday's standalone JSBSim the p51d aborts because some properties are > being used without being declared. Try the attached patch to the p51d.xml and > see if it works any better for you. > > Ron > ( I tried sending the whole file but it errorred out for being too many > kbytes.) > > diff --git a/aircraft/p51d/p51d.xml b/aircraft/p51d/p51d.xml > index 5a264c9..00eb3a3 100644 > --- a/aircraft/p51d/p51d.xml > +++ b/aircraft/p51d/p51d.xml > @@ -665,6 +665,9 @@ Hal V. Engel hven...@astound.net > <output>gear/gear-pos-norm</output> > </kinematic> > </channel> > + <property>/controls/gear/brake-left</property> > + <property>/controls/gear/brake-right</property> > + <property>/controls/gear/brake-parking</property> > > <channel name="Brakes">
That seemed to make a difference last night, but I'm getting the same error today. However, I put some trace statements into JSBSim within the test struct: struct test { vector <FGCondition*> conditions; eLogic Logic; double OutputVal; FGPropertyManager *OutputProp; float sign; double GetValue(void) { if (OutputProp == 0L) return OutputVal; else { printf("Prop: %s\n", OutputProp->getName()); return OutputProp->getDoubleValue()*sign; } } This produced the following output when run under gdb: [New Thread 0x7fffded15710 (LWP 4029)] Prop: boost-calculation Prop: contents-lbs Prop: contents-lbs Prop: rotational Prop: translational Prop: rotational Prop: translational Prop: position-norm Prop: map-error-lag setStores Prop: boost-calculation Prop: contents-lbs Prop: contents-lbs Prop: rotational This suggests that the problem is some property with a name ending in "rotational". I found some references to such properties in p51d/Systems/crash-detect.xml: <channel name="freeze"> <switch name="systems/crash-detect/switch1"> <default value="simulation/integrator/position/rotational"/> <test value="0"> systems/crash-detect/crashed eq 1 </test> <output>simulation/integrator/position/rotational</output> </switch> <switch name="systems/crash-detect/switch2"> <default value="simulation/integrator/position/translational"/> <test value="0"> systems/crash-detect/crashed eq 1 </test> <output>simulation/integrator/position/translational</output> </switch> <switch name="systems/crash-detect/switch3"> <default value="simulation/integrator/rate/rotational"/> <test value="0"> systems/crash-detect/crashed eq 1 </test> <output>simulation/integrator/rate/rotational</output> </switch> However, adding the following lines (with or without the "/" prefix) before the channel had no effect: <property>/simulation/integrator/position/rotational</property> <property>/simulation/integrator/rate/rotational</property> So, I suspect the problem is in these properties that are being used in switch statements without a default value, but I don't know enough about JSBSim properties to be able to set a sensible default in the right place. Hope this is of some use to the JSBSim gurus. -Stuart ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel