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.
本文标签:
版权声明:本文标题:python - Rocketpy - How can I give my rocket Flight its starting state vector (x,y,z coordinates and velocities)? - Stack Overfl 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745108114a2134848.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论