Jump to content

A possible Lagrange point workaround.


Recommended Posts

The necro'd thread from earlier got me thinking about it.

Accepted that we can't do N-body physics, we can't duplicate full Lagrangian behavior. BUT we could do a simplified one using the existing sphere of influence setup to mimic the most important aspect.

330px-Lagrange_points2.svg.png

First, we introduce a small sphere of influence with a very tiny gravitational pull (near Null). Like only 100km radius. We set these at each of the locations where all five lagrange points are supposed to occur, and then set them on rails to the correct orbital period to match that of the Mun. Once a craft enters these areas, the speed will be relative to the Lagrange point and the goal will be to come to a dead stop within. Getting into them would be difficult due to the relative size of the sphere of influence, but once accomplished, you wouldn't have to worry about warp drift. Since this would be near the same orbital speed at that altitude for L3, L4, and L5, nothing else would need to happen.

For L1 and L2, you would need to add a second, slightly larger sphere of influence with an inverse gravitational field, but still centered on the Lagrange point. One that pushes out away from the center and gets weaker the closer you get to the near null zone. Ideally, it would be right near or centered on the border of the mun's SOI so that once pushed out in that direction it would immediately enter the Mun's SOI.

This doesn't give us true Lagrangian gravitational topography, but it would mimic the basic behavior. Once in the Kergangian points, your could place stations and crafts which would remained in place. Move too far from the center point, and your craft would eventually be pushed back out into Kerbin's or the Mun's SOI.

Edited by BubbaWilkins
Link to comment
Share on other sites

There are several mods which add other planets and asteroids. Unless its impossible to do the inverse gravitational thing, it shouldn't be that hard to manage.

I'm pretty sure the devs said no to phantom bodies as a work around for Lagrange points.

Perhaps, I've only seen that they can't do n-body calcs. I haven't seen anything saying my method wasn't feasible.

Link to comment
Share on other sites

Phantom bodies wouldn't work as at the centre there would be a point of gravity in an infinitely small space (aka a black hole) This works fine for other planets as they have a surface to stop you getting their but this wouldn't be there for this.

I fell through the ground on minmus with a 300 part ship and started accelerating towards the center. As I got closer the acceleration approached infinity and the ship simply folded up once it got to close. This is what would happen if this was used as a Lagrange point.

(however if a black hole was ever added this would work pretty nicely. :))

Link to comment
Share on other sites

Phantom Bodies would theoretically have a radius of 0 and therefore the surface gravity would be the maximum gravity.

Also the concept of phantom bodies leaves me to believe they can become giant sinkholes for any debris dropped near them.

Link to comment
Share on other sites

Oh no, not this again.

You can simulate L4 and L5 - the only two truly stable Lagrangian points - quite easily. Just put your satellite on an orbit similar to the followed body, to the approximate point where L4/L5 would be, and make sure it has the same orbital period as the followed body. Voila, you have a satellite which moves around almost as if it was in Lagrangian point. In reality you need to do almost the same because the potential well at these points is rather shallow so you need to make sure your satellite in this point has the right energy too.

You can even pretend you have a satellite in L3, set up the same way - even though that'd be unrealistic because the rest of Lagrangian points are unstable - to keep a body there you need special kind of orbit, a KSP SOI would NOT create gravitational field even remotely similar to what is in these points.

Link to comment
Share on other sites

Oh no, not this again.

You can simulate L4 and L5 - the only two truly stable Lagrangian points - quite easily. Just put your satellite on an orbit similar to the followed body, to the approximate point where L4/L5 would be, and make sure it has the same orbital period as the followed body. Voila, you have a satellite which moves around almost as if it was in Lagrangian point. In reality you need to do almost the same because the potential well at these points is rather shallow so you need to make sure your satellite in this point has the right energy too.

You can even pretend you have a satellite in L3, set up the same way - even though that'd be unrealistic because the rest of Lagrangian points are unstable - to keep a body there you need special kind of orbit, a KSP SOI would NOT create gravitational field even remotely similar to what is in these points.

Lagrange points orbit the main planet the same as any other entity with one exception. The difference being that the share the orbiting period of the Moon/Mun and ignore the standard velocity/altitude equation. BUT, if implement as I have detailed above with a primary micro-gravity zone, once in the SOI of the Lagrange point the behavior would be near similar to that expect on the orbiting plane. It would require minimal energy to exit, and would hold steady while inside. If my L1 plan is implement, once you deviate from the core micro/null zone, you would be pushed out back towards the mun's or Kerbins SOI which is basically the same behavior.

I think this matches the general properties of the points without getting into the complicated physics involved trying to duplicate the actual gravitational topography of the zones. It also matches the simplified gameplay of KSP.

If I knew enough about modding the game, I would just do it and throw it out there for mod/testing assessment. But I think it's a bit beyond me as I haven't done any modding/coding in at least a decade.

Link to comment
Share on other sites

In addition, L-points are very much reliant on and/or affected by the other bodies in the planetary system. You can't "fake" that.

We fake everything else with gravity in the game. Fudging the numbers for L-Point orbits can work with a few hacks, and will be just as accurate as any other orbit we have in game currently.

Link to comment
Share on other sites

Lagrange points orbit the main planet the same as any other entity with one exception. The difference being that the share the orbiting period of the Moon/Mun and ignore the standard velocity/altitude equation. BUT, if implement as I have detailed above with a primary micro-gravity zone, once in the SOI of the Lagrange point the behavior would be near similar to that expect on the orbiting plane. It would require minimal energy to exit, and would hold steady while inside.

Lagrangian points (L1-L3) don't behave this way. If you put something in there, it will not stay there. It will escape. Because things near these Lagrangian points are accelerated along certain trajectories and decelerated along other trajectories. To keep things there, you cannot just put them there. You need to leave them on Lissajous orbits.

In my opinion the game is better without Lagrangian points.

Link to comment
Share on other sites

In my opinion the game is better without Lagrangian points.

How so? It would take effort for someone to actually place something at one, so anyone not trying for them isn't exactly going to notice much of an impact if any from one, and they would make placing a number of mission types possible that you can't really do without something that approximates them.

Link to comment
Share on other sites

One difficulty that hasn't been addressed here is how to keep the fake-Lagrange-point body in the right spot.

If you just set up a body using the current orbital mechanics system, it will have a certain relationship between the size of its orbit (Semi-major axis) and its orbital period. This relationship is based on 2-body physics: "fake Lagrange" SoIs would orbit their parent body just like any other planets/moons.

There is no Keplerian orbit around either Kerbin or Kerbol that will keep L1, L2, or L3 at the correct position: put it at the right position and its period will be wrong, give it the right period and its position will be wrong.

The properties of Lagrange points come from n-body dynamics, where n is greater than or equal to 3. Adding lagrange points isn't as simple as just adding another 2-body SoI. You would need to write a whole new subsystem in the orbital mechanics solver that keeps the lagrange points in the right spot. Writing a system that fakes 3-body positioning inside a 2-body solver would actually be more complicated than writing an n-body solver.

Lagrange points: No matter how often they get discussed, they still don't work in KSP and they're still not worth implementing.

Link to comment
Share on other sites

Are you sure, sal_vager?

The "on-rails" solver in KSP puts objects on rails, alright - Keplerian rails. Here is how you specify an object's orbit in KSP:

ORBIT
{
SMA = 76875.4600066045
ECC = 0.136808532664149
INC = 32.6082297441138
LPE = 91.4665699628126
LAN = 305.802690796769
MNA = 0.556028537338098
EPH = 19189976.1161395
REF = 3
OBJ = 0
}

There is no combination of those parameters that says: "Put this thing in circular Kerbol orbit, 100M meters inside Kerbin's orbit but with the same orbital period". If you want the same period and a circular orbit, then the radius must be equal to Kerbin's. If you want a different radius and circular, then the period must change.

You could set up L1 to be in retrograde Kerbin orbit with a period of exactly 1 year, and that would give you an object that stays on the line between Kerbin and Kerbol, appearing to orbit Kerbol inside Kerbin's radius. But it could only do so at a fixed orbital radius - the one corresponding to 1y period. This would, by definition, NOT be the same position as the true L1 point - it would be closer to Kerbin, since Kerbol's gravity is not being taken into account.

To have "on rails" lagrange points "always be in the right place", you would first need to build an entirely new set of rails. That's my point.

Link to comment
Share on other sites

It'd just be on rails Neil, so it'd always be in the right place :)

If you put them on rails in the correct orbit they will not be always in the right place. Both L4 and L5 are in a slightly higher orbit and therefor have a slower orbit.

403px-L4_diagram.svg.png

But since we're already 'faking' it you could of course put them in the same orbit as the planet and keeping them in the 'correct' position.

Edit: F! Got ninja'd by less than a minute.

Edited by Tex_NL
Link to comment
Share on other sites

I'm sure HarvesteR could alter it to suit, might invalidate existing saves though.

It could be altered, of course. Anything's possible with code.

My point is, it would not be trivial as the OP suggests. It would mean building a total hack job on top of an existing, elegant solver, to allow it to break its own rules. It would introduce bugs. It would be more difficult than writing a new n-body solver from scratch - building that is actually fairly easy, it's just that running it is computationally expensive.

My point is, it's a lot of work that just isn't worth it.

Link to comment
Share on other sites

There might be a hack that does not involve a complete re-write of the basic game engine.

Don't put the L-points on their own rails but instead put them on their parents rails with a distance and angle off-set.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...