Update of /cvsroot/jsbsim/JSBSim/tests
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv19745/tests
Modified Files:
CheckTrim.py
Log Message:
Check that the aircraft is motionless after the ground trim succeeded.
Index: CheckTrim.py
===================================================================
RCS file: /cvsroot/jsbsim/JSBSim/tests/CheckTrim.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** CheckTrim.py 30 Jan 2016 18:50:24 -0000 1.3
--- CheckTrim.py 4 Jun 2016 18:55:27 -0000 1.4
***************
*** 58,66 ****
fdm = CreateFDM(self.sandbox)
fdm.load_model('c172x')
! fdm['ic/theta-deg'] = 10.0
fdm.run_ic()
fdm['ic/theta-deg'] = 0.0
# If the trim fails, it will raise an exception
! fdm['simulation/do_simple_trim'] = 2
RunTest(CheckTrim)
--- 58,77 ----
fdm = CreateFDM(self.sandbox)
fdm.load_model('c172x')
! fdm['ic/theta-deg'] = 90.0
fdm.run_ic()
fdm['ic/theta-deg'] = 0.0
# If the trim fails, it will raise an exception
! fdm['simulation/do_simple_trim'] = 2 # Ground trim
!
! # Check that the aircraft has been trimmed successfully (velocities
! # should be zero i.e. the aircraft must be motionless once trimmed).
! while fdm['simulation/sim-time-sec'] <= 1.0:
! fdm.run()
! self.assertAlmostEqual(fdm['velocities/p-rad_sec'], 0., delta=1E-4)
! self.assertAlmostEqual(fdm['velocities/q-rad_sec'], 0., delta=1E-4)
! self.assertAlmostEqual(fdm['velocities/r-rad_sec'], 0., delta=1E-4)
! self.assertAlmostEqual(fdm['velocities/u-fps'], 0.0, delta=1E-4)
! self.assertAlmostEqual(fdm['velocities/v-fps'], 0.0, delta=1E-4)
! self.assertAlmostEqual(fdm['velocities/w-fps'], 0.0, delta=1E-4)
RunTest(CheckTrim)
|