Jump to content

Release KontrolSystem2 (0.4.2)


Untoldwind

Recommended Posts

7 hours ago, appenz said:

@DimiBD I think I fixed it, at least for a Mun transfer it works again. There were basically two issues:

  1. 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.
  2. 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 :)

 

 

Thx, I'll try to undestand the math ;)

I'll test today i think.

It's just a feeling, but, all node is not as precise than KSP1

 

Edited by DimiBD
Link to comment
Share on other sites

42 minutes ago, DimiBD said:

Thx, I'll try to undestand the math ;)

I'll test today i think.

It's just a feeling, but, all node is not as precise than KSP1

 

  ok for the alt calculation, Thx for adding comment ;)

Alt seems OK !

The time to burn is not

Ie :

Mission: To Minmus!           t: 52:06
body: Kerbin     msl/ter: 200.43 km /200.18 km  atm: (in space) v: 1,868 m/s

Node Burn: 0.0 s (41.1 %)   dV: 0.10 (41.3 %)  throttle: 0.01

--------------------------------------------------------------------------------
  eject at phase angle 114.7  ejection angle -1.0  dV: 844.93 m/s
Maneuver: dt: 15:41  dV: 844.9 m/s stages: 1 burn: 49 s  burn: 49 s
    stages: [#1  dv:  845 m/s t: 49 s 1x Methalox]

Burn is planned in 15:41, but we miss Minmus.

If I use MNC to adjust, it's more 14:20 to enter SOI (without changing the dV needed, with circular and good inclinaison 6° starting orbit)

Link to comment
Share on other sites

8 hours ago, DimiBD said:

  ok for the alt calculation, Thx for adding comment ;)

Alt seems OK !

The time to burn is not

Ie :

Mission: To Minmus!           t: 52:06
body: Kerbin     msl/ter: 200.43 km /200.18 km  atm: (in space) v: 1,868 m/s

Node Burn: 0.0 s (41.1 %)   dV: 0.10 (41.3 %)  throttle: 0.01

--------------------------------------------------------------------------------
  eject at phase angle 114.7  ejection angle -1.0  dV: 844.93 m/s
Maneuver: dt: 15:41  dV: 844.9 m/s stages: 1 burn: 49 s  burn: 49 s
    stages: [#1  dv:  845 m/s t: 49 s 1x Methalox]

Burn is planned in 15:41, but we miss Minmus.

If I use MNC to adjust, it's more 14:20 to enter SOI (without changing the dV needed, with circular and good inclinaison 6° starting orbit)

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.

Link to comment
Share on other sites

13 minutes ago, appenz said:

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.

Great !

Let me know how i can help you !

Link to comment
Share on other sites

On 1/14/2024 at 11:00 AM, DimiBD said:

Great !

Let me know how i can help you !

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.

Link to comment
Share on other sites

Hi!

I'm trying some functions inside the VAB using main_editor(). I have access to Kerbin information with find_body("Kerbin") but I wish to have access to my ship's information.

Is it possible?

As in main_flight, I try with main_editor(vessel: Vessel) but it didn't work. I assumed that function can't have any parameter. I try with a string parameter: after rebooting, my file was deleted from the entrypoints.

Thanks for your help.

Link to comment
Share on other sites

On 1/21/2024 at 12:55 AM, appenz said:

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.

@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.

Link to comment
Share on other sites

On 1/24/2024 at 4:29 AM, appenz said:

@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.

I test it on Minmus. It's work fine ;)

Link to comment
Share on other sites

Hey guys,

A lot of the nodes are warping to t-10s, ive got this huge beast of a ship that takes a good 45 seconds to line up to the next node.. i cant figure out how to add time to the warp command.. seems to be in ksp::game::warp, but there are no master files for that.. im specifically using go_mun from appenz which is using " use { sleep, current_time } from ksp::game ". i'm comparatively a noob for this coding, where do i input t-30s instead of the default 10s?

 

thanks for any help

Link to comment
Share on other sites

8 hours ago, masterquinn said:

Hey guys,

A lot of the nodes are warping to t-10s, ive got this huge beast of a ship that takes a good 45 seconds to line up to the next node.. i cant figure out how to add time to the warp command.. seems to be in ksp::game::warp, but there are no master files for that.. im specifically using go_mun from appenz which is using " use { sleep, current_time } from ksp::game ". i'm comparatively a noob for this coding, where do i input t-30s instead of the default 10s?

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.

Link to comment
Share on other sites

8 hours ago, appenz said:

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.

 

I try to play with the land_atmosphere function now ;)

Link to comment
Share on other sites

On 1/25/2024 at 7:35 PM, PhilippeDS said:

Hi!

Is it possible to add a shortcut for Kontrol System in the app tray of the VAB please?

Thanks.

I learned how to use github and I push a request. I found how to add the button in the VAB for Kontrol System.

Link to comment
Share on other sites

On 1/27/2024 at 8:49 PM, appenz said:

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.

I appreciate this. Now im working on modding your mun code for Minmus.. it gets SO close, and i found you have it mispelt as minimus in one of the files utility.to2 unless thats how its supposed to be? i ended up with a bunch of boot errors.. anyways. I'm working on the minmus code - or trying to, lol

Link to comment
Share on other sites

24 minutes ago, masterquinn said:

I appreciate this. Now im working on modding your mun code for Minmus.. it gets SO close, and i found you have it mispelt as minimus in one of the files utility.to2 unless thats how its supposed to be? i ended up with a bunch of boot errors.. anyways. I'm working on the minmus code - or trying to, lol

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. 

Link to comment
Share on other sites

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

Edited by appenz
added links
Link to comment
Share on other sites

19 hours ago, appenz said:

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

Hot Diggity! Thanks appenz

*Minmus :D

Link to comment
Share on other sites

On 2/5/2024 at 3:05 AM, appenz said:

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

I just update KSP and my mod... I'll find time to test this week end ! ;)

Link to comment
Share on other sites

15 hours ago, HollowHalls said:

apologies for being a noobie but i cant seem to get the mod to load scripts into the entrypoints tab. also when i try to click new module and then save and reboot it also isnt added to the entrypoints tab. ive attached a couple image to show what i mean.  https://imgur.com/a/0ezjf3z

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?
Link to comment
Share on other sites

1 hour ago, appenz said:

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?

thank you for having me check permissions and paths, the config files were pointing to folders that didnt exist. everything works great now

Link to comment
Share on other sites

Hey all, I'm trying to save telemetry data so I can display it in Google Sheets but I'm struggling to figure out how to convert the saved .json to .csv - Sheets does not accept .json formatting for data imports. I have no experience doing this so I don't even know where to start. Online converter tools spit out essentially garbage, or I assume, the data but in a completely different shape to what I need. Can anyone tell me where to begin? Or link a tutorial for this kind of thing?

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...