Closed Gui-FernandesBR closed 4 years ago
I agree with you completely in this one, @Gui-FernandesBR. Initially, I wanted to implement a set of new equations of motion which described the flight of the rocket with a single rail button still sliding along the rail.
However, the equations of motion have proven quite challenging and this will take a while to correctly derive, implement and test.
For the meantime, do you have any suggestions on how to mitigate this issue?
I made a pull request a few minutes ago and I believe the problem was already solved, at least until we implement a set of new equations of motion.
I created the 'effective1RL' attribute to be used as the new Rail length in all simulations. It discounts the distance between the nozzle exit and the upper button. However, the original rail length inserted by the engineer is still saved in another attribute.
Here's a copy of the script created:
upperRButton = max(self.rocket.railButtons[0])
lowerRButton = min(self.rocket.railButtons[0])
nozzle = self.rocket.distanceRocketNozzle
self.effective1RL = self.env.rL - abs(nozzle - upperRButton)
self.effective2RL = self.env.rL - abs(nozzle - lowerRButton)
Just for information purposes: the pull request being cited is #36.
@Gui-FernandesBR, did you replace all occurrences of self.env.rL
with self.effective2RL
in the Flight class? Or just the ones used to compute rail departure conditions?
By the way, perhaps outOfRailXxxxxx
should be renamed to railDepartureXxxxxx
.
@giovaniceotto , just the ones that follows this message:
# Check for out of rail event
However, I thought these were all occurrences of that variable in the Flight class...
Actually, I replaced self.env.rL with self.effective1RL
I agree with you to rename other variables. Indeed, I believe we should have two rail departure states.
I will close this issue since there is already another one about implementing the rest of code needed: #28.
From what I've known for so long using RocketPy (you can correct me if necessary), the rail departure time is assumed to be the time when the Rocket CM crosses the top of the Launch Rail. However, the main international rocket competition (SACup) defines rail departure time as "the first instant in which the launch vehicle becomes free to move about the pitch, yaw, or roll axis."[DTEG - SACUP]
I believe that we must make some changes to the Flight class so that the railDepartureTime variable be considered as the time that the upper button crosses the top of the rail.