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!