python - Rocketpy - How can I give my rocket Flight its starting state vector (x,y,z coordinates and velocities)? - Stack Overfl

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

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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745108116a4611680.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信