various tweaks

This commit is contained in:
Youen Toupin 2015-06-13 21:12:22 +02:00
parent 14c3951851
commit 1cda53febf
2 changed files with 7 additions and 8 deletions

View File

@ -8,7 +8,7 @@ PART
node_attach = 0.0, 0.0, -0.1875, 0.0, 0.0, -1.0 node_attach = 0.0, 0.0, -0.1875, 0.0, 0.0, -1.0
TechRequired = advLanding TechRequired = advLanding
entryCost = 2000 entryCost = 2000
cost = 2200 cost = 40
category = FuelTank category = FuelTank
subcategory = 0 subcategory = 0
title = Helium tank title = Helium tank

View File

@ -31,7 +31,7 @@ namespace Aerostats
/// Air density at sea level is about 1.2kg/m^3, which means a 1000m^3 balloon will be able to lift about 1 ton at sea level (after substracting the balloon gas weight) /// Air density at sea level is about 1.2kg/m^3, which means a 1000m^3 balloon will be able to lift about 1 ton at sea level (after substracting the balloon gas weight)
/// </summary> /// </summary>
[KSPField(isPersistant = false, guiActive = false)] [KSPField(isPersistant = false, guiActive = false)]
public float MaxBalloonVolume = 10000; public float MaxBalloonVolume = 15000;
/// <summary> /// <summary>
/// Weight, in kilograms, of 1m^3 of gas at 100kPa and 0°C /// Weight, in kilograms, of 1m^3 of gas at 100kPa and 0°C
@ -46,8 +46,8 @@ namespace Aerostats
/// If the balloon can not store the target amount of gas (because the maximum volume has been reached), the system won't try to inject more gas, to avoid venting through the security valve of the balloon. /// If the balloon can not store the target amount of gas (because the maximum volume has been reached), the system won't try to inject more gas, to avoid venting through the security valve of the balloon.
/// </summary> /// </summary>
[KSPField(isPersistant = true, guiActive = true)] [KSPField(isPersistant = true, guiActive = true)]
[UI_FloatRange(minValue = 0, maxValue = 20000.0f, stepIncrement = 1.0f)] [UI_FloatRange(minValue = 0, maxValue = 20000.0f, stepIncrement = 100.0f)]
public float LiftingGasTargetQuantity; public float LiftingGasTargetQuantity = 100.0f;
/// <summary> /// <summary>
/// Mass of the empty balloon, in kg /// Mass of the empty balloon, in kg
@ -56,11 +56,10 @@ namespace Aerostats
public float BalloonEmptyMass = 50.0f; public float BalloonEmptyMass = 50.0f;
/// <summary> /// <summary>
/// Minimum amount of gas that will be use to inflate the balloon at the beginning. /// Minimum amount of gas that will be used to inflate the balloon at the beginning. The balloon can not be deflated below this amount.
/// This is needed if you want the balloon to lift itself right after staging.
/// </summary> /// </summary>
[KSPField(isPersistant = false, guiActive = false)] [KSPField(isPersistant = false, guiActive = false)]
public float MinimumFillQuantity = 75.0f; public float MinimumFillQuantity = 10.0f;
/// <summary> /// <summary>
/// Drag coefficient of the balloon /// Drag coefficient of the balloon
@ -235,7 +234,7 @@ namespace Aerostats
if(springLength > restLength) if(springLength > restLength)
{ {
float tensingLength = springLength - restLength; float tensingLength = springLength - restLength;
springForceMag = Math.Min(tensingLength * SpringHardness, 500000.0f); springForceMag = tensingLength * SpringHardness;
var springForce = springVec * (springForceMag / springLength * 0.001f); var springForce = springVec * (springForceMag / springLength * 0.001f);
part.rigidbody.AddForce(springForce, ForceMode.Force); part.rigidbody.AddForce(springForce, ForceMode.Force);
Balloon.rigidbody.AddForceAtPosition(-springForce, balloonAttachPoint, ForceMode.Force); Balloon.rigidbody.AddForceAtPosition(-springForce, balloonAttachPoint, ForceMode.Force);