Releases: Petruchio96/KOS-Scripts
ExecNode.ks - Fixed warping
ExecNode.ks wouldn't actually warp on it's own - fixed in this release to use the built in function "WarpTo" Also added an optional parameter "WillWarp" to disable warping in the script if desired. Also added a line to turn SAS off. If SAS was on while running the script then the ship would "fight" the steering controls and never actually point at the burn vector.
SyncLong.ks update
Updated SyncLong.ks to include a "verbose" optional parameter to allow suppression of the print messages to the terminal. Also reworded some of the documentation in the code and in the Readme to reduce confusion.
Improved Charge Time Calculations
Improved the method used in CalcChargeTime to calculate the time needed to increase the ship's electric charge enough to transmit science in TransmitAllScience. Also created a buffer so the ship will not go below 5% charge while transmitting.
TransmitAllScience - Better Warping
Significant re-write of the TransmitAllScience function. I discovered the KOS built in function "warpto" so I removed my warp code and replaced it. Changed the CalcChargeTime function as a result. Added an optional parameter TransSpeed to TransmitAllScience to better calculate the transmission speed of the science based on the Mits/Sec of the antenna. Also changed GetAllScience to return the sensor list instead of a count of sensors. Had to change RunScience as a result.
Error Handling Update
This release handles errors and out of bounds conditions, such as trying to transmit data but there's no antenna, or trying to store data with no science storage container. This is not compatible with the previous version since it re-names GetESU() to GetESUlist() and the function returns a list (of just 1 part, or blank list) instead of returning a part object. Also not backwards compatible because of new function GetNonDeployableAnts() called by TransmitAllScience(). Also refactored GetDeployableAnts() and GetSensorList() for slimmer code and faster processing. Fixed a few minor bugs.
Fixed Bugs and Optimized Code
ClearAllScience() was not clearing the science data in the Atmospheric science part experiment - fixed. Also optimized the if statement to an "if else" statement. This eliminates 4 checks per part as the function steps through the list of all science parts.
Science Update
Added functionality to ClearAllScience() in Standard_Lib.ks so it reset goo canisters and science bays instead of deleting the science data. This allows them to be run again. Modified RunScience.ks to utilize these changes. See Readme and code comments for complete details.
First Public Release
See readme for complete documentation