Andy Ross <[EMAIL PROTECTED]> said: > David Megginson wrote: > > > Wolfram Kuss writes: > > > > Are r,p,h relative to the plane or the current view? > > > > I imagine two RPH vectors: the main vector (which would in some cases > > be the orientation of the plane) and the offset vector, which are > > relative to the main ones. For the pilot view, the main vector would > > be the plane's RPH, and the offsets would be relative to that; for the > > tower view, the main vector would usually be 0,0,0. > > It's just occurred to me that we may want to back off on the 100% > general view solution. One immediate problem is that the euler angle > conventions, in face, depend on context. > > Inside the cockpit, when you move the view to the left (by moving the > mouse or hat switch to the left), you expect the "forward" view vector > to rotate to the left. In a chase view, when you push left you really > mean for the *viewer* to move left, as if stepping to the left around > the aircraft. Likewise for pitching up and down -- the directions are > reversed. > > I'm thinking that maybe it would be simpler to hard-code the three > "canonical" flight simulator view types, and have them interpret the > input properties as needed: > In a way we would be. We're only talking about standardizing the interface and then supporting multiple types within that class. The same inputs will result in different outputs depending on type. Some inputs will have no effect for certain types...for example radius might not be used in pilot/internal view.
> All of which would interpret the following input properties in their > own way (are these "controls" or something else?): > > /controls/view/rotate-deg # left/right > pitch-deg # up/down > tilt-deg # cw/ccw > zoom # magnification factor, unitless > offset-x-m > offset-y-m > offset-z-m > offset-r-m # radius, for external views > > Changing views would probably just reset these all to zero. Or maybe, > if we wanted to be fancy, would could have a separate > /controls/view[n] tree for each defined view. Or cache the values > upon exiting , so they can be restored when we get back, or... > I think these values you've outlined could be placed in the /sim/view[x] branch[es] rather than controls. You may want to put these parameters in sub-branches in each /sim/view[x] branch. We already have this to some degree with the external chase view "pilot-offset" (not to be confused with the FDM pilot-offset...it needs to be renamed). If you look in the /sim/view[2] branch you'll see settings for the pilot-offset code that corresponds to the dial widget in the gui. The same settings can be bound to keys or joystick buttons in order to control the same external view offset's speherical coordinates. Also, when you toggle views you should come back to the exact same offset that was there when you last left it. Best, Jim _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
