Hi, I'd like to create a simple wingleveler autopilot, but need to be able to enable/disable...
I want to extend the view commands such that I have a duplicate pilot view, but jumping to that view changes a jsbsim property to '1' and not being in that view set the property to '0'
can someone mod the code below so as I can paste it into the .js file..
regards
Simon
//Camera positions + ground effect
var camera_z = clamp((this.fdm["gear/unit[0]/compression-ft"]+this.fdm["gear/unit[1]/compression-ft"]+this.fdm["gear/unit[2]/compression-ft"])*this.fdm["gear/unit[0]/compression-ft"]*0.2, -0.05, 0.05);
if(seat_cam===0)
this.set_fps_camera_pos({x:-0.25, y:-0.2, z:0.3-camera_z}); //Front Seat Left
else if(seat_cam===1)
this.set_fps_camera_pos({x: 0.25, y:-0.2, z:0.3-camera_z}); //Front Seat Right
else if(seat_cam===2)
this.set_fps_camera_pos({x:-0.25, y:-1, z:0.2-camera_z}); //Back Seat Left
else if(seat_cam===3)
this.set_fps_camera_pos({x: 0.25, y:-1, z:0.2-camera_z}); //Back Seat Right
else if(seat_cam===4)
this.set_fps_camera_pos({x:0.0,y: 1.0,z: 0.2}); //Nose
else if(seat_cam===5)
this.set_fps_camera_pos({x:-0.6,y:-1.5,z:-0.2}); //Body Left
else if(seat_cam===6)
this.set_fps_camera_pos({x: 0.6,y:-1.5,z:-0.2}); //Body Right
else if(seat_cam===7)
this.set_fps_camera_pos({x:-4.2,y:-0.1,z: 0.3}); //Wing Left
else if(seat_cam===8)
this.set_fps_camera_pos({x: 4.2,y:-0.1,z: 0.3}); //Wing Right
else if(seat_cam===9)
this.set_fps_camera_pos({x: 0,y:-5.1,z: 1.2}); //Tail