- #1
Dustinsfl
- 2,281
- 5
The book Orbital mechanics by Curtis says that the function (I labeled M2evals) is monotonically increasing. However, at pi, I have a discontinuity and the graph jumps below the negative axis when it should continue on; that is, the e = 0 should be the line y = x.
Here is the plot:
where the plot jumps down it is supposed to be shifted up to meet the first half.
What is wrong?
http://img96.imageshack.us/img96/5397/pfquestion.png
Code:
import pylab
import numpy as np
e = np.arange(0.0, 1.0, 0.15).reshape(-1, 1)
nu = np.linspace(0, 2 * np.pi, 50000)
M2evals = (2 * np.arctan(((1 - e) / (1 + e)) ** 0.5 * np.tan(nu / 2)) -
e * (1 - e ** 2) ** 0.5 * np.sin(nu) / (1 + e * np.cos(nu)))
fig2 = pylab.figure()
ax2 = fig2.add_subplot(111)
for Me2, _e in zip(M2evals, e.ravel()):
ax2.plot(nu.ravel(), Me2, label = str(_e))
pylab.legend()
pylab.xlim((0.0, 7.75))
pylab.ylim((-np.pi, np.pi))
pylab.savefig('eccentrueanomfunc.eps', format = 'eps', dpi = 1000)
pylab.show()
Here is the plot:
where the plot jumps down it is supposed to be shifted up to meet the first half.
What is wrong?
http://img96.imageshack.us/img96/5397/pfquestion.png
Attachments
Last edited by a moderator: