2023-01-18 11:49:09 -06:00
|
|
|
exec(open("Modified_data/realtime.py").read())
|
|
|
|
|
|
|
|
dyn_integloop.getIntegrator(trick.Runge_Kutta_4, 6)
|
|
|
|
dyn_integloop.set_integ_cycle(0.01)
|
|
|
|
|
|
|
|
dyn.aircraft.set_desired_compass_heading(45.0);
|
|
|
|
dyn.aircraft.autoPilot = True;
|
|
|
|
dyn.aircraft.desired_speed = 200 # meters per second
|
|
|
|
|
2023-02-13 16:45:15 -06:00
|
|
|
#==========================================
|
|
|
|
# Read the waypoints from the input file
|
|
|
|
#==========================================
|
|
|
|
|
2023-04-13 10:50:36 -05:00
|
|
|
waypoints_path = "Modified_data/default.wps"
|
|
|
|
dyn.aircraft.flightPath.load(waypoints_path)
|
2023-02-13 16:45:15 -06:00
|
|
|
|
2023-01-18 11:49:09 -06:00
|
|
|
#==========================================
|
|
|
|
# Start the Satellite Graphics Client
|
|
|
|
#==========================================
|
|
|
|
varServerPort = trick.var_server_get_port();
|
2023-01-24 17:19:19 -06:00
|
|
|
AircraftDisplay_path = "models/graphics/build/AircraftDisplay.jar"
|
2023-01-18 11:49:09 -06:00
|
|
|
|
|
|
|
if (os.path.isfile(AircraftDisplay_path)) :
|
|
|
|
AircraftDisplay_cmd = "java -jar " \
|
|
|
|
+ AircraftDisplay_path \
|
2023-02-13 16:45:15 -06:00
|
|
|
+ " -w " + waypoints_path \
|
2023-01-18 11:49:09 -06:00
|
|
|
+ " " + str(varServerPort) + " &" ;
|
|
|
|
print(AircraftDisplay_cmd)
|
|
|
|
os.system( AircraftDisplay_cmd);
|
|
|
|
else :
|
|
|
|
print('==================================================================================')
|
|
|
|
print('AircraftDisplay needs to be built. Please \"cd\" into ../models/graphics and type \"make\".')
|
|
|
|
print('==================================================================================')
|
|
|
|
|
|
|
|
trick.stop(5400);
|