Skip to content

Reset turbulence vector when turbulence is disabled#1252

Merged
bcoconni merged 2 commits intoJSBSim-Team:masterfrom
seanmcleod70:KillTurbulence
Apr 6, 2025
Merged

Reset turbulence vector when turbulence is disabled#1252
bcoconni merged 2 commits intoJSBSim-Team:masterfrom
seanmcleod70:KillTurbulence

Conversation

@seanmcleod70
Copy link
Contributor

Fix the issue reported by - #1250 in terms of the turbulence effect not being reset when the turbulence was set to None.

@codecov
Copy link

codecov bot commented Apr 5, 2025

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 24.77%. Comparing base (e1ea4e8) to head (992f529).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/models/atmosphere/FGWinds.cpp 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1252      +/-   ##
==========================================
- Coverage   24.77%   24.77%   -0.01%     
==========================================
  Files         169      169              
  Lines       19421    19423       +2     
==========================================
  Hits         4812     4812              
- Misses      14609    14611       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


self.checkBaselineWind(fdm)

def setup(self):
Copy link
Member

@bcoconni bcoconni Apr 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name setup is almost colliding with the method JSBSimTestCase.setUp (note the capital U in setUp). I would suggest to either choose a different name or rename setup to setUp and inherit from JSBSimTestCase.setUp. Check the code from TestInputSocket.py below for an example:

class TestInputSocket(JSBSimTestCase):
def setUp(self, *args):
super().setUp(*args)
self._fdm = self.create_fdm()
self.telnet = TelnetInterface()
self.script_path = self.sandbox.path_to_jsbsim_file("scripts", "c1722.xml")

If you choose renaming setup to setUp then please note that you will no longer need to make explicit calls to this method as setUp is automatically called before each test (i.e. before each method which name starts with test).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I'll take a look. Need to get more up to speed on the test framework 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've pushed a commit to update the test code to make use of the existing setUp() method.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@bcoconni bcoconni added the bug label Apr 6, 2025
@bcoconni bcoconni merged commit 614a5b7 into JSBSim-Team:master Apr 6, 2025
29 checks passed
@seanmcleod70 seanmcleod70 deleted the KillTurbulence branch April 6, 2025 15:32
bcoconni pushed a commit to bcoconni/jsbsim that referenced this pull request May 2, 2025
Co-authored-by: Sean McLeod <sean@seanmcleod.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants