Question External Tanks

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,872
Reaction score
2,847
Points
203
Location
Dallas, TX
Not sure if this is the right area to ask.

Can a vessel have external tanks that can be released? I saw the external tank for Delta glider. But to use Fuel MFD the tank needs to be docked. Which wouldn't work on a landed craft?
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,769
Reaction score
2,527
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Not sure if this is the right area to ask.

Can a vessel have external tanks that can be released? I saw the external tank for Delta glider. But to use Fuel MFD the tank needs to be docked. Which wouldn't work on a landed craft?

More complex topic then, since attached vessels don't have mass, their parent has to keep track of their mass. I use shadow masses in the parent vessel to keep things managed: I consume fuel from shadow masses in the parent and from the fuel tank. When I jettison the tank, the tank has the proper mass and I delete the shadow masses from the parent vessel to release also the masses from the parent.

So, it can be done. Even in a MFD. But I don't really recommend it, since it does mess with the physical properties of a vessel.

(I also have a clbkGeneric interface defined in that project to query information about the tank assignments and chemical resources in them, so more than just the standard tanks are supported, eg special multipurpose modules)
 
Last edited:

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,872
Reaction score
2,847
Points
203
Location
Dallas, TX
Thanks. How do you get the fuel from the tanks? I was thinking something if tank is attached then add fuel to main tank. But the tank would not run out.

But not sure if you could consume fuel from the tank. So the tank could be empty.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,769
Reaction score
2,527
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Thanks. How do you get the fuel from the tanks? I was thinking something if tank is attached then add fuel to main tank. But the tank would not run out.

But not sure if you could consume fuel from the tank. So the tank could be empty.

Two possibilities:

Pumping fuel from external tank to a main tank. Or
Connecting the thrusters to the shadow tank and sync external tank resources with its shadow tank version.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,872
Reaction score
2,847
Points
203
Location
Dallas, TX
What if you wanted to have a vessel that you could pop in/out fuel tanks. So at the start the main fuel tank is at 0. Then if a tank is attached then add 250 to the main fuel. So with 4 tanks attached you get 1000. But the tank itself would not have less fuel if detached.
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,303
Reaction score
3,278
Points
203
Location
Toulouse
It can be done very easily with Velcro Rockets. The addon comes with a few exemples of DG /w external tanks.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,872
Reaction score
2,847
Points
203
Location
Dallas, TX
Thanks. The specific vessel I am thinking about are the Space 1999 Eagles that have a fuel tank in each pod.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,769
Reaction score
2,527
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Thanks. The specific vessel I am thinking about are the Space 1999 Eagles that have a fuel tank in each pod.

it still has one sump tank per the engine for collecting fuel for the engines, at least according to one drawing in the WWW.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,872
Reaction score
2,847
Points
203
Location
Dallas, TX
it still has one sump tank per the engine for collecting fuel for the engines, at least according to one drawing in the WWW.

Where?

So I think if you just add fuel to the main tank from the 4 possible tanks it would work. But there is no a way to determine if a tank was full or not.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,769
Reaction score
2,527
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Where?

So I think if you just add fuel to the main tank from the 4 possible tanks it would work. But there is no a way to determine if a tank was full or not.

Just use shadow tanks, like I explained. For every possible external fuel tank, you have a propellant resource in your main vessel that imitates the external fuel tank like a shadow. you take fuel from the shadow tank and set the external fuel tank resource to the fuel mass of the shadow tank.

When the shadow tank is empty, the external fuel tank is empty as well. Still no reason to not pump fuel around, since this would also give you an important reserve in-game: When the external tanks are empty, you have still full sump tanks for getting home.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,872
Reaction score
2,847
Points
203
Location
Dallas, TX
Ok Do you have a code sample for the shadow tanks. So how would you attach the tanks?

sptrol147.jpg


As you can see a new red tank is loaded into a pod
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,769
Reaction score
2,527
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Ok Do you have a code sample for the shadow tanks. So how would you attach the tanks?

No code sample that could be useful for you for learning it, sadly.

In the creation of your vessel, you need to recreate the shadow tank resources during clbkPostCreation.

for attaching, just look for a vessel without parent that is having the right kind of attachment code (your choice) and is within z cm of a free attachment of the Eagle. Then just attach it, create a shadow tank resource and start using it (if desired, maybe you have valve works for selecting tanks)

For detaching, it should usually be enough to grapple the tank by another vehicle. For assisting, you could eject the tank by raising it on its attachment out of the slot (Could also make more realistic animations for inserting the tank, if you have the attachment raised for empty tank slots and then just lowering the attached tank into the slot)

For loading and saving, you need to remember storing the attachment states if animated, other wise, you can let Orbiter handle it, just update the information of all attachments during clbkPostCreation.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,872
Reaction score
2,847
Points
203
Location
Dallas, TX
For detaching, it should usually be enough to grapple the tank by another vehicle. For assisting, you could eject the tank by raising it on its attachment out of the slot (Could also make more realistic animations for inserting the tank, if you have the attachment raised for empty tank slots and then just lowering the attached tank into the slot)

I like that idea. I can already attach/detach the tank. But I like the raise/lower the tank.

But how do you change the fuel level of the tank. So if a tank is full and attached and drained into the Eagle. When you detach it if another vessel got it it might be empty.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,769
Reaction score
2,527
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
But how do you change the fuel level of the tank. So if a tank is full and attached and drained into the Eagle. When you detach it if another vessel got it it might be empty.

Make the "fuel tank vessel" with one standard propellant resource (config file should do it). every post step, you synchronize the level of the shadow tank in the eagle (which is just a copy of the tank in the fuel tank vessel) to the fuel tank vessels propellant resource (Same propellant mass in both tanks). Repeat this for all attached tanks and their shadow tanks in the Eagle.

Since the fuel tank vessel can't be refueled while attached to the Eagle, it is an one-directional and very simple.

I wish I would have the time for making some drawings to explain it better, but I have to leave for football in 20 minutes.
 

BruceJohnJennerLawso

Dread Lord of the Idiots
Addon Developer
Joined
Apr 14, 2012
Messages
2,585
Reaction score
0
Points
36
Just a thought with regards to the "unintentional orbital insertion bug" caused by ground docking; couldnt we just create the spacecraft, dock everything together, then land, say on the moon, with a seperate landing gear craft attached to the core ship via an att point? That should work in theory right?
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,769
Reaction score
2,527
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Just a thought with regards to the "unintentional orbital insertion bug" caused by ground docking; couldnt we just create the spacecraft, dock everything together, then land, say on the moon, with a seperate landing gear craft attached to the core ship via an att point? That should work in theory right?

It would even be better in many aspects to use attachments for such situations than the docking port, but remember that attachments are also no docking ports, it is a completely different mechanism.

Attachments permit far more freedom in the application, but have more limitations in terms of what orbiter does for you: you have to define the behavior, orbiter only helps you with a standard interface between the vessels.

Docking ports are for connecting vessels in orbit in a comfortable and mildly realistic way.
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,303
Reaction score
3,278
Points
203
Location
Toulouse
Attachements are a very powerful feature (I typically use them for multi-stage rockets), as long as, as said Urwumpe, you say everything to Orbiter (extra empty mass, extra fuel mass, extra aerodynamic drag, displacement of the CoG, etc etc...)

Docking, in my opinion, is interesting only in-flight "dynamic" situations. It is certainly possible to reproduce the docking behavior using attachments, it's just an useless pain when you just want to dock two vessels.

The way I see it, docking is a particular case of attachment, an handy shortcut Martins made available to us.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,872
Reaction score
2,847
Points
203
Location
Dallas, TX
I agree. But there are things you can do while docked but not attached. Transfer of Ummu for one.

I still not sure about the shadow tanks coding. I am going to add an elevator so the tank can be raised/lowered into the leg.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,769
Reaction score
2,527
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
I still not sure about the shadow tanks coding. I am going to add an elevator so the tank can be raised/lowered into the leg.

I see, you need enlightenment... let me just get same life back into my legs, and then I will explain things to you ...

When I am done, you will likely yell at me why I explained something that simple so complicated... :cheers:
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,769
Reaction score
2,527
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Here you have the algorithm explained, it isn't really that complex.
 

Attachments

  • External Fueltank system.png
    External Fueltank system.png
    95.8 KB · Views: 12
Last edited:
Top