1

I'm having a problem with the insertion from a LEO orbit into a moon orbit/ moon flyby in my gravity simulator. I use the calculations listed below. I think it is due to the fact that the moon pulls the object inwards as it gets to the moon, which has to be compensated for, though sadly I do not know how to tackle this problem. I got the formulas from StackExchange page
So far I have tried to calculate the gravitational potential energy of the insertion orbit, though not having any luck. I have tried manually adding a bit of deltav and got to see that about 5-16 would do the trick, depending on target altitude.
Would anyone have a good way of correcting for the moon's pull in the transfer calculation?
Images:
NOTE: the first two images are relative to the moon.
Simulation near moon
Simulation Earth and Moon Simulation Earth and Moon from Earthh POV
Calculations:
insertionheight = injected radius from moon (+moon.radius)
R1 = radius to LEO (from earth)
R2 = radius to Moon Orbit (from earth) + insertionheight
vLEO = Math.Sqrt((G * earh.mass) / R1)
vP = Math.Sqrt((2 * (R2-insertionheight) * G * relativeobj.mass) / (R1 * (R1 + R2-insertionheight)))
vInject = vP - vLEO
vLLO = Math.Sqrt((G * targetobj.mass) / (insertionheight))
vM = Math.Sqrt((G * relativeobj.mass) / (R2 - insertionheight))
vA = Math.Sqrt((2 * R1 * G * relativeobj.mass) / (R2 * (R1 + R2)))
vL = Math.Sqrt(Math.Pow(vM - vA, 2) + (2 * G * targetobj.mass) / (insertionheight))
vInsert = vL - vLLO
TOF = pi * Math.Sqrt(Math.Pow((R1 + (R2-insertionheight))/2.0, 3) / (relativeobj.mass*G))

The same but as typed in C#:

double R1 = (movedobj.location.placevector - relativeobj.location.placevector).Length;//Math.Sqrt(Math.Pow(movedobj.location.placevector.X - relativeobj.location.placevector.X, 2) + Math.Pow(movedobj.location.placevector.Y - relativeobj.location.placevector.Y, 2) + Math.Pow(movedobj.location.placevector.Z - relativeobj.location.placevector.Z, 2));
double insertionheight = 200000 + 1737000;
double R2 = (targetobj.location.placevector-relativeobj.location.placevector).Length + insertionheight;//Math.Sqrt(Math.Pow(targetobj.location.placevector.X - relativeobj.location.placevector.X, 2) + Math.Pow(targetobj.location.placevector.Y - relativeobj.location.placevector.Y, 2) + Math.Pow(targetobj.location.placevector.Z - relativeobj.location.placevector.Z, 2)) ;

double vLEO = Math.Sqrt((G * relativeobj.mass) / R1);
double vP = Math.Sqrt((2 * (R2) * G * relativeobj.mass) / (R1 * (R1 + R2)));
double vInject = vP - vLEO;
double vM = Math.Sqrt((G * relativeobj.mass) / (R2));
double vA = Math.Sqrt((2 * R1 * G * relativeobj.mass) / ((R2) * (R1 + R2)));
double vLLO = Math.Sqrt((G * targetobj.mass) / (insertionheight));
double vL = Math.Sqrt(Math.Pow(vM - vA, 2) + (2 * G * targetobj.mass) / (insertionheight));
double vInsert = vL - vLLO;
double TOF = pi * Math.Sqrt(Math.Pow((R1 + (R2- insertionheight))/2.0, 3) / (relativeobj.mass*G));
double ttransfer = (2 * pi - (pi - Math.Sqrt(G * relativeobj.mass / Math.Pow(R2, 3)) * TOF)) / (2*pi / ((2 * pi * R1) / (Math.Sqrt(G * relativeobj.mass / R1))) - 2 * pi / (2 * pi * R2 / (Math.Sqrt(G * relativeobj.mass / R2))));

Thanks all in advance.

Stijn
  • 19
  • 3
  • Cool images, but can you express an actual question using a sentence that ends in a question mark? Try to be as specific as possible in describing what you need from an answer. Also, are you using any propulsive maneuvers during Lunar approach to slow your craft down in order to be captured into orbit? Try to explain more clearly exactly what you are doing, and exactly what you expect to happen. – uhoh Jun 02 '18 at 02:40
  • As can be seen in the calculations part, it calculates the first and second hohmannn transfer deltavs + the time taken to travel from burst1 -> burst2 + when to initiate burn (ttransfer). When it gets close to the moon, (where it gets too close due to moon's graviry) it will initiate the second burn to slow down towards the moon. – Stijn Jun 02 '18 at 06:23
  • 2
    I'm recommending you clarify your question and make it easier for other people to read and see all of the information, so that you chances of getting an answer will improve. I'd recommend you make changes to the post, not just say "it's already there" in comments. Good luck! – uhoh Jun 02 '18 at 12:29
  • 1
    I'm voting to close as "unclear what you are asking" because I can not figure out what you are asking. If someone else can understand, they'll leave a comment explaining, or they'll edit your question to clarify it. Right now I don't see any clear definition of a "burst" or a "burn", and despite the nice plots, no effort to clearly explain what you are doing. fyi "I have tried manually adding a bit of deltav and got to see that about 5-16 would do the trick, depending on target altitude." isn't clear to me at all. Anyone else? – uhoh Jun 07 '18 at 03:00
  • "Would anyone have a good way of correcting for the moon's pull in the transfer calculation?" Well, what's wrong with it? How would you like it corrected? – Rikki-Tikki-Tavi Jun 07 '18 at 09:17
  • OK, so you're trying to use the patched conics approximation from the linked answer. Have you tested your code by "Plugging in the numbers, and assuming 200 km LEO and 100 km LLO altitudes, [you] get vInject=3.13 and vInsert=0.82" ? On what basis are you calculating TTransfer? the final orbit will be VERY sensitive to this decision –  Jun 07 '18 at 13:46
  • @Rikki-Tikki-Tavi, as seeable in the picture, it touches the moon very close to the centre of mass, even though there is an insertion height of the radius + 200000 – Stijn Jun 07 '18 at 14:11
  • In your simulator, is the moon's orbit elliptical? you appear to have calculated your injection burn based on the moons location at the time of the burn, not at the time of intercept –  Jun 07 '18 at 14:12
  • @JCRM Yes, I get the right vInject and vinserts. It calculates the ttransfer by calculating the required angle between two bodies, which it then turns into time by dividing this angle by the deltaangle/s (all planets are lined up on the same line at start) – Stijn Jun 07 '18 at 14:22
  • again, if the moons orbit is elliptical, that will adjust the angle swept during the TOF –  Jun 07 '18 at 14:37
  • It is round, not eliptical. – Stijn Jun 07 '18 at 14:58
  • to check your calculations, try reducing the target mass to 1 kg - this should all but remove any gravitational impact the moon has. if it looks right after doing this, then you probably need to adjust your injection burn time to happen a little later - the moon will pull the vehicle a little anticlockwise, so you will need to be a little further round - but I'm surprised it makes this much difference - but as the ISS is quite heavy that may account for it. –  Jun 08 '18 at 06:18
  • also, how long is your injection burn? –  Jun 08 '18 at 06:19

0 Answers0