![]() |
|
|||||||
| Addons A repository for Orbiter addons contributed by users. Developers & members may announce new releases here and discuss any Orbiter addon. |
![]() |
|
|
Thread Tools |
|
|
#16 |
|
Donator
![]() ![]() |
Quote:
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. |
|
|
|
| Thanked by: |
|
|
#17 |
|
Addon Developer
![]() ![]() |
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. |
|
|
|
| Thanked by: |
|
|
#18 |
|
Addon Developer
![]() |
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. |
|
|
|
|
|
#19 |
|
Donator
![]() ![]() |
Quote:
When I am done, you will likely yell at me why I explained something that simple so complicated...
|
|
|
|
|
|
#20 |
|
Donator
![]() ![]() |
Here you have the algorithm explained, it isn't really that complex.
Last edited by Urwumpe; 07-09-2012 at 09:16 PM. Reason: Poor version of the drawing |
|
|
|
|
|
#21 |
|
Addon Developer
![]() |
ok. Lets me see if I have this right:
Since there are 4 spaces for tank. I need 4 shadow tanks. so make 4 propellant resource for the shadow tanks. How does one move the fuel from the shadows in the main? Wouldn't you have to do this equally or a shift would occur? So if a tank is attached then add fuel into shadow tank 1 which feeds into the main tank, right. " 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." |
|
|
|
|
|
#22 |
|
Donator
![]() ![]() |
Depends on how YOU want it, you need to implement it. You could refuel the main tank from all tanks equally, by calculating how much fuel you need to transfer every timestep and then divide this amount by the number of tanks. Or select the tanks you want manually, for example draining a tank faster to have only empty and almost full tanks after landing, for swapping more tanks during the stop without wasting fuel.
Important is doing this with SetPropellantMass() in Prestep. PS: As far as I see it, the Eagle can carry 8 external fuel tanks, 2 per pod. |
|
|
|
|
|
#23 |
|
Addon Developer
![]() |
Ok. We are going with 4, 1 per leg pod. It is for the RCS engines and Hover and not main as they are Nuclear.
The red tank that goes in the leg pod is a UCGO vessel. some code: H: Code:
const double MAX_FUEL = 6000.0; const double MAX_CHEMICALFUEL = 0.0; PROPELLANT_HANDLE ph_main; PROPELLANT_HANDLE ph_shadow1; PROPELLANT_HANDLE ph_shadow2; PROPELLANT_HANDLE ph_shadow3; PROPELLANT_HANDLE ph_shadow4; PROPELLANT_HANDLE ph_mainchemical;//this is the combo of all shadow Code:
ph_main=CreatePropellantResource(MAX_FUEL); ph_mainchemical=CreatePropellantResource(0); ph_shadow1=CreatePropellantResource(shadow1); ph_shadow2=CreatePropellantResource(shadow2); ph_shadow3=CreatePropellantResource(shadow3); ph_shadow4=CreatePropellantResource(shadow4); ... th_main[i] = CreateThruster (_V(0,0,0), _V(0,0,1), MAX_MAIN_THRUST, ph_main, ISP_FUS);//1 of the 4 main th_hover[i] = CreateThruster (_V(0,0,0), _V(0,1,0), MAX_HOVER_THRUST, ph_mainchemical, ISP_QUI); void EAGLEFUEL::clbkPostStep(double simt, double simdt, double mjd) // if attached then add fuel if (GetAttachmentStatus(FUEL1))(shadow1=(shadow1+5000)); if (GetAttachmentStatus(FUEL2))(shadow2=(shadow2+5000)); if (GetAttachmentStatus(FUEL3))(shadow3=(shadow3+5000)); if (GetAttachmentStatus(FUEL4))(shadow4=(shadow4+5000)); 6 tanks but even though a tank is attached it only shows fuel in 1 Last edited by gattispilot; 09-27-2012 at 11:13 PM. |
|
|
|
|
|
#24 |
|
Addon Developer
![]() |
Not sure why no fuel is in the shadow tanks. I think I need to add all the shadow tanks into ph_mainchemical. But not sure how to change the level in the separate tank.
|
|
|
|
|
|
#25 |
|
Donator
![]() ![]() |
Because you increase in poststep the maximum amount of fuel possible in the tanks, not the actual amount of fuel.
|
|
|
|
|
|
#26 |
|
Addon Developer
![]() |
Quote:
|
|
|
|
|
|
#27 |
|
Donator
![]() ![]() |
Quote:
Also, you just increase the variable with which you defined the propellant mass, but did not change the actual propellant resource by calling the SetMaxPropellantMass function. |
|
|
|
|
|
#28 |
|
Addon Developer
![]() |
Quote:
Thanks so if change this: Code:
ph_mainchemical=CreatePropellantResource(3000); SetMaxPropellantMass So do I need to do this for the shadow tanks? wouldn't this shadow3 be 5000 since a tank is attached to Fuel3 and shadow3 is the amount of propellant in shadow3 Code:
ph_shadow3=CreatePropellantResource(shadow3); if (GetAttachmentStatus(FUEL3))(shadow3=(shadow3+5000)); |
|
|
|
|
|
#29 |
|
Donator
![]() ![]() |
Well, I would operate differently there:
Has the advantage that the scenario file is not showing the duplicates and it crashes when your logic is wrong, instead of just letting you have extra fuel. |
|
|
|
|
|
#30 |
|
Addon Developer
![]() |
Quote:
So how can I change/read the external tank propellant mass. So if attached it fuels a shadow tank and the external tank propellant level goes down. |
|
|
|
![]() |
|
| Thread Tools | |
|
|
|||||
| Quick Links | Need Help? |