![]() |
|
Tutorials & Challenges Feel free to publish your tutorials, challenges, & flight scenarios in this forum. |
![]() |
|
Thread Tools |
![]() |
#1 |
Orbinaut
|
![]()
Following directly on from An update on all things Lissajous and Halo, attached is a zip file containing a scenario and associated script and data files for a demonstration scenario of station-keeping at Earth-Moon L2 Lagrange point.
Download the zip file and, in the usual file, copy the files into the relevant Orbiter directories. Then: * open Orbiter and run the 'EML2.scn' scenario; * open the Lua Console using the Scenario Editor and type <run 'Lissajous/EML2'> You should now have two stock Delta-Gliders docked to each other at Earth-Moon L2. The motion of one of the Delta-Gliders ('GL-NT') is 'slaved' to EML2 and will remain firmly anchored to the Lagrange point even at high time acceleration. The motion of the other Delta-Glider ('GL-01') is unconstrained and can be manoeuvred at will. It will not, however, remain at the L2 Lagrange point without active station-keeping on your part. In the top right-hand portion of the screen you should see some blue text recording the cumulative amount of station-keeping dV required to keep GL-NT on-station at the Lagrange point. If you do not see this, the station-keeping script has not been loaded correctly. Enjoy. Last edited by MontBlanc2012; 02-05-2019 at 02:10 AM. |
![]() |
![]() |
Thanked by: |
![]() |
#2 |
Addon Developer
![]() |
![]()
So how hard would it be to do this for Satellites?
|
![]() |
![]() |
![]() |
#3 |
Orbinaut
|
![]() Quote:
If you look in the 'Script/Lissajous' directory, you'll find a file called 'EML2.lua'. If you open this in a text editor, near the bottom of the file, you'll see a few lines that read: Code:
local base = "Script/Lissajous/Earth-Moon/EM L2 - Lissajous - ER3BP - " local sys = "Earth-Moon" local v = vessel.get_interface("GL-NT") (The other two lines of code simply provide references to the appropriate dataset. For example, if you want to slave the motion to L1, simply change the first line to: Code:
local base = "Script/Lissajous/Earth-Moon/EM L1 - Lissajous - ER3BP - " |
![]() |
![]() |
![]() |
#4 |
Orbinaut
![]() ![]() |
![]()
Hello MontBlanc2012.
I've installed the files, but getting a "Execution Error"? in Lua Console. N. |
![]() |
![]() |
![]() |
#5 |
Addon Developer
![]() |
![]()
I was thinking for this my Queqiao in part of the Change4 project. As I believe the satellite was placed there?
So can only 1 vessel be placed there or does it need that slave vessel? |
![]() |
![]() |
![]() |
#6 |
Orbinaut
|
![]() Quote:
Code:
%run 'Lissajous/EML2' MB ![]() Last edited by MontBlanc2012; 02-04-2019 at 02:53 PM. Reason: Adding image |
![]() |
![]() |
![]() |
#7 |
Orbinaut
![]() ![]() |
![]()
Its fine, I was putting in the <> characters.
Thanks, N. |
![]() |
![]() |
Thanked by: |
![]() |
#8 |
Orbinaut
|
![]() Quote:
|
![]() |
![]() |
Thanked by: |
![]() |
#9 |
Addon Developer
![]() |
![]()
I will give her a try. then try to put my satellite there
---------- Post added at 08:17 PM ---------- Previous post was at 09:41 AM ---------- I guess I need the Lua Console |
![]() |
![]() |
![]() |
#10 |
Orbinaut
|
![]() Code:
I guess I need the Lua Console [As an aside, using Lua here to run this station-keeping algorithm probably isn't state-of-the-art and a more robust housing would be via Orbiter's C/C++ api interface. However, this scenario was intended as a simple demonstration piece using a straightforward, and easy to build, application of the Lua api interface. It works, but it isn't pretty.] Last edited by MontBlanc2012; 02-05-2019 at 02:29 AM. |
![]() |
![]() |
![]() |
#11 |
Addon Developer
![]() |
![]()
Thanks. But I got that Execution Error
But I am not sure if installed correctly ---------- Post added at 09:02 PM ---------- Previous post was at 08:35 PM ---------- Got it to work So I t edited the script Code:
local base = "Script/Lissajous/Earth-Moon/EM L2 - Lissajous - ER3BP - " local sys = "Earth-Moon" local v = vessel.get_interface("Queqiao") So will place the Queqiao at the L2 position? |
![]() |
![]() |
![]() |
#12 |
Orbinaut
|
![]() Code:
Thanks. But I got that Execution Error But I am not sure if installed correctly When running the Lua Console script, it is important to type in the correct command (as Notebook discovered). At the prompt, type: Code:
%run 'Lissajous/EML2' ---------- Post added at 03:06 AM ---------- Previous post was at 03:04 AM ---------- Code:
So I t edited the script Code: local base = "Script/Lissajous/Earth-Moon/EM L2 - Lissajous - ER3BP - " local sys = "Earth-Moon" local v = vessel.get_interface("Queqiao") and saved as EMQL2 So will place the Queqiao at the L2 position? |
![]() |
![]() |
Thanked by: |
![]() |
#13 |
Addon Developer
![]() |
![]()
Thanks. So how would I /can I distribute it in an addon? For me it may be just place the satellite at the L2 spot. So the scn would start with the satellite at L2. For the Change4 it is really for looks.
|
![]() |
![]() |
![]() |
#14 |
Orbinaut
|
![]() Quote:
In principle, one can get a scenario to auto run a Lau script. And, indeed, I’ve tried running these scripts in this fashion. However, these scripts are very precise in what they do and need to run in a very particular way: each time the core routines are run, Orbiter needs to suspend momentarily its standards time-stepping algorithm so that all of the script’s computations can be completed and replace the vessel at the right spot. Then control is handed back to Orbiter so that it can continue doing its simulation until the next time the script needs to run the core routines to update the location of the vessel. This interruption occurs about once a second at low time accelerations and about 10 times a (real world) second at high time accelerations. When trying to automate running the script using the standard command set provided by Orbiter, the process control of the script changes so that the script appears to be run as a background task rather than the primary control task. This results in the vessel not being placed at the right location and, instead of being placed with sub-millimeter accuracy, large and erratic errors of 10-100 meters in placement of the vessel ensue. Not ideal. At the moment, I don’t know how to get around this loss of process control issue. I’m sure there is a way of doing it - I just haven’t worked out how to do it yet. When I have a solution, I’ll let you know. |
![]() |
![]() |
![]() |
|
Thread Tools | |
|
|
Quick Links | Need Help? |