-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
ENH: Add Eccentricity to Stochastic Simulations #792
ENH: Add Eccentricity to Stochastic Simulations #792
Conversation
the wind factor wasn't applied to the env.wind_velocity properties
It showed the nominal and the standard deviation values and it doesn't make sense in a uniform distribution. In a np.random.uniform the 'nominal value' is the lower bound of the distribution, and the 'standard deviation' value is the upper bound. Now, a new condition has been added for the uniform distributions where the mean and semi range are calculated and showed. This way the visualize_attribute function will show the whole range where the random values are uniformly taken in
Co-authored-by: MateusStano <69485049+MateusStano@users.noreply.github.com>
A bug has been corrected in Flight class and an enhancement has been performed in the Rocket class as well
eccentricity_y was defined by x coordinate and eccentricity_x was defined by y coordinate
There are also changes related to another PR: BUG: fix the wind velocity factors usage and better visualization of uniform distributions in Stochastic Classes #783 |
I'm not passing the tests because you consider it valid that Anyway, even if you still want to mantain your nomenclature, there's still a BUG in |
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.
LGTM, just need to check if the stochastic_model file is correctly set here
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #792 +/- ##
===========================================
- Coverage 79.48% 79.31% -0.18%
===========================================
Files 96 96
Lines 11504 11537 +33
===========================================
+ Hits 9144 9150 +6
- Misses 2360 2387 +27 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Pull request type
Checklist
black rocketpy/ tests/
) has passed locallypytest tests -m slow --runslow
) have passed locallyCHANGELOG.md
has been updated (if relevant)Current behavior
Currently, it isn't possible to add CP and thrust eccentricities to the
StochasticRocket
class. As a result, these eccentricities can't be evaluated in the Monte Carlo simulations.I also found out a BUG related to thrust eccenticities in the
Rocket
andFlight
classes!!!New behavior
Rocket class:
I updated the documentation for the
add_cm_eccentricity
,add_cm_eccentricity
andadd_thrust_eccentricity
functions to better clarify that these eccentricities are relative to center of DRY mass.BUG in
add_thrust_eccentricity
function:self.thrust_eccentricity_y
was incorrectly assigned using thex
coordinate andself.thrust_eccentricity_x
using they
coordinate.Flight class:

BUG: The moments due to thrust eccentricity were miscalculated. They should be computed as follows:
StochasticRocket class:
Two new functions have been introduced:
add_cp_eccentricity
andadd_thrust_eccentricity
. These allow for defining a probabilistic distibution for their values. If not used, eccentricities remain undefined. If no inputs are provided, they default to the values used in the deterministic rocket. A new function_validate_eccentricity
function was created to validate eccentricity inputs.A new
_create_eccentricities
fucntion was implemented to generate random eccentricity values. These values are then assigned to the sample rocket in thecreate_object
function.Breaking change