-
-
Notifications
You must be signed in to change notification settings - Fork 194
Bug/flight without rail buttons #383
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
Conversation
rocketpy/Flight.py
Outdated
@cached_property | ||
def __rail_buttons_alpha_angle(self): | ||
"""Alpha angle of the rail buttons, in radians. If there is no rail | ||
button, the function returns 0. See the rail buttons documentation to | ||
learn more about the alpha angle. | ||
""" | ||
try: | ||
alpha = self.rocket.rail_buttons[0].component.angular_position * ( | ||
np.pi / 180 | ||
) | ||
except IndexError: | ||
alpha = 0 # there's no rail button defined, use any alpha value | ||
return alpha |
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.
Alpha angle? What is this supposed to be?
Also this is not in the rail buttons documentation (I think....)
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.
Alpha is the angular position of the rail buttons.
I agree this could be better described
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.
Okay! I prefer if we just use angular_position
as the name of this
@@ -2531,7 +2508,7 @@ def retrieve_temporary_values_arrays(self): | |||
return temporary_values | |||
|
|||
@cached_property | |||
def calculate_rail_button_forces(self): | |||
def __calculate_rail_button_forces(self): |
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.
Any reason to make this private?
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 just did not want to allow user to get the whole tuple of 4 Function objects.
- The return is a tuple of 4 elements describing the forces in the rocket coordinates system. This needs to be converted to "rail button" reference system. If we don't convert, we can't call it shear or normal force. I don't think it would be good if we set this "intermediate" result as public.
Pull request type
Please check the type of change your PR introduces:
Pull request checklist
Please check if your PR fulfills the following requirements, depending on the type of PR:
Code base additions (for bug fixes / features):
black rocketpy
) has passed locally and any fixes were madepytest --runslow
) have passed locallyWhat is the current behavior?
What is the new behavior?
Does this introduce a breaking change?
Other information