Orbiter-Forum Lambert Solver for Lagrange Points
 Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

 Math & Physics Mathematical and physical problems of space flight and astronomy.

 Thanked by:
 04-12-2018, 07:33 AM #2 Thorsten Orbinaut Not sure how your solver looks like in practice, but feel free to use the numerics of LEO Targeting for your needs (or to contribute to the code) - I'm currently at the point where I toyed some with the Earth/Moon Lagrange point dynamics and plan to expand on it. Basically it does fits over brute-force numerical trajectory computations with arbitrary perturbations (3rd body gravity, J2 and J3,...) Last edited by Thorsten; 04-12-2018 at 07:37 AM.
 04-12-2018, 07:57 AM #3 MontBlanc2012 Orbinaut Thorsten I haven't described the solver in detail in part because the maths is probably a little too much for most on this forum; and partly because setting out the details will take considerable effort. But, in brief: The solver is configured as a single-step very high-order symplectic discrete variational integrator using Gauss-Lobatto quadrature as per the procedure described by Marsden & West (Marsden & West 2001) reconfigured as the solution of a boundary value problem. In effect, this fits a high-order (near mini-max polynomial) to the motion of the satellite and, as such is capable of calculating the trajectory of a body in a arbitrarily complex gravitational field with machine precision over multiple orbits in a single time step. These integrators are fearsome and powerful beasts. The physical problem that is being modelled is the elliptical three-body problem in rotating, pulsating coordinates. In the vicinity of the Lagrange points, the equations of motion can be linearised and, in this case, and using the Marsden & West variational integrators, one can solve the two-point boundary problem in rotating coordinates using linear algebra after having specified the transfer time. For the purpose of this note, I have restricted attention to the linear approximation. But this linear solution can be used as starting-point for finding highly accurate solutions to the full, non-linear elliptical three-body boundary value problem. At the moment, the modelling and calculations are done in Mathematica. Although these can be ported to c/c++ without much effort, I'm not sure how this endeavour fits with your LEO targeting tool - although I'm sure that one could solve a multi-period perturbed Keplerian variant of the Lambert Solver for that case if one wanted to.
 04-12-2018, 09:16 AM #4 Thorsten Orbinaut Okay, then it really seems you don't need any of my code. Good job accessing an interesting problem!
 Thanked by:
 04-13-2018, 12:54 AM #5 ADSWNJ Scientist It would be interesting to see your solver mated with my LagrangeMFD. The code in LagrangeMFD is a 4th order symplectic integrator, well able to plot really eccentric orbits that you find around LP's, and able to do hypothetical burn predictions with really good accuracy over several thousand seconds. What it lacks is the ability to find burns into really beautiful orbits. An interesting solution would be to code your solver into an MFD, and then pipe results via ModuleMessaging into my utility to visualize the orbit and to execute the burns. It's non-trivial work though.
 Thanked by:
 04-14-2018, 01:03 PM #7 ADSWNJ Scientist It's such a shame that Dr Keith Gelling is no longer active in this forum. He would love to have discussed this topic. In terms of the mechanics of coding such a solution, you basically have two choices: code the Lambert Solver as a free-standing C++ executable, or code it as an MFD. In both cases, you need the solver to run in multi-threaded code, to unhook the deep calculation engine from the user interface. This technique is used in LagrangeMFD, so you can dial in a target calc time for its integrator - e.g. 2 seconds - without blocking the responsiveness of the Orbiter simulator - e.g. refreshing each 0.1 sec. Interested to see how you get on with this project!
 Thanked by:
 04-16-2018, 10:44 AM #8 cristiapi Orbinaut Quote: Originally Posted by MontBlanc2012  At the moment, the modelling and calculations are done in Mathematica. Although these can be ported to c/c++ without much effort, [...] My biggest effort, at the moment, is for the calculation of the Lagrange points. After the thread: https://www.orbiter-forum.com/showthread.php?t=38788 I found the NAIF files for the Lagrange points of the Sun-Earth system: https://naif.jpl.nasa.gov/pub/naif/g...agrange_point/ If I do all the calculations told me by perseus in that thread, I get very different results from NAIF. Is there any “standard” way to obtain an accurate position of L1, L2 and L3 for any system?
 04-16-2018, 11:57 AM #9 MontBlanc2012 Orbinaut Quote: Is there any “standard” way to obtain an accurate position of L1, L2 and L3 for any system? Not sure I followed perseus' comments fully, but the link referenced by dgatsoulis made a lot more sense to me. At the risk of a little plagiarism, the core of the calculation of the position of L1, say, is to solve the equation: for where: and . and where is the mass of the first gravitating body; and where is the mass of the first gravitating body. This expression is quite general and works for all restricted three-body systems. The rest of the note referred to by dgatsoulis uses this value to calculate the position of the L1 point in Orbiter's inertial reference frame. First, you have to calculate: The first of these is the eccentricity vector (and the length of which is the orbital eccentricity, ); the second is the set-major axis; and the third is the true anomaly of the elliptical orbit of the second gravitating body around the first gravitating body. In turn these quantities depend on the state vectors of the primary and secondary gravitating bodies - but you can always get this information by using an appropriate ephemeris calculator. If you work through calculations in dgatsoulis' referenced thread, it seems to me that you should be able to calculate the position of L1 (or L2 and L3) in the context of the elliptical restricted three-body problem with some precision.
 Thanked by:
 04-16-2018, 02:51 PM #10 cristiapi Orbinaut I tried to use the Keithth’s method, but it seemed overly complex to me and not good for the heavily perturbed systems (like Pluto and Jupiter). But now I coded the Keithth’s Lua snippet for the SPICE library; the result is good for the Sun-Earth system (the ERTBP L1 point is no more than 11000 km away from the L1 point obtained from the SPICE file). But what about ERTBP method in other systems? I thought to use the gravitational-centripetal accelerations method explained in the other thread because it seems an “always good” method, but it also seems that I don’t understand what happens in a Lagrange point, because the error in my calculations is too big. This is a very simple method because I just need to find a point where centrifugal acceleration = gravitational acceleration, is that correct?
 04-17-2018, 01:22 AM #11 MontBlanc2012 Orbinaut Cristiapi Strictly speaking, Lagrange points are only well-defined 'points' in the CR3BP and the ER3BP - i.e., only in specific classes of restricted three-body mathematical models. In a general n-body system, the Lagrange points do not (strictly speaking) exist since you will never get a stable point where gravitational and centripetal forces exactly cancel. However, if perturbations are weak enough we can still make use of notional Lagrange points. Take, for example, the Earth-Moon system which is quite heavily perturbed by solar tidal forces. Tidal forces fall of as 1/r^3 rather than the usual 1/r^2 - so, at the Earth-Moon system, solar tidal forces are quite weak but still strong enough to distort noticeably the Moon's orbit around the Earth. Here, it seems to me that mission designers use three-body concepts from the ER3BP to construct 'reference orbits'. In principle, if the Earth-Moon system were a true restricted three-body system then tiny amounts of dV would be required to remain 'on station' on the reference orbit. In practice, mission designers have to allow for the fact that the perturbations mean that the satellite has to do more work to stay on the reference orbit to counter the effect of the perturbations and so more dV is used. As the magnitude of the perturbations increases, the satellite has to do more and more additional work to stay on the reference orbit. And, at some point if perturbations are high enough, the concept of a Lagrange point and a reference point breaks down since the dV cost of staying on it is simply too high. At this point mission designers need to go back to the drawing board and work, I presume, with more general n-body calculations. wrt the position of L1 for the Sun-Earth system, are you using the state vectors of the Earth for your Lagrange point calculations or the state vectors of the centre of mass of the Earth and the Moon? Because the Sun-Earth L1 point is 1.5 million km from Earth, it is better to model the combined gravitational contribution of the Earth and the Moon as if it were emanating from a point source located at the centre of mass of the Earth-Moon system. Including the mass of the Moon in the calculations increases the mass of the secondary by about 1% and so will change the location of the L1 point by around 1% - i.e., by around 15,000 km. My guess is that you haven't included the Moon in your calculations and that doing so may well eliminate the bulk of the gap between your calculations and the spice file locations. You mentioned 'the heavily perturbed systems of Jupiter and Pluto'. In what respect do you regard these as heavily perturbed systems?
 Thanked by:
 04-17-2018, 09:23 AM #12 cristiapi Orbinaut Quote: Originally Posted by MontBlanc2012  My guess is that you haven't included the Moon in your calculations and that doing so may well eliminate the bulk of the gap between your calculations and the spice file locations. You're right; if I use EMB instead of just Earth I get exactly the same JPL result (the difference is on the order of 10-4 m). Quote: Originally Posted by MontBlanc2012  You mentioned 'the heavily perturbed systems of Jupiter and Pluto'. In what respect do you regard these as heavily perturbed systems? I mean that if I calculate Pluto-Charon L2 with ER3BP, the true equilibrium point will be very distant because of all the other satellites perturbations. The same for Pluto-Hydra and for the other planetary systems. I did many simulations for the stability of L1 and L2, but it was 1 year ago... Anyway, the result was as you say: Quote: Originally Posted by MontBlanc2012  In a general n-body system, the Lagrange points do not (strictly speaking) exist since you will never get a stable point where gravitational and centripetal forces exactly cancel.
 04-17-2018, 09:55 AM #13 MontBlanc2012 Orbinaut For Pluto-Charon system, as you say, L2 is indeed heavily perturbed. Basically, trying to calculate the location of L2 is fairly meaningless here. L1 for Pluto-Charon ought to behave a little better, though. But still, because the mass of the other moons aren't negligible, a satellite parked in the vicinity of the notional ER3BP L1 point is still going to get kicked around a lot. wrt the Lagrange points of the moons of Jupiter - Io, Europa, Ganymede, and Callisto. Yes, perturbations (due in large measure to Jupiter's J2 field) are likely to force higher station-keeping costs than one might ideally like. Callisto, in particular, ought to be reasonably well behaved. It's the furthest out so the J2 perturbation should be minimal. And if one replaces the state vectors of Jupiter with the state vectors of the centre of mass of Jupiter + Io + Europa +Ganymede, that also ought to improve things a little more. wrt "if I use EMB instead of just Earth I get exactly the same JPL result (the difference is on the order of 10-4 m)", that's probably good enough Last edited by MontBlanc2012; 04-17-2018 at 10:14 AM.
 Thanked by:

 Posting Rules BB code is On Smilies are On [IMG] code is On HTML code is Off You may not post new threads You may not post replies You may not post attachments You may not edit your posts
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Orbiter-Forum.com     Announcements     Meets & Greets Orbiter Space Flight Simulator     Orbiter Web Forum         OFMM         Orbiter Forum Space Station         Simpit Forum     General Questions & Help     MFD Questions & Help     Hardware & Software Help     Tutorials & Challenges     Orbiter SDK     Orbiter Visualization Project     Orbiter Beta » Orbiter Project Orbiter Addons     OrbitHangar Addons & Comments     Addons     Addon Development     Addon Requests     Addon Support & Bugs         Addon Developer Forums             Project Apollo - NASSP     Orbiter Lua Scripting Far Side of the Moon     Spaceflight News     Math & Physics     Astronomy & the Night Sky     Backyard Rocketry     Brighton Lounge     International Forum

All times are GMT. The time now is 08:54 PM.