@ Julioの優れた答えは、飛行経路の角度を記述し、それが接線方向中心体に対する半径方向のベクトル)および現在の速度ベクトルを含む。
私は最初にこの式から角度を取得しようとしましたが、明らかに間違っています。なぜなら$ arccos
$は偶数関数であり、角度は$ – pi/2 $から$ pi/2 $に行くことができるからです。
– frac { pi} {2} { mathbf { text
{(間違っています!)} $$
私は、GM($ mu $)とSMA($ a $)の統一軌道と0.2から1.8の開始距離を統合しました。それは期間を常に$ 2
pi $にします。私の機能の結果をプロットすると、私はあまりにも多くの揺れを取得します。
状態ベクトルから出発して正しい飛行経路角γを得るためにどのような式を使用できますか?
誤った部分のための改訂されたPythonは評価されるだろうが、確かに答えに必要ではない。
def deriv(X, t):
x, v = X.reshape(2, -1)
acc = -x * ((x**2).sum())**-1.5
return np.hstack((v, acc))
import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import odeint as ODEint
halfpi, pi, twopi = [f*np.pi for f in (0.5, 1, 2)]
T = twopi
time = np.linspace(0, twopi, 201)
a = 1.0
rstarts = 0.2 * np.arange(1, 10)
vstarts = np.sqrt(2./rstarts - 1./a) # from vis-viva equation
answers = []
for r, v in zip(rstarts, vstarts):
X0 = np.array([r, 0, 0, v])
answer, info = ODEint(deriv, X0, time, full_output= True)
answers.append(answer.T)
gammas = []
for a in answers:
xx, vv = a.reshape(2, 2, -1)
dotted = ((xx*vv)**2).sum(axis=0)
rabs, vabs = [np.sqrt((thing**2).sum(axis=0)) for thing in (xx, vv)]
gamma = np.arccos(dotted/(rabs*vabs)) - halfpi
gammas.append(gamma)
if True:
plt.figure()
plt.subplot(4, 1, 1)
for x, y, vx, vy in answers:
plt.plot(x, y)
plt.plot(x[:1], y[:1], '.k')
plt.plot([0], [0], 'ok')
plt.title('y vs x')
plt.subplot(4, 1, 2)
for x, y, vx, vy in answers:
plt.plot(time, x, '-b')
plt.plot(time, y, '--r')
plt.title('x (blue) y (red, dashed)')
plt.xlim(0, twopi)
plt.subplot(4, 1, 3)
for x, y, vx, vy in answers:
plt.plot(time, vx, '-b')
plt.plot(time, vy, '--r')
plt.title('vx (blue) vy (red), dashed')
plt.xlim(0, twopi)
plt.subplot(4, 1, 4)
for gamma in gammas:
plt.plot(time, gamma)
plt.title('gamma?')
plt.xlim(0, twopi)
plt.show()
This is a problem that has plagued groups of people very
knowledgeable about orbital dynamics but who learned using
different textbooks: there are two different definitions of
“flight path angle”!!
接線方向と速度ベクトルとの間の角度である$ gamma
$に加えて、半径方向と速度ベクトルとの間の角度。
使用している定義とは言わずに、「飛行経路の角度」と言うことがよくあります。混乱している!
(私はちょうど、Julioの答えの図も$ beta $を示していることに気づいた)
$ gamma $の代わりに$ beta $で作業すると、$ beta $は次のように与えられます。
$ { mathbf {r centerbot {}} { mathbf {r} | | mathbf
{v} |} right) tag {1} $$
これは0(「まっすぐ」)から$ pi $(「まっすぐ」)になります。 $ gamma/$を使用すると、
“straight up”は$ pi/2 $、 “straight down”は$ – pi/2 $です。 $ pi/2
$:
$ { mathbf {r centerdot v}} { mathbf {r} | | mathbf
{v} |} right) tag { 2} $$
これは
$ { mathbf {r centerdot v}} { mathbf {r} | | mathbf
{v} |} right) tag {3} $$
私はあなたの計算やプロットに使用した言語に精通していないので、あなたのアルゴリズムを見て、「あまりにも多くのウィグル」があるのを見ていません。