• Content Count

  • Joined

  • Last visited

Community Reputation

18 Good

About SPD13

  • Rank
    Bottle Rocketeer

Recent Profile Visitors

1,407 profile views
  1. Thank you for your reply, but my problem is: why the node has to be 1year in the future despite the fact i already wait for the interplanetary window before launch?
  2. Hi folks, I have a quick question for those of you using MechJeb as i am trying to find the best process to launch a ship from Kerbin to Duna using MechJeb. What i am doing: 1. On the launchpad, enter in map mode, select Duna as Target 2. On the Ascent guidance module, click on "Launch at interplanetary window", click on "engage autopilot". Mechjeb warps to the launch window and liftoff. 3. Once in Orbit, I click on "Maneuver planner" and "Transfer to another planet" My problem: The transfer maneuver sets a node more than 1year in the future!! The warp takes forever as the engine needs to use full simulation. What am i doing wrong?
  3. OK, then maybe we should change the link in the next release to point to Github.
  4. I was thinking about this wiki : http://wiki.mechjeb.com/index.php?title=Manual This is where the "online manual" button of the module is landing Thanks Not sure why... i did not explore the game enough to understand CommNet limitations. It should not have an impact as mechjeb is executed locally on the vessel.
  5. Hi, This should be possible. Once you are on Eve's trajectory, you set the following actions: - "Time" => "Warp to" and select "SOI change". This will wait until you enter Eve's SOI. - "Target" => "Target body" and select "Duna". - "Trajectory" => "Manoeuver" and select "Hohmann transfer to target" - "Trajectory" => "Execute node" and select "next node". This will execute the manoeuver previously set @sarbian Do you mind opening a Wiki access for me on the documentation so I can document the features of the Scripting module?
  6. Hi @sarbian Sorry, i've been off for a while. Lots of changes happening in my life :-) I see you upgraded Mechjeb to 1.3 and thank you for it! The last release does not contains all the latest script module features, especially the boolean logic programming features so I sent you a merge request with the last upgrade. I tested it on 1.3. I think it's also time for me to write a little bit of documentation about the module. I will try to update the wiki manual.
  7. SPD13

    Inter-Plugin communication

    Sorry for the late Reply. I have been pretty busy (had a baby ). That was the first option i considered. As a software engineer, I love kOS and the idea to be able to write lines of code to control KSP, but my idea was to provide something for people that does not know/want to write code to automate tasks. That's the reason why my script module offers far less possibility than kOS but it can be controlled from the UI. The screenshot below can give you an idea of what i tried to do: And the video below demonstrate it working I tried to be as less intrusive as i can in the mechjeb code. That's the reason why exposing mechjeb functions for kOS should be a combined effort with @sarbian, the main MechJeb developer. Yes, I have 8 slots. We can name the slots and load/save the list of actions. Sure. And that's something i can dive in a near future. That's one of the reason i considered a bridge between my system and kOS to offer the opportunity to connect both together. sure the "if" logic is something that does not exists for the moment in my MechJeb script system. Yes, i like this implementation, i will try to modify the code to look like what you suggest. That would be wonderful. I'm not proud with the way i used to wait until the command is executed.
  8. SPD13

    Inter-Plugin communication

    Good point. I'll do this.
  9. No Worries, code is really clean ;-) Basically i'm relying on "StartSequence", "PauseSequence", "ResetSequence" functions of the "ModuleSequencer".
  10. Hi, Just a quick note to let you know i added a feature in the scripting module i developed for MechJeb. With the latest version, you can run an IR sequence from a script action in MechJeb. It means for example you can use the MechJeb Ascent Guidance and then automatically deploy something using IR Sequencer when you are in orbit. Hope you enjoy !
  11. SPD13

    Inter-Plugin communication

    Hi @hvacengi, Thank you for your message and for the details about how to connect MJ and kOS. Some Background: I created a "scripting" module for MechJeb, intended to automate MechJeb tasks (Ascent guidance, docking autopilot, ...) and basic flight or control tasks (Target a body, Target a docking port, crew transfer, ...) to create fully autonomous flights. I'm done with most of the basic MechJeb tasks and now i would like to integrate tasks that could control additional plugins. I started with IR Sequencer and kOS. My target with kOS: Be able to send a command to a processor and monitor the task execution to be able to wait for completion. How i did that: Step 1: Check if kOS is installed to enable the kOS features in MJ foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies()) { else if (assembly.FullName.Contains("kOS")) { this.compatiblePluginsInstalled.Add("kOS"); } } This will check for the assembly Step 2: Identify kOS processors foreach (Vessel vessel in FlightGlobals.Vessels) { if (vessel.state != Vessel.State.DEAD) { foreach (Part part in vessel.Parts) { foreach (PartModule module in part.Modules) { if (module.moduleName.Contains("kOSProcessor")) { //add the processor to a list this.kosModules.Add(module); } } } } } Step 3: When the action is triggered, use reflection to send the command on the Interpreter of ShareObjects inside the kOSProcessor module. if (this.selectedPartIndex < this.kosModules.Count) { if (openTerminal) { //Invoke "OpenWindow" on the kOSProcessor module to open the terminal window this.kosModules[this.selectedPartIndex].GetType().InvokeMember("OpenWindow", System.Reflection.BindingFlags.InvokeMethod, null, this.kosModules[this.selectedPartIndex], null); } //Catch the SharedObjects on the kOSProcessor module var sharedObjects = this.kosModules[this.selectedPartIndex].GetType().GetField("shared", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(this.kosModules[this.selectedPartIndex]); if (sharedObjects != null) { //Catch the Interpreter in SharedObjects var interpreter = sharedObjects.GetType().GetProperty("Interpreter").GetValue(sharedObjects, null); if (interpreter != null) { //Send the command to the Interpreter interpreter.GetType().InvokeMember("ProcessCommand", System.Reflection.BindingFlags.InvokeMethod | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance, null, interpreter, new object[] { command }); ... Step 4: Wait for the action to complete. Here, i used a "trick". I regularly watch for the result of "IsWaitingCommand" on the interpreter object. Not very clean, but it the only way i found to know a command has been completed. public bool isCPUActive(object module) { var sharedObjects = this.kosModules[this.selectedPartIndex].GetType().GetField("shared", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(this.kosModules[this.selectedPartIndex]); if (sharedObjects != null) { var interpreter = sharedObjects.GetType().GetProperty("Interpreter").GetValue(sharedObjects, null); if (interpreter != null) { //We check if the interpreter is waiting to know if our program has been executed bool waiting = (bool)interpreter.GetType().InvokeMember("IsWaitingForCommand", System.Reflection.BindingFlags.InvokeMethod, null, interpreter, null); if (waiting) { //Action ended ! return true; } } } return false; } I know reflection is not very clean, but it's very convenient as it greatly simplifies the setup for the user and creates no dependency between both plugins. Anyway, the way you describe seems really cleaner and i will try to have a look. Thank you for your feedback.
  12. It works ! Should be something with my install. Maybe the directory "fusion" mac os X is doing when i deployed the different zips... Many Many thanks for your help.
  13. Really many thanks for your help. I deleted the Config.xml. Same error. Same error also in the VAB Maybe i did something wrong in the setup. I don't want you to dive in the code, if i made a setup mistake i would feel really bad to waste your time :-) Does it works for you on KSP 1.2 ?
  14. Sorry, no change :-( I even checked and i have the same AssetBundles/ir_ui_objects.ksp file as the IR 2.0.6 Zip
  15. IR is working when moving things manually. Below a screenshot of a simple craft. The error message appears when i click on the sequencer in the toolbar: