-
Notifications
You must be signed in to change notification settings - Fork 494
Add a thrust vectoring python script example #1280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a thrust vectoring python script example #1280
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1280 +/- ##
=======================================
Coverage 24.76% 24.76%
=======================================
Files 169 169
Lines 19598 19598
=======================================
Hits 4854 4854
Misses 14744 14744 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Nice ! 👍 Your PR just made me realize that we are not advertising about the Python example scripts in |
@seanmcleod70 @bcoconni |
I've pushed a commit with an update to the @agodemar no problem with you advertising these Python scripting examples on LinkedIn. But rather than just pointing to the |
@seanmcleod70 What about pointing to Jupyter notebooks that render the plots? |
Yep, one option is to convert the 4 samples from stand-alone Python scripts to Jupyter notebooks. |
@seanmcleod70 Something along the line of these notebooks: https://github.com/agodemar/WiReS/tree/master/calc But all made using the JSBSim interface to Python. |
Okay, I've converted all 4 standalone Python scripts to individual Jupyter notebooks. Easiest way to double-check them is to view the Jupyter notebooks via Github's automatic Jupyter notebook rendering by viewing them in my branch. https://github.com/seanmcleod70/jsbsim/tree/ThrustVectoringExample/examples/python I've done the bare minimum to turn them into Jupyter notebooks for now. We could later on make some of them interactive by using ipywidgets to allow a user to use a slider to select for example the airspeed etc. and have the graph update as the slider is moved etc. The advantage of the Jupyter notebook approach is that users who don't have Python installed, or don't have matplotlib etc. installed can view the code and the generated output simply by viewing them via Github's automatic Jupyter notebook rendering, given there are saved versions of the matplotlib output in the notebooks. |
I've pushed another commit which stores the cached matplotlib plot outputs as SVG instead of PNG since the PNGs looked really 'fuzzy/soft'. Take a look at the notebooks at - https://github.com/seanmcleod70/jsbsim/tree/ThrustVectoringExample/examples/python to see what the plot outputs look like now as SVG renderings. So @agodemar when you post links now we'll have much better looking plots 😉 |
README.md
Outdated
|
||
The [examples/python](https://github.com/JSBSim-Team/jsbsim/tree/master/examples/python) directory contains a number of example Python based scripts embedded in Jupyter notebooks demonstrating the use of JSBSim to determine and analyse aircraft performance. | ||
|
||
- [AoA vs CAS.ipynb](https://github.com/JSBSim-Team/jsbsim/blob/master/examples/python/AoA%20vs%20CAS.ipynb) calculates and plots the AoA versus CAS for level trim for a range in aircraft weight, altitude and cg. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explain the meaning of the acronyms (AoA = Angle of Attack, CAS=Calibrated Air Speed, cg=center of gravity, etc.)
There was a problem hiding this comment.
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 spelling out the acronyms. I did sort of assume that users of JSBSim would know these already 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you, but I think we should avoid using acronyms and technical jargon, at least in the README file. Since it's our homepage, it shouldn't intimidate potential users who don't have an aeronautical background — I'm particularly thinking of game developers who might want to use JSBSim with the Unreal Engine.
Spell out acronyms for AoA, CAS and cg.
Looks good to me. |
Based on a user asking how to make use of thrust vectoring in JSBSim in - #1279