Jump to content

appenz

Members
  • Posts

    24
  • Joined

  • Last visited

Reputation

7 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Understood. Still, if you post it we can have a look. Otherwise it's super hard to debug this.
  2. @AsteroH This looks to me like either the file is not even a text file or it is empty. If you post it somewhere, we can take a look.
  3. I believe anything you log in the console appears in the KSP.log file. See here: https://kontrolsystem2.readthedocs.io/en/latest/reference/core/logging.html There is no persistent storage for Kontrolsystem2, if that is what you are looking for.
  4. Are you comfortable with (simple) coding? If yes, python is very good at this. For example: https://www.geeksforgeeks.org/convert-json-to-csv-in-python/ As JSON is a more complex structure, there is no 1:1 conversion. You will have to parse through the tree and generate what you want.
  5. It looks like the scripts that are part of the Kontrolsystem2 install are there, but your can't add them, correct? If yes, my guess is that this might be a path or permission issue. Can you: Post full stdLib and localLib paths? Check permissions on the localLib path Try saving the script with a name not containing a space. Not sure if or what escaping is needed. What happens if you add a script to the stdLib path, does that show up correctly?
  6. I just posted an updated version of my Kontrolsystem 2 libraries and missions. Key updates Fully automated scripts to autonomously fly to and land on Mun and Minimus Fully automated return from Mun. Should work for Minimus too, but not tested yet. For transfers, it does a two stage burn making it very precise and efficient Correction burn uses the new maneuver node functionality to optimize the encounter Updated debugging information More reliable warp code Tested with Kontrolsystem 0.5.2.4. Code on GitHub here: https://github.com/appenz/kerbal2 Release (zip file) here: https://github.com/appenz/kerbal2/releases/tag/v0.2.0
  7. Misspell was unintentional (and is fixed in my internal repo). The problem with Minimus is my current ejection burn calculation isn't precise enough for cases where there is staging during the ejection burn. I have code that adds a second burn to fine tune the trajectory (which is what you need to get to other planets anyways), but it's not quite working yet.
  8. You can edit this in the file maneuver_vacuum.to2 (link here) in line 244. Code is this: // Need code here to orient vessel first while( current_time() < node.time - 15 ) { <-- Edit this number! warp_to(node.time - 10) // <-- Edit this number! sleep(1) wait_until(fn() -> current_rate() < 1.5) } This is the time it waits in seconds. Just make both numbers something big and the first one slightly bigger (e.g. 65 and 60). I added an enhancement request for my code on GitHub, you can track it here. It shouldn't be hard to add code that actually detects if the ship is fully turned. BTW @Untoldwind fixed the global_position() and global_velocity() issues and I am working on much more precise transfer code.
  9. @DimiBD Small update: Untoldwind fixed the global_position() bug in 5.2.4 which is awesome! But a new bug for global_velocity() is now blocking as it prevents me from correcting inclination. Fix appears to be planned for the next release.
  10. So I tried this today, and I can't burn maneuver nodes with enough precision to reliably get an encounter with Minimus with a single burn. I tried adding a correction burn using the new maneuver node functionality in Kontrolsyste, 0.5.2 but ran into bugs. I can't reliably calculate the distance to a bod that I am not orbiting (e.g. Minimus). In theory this should be easy with global_position() from Orbit, but it looks like global_position() isn't working as intended right now (or I don't understand it). I filed a bug and will take another look once I hear back.
  11. Thanks for testing. It seems like something is off with the MN calculation. Doesn't matter for easy transfers like Mun, but causes it to fail for Minmums. I'll take a closer look.
  12. @DimiBD I think I fixed it, at least for a Mun transfer it works again. There were basically two issues: Bugs in how I calculate the transfer altitude (i.e. the highest point of the new orbit that should be inside the Sphere of influence of the target body. My maneuver node burn isn't nearly as precise as I want it to be. I fixed (1) but (2) may still be an issue if you have a craft that stages during the transfer burn. The planTransfer() function no directly takes a target altitude. I would set it to something that's high, but not close to the SOI. So maybe 10% of the SOI is safe. Let me know if this gets you to Minimums. I didn't test that I know this is a bit late, but I code for this here on GitHub. The basic idea is: Check if we are landed at KSP, if yes fly up 2,000m Land on one of the landing pads Basic logic of the code is that it constantly calculates the dV between the desired trajectory and the actual one and tries to correct it. While we are well ahead of time when we'd have to start a suicide burn it corrects only horizontally. As it gets close to the suicide burn time we add vertical breaking. Works for a decent variety of vessels for me.
  13. Alright, I'll try to fix this week. Tracking it as a bug on GitHub here.
  14. I am also seeing the interplanetary transfer coming up short. In the past this was necessary in order to not overshoot, but it looks like something changed. There is a parameter to adjust this, so it should be easy to fix. In the file go-mun.to2, change the parameter from 0.6 to something bigger. See the t.planTransfer() line below: // We made it to Orbit, are we still around Kerbin if (vessel.orbit.reference_body.name == "Kerbin" && vessel.orbit.apoapsis.defined && vessel.orbit.apoapsis.value < 5000000) { const t = Transfer() t.planTransfer(mission,"Mun", 0.6) // <-- Edit this parameter const n = t.getTransferNode() mission.addManeuver(n) mission.burnNextNode() con.log(" ejection burn complete.") } Now @Untoldwind just dropped code that can gives access to the trajectory after the maneuver node (see here). Haven't tried it out yet, but this should allow us to do a gradient-descent type calculation for the entire trajectory. That will be much more reliable. Yes, I found this out the hard way as well.
×
×
  • Create New...