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; a->getPilotPos(pilot); fgSetFloat("/sim/view/pilot/x-offset-m", -pilot); fgSetFloat("/sim/view/pilot/y-offset-m", -pilot); fgSetFloat("/sim/view/pilot/z-offset-m", pilot); 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. Ross NextBus 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