I have been playing Flightgear off and on for a few years, and recently have built a simple headtracker using infra-red LEDs. This is imaged using a webcam (with an IR filter) and is brought into the Flightgear environment as a "joystick" with 6 axes (X,Y and Z translation, plus yaw, pitch and roll). In operation Flightgear assigns the "default" joystick file: this is edited so the six axes are assigned to /sim/current-view/goal- roll / pitch / heading -offset (for the rotational axes) and sim/current-view/ x / y / z -offset-m (for the translational axes)
In the absence of the headtracker the program seems to obtain some offset values from somewhere (presumably from the aircraft config files, although I can't find anything in the C172 xml documents), so the default view is at the pilot's eye level. I built these offsets into the joystick config file without too much hassle. However, they only work for the C172. If I load up another aircraft the viewpoint is in the wrong place.
I could edit the joystick file (with different offsets) every time I want to change planes, but surely there must be an easier way.
Ian