[Flightgear-devel] Re: [Flightgear-cvslogs] CVS: data/Aircraft/dc3/Models dc3-dpm.ac, 1.7, 1.8 dc3-dpm.xml, 1.10, 1.11

2003-12-29 Thread Curtis L. Olson
David, (Andy?)

It appears that in the latest cvs, we have lost the ability to control
the engines independently.  Previously you could type Shift-1
Shift-2 Shift-3 ... etc. to select an engine.  Then '{' and '}'
would select the magnetos.  Finally, space bar would kick in the
starter motor for as long as it was depressed.

This seems to only work for Shift-1, but applies to all engines, not
just the first one.

Any ideas?

Also, the dc3 model animation appears to still have some references to
engine[0] for the right prop animation.  I will commit a fix for that.

Thanks,

Curt.



David Megginson writes:
 Update of /var/cvs/FlightGear-0.9/data/Aircraft/dc3/Models
 In directory baron:/tmp/cvs-serv4608/Models
 
 Modified Files:
   dc3-dpm.ac dc3-dpm.xml 
 Log Message:
 Add a propeller disk for the right propeller as well.
 
 Select propeller disk at 500 rpm or above.
 
 
 Index: dc3-dpm.ac
 ===
 RCS file: /var/cvs/FlightGear-0.9/data/Aircraft/dc3/Models/dc3-dpm.ac,v
 retrieving revision 1.7
 retrieving revision 1.8
 diff -C2 -r1.7 -r1.8
 *** dc3-dpm.ac20 Nov 2003 10:03:37 -  1.7
 --- dc3-dpm.ac29 Dec 2003 21:34:32 -  1.8
 ***
 *** 8339,8340 
 --- 8339,8571 
   32 0.5 0.5
   kids 0
 + OBJECT poly
 + name RightPropeller.Fast
 + loc -0.729208 -1.53638 -2.90127
 + numvert 33
 + 0 0 1.55
 + 0 0.30239 1.52022
 + 0 0.593159 1.43201
 + 0 0.861134 1.28878
 + 0 1.09602 1.09601
 + 0 1.28878 0.861133
 + 0 1.43201 0.59316
 + 0 1.52022 0.302391
 + 0 1.55 0
 + 0 1.52022 -0.30239
 + 0 1.43201 -0.593159
 + 0 1.28878 -0.861134
 + 0 1.09602 -1.09601
 + 0 0.861134 -1.28878
 + 0 0.593159 -1.43201
 + 0 0.30239 -1.52022
 + 0 -1.19209e-007 -1.55
 + 0 -0.30239 -1.52022
 + 0 -0.593159 -1.43201
 + 0 -0.861134 -1.28878
 + 0 -1.09602 -1.09601
 + 0 -1.28878 -0.861134
 + 0 -1.43201 -0.593159
 + 0 -1.52022 -0.30239
 + 0 -1.55 4.76837e-007
 + 0 -1.52022 0.302391
 + 0 -1.43201 0.59316
 + 0 -1.28878 0.861134
 + 0 -1.09602 1.09601
 + 0 -0.861134 1.28878
 + 0 -0.593159 1.43201
 + 0 -0.30239 1.52022
 + 0 0 0
 + numsurf 32
 + SURF 0x20
 + mat 3
 + refs 3
 + 0 1 0.5
 + 1 0.990393 0.597545
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 1 0.990393 0.597545
 + 2 0.96194 0.691342
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 2 0.96194 0.691342
 + 3 0.915735 0.85
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 3 0.915735 0.85
 + 4 0.853553 0.853553
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 4 0.853553 0.853553
 + 5 0.85 0.915735
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 5 0.85 0.915735
 + 6 0.691342 0.96194
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 6 0.691342 0.96194
 + 7 0.597545 0.990393
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 7 0.597545 0.990393
 + 8 0.5 1
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 8 0.5 1
 + 9 0.402455 0.990393
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 9 0.402455 0.990393
 + 10 0.308658 0.96194
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 10 0.308658 0.96194
 + 11 0.15 0.915735
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 11 0.15 0.915735
 + 12 0.146447 0.853553
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 12 0.146447 0.853553
 + 13 0.0842652 0.85
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 13 0.0842652 0.85
 + 14 0.0380602 0.691342
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 14 0.0380602 0.691342
 + 15 0.00960734 0.597545
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 15 0.00960734 0.597545
 + 16 0 0.5
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 16 0 0.5
 + 17 0.00960739 0.402455
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 17 0.00960739 0.402455
 + 18 0.0380602 0.308658
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 18 0.0380602 0.308658
 + 19 0.0842652 0.15
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 19 0.0842652 0.15
 + 20 0.146447 0.146447
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 20 0.146447 0.146447
 + 21 0.15 0.0842651
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 21 0.15 0.0842651
 + 22 0.308658 0.0380602
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 22 0.308658 0.0380602
 + 23 0.402455 0.00960733
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 23 0.402455 0.00960733
 + 24 0.5 0
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 24 0.5 0
 + 25 0.597545 0.00960738
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 25 0.597545 0.00960738
 + 26 0.691342 0.0380603
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 26 0.691342 0.0380603
 + 27 0.85 0.0842652
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 27 0.85 0.0842652
 + 28 0.853553 0.146447
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 28 0.853553 0.146447
 + 29 0.915735 0.15
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 29 0.915735 0.15
 + 30 0.96194 0.308658
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + refs 3
 + 30 0.96194 0.308658
 + 31 0.990393 0.402455
 + 32 0.5 0.5
 + SURF 0x20
 + mat 3
 + 

Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: data/Aircraft/dc3/Models dc3-dpm.ac, 1.7, 1.8 dc3-dpm.xml, 1.10, 1.11

2003-12-29 Thread Andy Ross
Curtis L. Olson wrote:
 David, (Andy?)

 It appears that in the latest cvs, we have lost the ability to control
 the engines independently.

This one is mine.  The recent Nasal stuff contains a rework of the
engine handling to allow for arbitrary numbers of engines, and avoid
the why are there 10 engines on the skyhawk? issue.

 Previously you could type Shift-1 Shift-2 Shift-3 ... etc. to
 select an engine.  Then '{' and '}' would select the magnetos.
 Finally, space bar would kick in the starter motor for as long as it
 was depressed.

Let me take a look.  I presume you're seeing this with the DC-3?  The
code (selectEngine(), stepMagnetos() and startEngine() in
controls.nas) looks more or less correct at first reading.  I'm pretty
sure I remember testing this with a multiengine aircraft...

Andy


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: data/Aircraft/dc3/Models dc3-dpm.ac, 1.7, 1.8 dc3-dpm.xml, 1.10, 1.11

2003-12-29 Thread Jon S Berndt
On Mon, 29 Dec 2003 15:49:30 -0600
 Curtis L. Olson [EMAIL PROTECTED] wrote:
David, (Andy?)

It appears that in the latest cvs, we have lost the ability to control
the engines independently.  Previously you could type Shift-1
Shift-2 Shift-3 ... etc. to select an engine.  Then '{' and '}'
would select the magnetos.  Finally, space bar would kick in the
starter motor for as long as it was depressed.
Was this an FDM-dependent problem? Or, was it for all FDM's?

Jon

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: data/Aircraft/dc3/Models dc3-dpm.ac, 1.7, 1.8 dc3-dpm.xml, 1.10, 1.11

2003-12-29 Thread Curtis L. Olson
Andy Ross writes:
 Curtis L. Olson wrote:
  David, (Andy?)
 
  It appears that in the latest cvs, we have lost the ability to control
  the engines independently.
 
 This one is mine.  The recent Nasal stuff contains a rework of the
 engine handling to allow for arbitrary numbers of engines, and avoid
 the why are there 10 engines on the skyhawk? issue.

The engine selection code seems to work ok based on examining the
property tree.

It seems like the stepMagnetos() and startEngine() routines must be at
fault.  But I agree, from an initial reading, I don't see any obvious
faults.

I see this also with --aircraft=c310 which I believe is a jsbsim
aircraft.

  Previously you could type Shift-1 Shift-2 Shift-3 ... etc. to
  select an engine.  Then '{' and '}' would select the magnetos.
  Finally, space bar would kick in the starter motor for as long as it
  was depressed.
 
 Let me take a look.  I presume you're seeing this with the DC-3?  The
 code (selectEngine(), stepMagnetos() and startEngine() in
 controls.nas) looks more or less correct at first reading.  I'm pretty
 sure I remember testing this with a multiengine aircraft...

Ok, thanks for looking into this, hopefully it is something simple.

Curt.
-- 
Curtis Olson   HumanFIRST Program   FlightGear Project
Twin Citiescurt 'at' me.umn.edu curt 'at' flightgear.org
Minnesota  http://www.flightgear.org/~curt  http://www.flightgear.org

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: data/Aircraft/dc3/Models dc3-dpm.ac, 1.7, 1.8 dc3-dpm.xml, 1.10, 1.11

2003-12-29 Thread Curtis L. Olson
Jon S Berndt writes:
 On Mon, 29 Dec 2003 15:49:30 -0600
   Curtis L. Olson [EMAIL PROTECTED] wrote:
 David, (Andy?)
 
 It appears that in the latest cvs, we have lost the ability to control
 the engines independently.  Previously you could type Shift-1
 Shift-2 Shift-3 ... etc. to select an engine.  Then '{' and '}'
 would select the magnetos.  Finally, space bar would kick in the
 starter motor for as long as it was depressed.
 
 Was this an FDM-dependent problem? Or, was it for all FDM's?

It appears (to me) to be a property setting problem.  Andy, does nasal
have the ability to dump console output for temporary debugging?

Curt.
-- 
Curtis Olson   HumanFIRST Program   FlightGear Project
Twin Citiescurt 'at' me.umn.edu curt 'at' flightgear.org
Minnesota  http://www.flightgear.org/~curt  http://www.flightgear.org

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: data/Aircraft/dc3/Models dc3-dpm.ac, 1.7, 1.8 dc3-dpm.xml, 1.10, 1.11

2003-12-29 Thread Curtis L. Olson
Andy Ross writes:
 Curtis L. Olson wrote:
  David, (Andy?)
 
  It appears that in the latest cvs, we have lost the ability to control
  the engines independently.
 
 This one is mine.  The recent Nasal stuff contains a rework of the
 engine handling to allow for arbitrary numbers of engines, and avoid
 the why are there 10 engines on the skyhawk? issue.
 
  Previously you could type Shift-1 Shift-2 Shift-3 ... etc. to
  select an engine.  Then '{' and '}' would select the magnetos.
  Finally, space bar would kick in the starter motor for as long as it
  was depressed.
 
 Let me take a look.  I presume you're seeing this with the DC-3?  The
 code (selectEngine(), stepMagnetos() and startEngine() in
 controls.nas) looks more or less correct at first reading.  I'm pretty
 sure I remember testing this with a multiengine aircraft...

For what it's worth, I can control the engines independently if I
manually manipulate the correct properties, so this has to be some
problem with the nasal scripts not setting the properties correctly.

Regards,

Curt.
-- 
Curtis Olson   HumanFIRST Program   FlightGear Project
Twin Citiescurt 'at' me.umn.edu curt 'at' flightgear.org
Minnesota  http://www.flightgear.org/~curt  http://www.flightgear.org

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: data/Aircraft/dc3/Models dc3-dpm.ac, 1.7, 1.8 dc3-dpm.xml, 1.10, 1.11

2003-12-29 Thread Curtis L. Olson
Andy Ross writes:
 Curtis L. Olson wrote:
  David, (Andy?)
 
  It appears that in the latest cvs, we have lost the ability to control
  the engines independently.
 
 This one is mine.  The recent Nasal stuff contains a rework of the
 engine handling to allow for arbitrary numbers of engines, and avoid
 the why are there 10 engines on the skyhawk? issue.
 
  Previously you could type Shift-1 Shift-2 Shift-3 ... etc. to
  select an engine.  Then '{' and '}' would select the magnetos.
  Finally, space bar would kick in the starter motor for as long as it
  was depressed.
 
 Let me take a look.  I presume you're seeing this with the DC-3?  The
 code (selectEngine(), stepMagnetos() and startEngine() in
 controls.nas) looks more or less correct at first reading.  I'm pretty
 sure I remember testing this with a multiengine aircraft...

Andy,

The following line is failing in the stepMagneto() and startEngine()
functions.  If the first engine is selected, this returns 1 for every
engine.  If any other engine is selected, this returns 0.

select = sel.getChild(engine, i);

Could there be a bug in this form of getChild()?

If I rewrite the function to avoid using getChild() things work again,
for instance:

startEngine = func {
sels = props.globals.getNode(/sim/input/selected).getChildren(engine);
engs = props.globals.getNode(/controls/engines).getChildren(engine);
count = size(sels);
if (size(engs)  count) {
count = size(engs);
}
for(i=0; icount; i=i+1) {
if(sels[i].getValue()) {
engs[i].getNode(starter).setBoolValue(1);
}
}
}

Thanks,

Curt.
-- 
Curtis Olson   HumanFIRST Program   FlightGear Project
Twin Citiescurt 'at' me.umn.edu curt 'at' flightgear.org
Minnesota  http://www.flightgear.org/~curt  http://www.flightgear.org

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: data/Aircraft/dc3/Models dc3-dpm.ac, 1.7, 1.8 dc3-dpm.xml, 1.10, 1.11

2003-12-29 Thread Andy Ross
Curt wrote:
 select = sel.getChild(engine, i);
 Could there be a bug in this form of getChild()?

Heh, bingo.  That was exactly it.  See the other post for notes.

Andy


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: data/Aircraft/dc3/Models dc3-dpm.ac, 1.7, 1.8 dc3-dpm.xml, 1.10, 1.11

2003-12-29 Thread Andy Ross
Curtis L. Olson wrote:
 It appears (to me) to be a property setting problem.  Andy, does
 nasal have the ability to dump console output for temporary
 debugging?

Sure, there's a print() function which uses SG_LOG; for exactly this
purpose.  There's even a fancy dump() method on a property node that
you can use to dump a property tree to the console.

It turns out to be a missing feature in the C++ code.  The
Node.getChild() function worked for the getChild(name) variant, but
silently ignored the second argument for a getChild(name, index).  I
just forgot to write it, apparently. :)

An additional issue was that the number of /sim/selected/engines[n]
properties (one) in the default configuration didn't match the actual
number of engines, so engine 2 would always look unselected.  I
fixed this via a Nasal hack that patches things up after
initialization, but we should consider unifying these trees somehow
(for example, by putting the selected properties under
/controls/engines).

Anyway, this should be fixed.  You'll need to do a rebuild and get a
new controls.nas file out of the base package.

Andy


___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: data/Aircraft/dc3/Models dc3-dpm.ac, 1.7, 1.8 dc3-dpm.xml, 1.10, 1.11

2003-12-29 Thread Curtis L. Olson
Andy Ross writes:
 Sure, there's a print() function which uses SG_LOG; for exactly this
 purpose.  There's even a fancy dump() method on a property node that
 you can use to dump a property tree to the console.

Ok, thanks, I eventually found it.  Quite useful, thanks. :-)

 It turns out to be a missing feature in the C++ code.  The
 Node.getChild() function worked for the getChild(name) variant, but
 silently ignored the second argument for a getChild(name, index).  I
 just forgot to write it, apparently. :)
 
 An additional issue was that the number of /sim/selected/engines[n]
 properties (one) in the default configuration didn't match the
 actual number of engines, so engine 2 would always look
 unselected.  I fixed this via a Nasal hack that patches things up
 after initialization, but we should consider unifying these trees
 somehow (for example, by putting the selected properties under
 /controls/engines).

I will vote for moving this into the tree with the engine controls.
That should make the code a bit simpler.  

Regards,

Curt.
-- 
Curtis Olson   HumanFIRST Program   FlightGear Project
Twin Citiescurt 'at' me.umn.edu curt 'at' flightgear.org
Minnesota  http://www.flightgear.org/~curt  http://www.flightgear.org

___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel