Jump to content

[LINUX, WIN, MAC] KSP Tank Calculator 1.5


Recommended Posts

Ksp Tank Calculator 1.5

A simple browser app for configuring fuel tanks (or any tank) for use with default KSP fuels or Community Resource Pack resources.

 

6cznnAF.png?1

Enter the dimensions of the part you wish to make configs for. Add sub tanks with the 'Add Sub-tank' button. Or, remove tanks

with the 'Remove Sub-tank' button. Sliders allow for customization of each tanks size or you can enter the ratio in the 'Ratio' input.

 

 

WJqHm2o.png?1

Select the shape you would like to use for the volume calculation. Choose either Capsule, Cylinder, or Sphere.

 

PViEFiJ.png

Select multiple fuel types for each tank.

kzDgceh.png?1

New in 1.2 is the CFG button which takes your resources for each tank, the total dry mass, cost, and calculated entry cost, then outputs those variables in CFG format.

Newly added in 1.3 is conical mode. By toggling the conical button, a second diameter input will appear that will conform all sub tanks to a tapered cylinder. Useful for making nosecone fuel tanks.

In 1.5 a new "Open Settings" button has been added, which exposes global variables. 

 

KSP Tank Calculator is pretty smart. It will automatically adjust the volume, density, and cost of a tank when default KSP fuels

are selected. 

 

Under The Hood

zyRzPnI.jpg

A typical tank setup in KSPTC consists of:

  1. Master Tank - The outer envelope for the Sub-Tanks. Sub Tank size/volume is constrained to the Master Tank.
     
  2. Master Tank Cost - Master Tank Inner Volume is subtracted from Master Tank Inner Volume, then multiplied by Dry Mass Cost.
     
  3. Master Tank Outer Volume - This is the total amount of space for the whole tank.
     
  4. Master Tank Dry Mass - By subtracting the Master Tank Inner Volume from Master Tank Outer Volume, the stiffener dry mass volume is
                                       attained. This value is multiplied by Dry Mass Density.

     
  5. Master Tank Inner Volume - This is the amount of space for all Sub-Tanks to occupy. 
     
  6. Sub-Tank - Sub-Tanks are what contain resources. Each Sub-Tank you add subtracts from the space inside of the Master Tank.
                     The more Sub-Tanks you add, the less volume each Sub-Tank can contain. Sub-Tanks form a hierarchy based on their
                     order in the stack. The one bellow is constrained to the one above. This means, as you increase the ratio of the top most
                     Sub-Tank, you decrease the left over space for the lower Sub-Tanks to occupy. 

     
  7. Sub-Tank Outer Volume - This is the total amount of space that the Sub-Tank occupies. 
     
  8. Sub-Tank Inner Volume - This is the amount of space within the tank which resources may occupy.
     
  9. Sub-Tank Resource Amount - The amount of a given resource for this Sub-Tank in Liters. If the fuel type for this Sub-Tank is a vanilla
                                                KSP fuel, his value is multiplied by 0.199813, the default value of KSP Volume Mult. Otherwise, Sub-Tank
                                                Resource Amount is multiplied by Volume Mult (the default is 1).

     
  10. Sub-Tank Dry MassBy subtracting the Sub-Tank Inner Volume from Sub-Tank Outer Volume, the Sub-Tank wall dry mass is attained.
                                   This value is multiplied by Dry Mass Density.

     
  11. Sub-Tank Fuel CostBy multiplying the Sub-Tank Resource Amount by the fuel type unitCost value (defined in resources.js) the cost of
                                    fuel is attained.

     
  12. Sub-Tank Dry Cost - The Sub-Tank Dry Mass volume is multiplied by Dry Mass Cost. If the Sub-Tank fuel type for this
                                  Sub-Tank is a vanilla KSP fuel type, KSP Dry Mass Cost is used instead of Dry Mass Cost.

     
  13. Sub-Tank Cost - The sum of Sub-Tank Fuel Cost and Sub-Tank Dry Cost.
     
  14. Total Volume - This is the sum of all Sub-Tank Resource Amounts.
     
  15. Dry Mass -  The sum of all Sub-Tank Dry Mass and the Master Tank Dry Mass.
     
  16. Fuel Mass -  The sum of all Sub-Tank Resource Amounts multiplied by each Sub-Tank fuel type density value (stored in resources.js).
     
  17. Total Mass - The sum of Fuel Mass and Dry Mass.
     
  18. Dry Cost - The sum of all Sub-Tank Dry Cost values and Master Tank Dry Cost.
     
  19. Fuel Cost - The sum of all Sub-Tank Fuel Cost values.
     
  20. Total Cost - The sum of all Sub-Tank Cost .
     

Setup

Download the KSP_Tank_Calculator zip file anywhere. Unzip the zip file. Open ksp_tank_calculator.html in any web browser (preferably Chrome or Firefox). Enjoy!

 

Download Version 1.5

Github

Online version: https://bonus-eventus.github.io/KSP_Tank_Calculator/ 

 

Changelog

 

Version 1.5

Fixed a bug where resource definitions for SolidFuel and XenonGas were missing in resources.js

Added "Open Settings" button for editing global variables.

 

Version 1.4

*fixed minor bug where monopropellant was labeled monoprop

*changed name of ksp_tank_calculator.html to index.html

 

Version 1.3

*Fixed a bug where when non KSP fuels were selected then volumes did not
update to the proper scale.

*Added conical mode for nosecone tanks

 

Version 1.2

* Fixed bug that caused volume calculations to be inaccurate at low ratios.

* Added CFG output for easier copy/pasting.

* Changed tank slider step amount from 0.01 to 0.0001 for more precise fine tuning.

 

Licensing

Author: Bonus Eventus

This software is licensed under GPL 3. Check LICENSE file for more info.
All other software, fonts, etc is licensed by their respective copyright holders.

Edited by Bonus Eventus
Link to comment
Share on other sites

  • 2 weeks later...

Updated to version 1.3

*Fixed a bug where when non KSP fuels were selected then volumes did not
update to the proper scale.

*Added conical mode for nosecone tanks

Edited by Bonus Eventus
Link to comment
Share on other sites

Updated to Version 1.5

* Fixed a bug where resource definitions for SolidFuel and XenonGas were missing in resources.js

* Added "Open Settings" button for editing global variables.

Thanks to @Pak for bringing the resource issues to my attention.

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