#include "ls_aux.h"
#include "ls_model.h"
#include "ls_init.h"
+
#include <Flight/flight.h>
#include <Aircraft/aircraft.h>
-#include <Autopilot/autopilot.h>
#include <Debug/fg_debug.h>
ls_cockpit();
}
- for ( i = 0; i < multiloop; i++ ) {
- //Insertion by Jeff Goeke-Smith for Autopilot.
-
- // run Autopilot system
- // fgPrintf( FG_ALL, FG_BULK, "Attempting autopilot run\n");
- fgAPRun();
-
- /* lets try to avoid really screwing up the LaRCsim model */
- if ( FG_Altitude < -9000 ) {
- save_alt = FG_Altitude;
- FG_Altitude = 0;
- }
+ /* lets try to avoid really screwing up the LaRCsim model */
+ if ( FG_Altitude < -9000 ) {
+ save_alt = FG_Altitude;
+ FG_Altitude = 0;
+ }
- // translate FG to LaRCsim structure
- fgFlight_2_LaRCsim(f);
- // printf("FG_Altitude = %.2f\n", FG_Altitude * 0.3048);
- // printf("Altitude = %.2f\n", Altitude * 0.3048);
- // printf("Radius to Vehicle = %.2f\n", Radius_to_vehicle * 0.3048);
+ // translate FG to LaRCsim structure
+ fgFlight_2_LaRCsim(f);
+ // printf("FG_Altitude = %.2f\n", FG_Altitude * 0.3048);
+ // printf("Altitude = %.2f\n", Altitude * 0.3048);
+ // printf("Radius to Vehicle = %.2f\n", Radius_to_vehicle * 0.3048);
- // end of insertion
-
+ for ( i = 0; i < multiloop; i++ ) {
ls_loop( model_dt, 0);
+ }
- // printf("%d FG_Altitude = %.2f\n", i, FG_Altitude * 0.3048);
- // printf("%d Altitude = %.2f\n", i, Altitude * 0.3048);
-
- // translate LaRCsim back to FG structure so that the
- // autopilot (and the rest of the sim can use the updated
- // values
- fgLaRCsim_2_Flight(f);
-
- /* but lets restore our original bogus altitude when we are done */
- if ( save_alt < -9000 ) {
- FG_Altitude = save_alt;
- }
+ // printf("%d FG_Altitude = %.2f\n", i, FG_Altitude * 0.3048);
+ // printf("%d Altitude = %.2f\n", i, Altitude * 0.3048);
+
+ // translate LaRCsim back to FG structure so that the
+ // autopilot (and the rest of the sim can use the updated
+ // values
+ fgLaRCsim_2_Flight(f);
+
+ /* but lets restore our original bogus altitude when we are done */
+ if ( save_alt < -9000 ) {
+ FG_Altitude = save_alt;
}
- return(1);
+ return 1;
}
/* Flight Gear Modification Log
*
* $Log$
- * Revision 1.21 1998/08/22 14:49:56 curt
+ * Revision 1.22 1998/09/29 02:02:59 curt
+ * Added a brake + autopilot mods.
+ *
+ * Revision 1.21 1998/08/22 14:49:56 curt
* Attempting to iron out seg faults and crashes.
* Did some shuffling to fix a initialization order problem between view
* position, scenery elevation.
$Header$
$Log$
+Revision 1.5 1998/09/29 02:03:00 curt
+Added a brake + autopilot mods.
+
Revision 1.4 1998/08/06 12:46:40 curt
Header change.
#include "ls_generic.h"
#include "ls_cockpit.h"
+#include <Controls/controls.h>
void sub3( DATA v1[], DATA v2[], DATA result[] )
{
* Put aircraft specific executable code here
*/
- percent_brake[1] = 0.; /* replace with cockpit brake handle connection code */
+ percent_brake[1] = fgBrakeGet(); /* replace with cockpit brake handle connection code */
percent_brake[2] = percent_brake[1];
caster_angle_rad[0] = 0.03*Rudder_pedal;