Closed joelgeorgem closed 5 years ago
Dear Sir, I will write them as separate functions. I made little changes in the same code offline and inputted the r1, r2 values which we got in the algorithm mentioned in the book to the Prussings algorithm as we discussed yesterday. I have attached the comparison. Only for some values of r1 r2 the Prussing algorithm gave output. And at the discontinuity point, the target and chaser are closer by a large margin than before. Comparision for same values of r1 r2.xlsx
While analyzing the code I found that fzero function stops whenever it encounters a complex value. But sometimes, in the Prussing algorithm, the Function starts of with a complex value but becomes a real value as the iteration goes by. In this case, when Fzero is used, it just stops the iteration in the beginning, thus not finding a real solution which will come further down the iteration process. Thus I checked the Prussings algorithm using fsolve and the output tcoast vs tmin graph now had many data points than before and as the book method, this was also discontinuous. I have attached the data here for the Prussing and the Book Algorithm when fzero and fsolve is used along with their graphs. position data.xlsx
Sir, Shall I also make the lambert function to give the orbital parameters of the transfer orbit?
A reliable Lambert subroutine will be available over the internet.
Perhaps SPG4 itself will have it?
Compare our subroutines with one of them.
If using fslove
appears to be a problem, then revert back to using Newton's iteration.
We need to get the lambert function working.
Make the other method also a function of the same form:
[v1 v2] = lambert(r1,r2,dt)
Both fucntions should give the same v1 and v2. If not, we need to find out why.