Jump to content

[1.12.x] Kerbal Alarm Clock v3.13.0.0 (April 10)


TriggerAu

Recommended Posts

[*]One alarm that fires/resets for the next expiry time

I think the middle one makes the most sense to me - single alarm for when its time to check back - but whats your (and others) thoughts

This sounds already very cool. All I need (at the moment :) ) is a hint that I should go and check the Mission Control, instead of randomly clicking at it every now and then...

Link to comment
Share on other sites

This sounds already very cool. All I need (at the moment :) ) is a hint that I should go and check the Mission Control, instead of randomly clicking at it every now and then...

K, I can probably get that in the v3 release after the next one - just trying to finish beta5 with TransferWindowPlanner integration at the present

EDIT: https://github.com/TriggerAu/KerbalAlarmClock/issues/58

Edited by TriggerAu
Link to comment
Share on other sites

v3 Beta 5 is now available - https://github.com/TriggerAu/KerbalAlarmClock/releases/tag/v3.0.0.5-beta

Added new default timewarp control so it uses non-instant transitions - helps with really high warp rates. Works well with Xaiier's Time Mod - well from my tests at least :)

Added some extra API stuff for Transfer Window Planner - With TWP v1.1.0.0 you can now set an alarm in KAC for the selected transfer window with all the details in the notes

Website is also ready - http://triggerau.github.io/KerbalAlarmClock/.

My goals for v3 to be live are now:

  • Lots of testing for bugs.
  • Add Contract Alarms.

After that...

  • Repeatable Alarms
  • RSS Stuff - Add an option to display earth dates in RSS installs, and rely on TWP for transfers in RSS modded installs
  • Work out burn time to use as margin if its at all possible
  • Maybe add Audio alarms
  • Maybe Generate some new model data for Transfers and bin the formula model

NOTE: I cant for the life of me get this to show up in the App Launcher in Tracking Stations - thats the biggest bug I need to squash, and I finally decioded to release this beta as is, cause I'm very stuck

Edited by TriggerAu
Link to comment
Share on other sites

I recently worked out the whole burn time calculation for my own purposes, and it's really not that difficult, provided you draw a line somewhere (i.e. base it on the current stage only).

Assuming no stage changes and no running out of fuel, you need this information:

Mass (tonnes)

Delta V (m/s)

Thrust (kN)

Specific Impulse (s)

Kerbal Engineer has all that information, but I've only glanced at the source, so I'm not sure how much is directly exposed and how much requires part iteration. Assuming you have to calculate combined Isp, that's just total thrust of all engines divided by the sum of thrust/Isp for each.

First, with the thrust and Isp, you determine the fuel burn rate by mass:

Fb = fuel burn rate

Isp = combined specific impulse

T = total thrust

Fb = T / (Isp * 9.82)

The time you want for the alarm is when half the burn is complete plus some buffer. And the half that's relevant is half the delta V. Using the Tsiolkovsky rocket equation, the final mass of the ship after the half-burn is this:

Me = end mass

Mi = initial mass

Dv = delta V

Isp = combined specific impulse

Me = Mi * exp(-(Dv / 2)/(Isp * 9.82))

From that, the total fuel mass consumed:

Mf = fuel mass

Mf = Mi - Me

That means the time taken is:

t = Mf / Fb

The total burn time can be calculated in the same way by using total delta V instead of half delta V in the equation.

That works for any engine type. If you want to look at whether or not there's enough fuel, the relevant values:

LF+O = 200 units/tonne

Mono = 250 units/tonne

Xenon = 10,000 units/tonne

With LF+O, LF is 9/20 of the total, and O is 11/20 of the total.

You'd need to solve the rocket equation for delta V instead to handle running out of fuel and staging. It's doable, but an added layer of complexity, including knowing how much mass each stage will have. Again, that's something Kerbal Engineer knows, but I'm reasonably sure it iterates through the parts to figure it out.

Link to comment
Share on other sites

I use this for burn time calculation and it's extremely accurate.

Also, I'm probably an edge case but... :P

r7EfW7J.jpg

yea I have a lot of asteroids to keep track of, haha. I just pasted a bunch into the v2 file at a time for import until I had them all in.

I've also noticed that KAC does not update when a new persistence file is loaded which lacks an alarm scenario, which means if I import alarms in one game save and then exit back to the menu and switch to another game save, I will still see the alarms from the previous game. Then I have to delete them and import the new alarms.

Just minor edge-casey stuff...

Using the latest beta

Link to comment
Share on other sites

v3 Beta 6 is now available - https://github.com/TriggerAu/KerbalAlarmClock/releases/tag/v3.0.0.6-beta

Many thanks to Toadicus for helping to solve the case of the missing Tracking Station button - needed to readd references for 0.25 and remove the firstpass reference to get it to recompile properly for 0.25

And thanks for the info and feedback - will look at those shortly

Link to comment
Share on other sites

v3 Beta 6 is now available - https://github.com/TriggerAu/KerbalAlarmClock/releases/tag/v3.0.0.6-beta

Many thanks to Toadicus for helping to solve the case of the missing Tracking Station button - needed to readd references for 0.25 and remove the firstpass reference to get it to recompile properly for 0.25

And thanks for the info and feedback - will look at those shortly

Will V3 Beta interfere with Alternate Resourcepanel, because of the changed folder structure? otherwise I will be happy to download it this evening :)

Link to comment
Share on other sites

It should make it much easier in that each mod now has its own folder inside triggertech and KAC is not spread out. eg if you had em all


GameData
- TriggerTech
- Flags
- KerbalAlarmClock
- KSPAlternateResourcePanel
- TransferWindowPlanner

Note: You cant have v2 of KAC and v3 installed at the same time and if you wanna import your alarms from the v2 saves make sure you save the text file - instructions here - http://triggerau.github.io/KerbalAlarmClock/install.html

Link to comment
Share on other sites

It should make it much easier in that each mod now has its own folder inside triggertech and KAC is not spread out. eg if you had em all


GameData
- TriggerTech
- Flags
- KerbalAlarmClock
- KSPAlternateResourcePanel
- TransferWindowPlanner

Note: You cant have v2 of KAC and v3 installed at the same time and if you wanna import your alarms from the v2 saves make sure you save the text file - instructions here - http://triggerau.github.io/KerbalAlarmClock/install.html

Thanks, cool.

Link to comment
Share on other sites

The main problem with doing reasonable burn time estimates isn't in the math, it's in knowing what engines are turned on and how much mass they're moving. It's simple if there's only one or two engines on, and they're the same kind of engine, and they're pointed in the same direction. It's much less so if any of those aren't the case (which happens a lot). VOID uses KerbalEngineer to get that information; to do it without would mean duplicating a large portion of KerbalEngineer's functionality.

Link to comment
Share on other sites

The main problem with doing reasonable burn time estimates isn't in the math, it's in knowing what engines are turned on and how much mass they're moving. It's simple if there's only one or two engines on, and they're the same kind of engine, and they're pointed in the same direction. It's much less so if any of those aren't the case (which happens a lot). VOID uses KerbalEngineer to get that information; to do it without would mean duplicating a large portion of KerbalEngineer's functionality.

Same kind of engine is irrelevant, unless you're actively tracking fuel quantity to determine if it will run out before the burn is complete (which is still a tractable problem, but considerably trickier). Thrust and Isp work out the same regardless of fuel type. Correct orientation is another matter entirely, one in which the word "simple" is surely absent. But I don't believe that situation happens at all frequently. No sensible design has simultaneously active throttled rockets pointing in different directions. I would simply add up active engines with a current non-zero fuel supply, and assume they're pointing in the correct direction. This is, after all, just a tool for someone to pick an appropriate alarm offset for a maneuver node. It doesn't need to duplicate the kind of information Kerbal Engineer produces.

Link to comment
Share on other sites

There may be an issue loading KSC with 3.0.0.6. When first loading a saved game, I get stuck on a zoomed-in view of KSC where nothing is clickable. If I jump to a ship with KAC and back to the space center, it still doesn't work. Furthermore, I can't even click on the menu after exiting that save. This happened twice in a row just now. Then I hid the KAC window and restarted the game, which loaded KSC normally.

It could still be coincidental. I noticed this problem starting a couple days ago. I don't recall exactly, but it may have been after both the upgrade to KAC 3.0.0.5 and the installation of Blizzy's Toolbar. I know the latter did trigger a spurious incompatibility window for PreciseNode.

My full list of mods (directory name):

  • 000_Toolbar
  • EditorExtension
  • EnhancedNavBall
  • KerbalEngineer
  • PreciseNode
  • ThunderAerospace (TAC)
  • TriggerTech (KAC)

If I'm able to consistently tie the problem to the KAC window being open in KSC, I'll post an update.

Link to comment
Share on other sites

There may be an issue loading KSC with 3.0.0.6. When first loading a saved game, I get stuck on a zoomed-in view of KSC where nothing is clickable.

I get this if I tab out of KSP after hitting the save I want to load. It may or may not be KAC. I use 2.7.9.0.

Link to comment
Share on other sites

There may be an issue loading KSC with 3.0.0.6. When first loading a saved game, I get stuck on a zoomed-in view of KSC where nothing is clickable. If I jump to a ship with KAC and back to the space center, it still doesn't work. Furthermore, I can't even click on the menu after exiting that save. This happened twice in a row just now. Then I hid the KAC window and restarted the game, which loaded KSC normally.

It could still be coincidental. I noticed this problem starting a couple days ago. I don't recall exactly, but it may have been after both the upgrade to KAC 3.0.0.5 and the installation of Blizzy's Toolbar. I know the latter did trigger a spurious incompatibility window for PreciseNode.

My full list of mods (directory name):

  • 000_Toolbar
  • EditorExtension
  • EnhancedNavBall
  • KerbalEngineer
  • PreciseNode
  • ThunderAerospace (TAC)
  • TriggerTech (KAC)

If I'm able to consistently tie the problem to the KAC window being open in KSC, I'll post an update.

I get this if I tab out of KSP after hitting the save I want to load. It may or may not be KAC. I use 2.7.9.0.

Can you try turning of the click through lock setting and see if that stops it from happening?

Link to comment
Share on other sites

Same kind of engine is irrelevant, unless you're actively tracking fuel quantity to determine if it will run out before the burn is complete (which is still a tractable problem, but considerably trickier). Thrust and Isp work out the same regardless of fuel type. Correct orientation is another matter entirely, one in which the word "simple" is surely absent. But I don't believe that situation happens at all frequently. No sensible design has simultaneously active throttled rockets pointing in different directions. I would simply add up active engines with a current non-zero fuel supply, and assume they're pointing in the correct direction. This is, after all, just a tool for someone to pick an appropriate alarm offset for a maneuver node. It doesn't need to duplicate the kind of information Kerbal Engineer produces.

The point is more that these calculations are simple for a human to do based on a design of his or her own, but for the computer to figure out your design, and the mods you're using and how they affect things, and even whether or not there's a connected fuel source, is a bit more complicated. Also, you might only build things that seem sensible to you, but other people throw insane builds at engineering mods just to see if they break. ;)

I'm not trying to discourage Trigger from pursuing this; I'm just saying that if he doesn't, don't hold it against him. It's a deep rabbit hole. ;)

Link to comment
Share on other sites

Just wanted to let you know that Kerbal Construction Time is using the KAC API now for automatic creation/handling of alarms for vessel completion. Really basic integration stuff, but wanted to let you know.

I did run into an issue when calling the InitKACWrapper and version 2.x of KAC was installed on the system. It recognized the assembly as being KAC, then tried to get the instance. Instead of just seeing that as null it throws an error that caused Start() not to finish execution. Surrounding with a try/catch avoided the issue. Figured I'd let you know, in case you hadn't tried that yourself yet.

Here's a snippet of the error, after it's been caught by KCT. It's simple enough to recreate and there's not much more to actually say about it (just use something that has the v3 API with v2 installed), but if you need more let me know.


10/17/2014 10:10:34 PM,Kerbal_Construction_Time-KACWrapper,Attempting to Grab KAC Types...

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

10/17/2014 10:10:34 PM,Kerbal_Construction_Time-KACWrapper,Got Assembly Types, grabbing Instance

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

[KCT] Caught exception while trying to init KAC wrapper.
at Kerbal_Construction_Time.KACWrapper.InitKACWrapper () [0x00000] in <filename unknown>:0

at Kerbal_Construction_Time.Kerbal_Construction_Time.Start () [0x00000] in <filename unknown>:0

I should say that this might not be with the absolute newest version of the wrapper if you've updated it recently. I will double check with a fresh copy of the wrapper.

Edit: Tested with newest wrapper version. Same problem. You may want to add a check for the version number and ensure it's > 3. Or add a try/catch around the GetField.

Edited by magico13
Link to comment
Share on other sites

In the settings of 3.0.0.6, you can't independently change time margins for each alarm type and its quick alarm version. Change the value in one field, and the other is immediately updated to copy it.

Actually, it looks like it saves the settings correctly, but you can't see it. So I enter 5 minutes for quick maneuver alarm, and it overwrites the value in the entry field for the normal alarm offset. Then I put 10 minutes in the latter, and it overwrites the value in the quick alarm offset entry field. However, when I add a quick alarm, it's at 5 minutes out from the node.

Edited by Thanny
Additional info
Link to comment
Share on other sites

Just wanted to let you know that Kerbal Construction Time is using the KAC API now for automatic creation/handling of alarms for vessel completion. Really basic integration stuff, but wanted to let you know.

I did run into an issue when calling the InitKACWrapper and version 2.x of KAC was installed on the system. It recognized the assembly as being KAC, then tried to get the instance. Instead of just seeing that as null it throws an error that caused Start() not to finish execution. Surrounding with a try/catch avoided the issue. Figured I'd let you know, in case you hadn't tried that yourself yet.

Here's a snippet of the error, after it's been caught by KCT. It's simple enough to recreate and there's not much more to actually say about it (just use something that has the v3 API with v2 installed), but if you need more let me know.


10/17/2014 10:10:34 PM,Kerbal_Construction_Time-KACWrapper,Attempting to Grab KAC Types...

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

10/17/2014 10:10:34 PM,Kerbal_Construction_Time-KACWrapper,Got Assembly Types, grabbing Instance

(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

[KCT] Caught exception while trying to init KAC wrapper.
at Kerbal_Construction_Time.KACWrapper.InitKACWrapper () [0x00000] in <filename unknown>:0

at Kerbal_Construction_Time.Kerbal_Construction_Time.Start () [0x00000] in <filename unknown>:0

I should say that this might not be with the absolute newest version of the wrapper if you've updated it recently. I will double check with a fresh copy of the wrapper.

Edit: Tested with newest wrapper version. Same problem. You may want to add a check for the version number and ensure it's > 3. Or add a try/catch around the GetField.

Thanks magico13, I hadnt considered that use case - have wrapped the getfield in a try/catch and its working for me now. Heres a link to the latest one - https://github.com/TriggerAu/KerbalAlarmClock/blob/feature/v3refresh/KerbalAlarmClock/API/KACWrapper.cs

Link to comment
Share on other sites

In the settings of 3.0.0.6, you can't independently change time margins for each alarm type and its quick alarm version. Change the value in one field, and the other is immediately updated to copy it.

Actually, it looks like it saves the settings correctly, but you can't see it. So I enter 5 minutes for quick maneuver alarm, and it overwrites the value in the entry field for the normal alarm offset. Then I put 10 minutes in the latter, and it overwrites the value in the quick alarm offset entry field. However, when I add a quick alarm, it's at 5 minutes out from the node.

Thanks for the extra info - I see where that os an issue now - sorting it now

EDIT: All the variables were there - made a typo - duh!

Edited by TriggerAu
Link to comment
Share on other sites

I don't get why I put off trying this mod for so long. It's pretty much exactly what I was looking for: a scheduling utility so I can run multiple missions at once without potentially forgetting important steps along the way. Thanks for this wonderful mod!

Link to comment
Share on other sites

I don't get why I put off trying this mod for so long. It's pretty much exactly what I was looking for: a scheduling utility so I can run multiple missions at once without potentially forgetting important steps along the way. Thanks for this wonderful mod!

Tis addictive once you start to get multiple missions going yeah :)

In other news, squashed a few bugs and now have some basic contract stuff in the code, will try and finalise that and squash more bugs for another beta release this week. Thanks for all the feedback :)

Link to comment
Share on other sites

I don't get why I put off trying this mod for so long. It's pretty much exactly what I was looking for: a scheduling utility so I can run multiple missions at once without potentially forgetting important steps along the way. Thanks for this wonderful mod!

Yep, after re-testing stock KSP this was one of the two mods I needed, along with MJ. MJ only gets in there because I'm testing and need repeatable flying, KAC's there because, well, I don't want to have to use a stopwatch and notepad all the time ^^.

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