Delta-V calculator

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Moderator
Veteran
Modder
Deja Vu
Hot Stuff
Swingin' on a Star
Atlas
Forum Legend
#1
Here is a simple, yet very useful mod, the ΔV calculator.

This mod adds your ΔV stat to your flight information panel:
DVcalculator.gif


How does it work?

It simply calculates the ΔV available to your rocket based on all the engines that are currently turned on. Basically, it shows how much ΔV you would get by letting the rocket burning its fuel without touching anything else. It means that for example your ΔV will change if you turn on another engine, or if you trigger a separator (because it alleviates your rocket).
It is compatible with many situations:
  • can deal with multiple stages working together (typically a first stage flanked by boosters), it also takes into account the fact that some stages may run out of fuel before others.
  • works accurately with angled engines
  • compatible with boosters (if you have a custom parts pack adding them)
  • works with ion engines
  • works with stretched engines

Known limitations:
  • doesn't take RCS into account (you generally don't add them for ΔV...)

Wait, what is "ΔV" to begin with?

"ΔV" is to be pronounced "delta-V". "Δ" is a greek letter that is commonly used in physics to express a difference. In this case, it means "velocity difference". That's an abstract rocket resource that tells you by how much you can make vary your rocket speed.

For example, if your rocket runs at 1000 m/s and you accelerate until you reach 1100 m/s, then you have spent 100 m/s of ΔV.

How do I install it?
  1. Open your mod folder (from the game, go into the mod loader menu, then click "Open Mod folder")
  2. Download DeltaV_Calculator.dll
  3. Drop it into your mod folder
  4. Restart your game and activate the mod (make sure UI Tools is activated, otherwise the mod won't show up)
This is what the mod looks like in your mod loader menu:
ModDisplay.jpg


Enjoy :cool:

Note: this mod is compatible with Vanilla Upgrade (it also adds additional data to the flight information panel)

Source code available here.
 
Last edited:

Orion

Die-hard WALL-E fan.
Staff member
Sentinelle
Modder
Hot Stuff
Space Glider
Swingin' on a Star
Atlas
#3
It works with extreme values too...
Screenshot 2023-11-21 191309.png

Lol
 

Orion

Die-hard WALL-E fan.
Staff member
Sentinelle
Modder
Hot Stuff
Space Glider
Swingin' on a Star
Atlas
#5
Now that is a beautiful detail. That's a great use, too, for quickly verifying the potential of rockets with engines from your upcoming interstellar pack
Yeah, it meshes well with VanillaUpgrades for the unit change, I wasn't expecting that.
 

Lemniscate Biscuit

RL10C-5-1
Staff member
Sentinelle
Ace
Modder
Hot Stuff
Moon Maker
Atlas
MOTY 2023
#8
Here is a simple, yet very useful mod, the ΔV calculator.

This mod adds your ΔV stat to your flight information panel:
View attachment 110471

How does it work?

It simply calculates the ΔV available to your rocket based on all the engines that are currently turned on. Basically, it shows how much ΔV you would get by letting the rocket burning its fuel without touching anything else. It means that for example your ΔV will change if you turn on another engine, or if you trigger a separator (because it alleviates your rocket).
It is compatible with many situations:
  • can deal with multiple stages working together (typically a first stage flanked by boosters), it also takes into account the fact that some stages may run out of fuel before others.
  • works accurately with angled engines
  • compatible with boosters (if you have a custom parts pack adding them)
  • works with ion engines

Known limitations:
  • Untested with custom engines using an alternative fuel source
  • doesn't take RCS into account (you generally don't add them for ΔV...)

Wait, what is "ΔV" to begin with?

"ΔV" is to be pronounced "delta-V". "Δ" is a greek letter that is commonly used in physics to express a difference. In this case, it means "velocity difference". That's an abstract rocket resource that tells you by how much you can make vary your rocket speed.

For example, if your rocket runs at 1000 m/s and you accelerate until you reach 1100 m/s, then you have spent 100 m/s of ΔV.

How do I install it?
  1. Open your mod folder (from the game, go into the mod loader menu, then click "Open Mod folder")
  2. Download DeltaV_Calculator.dll
  3. Drop it into your mod folder
  4. Restart your game and activate the mod (make sure UI Tools is activated, otherwise the mod won't show up)
This is what the mod looks like in your mod loader menu:
View attachment 110472

Enjoy :cool:

Note: this mod is compatible with Vanilla Upgrade (it also adds additional data to the flight information panel)
This is great!
 

NeptuneSky

Pilot
Modder
Hot Stuff
Swingin' on a Star
Atlas
#10
Wow, I never expected to see this one made. Using enabled engines instead of trying to manually figure out stages is a clever solution to an otherwise annoying problem, although it still leaves a very complicated area to improve on the table. Regardless, looking great and will be installing.
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Moderator
Veteran
Modder
Deja Vu
Hot Stuff
Swingin' on a Star
Atlas
Forum Legend
#11
Wow, I never expected to see this one made. Using enabled engines instead of trying to manually figure out stages is a clever solution to an otherwise annoying problem, although it still leaves a very complicated area to improve on the table. Regardless, looking great and will be installing.
Coming from you that's truly a compliment :)

I agree that one could expect more from this (taking stages into account), but I guess it's the most that's realistically feasible. SFS offers way more freedom than other space games in terms of rocket construction, so it's potentially very hard to understand how the rocket will be used. Anyway, there are things that are hard (if not impossible) to anticipate, like fuel transfer, asparagus staging and so on, so I accept the fact that the mod would have limits anyway :)
 

NeptuneSky

Pilot
Modder
Hot Stuff
Swingin' on a Star
Atlas
#12
Coming from you that's truly a compliment :)

I agree that one could expect more from this (taking stages into account), but I guess it's the most that's realistically feasible. SFS offers way more freedom than other space games in terms of rocket construction, so it's potentially very hard to understand how the rocket will be used. Anyway, there are things that are hard (if not impossible) to anticipate, like fuel transfer, asparagus staging and so on, so I accept the fact that the mod would have limits anyway :)
For sure, I honestly never expect an attempt to do it that way to be very accurate unless you're building something "traditional". This method provides more accurate results anyways with the only drawback being you can't see it preflight.

I have been considering remaking the build screen dV calculator that VU used to have but instead calculate it based on selected parts, i.e. manually select the entire stage and it'll spit out a number, then you can add another stage and it omits the parts you selected for previous stages.
 

NeptuneSky

Pilot
Modder
Hot Stuff
Swingin' on a Star
Atlas
#13
Yeah, it meshes well with VanillaUpgrades for the unit change, I wasn't expecting that.
Vanilla Upgrades patches the vanilla conversion for units, any mod that doesnt use its own separate unit conversion method should work with it.
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Moderator
Veteran
Modder
Deja Vu
Hot Stuff
Swingin' on a Star
Atlas
Forum Legend
#14
Update to V1.1.2

The mod wasn't working with electric engines (only custom engines using the electricity parts pack are concerned), the new version fixes that.
If you have the mod already installed you have nothing to do, the update is automatic :)
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Moderator
Veteran
Modder
Deja Vu
Hot Stuff
Swingin' on a Star
Atlas
Forum Legend
#18
Does this work accurately with stretched engines?
Yes, that was taken into account. I'll edit the first post to mention it, thanks for bringing this up.
 

Darthan

Modder
Deja Vu
Hot Stuff
Space Glider
Swingin' on a Star
Voyager Quest
ET phone home
Atlas
Floater
#19
Would it be possible to also show the delta-v allowing for the Oberth effect? You can get some impressive boosts from the Oberth effect from Jupiter and the Sun.
In a recent experiment in realistic I managed to escape the Solar System at about 78 km/s starting with a total of about 14 km/s at LEO (using 3 stages). I used a bi-elliptic transfer (via about 10,000 Gm) from Earth to a very low solar periapsis (about 3000 km) then spending all the remaining fuel at the periapsis.
 

Axiom

The Didact
Recruit
Hot Stuff
Swingin' on a Star
Atlas
#20
Would it be possible to also show the delta-v allowing for the Oberth effect? You can get some impressive boosts from the Oberth effect from Jupiter and the Sun.
Altaïr can probably give a better explanation but in short the Oberth effect doesn't increase your delta-v, what it says is that you'll have greater effects on your orbit if at the periapsis (where you're going the fastest)

Why?
Take two ships, Ship A is moving at 5m/s (and has a mass of 10kg) and Ship B is moving at 10m/s. The kinetic energy of Ship A and Ship B respectively are 125J and 500J. Now lets increase the velocity of both ships by 1m/s so Ship A and Ship B are moving at 6m/s and 11/ms, now their kinetic energies are 180J and 605J, so Ship A gained 55J and Ship B gained 105J. The total energy in a orbit stays constant so the higher increase in kinetic energy results in a bigger change in orbit

Wouldn't that violate the conservation of energy?
It does look like that, I did think that once aswell but what happens here is that a portion of the chemical energy of the fuel goes out through the exhaust as kinetic energy. When the speed of the ship goes up the exhaust speed will go down (Think about throwing a ball while stationary compared to moving backwards in a car) and the kinetic energy of the exhaust will be lower, so the energy transferred into the ship as kinetic energy is higher

I hope this at somewhat makes sense
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Moderator
Veteran
Modder
Deja Vu
Hot Stuff
Swingin' on a Star
Atlas
Forum Legend
#21
Would it be possible to also show the delta-v allowing for the Oberth effect? You can get some impressive boosts from the Oberth effect from Jupiter and the Sun.
It's not the purpose of this mod. The ΔV calculator tells you how much ΔV your rocket has based on the engine setup and the fuel available. It doesn't assume what you intend to do with it, in particular it doesn't know if your intention is to convert your whole ΔV into escape velocity...

If your intention is to calculate the gain in escape velocity, you can use the following formula:
V² = V_lib² + V_inf²
Where:
- V is your current speed
- V_lib is the liberation speed at the current point
- V_inf (like "infinity") is the escape velocity

That way you can easily calculate by how much V_inf increases by increasing V by a given value.

Altaïr can probably give a better explanation but in short the Oberth effect doesn't increase your delta-v, what it says is that you'll have greater effects on your orbit if at the periapsis (where you're going the fastest)

Why?
Take two ships, Ship A is moving at 5m/s (and has a mass of 10kg) and Ship B is moving at 10m/s. The kinetic energy of Ship A and Ship B respectively are 125J and 500J. Now lets increase the velocity of both ships by 1m/s so Ship A and Ship B are moving at 6m/s and 11/ms, now their kinetic energies are 180J and 605J, so Ship A gained 55J and Ship B gained 105J. The total energy in a orbit stays constant so the higher increase in kinetic energy results in a bigger change in orbit

Wouldn't that violate the conservation of energy?
It does look like that, I did think that once aswell but what happens here is that a portion of the chemical energy of the fuel goes out through the exhaust as kinetic energy. When the speed of the ship goes up the exhaust speed will go down (Think about throwing a ball while stationary compared to moving backwards in a car) and the kinetic energy of the exhaust will be lower, so the energy transferred into the ship as kinetic energy is higher

I hope this at somewhat makes sense
Apparently somebody taught you well :)
 

Altaïr

Space Stig, Master of gravity
Staff member
Head Moderator
Moderator
Veteran
Modder
Deja Vu
Hot Stuff
Swingin' on a Star
Atlas
Forum Legend
#23
V1.1.4 released.
Just a couple of minor fixes.
 

TheMacTester

Voyager Quest
ET phone home
Atlas
Floater
MOTY 2024
#24
so for some reason, on my mac, when i stretch engines the delta-v stays the same, why is this, does a mod make this happen, did i do somthing wrong?
 

Darthan

Modder
Deja Vu
Hot Stuff
Space Glider
Swingin' on a Star
Voyager Quest
ET phone home
Atlas
Floater
#25
As far as I know stretching engines only changes the thrust, not the mass or the ISP so the delta-V should not change?