Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-04 Thread David Megginson

Jim Wilson writes:

  Ok, I think this means I can continue in the same direction with
  the viewer code.  It would be just a matter of editing xml to
  switch from using /position/lat||lon||alt to somewhere else in the
  property tree, so if folks want to experiment they can.

I don't know if that will be necessary.  As long as we agree that the
lat/lon/alt give a fixed position (somewhere) on the plane, that's
good enough, and it becomes a convention to be agreed upon model by
model.  I agree with Jon that when the manufacturer does specify an
origin, we should use that.


All the best,


David

-- 
David Megginson
[EMAIL PROTECTED]


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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-04 Thread David Megginson

Andy Ross writes:

  I'll chop the cockpit stuff out of YASim as soon as someone tells me
  it's OK.

It's fine with me.  Curt?


All the best,


David

-- 
David Megginson
[EMAIL PROTECTED]


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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-04 Thread David Megginson

Arnt Karlsen writes:

  ..a wee point: in sideslipping, will the responsible pilot 
  stare, towards the infinte end of the longitudal axis, or will 
  he watch/look out to where he is going?  My .02, only.  ;-)

We are talking only about the default viewpoint location.  It's up to
the pilot to control the view orientation using the mouse, keyboard,
joystick hat, etc.


All the best,


David

-- 
David Megginson
[EMAIL PROTECTED]


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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-04 Thread Jim Wilson

David Megginson [EMAIL PROTECTED] said:

 Jim Wilson writes:
 
   Err umm...what is it that won't be necessary?
 
 Using properties other than the /position ones.
 

Right from the start I've been planning to support that anyway.

Two reasons:
1) Probably soon to be realized multiple instances of FDM and models.
2) Towers don't fly (usually).  So their position and orientation needs to
come from elsewhere.

Best,

Jim

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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-04 Thread Curtis L. Olson

David Megginson writes:
 Andy Ross writes:
 
   I'll chop the cockpit stuff out of YASim as soon as someone tells me
   it's OK.
 
 It's fine with me.  Curt?

Sure, sounds good to me.

Curt.
-- 
Curtis Olson   IVLab / HumanFIRST Program   FlightGear Project
Twin Cities[EMAIL PROTECTED]  [EMAIL PROTECTED]
Minnesota  http://www.menet.umn.edu/~curt   http://www.flightgear.org

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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Jim Wilson

David Megginson [EMAIL PROTECTED] said:

 I tried this
 
   fgfs --aircraft=c172-3d --fdm=yasim
 
 and had an interesting experience -- I ended up sitting on the runway
 a meter or two to the right of the plane, rather than inside it.
 
Something is overwriting the xyz offsets in the c172-3d-set.xml or maybe it
isn't reading that file?  Those are defaults from somewhere...probably from
c172-set.xml.

 Things got even more interesting when I started playing with the view
 position offsets, because everything was wrong: the x offset moved the
 viewpoint sideways (y-axis), the y offset moved the viewpoint up and
 down (z-axis), and the z offset moved the viewpoint backwards and
 forwards (x-axis).
 
That is intentional.  Before the pilot and chase were different than each
other (or seemed that way).  Prior to knowing anything about using plib or
Opengl, I always assumed as a user that x was across the screen,  y was up and
down and z was depth.  That is I think most intuitive to the xml user, and the
fact that it doesn't coincide what's going on in the viewer black box is not
important.  Anyway, it is in my change log entry, documented in the source,
and all my proposal stuff ;-)


 I cannot figure out why this is happening.  YASIM uses a different
 coordinate system internally, but there should be no direct dependency
 between the view offsets and the FDM -- YASIM simply reports the
 geodetic position (lon/lat/alt) and orientation (roll/pitch/heading)
 for the model itself, and the viewer positions the model
 appropriately.
 
There's no interface problem, only a settings file issue.

Best,

Jim


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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread David Megginson

Jim Wilson writes:

  That is intentional.  Before the pilot and chase were different
  than each other (or seemed that way).  Prior to knowing anything
  about using plib or Opengl, I always assumed as a user that x was
  across the screen, y was up and down and z was depth.  That is I
  think most intuitive to the xml user, and the fact that it doesn't
  coincide what's going on in the viewer black box is not important.
  Anyway, it is in my change log entry, documented in the source, and
  all my proposal stuff ;-)

Sorry for the confusion there.  I think that it's probably not a good
idea to do things that way -- we should stick with normal aircraft
axes for consistency with the rest of FlightGear, at least at the
property level (a GUI can present things differently, of course).


All the best,


David

-- 
David Megginson
[EMAIL PROTECTED]


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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Jim Wilson

David Megginson [EMAIL PROTECTED] said:

 
 Sorry for the confusion there.  I think that it's probably not a good
 idea to do things that way -- we should stick with normal aircraft
 axes for consistency with the rest of FlightGear, at least at the
 property level (a GUI can present things differently, of course).
 

It's already inconsistent.  The model is one way (as you expected) and the
panel xml is x across and y up/down.  If I was the only one to have say in
this I'd make the xyz in the model files conform to the expected by the user
axes (x across, y up/down, z depth).  It is also what would be expected by
anyone who is  unfamiliar with plib but has done other 3d programming or
modeling.  The FDM and other stuff I'd leave alone, but the panel, model, and
viewer that end users are most likely to mess around with, I'd make consistent.

Best,

Jim

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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread David Megginson

Jim Wilson writes:

  It's already inconsistent.  The model is one way (as you expected) and the
  panel xml is x across and y up/down.

Yes, I know.  One consideration, though, is that each panel is (soon)
going to be projected to any arbirtary location and orientation in the
aircraft, so you can think of it as being drawn from overhead and then
rotated around.

  If I was the only one to have say in this I'd make the xyz in the
  model files conform to the expected by the user axes (x across, y
  up/down, z depth).  It is also what would be expected by anyone who
  is unfamiliar with plib but has done other 3d programming or
  modeling.  The FDM and other stuff I'd leave alone, but the panel,
  model, and viewer that end users are most likely to mess around
  with, I'd make consistent.

Fair enough, but it would drive the aero people crazy.


All the best,


David

-- 
David Megginson
[EMAIL PROTECTED]


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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Andy Ross

Jim Wilson wrote:
  David Megginson wrote:
   I tried this
  
   fgfs --aircraft=c172-3d --fdm=yasim
  
   and had an interesting experience -- I ended up sitting on the runway
   a meter or two to the right of the plane, rather than inside it.
 
  Something is overwriting the xyz offsets in the c172-3d-set.xml or maybe it
  isn't reading that file?  Those are defaults from somewhere...probably from
  c172-set.xml.

YASim _sets_ those offsets based on its own configuration.  I think
this is a problem of data ownership -- who owns the location of the
cockpit?  I argue that it's the FDM, since it's the code responsible
for other issues of aircraft geometry.  But then the model wants it
too.  I dunno.  Maybe the sane thing to do would be to put the cockpit
location into the model file, and work really hard to insure that the
coordinate origin is identical between the representations?  Yanking
this out of YASim is easy.

Beyond that, there appears to be an axis mismatch somewhere.  I
verified that the code worked with the old viewer (the 747 cockpit was
high, the 172 slightly to the left, etc...), but things might have
changed since.  We really need to write up a coordinates bible that
defines, once and for all, the conventions we're using. :)

Andy

-- 
Andrew J. RossNextBus Information Systems
Senior Software Engineer  Emeryville, CA
[EMAIL PROTECTED]  http://www.nextbus.com
Men go crazy in conflagrations.  They only get better one by one.
  - Sting (misquoted)


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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Andy Ross

Jim Wilson wrote:
  It's already inconsistent.  The model is one way (as you expected)
  and the panel xml is x across and y up/down.

But this is OK -- these are different coordinate systems with
different usages.  You'll never put airframe coordinates into the
panel XML, nor use panel coordinates in a model file.

The problem with inconsistencies is when multiple conventions get used
for the *same* coordinates.  To take airframe coordinates as an
example (I'm not 100% certain on some of these):

JSBSim uses X-forward, Y-right, Z-down
YASim uses X-forward, Y-left, Z-up
The model ac3d file appears to use X-right, Y-forward, Z-up

All of these are right handed coordinates, and any of them could work.
Internally, it really doesn't matter what convention the subsystem
uses (YASim converts its coordinates to JSBSim conventions before
exporting them, for example).  But externally (on the bus, as it
were), we really need to pick one and only one canonical way to
represent a unique point on the airframe.

Andy

-- 
Andrew J. RossNextBus Information Systems
Senior Software Engineer  Emeryville, CA
[EMAIL PROTECTED]  http://www.nextbus.com
Men go crazy in conflagrations.  They only get better one by one.
  - Sting (misquoted)


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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Jim Wilson

Andy Ross [EMAIL PROTECTED] said:

 Jim Wilson wrote:
   David Megginson wrote:
I tried this
   
fgfs --aircraft=c172-3d --fdm=yasim
   
and had an interesting experience -- I ended up sitting on the runway
a meter or two to the right of the plane, rather than inside it.
  
   Something is overwriting the xyz offsets in the c172-3d-set.xml or
maybe it
   isn't reading that file?  Those are defaults from
somewhere...probably from
   c172-set.xml.
 
 YASim _sets_ those offsets based on its own configuration.  I think
 this is a problem of data ownership -- who owns the location of the
 cockpit?  I argue that it's the FDM, since it's the code responsible

That isn't the issue here though.  Those are just the offsets from the
lon+lat+alt to the eyepoint and it was those that were off.  Where that origin
is FDMwise is another issue and not related to what David was observing.

Best,

Jim


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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Jon S Berndt

On Wed, 03 Apr 2002 09:32:12 -0800

 Something is overwriting the xyz offsets in the c172-3d-set.xml or
 maybe it isn't reading that file?  Those are defaults from 
 somewhere...probably from c172-set.xml.

  Andy Ross [EMAIL PROTECTED] replied:

YASim _sets_ those offsets based on its own configuration.  I think
this is a problem of data ownership -- who owns the location of the
cockpit?  I argue that it's the FDM, since it's the code responsible
for other issues of aircraft geometry.  But then the model wants it
too.

I agree. The published geometric and physical properties 
of the aircraft - necessary for the creation of an 
aircraft flight model - often includes if not the exact 
eyepoint of the pilot at least a diagram that allows the 
flight modeler to deduce it. The flight modeler may also 
want to place a point mass weight where the pilot sits, 
too, so the information is very much critical to the 
aircraft flight modeler. JSBSim will include the eyepoint 
of the pilot - as well as ballast to represent the pilot - 
regardless of whether or not the modeler uses it. I 
suggest that the FDM be looked to for supplying such a 
value - at least as a recommendation.

Also, be it known that the day is coming when a standard 
method of describing aircraft via some form of XML 
specification file is present. It is likely that the 
coordinate system used for such a standard specification 
will be one that is already a standard. That is, the 
aircraft structural frame: X axis increasing out the tail, 
Y axis increasing out the right side of the aircraft (when 
looking forward), and the Z axis of course positive 
upwards to complete the right-handed coordinate frame. The 
origin would typically be somewhere at the nose or just 
ahead of the nose of the aircraft, with the X axis either 
coincident with the centerline or parallel to it but below 
it (in order that all the Z coordinates would be positive 
numbers).

It would be nice if there was some coherent and stable 
method of describing aircraft models and how they relate 
to the aircraft structural frame, if not coincident.

Jon

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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Jim Wilson

David Megginson [EMAIL PROTECTED] said:

   If I was the only one to have say in this I'd make the xyz in the
   model files conform to the expected by the user axes (x across, y
   up/down, z depth).  It is also what would be expected by anyone who
   is unfamiliar with plib but has done other 3d programming or
   modeling.  The FDM and other stuff I'd leave alone, but the panel,
   model, and viewer that end users are most likely to mess around
   with, I'd make consistent.
 
 Fair enough, but it would drive the aero people crazy.
 

Should I just sit on this until we hear from some model people?  Or should I
change something?

Best,

Jim


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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Jim Wilson

Jon S Berndt [EMAIL PROTECTED] said:

 On Wed, 03 Apr 2002 09:32:12 -0800
 
  Something is overwriting the xyz offsets in the c172-3d-set.xml or
  maybe it isn't reading that file?  Those are defaults from 
  somewhere...probably from c172-set.xml.
 
   Andy Ross [EMAIL PROTECTED] replied:
 
 YASim _sets_ those offsets based on its own configuration.  I think
 this is a problem of data ownership -- who owns the location of the
 cockpit?  I argue that it's the FDM, since it's the code responsible
 for other issues of aircraft geometry.  But then the model wants it
 too.
 
 I agree. The published geometric and physical properties 
 of the aircraft - necessary for the creation of an 
 aircraft flight model - often includes if not the exact 
 eyepoint of the pilot at least a diagram that allows the 
 flight modeler to deduce it.

That's fine, but this is really anybody's eye (as far as the viewer is 
concerned).  It could for example be a passenger in 5A on a dc3.  It doesn't
need to be tied to the FDM.  Now the origin location for the 3d model itself
is a different story and that probably should be addressed.  Right now it is 
set to whatever the fdm is reporting for lon/lat/alt (plus model offsets that
I think aren't being used any more?).

Best,

Jim


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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Andy Ross

Jim Wilson wrote:
  Andy Ross wrote:
   David Megginson wrote:
Something is overwriting the xyz offsets in the c172-3d-set.xml or
maybe it isn't reading that file?  Those are defaults from
somewhere...probably from c172-set.xml.
  
   YASim _sets_ those offsets based on its own configuration.  I think
   this is a problem of data ownership -- who owns the location of
   the cockpit?  I argue that it's the FDM, since it's the code
   responsible
 
  That isn't the issue here though.  Those are just the offsets from the
  lon+lat+alt to the eyepoint and it was those that were off.  Where
  that origin is FDMwise is another issue and not related to what David
  was observing.

No, I meant the airframe offsets, not the global ones.  The following
code appears in YASim.cxx (the negations are due to the difference in
coordinate sense):

 // The pilot's eyepoint
 float pilot[3];
 a-getPilotPos(pilot);
 fgSetFloat(/sim/view/pilot/x-offset-m, -pilot[0]);
 fgSetFloat(/sim/view/pilot/y-offset-m, -pilot[1]);
 fgSetFloat(/sim/view/pilot/z-offset-m, pilot[2]);

Ultimate, the pilot position comes from the cockpit tag in the YASim
.xml file.  The rationale here was that this was the best place to put
the information about the cockpit position was in the aircraft
definition.  But that was before the 3D model work got done.  Now,
there are *two* aircraft definitions: one to decide on physical
performance and one to control visual display.  Basically, we need to
pick one mechanism.  I think the simplest thing to do would be to yank
the YASim cockpit mechanism (and whatever JSB and UIUC do) and use
the model stuff only.  Then, at least, we're guaranteed to be
consistent across FDMs so long as we get the origin correct.

The axis mixup, though, still requires a solution.  My guess is that
the new viewer draws the new models correctly in their (new)
coordinate system, but misinterprets the offset information generated
by the FDMs.

Andy

-- 
Andrew J. RossNextBus Information Systems
Senior Software Engineer  Emeryville, CA
[EMAIL PROTECTED]  http://www.nextbus.com
Men go crazy in conflagrations.  They only get better one by one.
  - Sting (misquoted)


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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Jim Wilson

Andy Ross [EMAIL PROTECTED] said:

 Jim Wilson wrote:
 
 Ultimate, the pilot position comes from the cockpit tag in the YASim
 .xml file.  The rationale here was that this was the best place to put
 the information about the cockpit position was in the aircraft
 definition.  But that was before the 3D model work got done.  Now,
 there are *two* aircraft definitions: one to decide on physical
 performance and one to control visual display.  Basically, we need to
 pick one mechanism.  I think the simplest thing to do would be to yank
 the YASim cockpit mechanism (and whatever JSB and UIUC do) and use
 the model stuff only.  Then, at least, we're guaranteed to be
 consistent across FDMs so long as we get the origin correct.
 

That's ok, but as I said earlier, the offsets that the viewer will use will be
defined elsewhere because they are not necessarily the true actual pilot's eye
point.  The only thing I can think of that the FDM should be concerned about 
reporting (for viewer/model use) other than orientation is the aircraft model
position...ie where the origin should be.  Right now I believe the model's
origin is being placed at the lon/lat/alt that is set by the FDM, converted to
fg coordinates.

Note that this isn't taking center of gravity into consideration, so at some
point we should be adding in an offset to cg too (or is lon/lat/alt at cg)?

Best,

Jim

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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Jim Wilson

Andy Ross [EMAIL PROTECTED] said:

 Jim Wilson wrote:
   That's ok, but as I said earlier, the offsets that the viewer will
   use will be defined elsewhere because they are not necessarily the
   true actual pilot's eye point.
 
 We're evidently talking past each other.  What you say is true.  It is
 *also* true that, under YASim, you have non-zero pilot offset numbers.
 These are (1) defined by the FDM, in conflict with similar definitions
 in the model, and (2) in an apparently different coordinate space from
 the one the viewer is expecting.
 
 The viewer must be using those properties
 (/sim/view/pilot/x-offset-m), no?  How else would the settings by
 YASim be affecting the view location?
 

Ah ok.  After I get done with the configurable viewer, those values won't be 
used by the viewer.  You are correct we have been using them if they are set
by Yasim.  Under other flight models (eg JSBsim) the values defined in the xml
are being used.  When I get done those offsets will be in each view with xml
and not in that path.  If there is something that I need to use that comes
from the FDM let me know what it is and how to use it.  But I'm not going to
be setting the eyepoint with FDM data (other than offseting it from the
available origin value).  Because, as I said before, the eyepoint is not
necessarily the pilot's eye.

   Right now I believe the model's origin is being placed at the
   lon/lat/alt that is set by the FDM, converted to fg coordinates.
 
 This is correct, and exactly as it should be (so long as the FDM and
 model agree on where the origin is, at the nose, for example).
 

It looks like most of the 3D models have the origin on the firewall.  I
think that is what JSBsim is using too.

   Note that this isn't taking center of gravity into consideration, so
   at some point we should be adding in an offset to cg too (or is
   lon/lat/alt at cg)?
 
 Eep, no.  The FDMs already take the c.g. into consideration.  If a
 stopped aircraft rotates (about the c.g, of couse), you will see the
 coordinate origin moving.  We certainly don't want code outside the
 FDMs to have to worry about this.  The c.g. is an internal parameter
 of the FDM.  Other code might want to inspect it out of curiosity, but
 we *certainly* don't want the view code worrying about rigid body
 dynamics. :)
 

Well this might be useful to the 3D model.  The effect probably isn't all that
noticable compared to what we have now,  but a real plane would pitch and roll
about it's cg rather than the fixed origin as defined in a 3D model,
wouldn't it?

Best,

Jim


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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Jon S Berndt

On Wed, 3 Apr 2002 20:47:57 -
  Jim Wilson [EMAIL PROTECTED] wrote:

 If there is something that I need to use that comes
from the FDM let me know what it is and how to use it. 
 But I'm not going to be setting the eyepoint with FDM data (other than 
offseting it from the available origin value).  Because, as I said
 before, the eyepoint is not necessarily the pilot's eye.

I'm not sure I understand what you are saying, here. I 
will say, however, that if there is a viewpoint given for 
pilot eyepoint in a JSBSim config file it would be good to 
reference it somehow (even if you copy it into an aircraft 
3d model file) because it will be accurate information for 
the *pilot* eyepoint, if nothing else.

It looks like most of the 3D models have the origin on 
the firewall.  I think that is what JSBsim is using too.

Actually, that is not necessarily the case. Tony created 
the coordinate frame there and its just as good as 
anything else. For us FDM guys, for the most part, it is 
the relative locations of various items that is most 
important. However, the X-15 and Space Shuttle, etc. 
models use various other conventions for structural frame 
origin.

Well this might be useful to the 3D model.  The effect probably isn't all
that noticable compared to what we have now,  but a real plane 
would pitch and roll about it's cg rather than the fixed origin as
 defined in a 3D model, wouldn't it?

FWIW, the CG location can/will change as fuel is burned 
off and external stores (if present) are dropped.

Jon

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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Andy Ross

Jim Wilson wrote:
  Andy Ross wrote:
   The FDMs already take the c.g. into consideration.  If a stopped
   aircraft rotates (about the c.g, of couse), you will see the
   coordinate origin moving.
 
  Well this might be useful to the 3D model.  The effect probably isn't
  all that noticable compared to what we have now, but a real plane
  would pitch and roll about it's cg rather than the fixed origin as
  defined in a 3D model, wouldn't it?

It would indeed.  And it already does.  Again, the rigid body magic
required to move the coordinate origin appropriately for a given
rotation about the center of gravity is the FDM's job.  They already
do this; all the rest of the system has to do is draw the origin at
the right place.

Once more: there's no error.  Things are taken care of for you by the
physics code in the FDMs.

Andy

-- 
Andrew J. RossNextBus Information Systems
Senior Software Engineer  Emeryville, CA
[EMAIL PROTECTED]  http://www.nextbus.com
Men go crazy in conflagrations.  They only get better one by one.
  - Sting (misquoted)


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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread David Megginson

Jon S Berndt writes:

  I'm not sure I understand what you are saying, here. I will say,
  however, that if there is a viewpoint given for pilot eyepoint in a
  JSBSim config file it would be good to reference it somehow (even
  if you copy it into an aircraft 3d model file) because it will be
  accurate information for the *pilot* eyepoint, if nothing else.

At least it would be close.  I'm sure that the eyepoints are different
for a 5'2 pilot and a 6'4 pilot, and we also want to be able to
model leaning forward, etc.


All the best,


David

-- 
David Megginson
[EMAIL PROTECTED]


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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Alex Perry

I mildly disagree.

I think the FGFS should require that the FDMs _and_ the aircraft models
all have the reference point at the original manufacturer's defined
reference point (so they all match nicely) even if this is done by
a parametric offset that the FDM's configuration file has somewhere.

The Aircraft's model file should contain an empty piece of movable
airframe that is named PILOT and has the origin at the location of
the obvious point of symmetry underneath a sitting person (grin)
and has the up vector aligned with the slope of the seat back.

This would allow the viewpoint stuff to specify pilot-centric viewpoints
in terms of the PILOT location plus a specified distance that corresponds
to the notional torso height of the simulated pilot to get the matrix.

 Here's what make sense to me.
 
 The FDM defines some aribitrary reference point (i.e. on the firewall)
 and provides the lon/lat/elev of that point.
 
 The FDM really doesn't care about the actual FlightGear view point.
 It won't know if the user is flying from the left seat, the right
 seat, or seat 5A in the DC-3.
 
 It seems like it would make much more sense for the flightgear side
 (maybe the aircraft-set.xml file?) to provide the actual view offset
 point relative to the FDM reference point.
 
 Curt.
 
 
 David Megginson writes:
  Andy Ross writes:
  
We're evidently talking past each other.  What you say is true.  It is
*also* true that, under YASim, you have non-zero pilot offset numbers.
These are (1) defined by the FDM, in conflict with similar definitions
in the model, and (2) in an apparently different coordinate space from
the one the viewer is expecting.

The viewer must be using those properties
(/sim/view/pilot/x-offset-m), no?  How else would the settings by
YASim be affecting the view location?
  
  OK, here's how I had understood things:
  
  1. The FDM sets the plane's lat/lon/alt to the ideal pilot viewpoint.
  
  2. /sim/view/pilot/*-offset-m are properties controlled by the user
 and/or the view manager, and are added to the lat/lon/alt supplied
 by the FDM.
  
  Here's how Andy understands things:
  
  1. The FDM sets the plane's lat/lon/alt to the origin, which is any
 arbitrary point on the plane's body.
  
  2. /sim/view/pilot/*-offset-m are properties controlled by the FDM to
 give the offsets from the origin to the ideal pilot viewpoint.
  
  I'd like to reserve the /sim/view properties literally for allowing
  the user to move around inside (or outside) the plane.  If my #1 is
  not correct, perhaps we should all the FDMs to put offsets somewhere
  under the FDM hierarchy.
  
  
  All the best,
  
  
  David
  
  -- 
  David Megginson
  [EMAIL PROTECTED]
  
  
  ___
  Flightgear-devel mailing list
  [EMAIL PROTECTED]
  http://mail.flightgear.org/mailman/listinfo/flightgear-devel
 
 -- 
 Curtis Olson   IVLab / HumanFIRST Program   FlightGear Project
 Twin Cities[EMAIL PROTECTED]  [EMAIL PROTECTED]
 Minnesota  http://www.menet.umn.edu/~curt   http://www.flightgear.org
 
 ___
 Flightgear-devel mailing list
 [EMAIL PROTECTED]
 http://mail.flightgear.org/mailman/listinfo/flightgear-devel
 
 

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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Jon S Berndt

On Wed, 3 Apr 2002 16:26:57 -0600 (CST)
  Curtis L. Olson [EMAIL PROTECTED] wrote:

The FDM defines some aribitrary reference point (i.e. on the firewall)
and provides the lon/lat/elev of that point.

We provide the lat/lon/elev of the current _CG_. 

The FDM really doesn't care about the actual FlightGear view point.

True.

It won't know if the user is flying from the left seat, the right
seat, or seat 5A in the DC-3.

True.

It seems like it would make much more sense for the flightgear side
(maybe the aircraft-set.xml file?) to provide the actual view offset
point relative to the FDM reference point.

All true. I just want to make these points:

1) In JSBSim (and I am assuming in YASim, too) one can add 
a weight to where the pilot sits - or anybody for that 
matter, including someone seated in 5A or a piece of 
luggage, etc. This will typically be where the pilot sits. 
If you change the viewpoint you won't be changing where 
the pilot ballast is. You'll merely be changing the 
viewpoint. You won't be virtually walking around the 
aircraft.

2) The flight modeler will usually have an intimate 
knowledge of where the *pilot* sits from aircraft 
manufacturer 3-views or other means. In some cases this 
data is given directly as X, Y, Z coords in the structural 
frame. An aircraft 3D modeler might have this information, 
too, if working from the same diagrams, or [s]he can 
probably guess fairly well.

3) The turn coordinator instrument (to my knowledge) works 
in consideration of where it is located, typically right 
in front of the pilot. The accels sensed by this 
instrument include rotational effects at the pilots moment 
arm from the CG.

4) If FlightGear was ever to be hooked up to a motion 
base, the motion of the base might be linked to the second 
derivative of the body velocities _at_the_pilot_location_. 
Thus, again in this case and with point #3, above, the 
flight model still needs to know where the pilot is.

I still recommend that the FDM be allowed to at least 
_recommend_ a pilot eyepoint, as some calculations inside 
the FDMs will use this value. It would be nice if this 
value could be useful to FlightGear. FlightGear could 
still be allowed to shift the viewpoint as it wished, but 
withe understanding of points 1 - 4, above.

Jon

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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Jim Wilson

Andy Ross [EMAIL PROTECTED] said:

 Jim Wilson wrote:
   Andy Ross wrote:
The FDMs already take the c.g. into consideration.  If a stopped
aircraft rotates (about the c.g, of couse), you will see the
coordinate origin moving.
  
   Well this might be useful to the 3D model.  The effect probably isn't
   all that noticable compared to what we have now, but a real plane
   would pitch and roll about it's cg rather than the fixed origin as
   defined in a 3D model, wouldn't it?
 
 It would indeed.  And it already does.  Again, the rigid body magic
 required to move the coordinate origin appropriately for a given
 rotation about the center of gravity is the FDM's job.  They already
 do this; all the rest of the system has to do is draw the origin at
 the right place.
 
 Once more: there's no error.  Things are taken care of for you by the
 physics code in the FDMs.
 

Ok, so are you saying that the lon/lat/alt values that the fdm outputs are at
 the origin already adjusted for cg?  If so then how would that affect the
axis of say pitch rotation on the c172 model?  It's origin is at the firewall
 and the pitch rotation is always on the access that intersects there.  Should
we be doing something different?

Best,

Jim

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



RE: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Norman Vine

Curtis L. Olson writes:

Jon S Berndt writes:
 On Wed, 3 Apr 2002 22:54:01 -
   Jim Wilson [EMAIL PROTECTED] wrote:

 Ok, so are you saying that the lon/lat/alt values that
 the fdm outputs are at the origin already adjusted for cg?

 JSBSim gives the lat/lon/alt of the CURRENT CG - NOT the
 origin of the structural frame.

This means that currently as the CG moves (i.e. loading baggage, fuel,
people, etc.)  the aircraft and the view point will move as well.
This is probably too small to normally notice and we typically aren't
changing the CG over time, but this does seem like something that
needs to be straightened out.  Whatever the FDM's are returning for
position, it does need to be a fixed point relative to the airframe.

FWIW
I think the whole problem here stems from an old misunderstanding
that although is a quite reasonable one is unfortunately mistaken

ie  CG has been considerd by some to be Center of Gravity
and by others as Center of Geometry and its usage has gotten
mixed up

When we weren't changing the mass of the plane this made no
difference but now that we are this needs to be cleared up

I should have pointed this out at the time we started 'burning fuel'
but I was well just 'burning' at the assumption that default behaviour
could be changed ar will with out 'group' discussion.
 which BTW would have led very quickly to exposing this CG confusion 

FWIW
My take on this is that all we need is a 'fixed' position ie 'Center of
Geometry'
returned by the FDM.  This fixed position can be anywhere on the AirFrame
and it needs to be described more exactly in the individual model's
configuration
file so as the Viewer part of the program can do it's thing

Ciao

Norman


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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Jon S Berndt

On Wed, 3 Apr 2002 17:29:42 -0600 (CST)
  Curtis L. Olson [EMAIL PROTECTED] wrote:
Jon S Berndt writes:

I think this boils down to let's have the FDM worry about where the
plane is, and let's have FlightGear worry about where the current view
point is.

I agree. We don't care about where the view is. Just 
remember the four points I made in the earlier email 
(particularly #3 and #4). We will be supplying a pilot 
position in the aircraft config file for weight and 
balance and sensed accelerations purposes.

I'll be happy that the view is not merely at the CG like 
it was with the LaRCSim Navion. At landing the proper 
pilot placement prevents poor position perception.

Jon

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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Jon S Berndt

On Wed, 3 Apr 2002 18:44:23 -0500
  Norman Vine [EMAIL PROTECTED] wrote:

My take on this is that all we need is a 'fixed' position ie 'Center of
Geometry' returned by the FDM.  This fixed position can be anywhere 
on the AirFrame and it needs to be described more exactly in the 
individual model's configuration
file so as the Viewer part of the program can do it's thing

Yeah, I think that's where we're headed. It might work 
that we could keep doing things as we (JSBSim) are doing, 
with an added step. The initial CG of the aircraft could 
be defined to be the refernce point that we both 
understand. We would continue to burn fuel and drop 
stores and launch carried vehicles, etc. and change the 
CG. However, when reporting location (lat/lon/alt) we'd 
need to report NOT merely the location of the current 
aircraft CG, but the location of the current aircraft CG 
minus the delta from the original - i.e. the location of 
the original CG. (?)

Is that right?

Jon

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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Jim Wilson

Jon S Berndt [EMAIL PROTECTED] said:

 On Wed, 3 Apr 2002 18:44:23 -0500
   Norman Vine [EMAIL PROTECTED] wrote:
 
 My take on this is that all we need is a 'fixed' position ie 'Center of
 Geometry' returned by the FDM.  This fixed position can be anywhere 
 on the AirFrame and it needs to be described more exactly in the 
 individual model's configuration
 file so as the Viewer part of the program can do it's thing
 
 Yeah, I think that's where we're headed. It might work 
 that we could keep doing things as we (JSBSim) are doing, 
 with an added step. The initial CG of the aircraft could 
 be defined to be the refernce point that we both 
 understand. We would continue to burn fuel and drop 
 stores and launch carried vehicles, etc. and change the 
 CG. However, when reporting location (lat/lon/alt) we'd 
 need to report NOT merely the location of the current 
 aircraft CG, but the location of the current aircraft CG 
 minus the delta from the original - i.e. the location of 
 the original CG. (?)
 

Ok, I think this means I can continue in the same direction with the viewer
code.  It would be just a matter of editing xml to switch from using
/position/lat||lon||alt to somewhere else in the property tree, so if folks 
want to experiment they can.   As for the xyz viewer eyepoint offsets, those
will be in the /sim/view[x] tree(s) and can be set with aircraft-set.xml or
whatever else.

Best,

Jim

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



RE: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Norman Vine

Jim Wilson writes:

Jon S Berndt [EMAIL PROTECTED] said:

 On Wed, 3 Apr 2002 18:44:23 -0500
   Norman Vine [EMAIL PROTECTED] wrote:

 My take on this is that all we need is a 'fixed' position ie 'Center of
 Geometry' returned by the FDM.  This fixed position can be anywhere
 on the AirFrame and it needs to be described more exactly in the
 individual model's configuration
 file so as the Viewer part of the program can do it's thing

 Yeah, I think that's where we're headed.

 However, when reporting location (lat/lon/alt) we'd
 need to report NOT merely the location of the current
 aircraft CG, but the location of the current aircraft CG
 minus the delta from the original - i.e. the location of
 the original CG. (?)


Ok, I think this means I can continue in the same direction with the viewer
code.  It would be just a matter of editing xml to switch from using
/position/lat||lon||alt to somewhere else in the property tree, so if folks
want to experiment they can.   As for the xyz viewer eyepoint offsets,
those
will be in the /sim/view[x] tree(s) and can be set with aircraft-set.xml or
whatever else.

Right

The Viewer Code HAS to assume that the position reported by the FDM
is invariant with respect to the airframe or else the Viewer really is
'lost'

So I would just carry on assuming this to be the case and hopefully the rest
will get sorted out shortly.

Cheers

Norman


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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Arnt Karlsen

On Wed, 3 Apr 2002 17:16:31 -0500, 
David Megginson [EMAIL PROTECTED] wrote in message 
[EMAIL PROTECTED]:

 Jon S Berndt writes:
 
   I'm not sure I understand what you are saying, here. I will say,
   however, that if there is a viewpoint given for pilot eyepoint in a
   JSBSim config file it would be good to reference it somehow (even
   if you copy it into an aircraft 3d model file) because it will be
   accurate information for the *pilot* eyepoint, if nothing else.
 
 At least it would be close.  I'm sure that the eyepoints are different
 for a 5'2 pilot and a 6'4 pilot, and we also want to be able to
 model leaning forward, etc.

..a wee point: in sideslipping, will the responsible pilot 
stare, towards the infinte end of the longitudal axis, or will 
he watch/look out to where he is going?  My .02, only.  ;-)

-- 
..med vennlig hilsen = with Kind Regards from Arnt... ;-)
...with a number of polar bear hunters in his ancestry...
  Scenarios always come in sets of three: 
  best case, worst case, and just in case.


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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Andy Ross

Jim Wilson wrote:
  Ok, so are you saying that the lon/lat/alt values that the fdm outputs
  are at the origin already adjusted for cg?  If so then how would that
  affect the axis of say pitch rotation on the c172 model?  It's origin
  is at the firewall and the pitch rotation is always on the access that
  intersects there.  Should we be doing something different?

OK, now I'm confused. :)

To the first part: yes.  If you take an aircraft with zero velocity
and spin it, the output lat/lon/alt values from the FDM will be moving
in a circle around the center of gravity, even though the c.g. is
stationary.  All of this math is done for you by the FDM.

The second answer, if I understand the question, is it doesn't
matter.  Orientations and positions have nothing to do with each
other.  The lat/lon/alt values tell you where the firewall point of
the aircraft is, but they don't say anything about where the aircraft
is pointing.  The hdg/pitch/roll numbers tell you how the aircraft is
oriented, but not where the firewall is.

Andy

-- 
Andrew J. RossNextBus Information Systems
Senior Software Engineer  Emeryville, CA
[EMAIL PROTECTED]  http://www.nextbus.com
Men go crazy in conflagrations.  They only get better one by one.
  - Sting (misquoted)


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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Andy Ross

Jon S. Berndt wrote:
  Jim Wilson wrote:
   Ok, so are you saying that the lon/lat/alt values that the fdm
   outputs are at the origin already adjusted for cg?
 
  JSBSim gives the lat/lon/alt of the CURRENT CG - NOT the origin of the
  structural frame.

Ack, really?  I was honestly under the impression that you were
handing out the coordinate frame too; I thought I had checked this in
code when writing YASim.  Why c.g.?  Since it moves, it forces the
model renderer to track the current value and do an extra translation.

Andy

-- 
Andrew J. RossNextBus Information Systems
Senior Software Engineer  Emeryville, CA
[EMAIL PROTECTED]  http://www.nextbus.com
Men go crazy in conflagrations.  They only get better one by one.
  - Sting (misquoted)


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



Re: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Jim Wilson

Andy Ross [EMAIL PROTECTED] said:

 Jim Wilson wrote:
   Ok, so are you saying that the lon/lat/alt values that the fdm outputs
   are at the origin already adjusted for cg?  If so then how would that
   affect the axis of say pitch rotation on the c172 model?  It's origin
   is at the firewall and the pitch rotation is always on the access that
   intersects there.  Should we be doing something different?
 
 The second answer, if I understand the question, is it doesn't
 matter.  Orientations and positions have nothing to do with each
 other.  The lat/lon/alt values tell you where the firewall point of
 the aircraft is, but they don't say anything about where the aircraft
 is pointing.  The hdg/pitch/roll numbers tell you how the aircraft is
 oriented, but not where the firewall is.

Sorry, I mistyped that message.  What I was concerned about was the axis of
rotation.  Where the aircraft pivots when the pitch angle changes similar to
where the fulcrum would be if the aircraft was a seesaw.  It probably doesn't
change all that much (for visualization) and I'm not going to worry about it
right now.

As far as the viewer.cxx and model.cxx code are concerned the axes for
orientation rotations will continue to be at the model origin (which is set at
the lon/lat/alt reported by FDMs) until further notice :-)

Best,

Jim

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



RE: [Flightgear-devel] YASIM/Viewer mismatch

2002-04-03 Thread Jon Berndt

 Ack, really?  I was honestly under the impression that you were
 handing out the coordinate frame too; I thought I had checked this in
 code when writing YASim.

Perhaps this is related to the misunderstanding of our gear model and how we
determined where we were?

 Why c.g.?  Since it moves, it forces the
 model renderer to track the current value and do an extra translation.

When we wrote the code for this initially, and for years afterwards, there
*was* no model renderer. :-)

In hindsight, I realize we may have erred in this. I'll add that initially
we didn't model moving the CG around either, so it wasn't a big deal.

I'll repeat points 3 and 4 I made earlier:

3) The turn coordinator instrument (to my knowledge) works
in consideration of where it is located, typically right
in front of the pilot. The accels sensed by this
instrument include rotational effects at the pilots moment
arm _from_the_current_CG_.

4) If FlightGear was ever to be hooked up to a motion
base, the motion of the base might be linked to the second
derivative of the body velocities _at_the_pilot_location_
relative to _the _current_CG_.
Thus, again in this case and with point #3, above, the
flight model still needs to know where the pilot is.

I still recommend that the FDM be allowed to at least
_recommend_ a pilot eyepoint, as some calculations inside
the FDMs will use this value. It would be nice if this
value could be useful to FlightGear. FlightGear could
still be allowed to shift the viewpoint as it wished, but
with the understanding of points 1 - 4, above.


In any case, to the best of my recollection, this is how LaRCSim does it,
how McFarland's paper describes it, etc. This is how to do it naturally. It
may be that we should take it a step further and extrapolate the reference
point from that, whatever that should be, and report the lat/lon/alt
(henceforth known as LLA).

Jon


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