OHM Lagrange MFD

OrbitHangar

Addon Comments
Joined
Apr 9, 2008
Messages
3,832
Reaction score
13
Points
0
Lagrange MFD is a tool for visualizing motion in a rotating reference frame. Typical 3-body phenomena, like the Lagrangian points, and some exotic orbit shapes, can be observed with this MFD. Version 0.5 shows the two reference bodies, the vessel and an optional target, and a trace of their past positions. The MFD is far from complete, so feel free to make improvements.

[ame=http://www.orbithangar.com/searchid.php?ID=3644]More...[/ame]
 

flying coffin

Member
Joined
Dec 7, 2007
Messages
194
Reaction score
0
Points
16
Can you use this to plot a course along the Interplanetary Superhighway?
If so how? I set Ref 1 and 2 to earth and moon, and I see 2 white dots and one
green one. I don't see any lines which might represent a possible course.
 

Enjo

Mostly harmless
Addon Developer
Tutorial Publisher
Donator
Joined
Nov 25, 2007
Messages
1,665
Reaction score
13
Points
38
Location
Germany
Website
www.enderspace.de
Preferred Pronouns
Can't you smell my T levels?
Lagrange MFD !!! Finally ! Thanks man :)

[EDIT]
Yeah, any plans to add planning? :)
 

cjp

Addon Developer
Addon Developer
Donator
Joined
Feb 7, 2008
Messages
856
Reaction score
0
Points
0
Location
West coast of Eurasia
There's at least one extra thing I'd like to see/add in this add-on: the Lagrange points themselves. Maybe display all five of them, or at least the possibility to see the distance and direction to one of them, and a velocity indicator. Should make it easier to reach a Lagrange point very accurately.

I don't know about this superhighway. Sounds complicated. I don't have plans yet for trajectory prediction.
 

Peskie

New member
Joined
Oct 7, 2008
Messages
41
Reaction score
0
Points
0
Location
Southern Ontario
Lagrange point display/navigation?

:speakcool: I actually started to write something similar (without the graphics tho).

I hacked on the source a bit to add two buttons, the first toggles display of a Lagrange point (i.e. none -> L1 -> L2 -> L3 -> L4 -> L5 -> none; but I don't have L4&L5 there yet) as a fixed white dot at the correct (or close) location. The other button adds/removes a fake vessel (using the LaunchMFD-Probe fake vessel) to the location of the selected Lagrange point and keeps it there by updating the vessel state every update (only while the MFD is displayed, need to move it out of the MFD update routine).

I had hoped this would make it easy(er) for me to get to the Earth-Moon L1 point which I had tried and failed to get to several times. It allowed me to get close-ish using Attitude MFD (IMFD didn't like the vessel's "orbit") but without the scenario editor (setting a vessel to the same state as the fake vessel) I still wasn't able to get closer than ~10km and I was never able to get the correct velocity to stay there for any length of time.

My code is just blindly updating the fake vessels position relative to the ref2 body with a relative velocity vector of all zeros... it looks like I'd actually need to approximate the actual relative velocity vector to allow tools to correctly target the fake vessel. Without that AttitudeMFD and the default docking display give erronous information about velocity (e.g. AttitudeMFD shows an incorrect relative velocity and cannot be used to null velocity; DockingMFD/HUD shows an incorrect velocity vector but a correct-ish closing rate in the MFD, although the value jumps around).

Could such features be added to the real LagrangeMFD but done properly to help people like me get to the L1, L2, and L3 points (the L4 and L5 points are fairly easy to get to with IMFD's offset capability).

Speaking of which, is there a technique someone can share to get to the Earth-Moon L1 point (or an orbit around it) which requires only small station-keeping to maintain? Is it even possible in Orbiter?
 

cjp

Addon Developer
Addon Developer
Donator
Joined
Feb 7, 2008
Messages
856
Reaction score
0
Points
0
Location
West coast of Eurasia
Could such features be added to the real LagrangeMFD but done properly to help people like me get to the L1, L2, and L3 points (the L4 and L5 points are fairly easy to get to with IMFD's offset capability).

Are your own modifications good enough to be used, or do you think they need to be re-done in a 'proper' way?

For reaching and maintaining a Lagrange point, you don't just need the right position, you also need the right velocity. The right velocity is the one that gives you zero velocity in the rotating reference frame.

For L4 and L5 this is easy, because, for very asymmetric reference body pairs, it basically puts you in the same orbit as the lighter body around the heavier body. For the other points, it is more difficult.

My plan was to make some kind of velocity indicator for the velocity in the rotating reference frame. Maybe with some kind of arrow to indicate the direction in the orbital plane.

I think I'll just ignore the third dimension. I'll leave it the responsibility of the pilot to stay in the right orbital plane.
 

Peskie

New member
Joined
Oct 7, 2008
Messages
41
Reaction score
0
Points
0
Location
Southern Ontario
Are your own modifications good enough to be used, or do you think they need to be re-done in a 'proper' way?

See for yourself: http://www.sentex.ca/~dchapes/Lagrange.diff

I just hacked it in for my own use. Issues you'll notice:

* indentation; I used spaces because I can't stand ts=4
* position calculations; I'm probably off but it was close enough for my use, no idea if L3 is remotely correct, no attempt at L4 and L5
* lack of velocity calculations; I'd only be able to do this by looking at the position deltas from the fake vessel position updates; calculating it directly would be more accurate but is beyond my current knowledge
* updates of fake vessel position are done from MFD::Update, this should be moved to opcPreStep (IMHO so should the existing tracking code updates so that the tracks keep updating even if the MFD isn't current displayed)
* The fake vessel is created as LaunchMFD-Probe, [ame="http://www.orbithangar.com/searchid.php?ID=2802"]Launch MFD - v 1.2.8[/ame] this is just a mesh (apparently transparent) and a small *.cfg file. Using this allows for it to show up with F9 and to be used as a target with any other MFD but your own mesh and config file should be used.
* When the scenario is saved but the MFD state is not (e.g. the MFD is not currently active) then the LaunchMFD-Probe vessel is saved in the scenario but orphaned; this most likely will screw up the function of the createMarker() after loading the scenario... either createMarker() should use a new vessel name or just assume it can destroy any vessel with the same name...

For reaching and maintaining a Lagrange point, you don't just need the right position, you also need the right velocity. The right velocity is the one that gives you zero velocity in the rotating reference frame.

I knew that. I just didn't realise that moving a vessel by updating it's rpos state but zeroing rvel wouldn't allow me to use something like AttitudeMFD to sync velocities once close. :fool:

For L4 and L5 this is easy, because, for very asymmetric reference body pairs, it basically puts you in the same orbit as the lighter body around the heavier body. For the other points, it is more difficult.

I didn't bother with L4&L5 because I've been able to get close to these in the past using just the offset feature of IMFD. Although it was only close and I wasn't sure if I was just in a random orbit with the same radius as the ref2 orbit or was actually at L4. From what I've read I think L4 lies slighly outside the orbit of ref2.

Thanks for a cool MFD!
 

pattersoncr

Tutorial Publisher
Tutorial Publisher
Joined
Oct 17, 2007
Messages
417
Reaction score
3
Points
0
Location
Eastern PA
...I didn't bother with L4&L5 because I've been able to get close to these in the past using just the offset feature of IMFD. Although it was only close and I wasn't sure if I was just in a random orbit with the same radius as the ref2 orbit or was actually at L4. From what I've read I think L4 lies slighly outside the orbit of ref2.

Thanks for a cool MFD!

I've done that myself with IMFD offset.
My understanding was that L4 & L5 were more regions than points.
 

cjp

Addon Developer
Addon Developer
Donator
Joined
Feb 7, 2008
Messages
856
Reaction score
0
Points
0
Location
West coast of Eurasia
From what I've read I think L4 lies slighly outside the orbit of ref2.

Yes, when looking at the orbit around the barycenter.
No, when looking at the orbit around one of the bodies.

The two bodies and L4 (or L5) make an equilateral triangle with angles of exactly 60 degrees. So, the distance from the L4/L5 point to one body is exactly equal to the distance between the bodies.

Thanks for a cool MFD!
Does this make me a real add-on developer? I think I'll PM Tex to get me that orange thing. :hotcool:
 

sputnik

Addon Developer
Addon Developer
Donator
Joined
Apr 3, 2008
Messages
424
Reaction score
0
Points
31
Location
Palmdale
Website
www.worldof2001.com
Very cool! This one's a keeper!

I would very much like to see the Lagrange points plotted.

It would also be nice to have some predictive capability; perhaps a few dots ahead of your spacecraft to show predicted future position? I realize this is a lot harder.
 

cjp

Addon Developer
Addon Developer
Donator
Joined
Feb 7, 2008
Messages
856
Reaction score
0
Points
0
Location
West coast of Eurasia
I released an update for Lagrange MFD. Now the Lagrange points are visible, and also the velocity in the rotating reference frame. You should in theory stay at a Lagrange point when that velocity is zero, but I found this not to work in the Earth+Moon system (I also tried Pluto+Charon, but that doesn't have stable L4+L5 anyway). I think it is because the Moon's orbit's eccentricity, but another possibility is there might be a bug in the way how I calculate the velocity.
 

Fixerger

Member
Joined
May 24, 2009
Messages
163
Reaction score
1
Points
18
I released an update for Lagrange MFD. Now the Lagrange points are visible, and also the velocity in the rotating reference frame. You should in theory stay at a Lagrange point when that velocity is zero, but I found this not to work in the Earth+Moon system (I also tried Pluto+Charon, but that doesn't have stable L4+L5 anyway). I think it is because the Moon's orbit's eccentricity, but another possibility is there might be a bug in the way how I calculate the velocity.

Thanks for that nice MFD! I've tried it on 2010 beta at provided L4 scenario point and it was quite stable... with nice halo orbit. Can you add some navigation ability to points? It's really hard to maintain :p
 

Michael_Chr

New member
Joined
Jul 16, 2013
Messages
153
Reaction score
0
Points
0
Location
Virklund
I know I'm beating on an old horse here...since this topic has been discussed a lot and - as I understand it there are presently no way or method (other than trial and error -perhaps) of navigating to a lagrangian point in orbiter2010. So...Looking at this MFD utility...is there a point Im not getting?
Can this give you the correct burn vectors to have you arrive at a LG point?
I can see in the MFD that you can setup a TGT (there is a TGT button)- but I cant figure the dialogue out. I understand the RF1 and RF2 (Earth-Moon - for instance if using that Two body system) but what can I setup as TGT - one of the LG points? and what do I enter.
Finally... I guess all the velocity "dials" in the top are referenced to the entire two-body system so when all "dials" are at or near zero then you are stationary in the two-body system i.e. are at a LG point?

Any hints as to setup a burn vector that can point me to the different LG points would also be appreciated.

Best regards
Michael
 

ADSWNJ

Scientist
Addon Developer
Joined
Aug 5, 2011
Messages
1,667
Reaction score
3
Points
38
News: Keithth and I have been working on a private project to create the ultimate LagrangeMFD. It currently lives as a very early alpha. It implements Keith's 4th Order Symplectic Integrator for an arbitrary number of objects in a Lagrangian System, including barycenters and multiple vessels.

I have the S4 integration engine running in an async worker thread, plus the LP calculations, the encounter distance and dV, and the orbital plots all working. Typical worker iteration cycles are ~100ms for a 30 day projection as 30secs resolution, and the engine looks good for over a year's projection (e.g. of the Sun-Earth-L2 point).

Currently working on the planning mode, which will insert a dV impulse into the flight path like a TransX maneuver mode. Next will be the auto-center/auto-burn capability, and station-keeping at the LP. Then finally lots of user-customization options.

No ETA yet for the completed project, but PM me if interested in working with the alpha.
 

jgrillo2002

Conservative Pioneer
Addon Developer
Joined
Mar 17, 2008
Messages
755
Reaction score
17
Points
33
Location
New York State
News: Keithth and I have been working on a private project to create the ultimate LagrangeMFD. It currently lives as a very early alpha. It implements Keith's 4th Order Symplectic Integrator for an arbitrary number of objects in a Lagrangian System, including barycenters and multiple vessels.

I have the S4 integration engine running in an async worker thread, plus the LP calculations, the encounter distance and dV, and the orbital plots all working. Typical worker iteration cycles are ~100ms for a 30 day projection as 30secs resolution, and the engine looks good for over a year's projection (e.g. of the Sun-Earth-L2 point).

Currently working on the planning mode, which will insert a dV impulse into the flight path like a TransX maneuver mode. Next will be the auto-center/auto-burn capability, and station-keeping at the LP. Then finally lots of user-customization options.

No ETA yet for the completed project, but PM me if interested in working with the alpha.
Very interesting. This will hopefully make those missions like Genesis easier to get to L1,etc.
 

ADSWNJ

Scientist
Addon Developer
Joined
Aug 5, 2011
Messages
1,667
Reaction score
3
Points
38
Here's a couple of teaser from the alpha code test bed:

YlZSc7u.jpg


On the ORBIT mode, the Green plot is the vessel trajectory, from Earth out to the EML1 Lagrange Point (purple dashes), with the Moon behind (yellow). The Circles on the plot are the closest approach to EML1. On the LP mode, you can see current and encounter position and dV, with a projected encounter time almost 400,000 seconds from now.

Some time later, and I've circularized at the EML1 point, and changed the integrator to plot a full orbit. For fun, I gave it a bit more prograde, such that the orbit becomes decidedly non-Keplerian!

X5Cj7U2.jpg


The green trace here is really calculated, not just scribbled on by a 5 year old!! I think we are going to have fun with this utility.

Due to be released on a Tuesday at some point in the future!
 
Top