Add a LoadPlanet method to FGFDMExec#913
Merged
agodemar merged 2 commits intoJSBSim-Team:masterfrom May 16, 2023
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #913 +/- ##
==========================================
- Coverage 23.14% 23.11% -0.04%
==========================================
Files 167 167
Lines 19603 19631 +28
==========================================
Hits 4538 4538
- Misses 15065 15093 +28
|
Member
|
Looks good. |
Contributor
|
Awesome addition!
Jon
|
bcoconni
added a commit
to bcoconni/jsbsim
that referenced
this pull request
Aug 26, 2023
* Add a new `LoadPlanet` method * Fix the help messages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Following an idea from @seanmcleod (see #908 (comment)), this PR introduces a new method
FGFDMExec::LoadPlanet()which can be used to load a planet definition such astests/moon.xml:jsbsim/tests/moon.xml
Lines 1 to 7 in 8c13fd6
As Sean explained, this feature allows to manage independently the aircraft model and the planet definition file on which the simulation should take place.
The programs
JSBSim.exeandJSBSim.pyhave been updated accordingly. A script such asball_chute.xmlcan therefore be run on the Moon using the following command line:> JSBSim --script=scripts/ball_chute.xml --planet=tests/moon.xmlThe ball needs 107.8 sec to fall from an height of 10000 ft on Earth and 329.6 sec to fall from the same height on the Moon. One might notice that the ratio of these 2 duration is not equal to$\sqrt{6}$ but the script deploys a parachute at an height of 5000 ft and we currently cannot force the Moon atmosphere to be the vacuum 😉