1. This forum is obsolete and read-only. Feel free to contact us at support.keenswh.com

Hydrogen infrastructure script

Discussion in 'Programming Released Codes' started by mar21m, Feb 15, 2018.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. mar21m

    mar21m Trainee Engineer

    Messages:
    3
    Hello, I would like to show you my script that I am currently working on.

    Source code - Please feel free to point out anything that could be done better or is done wrong.
    Workshop page


    What it does ?
    The purpose of the script is to analyze all kind of data in regards to hydrogen. That means maximum gain from gas generators, maximum draw from any hydrogen thrusters and much more.

    Output of this script is separated into two panels:
    1) H_STAT panel - Global stats
    - Amount of hydrogen stored in hydrogen tanks and their fill percentage (when hydrogen tanks are present)
    - Amount of hydrogen that could be generated from stored Ice onboard (when gas generators are present)
    - Maximum gain per second from all gas generators (when gas generators are present)
    - Maximum draw per second from all hydrogen thrusters firing at once at full thrust (when hydrogen thrusters are present)
    - Approximate times from different thrusts using Ice and/or hydrogen tanks
    (when hydrogen thrusters are present) (when gas generators are present) (when hydrogen tanks are present)
    2) H_THRUST panel - Stats per thrust vector
    A controller is required for this panel to show any information.
    It shows current and maximum draw of all hydrogen thrusters as well as shown below per each thrust vector.
    - Thrust direction
    - % thrust
    - Current draw
    - Maximum draw
    How can I use it ?
    The only requirement for this script to function is a Programmable Block.
    If you want to display data on LCD panels, simply put #H_STAT or #H_THRUST somewhere in the panel's name and reset the programmable block. You can add those to any number of panels and they will all work.

    All non functional blocks are ignored by the script, as well as any blocks with #IGNORE in their name. (This feature is not yet present in workshop / git release)

    Script updates every 10 ticks and every 100 ticks it re-detects all blocks on the ship.

    Current TUI is not very nice and I will soon start making it much nicer.
     
Thread Status:
This last post in this thread was made more than 31 days old.