MCPcopy Create free account
hub / github.com/JSBSim-Team/jsbsim / BuildReference

Method BuildReference

tests/TestModelLoading.py:31–51  ·  view source on GitHub ↗
(self, script_name)

Source from the content-addressed store, hash-verified

29
30class TestModelLoading(JSBSimTestCase):
31 def BuildReference(self, script_name):
32 # Run the script
33 self.script = self.sandbox.path_to_jsbsim_file('scripts', script_name)
34 self.sandbox.delete_csv_files()
35 fdm = CreateFDM(self.sandbox)
36 fdm.set_output_directive(self.sandbox.path_to_jsbsim_file('tests',
37 'output.xml'))
38 fdm.load_script(self.script)
39 fdm['simulation/randomseed'] = 0.0
40
41 fdm.run_ic()
42 ExecuteUntil(fdm, 50.0)
43
44 self.ref = pd.read_csv("output.csv", index_col=0)
45
46 # Since the script will work with modified versions of the aircraft XML
47 # definition file, we need to make a copy of the directory that
48 # contains all the input data of that aircraft
49
50 tree, self.aircraft_name, self.path_to_jsbsim_aircrafts = CopyAircraftDef(self.script, self.sandbox)
51 self.aircraft_path = os.path.join('aircraft', self.aircraft_name)
52
53 def ProcessAndCompare(self, section):
54 # Here we determine if the original aircraft definition <section> is

Callers 1

test_model_loadingMethod · 0.95

Calls 7

CreateFDMFunction · 0.90
ExecuteUntilFunction · 0.90
CopyAircraftDefFunction · 0.90
load_scriptMethod · 0.80
joinMethod · 0.80
path_to_jsbsim_fileMethod · 0.45
delete_csv_filesMethod · 0.45

Tested by

no test coverage detected