admin管理员组

文章数量:1026989

I'm trying to simulate a 2-stage rocket, and in RocketPy there is not a built-in method to do this yet.

To simplify this issue: I am trying to start a second simulation at the ending point of the first with the same speed, position, etc. I am trying to use the parameters in the "Flight" class that may allow me to give the rocket the state vector from the previous stage (velocity in x,y and z planes, position etc):

Flight.initial_solution (list) – List defines initial condition - [tInit, x_init, y_init, z_init, vx_init, vy_init, vz_init, e0_init, e1_init, e2_init, e3_init, w1_init, w2_init, w3_init]

The RocketPy documentation even specifies that you should be able to do this; to quote:

initial_solution (array, Flight, optional) –

Initial solution array to be used. Format is:

initial_solution = [
    self.t_initial,
    x_init, y_init, z_init,
    vx_init, vy_init, vz_init,
    e0_init, e1_init, e2_init, e3_init,
    w1_init, w2_init, w3_init
]
If a Flight object is used, the last state vector will be used as initial solution. If None, the initial solution will start with all null values, except for the euler parameters which will be calculated based on given values of inclination and heading. Default is None.

I have input some basic values like all zeroes. Some values are fine with any inputs, but others cause the whole program to stall indefinitely.

Let me know if you have any ideas what the issue could be or how I could solve this. Thanks!

P.S., I should mention that I have checked out this very useful link on github (.py) but I have been unable to replicate it in a similarly effective way.

I'm trying to simulate a 2-stage rocket, and in RocketPy there is not a built-in method to do this yet.

To simplify this issue: I am trying to start a second simulation at the ending point of the first with the same speed, position, etc. I am trying to use the parameters in the "Flight" class that may allow me to give the rocket the state vector from the previous stage (velocity in x,y and z planes, position etc):

Flight.initial_solution (list) – List defines initial condition - [tInit, x_init, y_init, z_init, vx_init, vy_init, vz_init, e0_init, e1_init, e2_init, e3_init, w1_init, w2_init, w3_init]

The RocketPy documentation even specifies that you should be able to do this; to quote:

initial_solution (array, Flight, optional) –

Initial solution array to be used. Format is:

initial_solution = [
    self.t_initial,
    x_init, y_init, z_init,
    vx_init, vy_init, vz_init,
    e0_init, e1_init, e2_init, e3_init,
    w1_init, w2_init, w3_init
]
If a Flight object is used, the last state vector will be used as initial solution. If None, the initial solution will start with all null values, except for the euler parameters which will be calculated based on given values of inclination and heading. Default is None.

I have input some basic values like all zeroes. Some values are fine with any inputs, but others cause the whole program to stall indefinitely.

Let me know if you have any ideas what the issue could be or how I could solve this. Thanks!

P.S., I should mention that I have checked out this very useful link on github (.py) but I have been unable to replicate it in a similarly effective way.

本文标签: