You don't need to call me sir. It makes me nervous.I'm glad you're having fun on your vacation sir.
Here is a map of engine thrust while stationary at sea level. Note how the thrust isn't linear with throttle setting. Unlike rocket engines where the throttle directly controls the reaction mass, in jet engines the reaction mass is also dependent on flight conditions (Mach number, pressure, and temperature). To implement this in the existing Orbiter thruster framework will require two thruster definitions - one dummy thruster to take the user-input throttle level, which is then used to calculate thrust and variable Isp in the jet engine model, which are then passed to a second thruster that actually provides the thrust using SetThrusterLevel and SetThrusterIsp. |
Here is a map of engine thrust at 10 km and Mach 0.5 This shows the variation in thrust with altitude and Mach number compared to sea level thrust. |
Here is a map of engine thrust at 5 km at full throttle without afterburner at varying Mach number. This shows the variation in thrust with flight Mach number. Thrust decreases because it is equal to the change in momentum of the mass of air passing through the engine. As velocity increases, the inlet momentum increases and decreases the overall thrust. |
I actually updated Kev's Cessna 172 years ago, same deal. Unfortunately I only PM'd him through the forum.Ask @asbjos, he updated the T-38 from Kev's meshes, maybe he has his e-mail.
I got Kev's cleaned code to compile and the addon ran fine in Orbiter. Something in the implementation of the jet engine code is awry.
EDIT: I wonder if Orbiter is happy with a dummy propellant tank with no fuel, or a thruster with 0 thrust. Hmmm...
EDIT: I wonder if Orbiter is happy with a dummy propellant tank with no fuel, or a thruster with 0 thrust. Hmmm...
If no propellant resource is specified, the thruster is disabled until it is linked to a resource by SetThrusterResource().
Just read martins fine API documentation.... You can create a thruster with NULL as propellant resource for disabling the thruster.
/// \name Fuel management
//@{
/**
* \brief Create a new propellant resource ("fuel tank")
*
* Propellant resources are a component of the vessel's propulsion
* system. They can hold propellants and distribute them to connected
* engines to generate thrust.
* \param maxmass maximum propellant capacity of the tank [kg]
* \param mass initial propellant mass of the resource [kg]
* \param efficiency fuel efficiency factor (>0)
* \return propellant resource handle
* \note Orbiter doesn't distinguish between propellant and oxidant. A
* "propellant resource" is assumed to be a combination of fuel and
* oxidant resources.
* \note The interpretation of a propellant resource (liquid or solid
* propulsion system, ion drive, etc.) is up to the vessel developer.
* \note The rate of fuel consumption depends on the thrust level and
* Isp (fuel-specific impulse) of the thrusters attached to the
* resource.
* \note The fuel efficiency rating, together with a thruster's Isp
* rating, determines how much fuel is consumed per second to obtain a
* given thrust: \f$R = F (e \cdot Isp)^{-1}\f$ with fuel rate R
* [kg/s], thrust F [N], efficiency e and fuel-specific impulse Isp
* [m/s].
* \note If mass < 0 then mass = maxmass is substituted.
* \sa DelPropellantResource, SetPropellantMaxMass, SetPropellantMass,
* SetPropellantEfficiency, GetPropellantMaxMass, GetPropellantMass,
* GetPropellantEfficiency
*/
PROPELLANT_HANDLE CreatePropellantResource (double maxmass, double mass=-1.0, double efficiency=1.0) const;
I've also tried setting the argument to a higher value and it makes no difference. I may be misinterpreting the debugger.Allow me to kidnap you for a tour inside the brain of a C++ coder. When I am confused about the signature of a function (What the Error C2660 tells me), I look it up:
- CTRL + Left click on VesselAPI.h or open it manually in your project.
- In the center drop down menu at the top of the editor view, which should say something like "Global scope", you select VESSEL
- In the right drop down menu there, you scroll along or type the first letters of CreatePropellantResource and select it.
- Now you should read this one, including the doxygen comment on top:
C++:/// \name Fuel management //@{ /** * \brief Create a new propellant resource ("fuel tank") * * Propellant resources are a component of the vessel's propulsion * system. They can hold propellants and distribute them to connected * engines to generate thrust. * \param maxmass maximum propellant capacity of the tank [kg] * \param mass initial propellant mass of the resource [kg] * \param efficiency fuel efficiency factor (>0) * \return propellant resource handle * \note Orbiter doesn't distinguish between propellant and oxidant. A * "propellant resource" is assumed to be a combination of fuel and * oxidant resources. * \note The interpretation of a propellant resource (liquid or solid * propulsion system, ion drive, etc.) is up to the vessel developer. * \note The rate of fuel consumption depends on the thrust level and * Isp (fuel-specific impulse) of the thrusters attached to the * resource. * \note The fuel efficiency rating, together with a thruster's Isp * rating, determines how much fuel is consumed per second to obtain a * given thrust: \f$R = F (e \cdot Isp)^{-1}\f$ with fuel rate R * [kg/s], thrust F [N], efficiency e and fuel-specific impulse Isp * [m/s]. * \note If mass < 0 then mass = maxmass is substituted. * \sa DelPropellantResource, SetPropellantMaxMass, SetPropellantMass, * SetPropellantEfficiency, GetPropellantMaxMass, GetPropellantMass, * GetPropellantEfficiency */ PROPELLANT_HANDLE CreatePropellantResource (double maxmass, double mass=-1.0, double efficiency=1.0) const;
So, as you can see, the first parameter maxmass is mandatory and can't be omitted, while the other two have a default value and can be left away.
So, with that knowledge, you can now decide that your small dummy fuel tank needs a maximum mass parameter.
I don't know what happens if you enter 0.0. Maybe you accidentially create a black hole. Or a division by zero error.
But you are allowed to enter the upper bound for the mass of a hypothetical graviton particle: 8.9E-59 ...............
I am hunting for the log now. The VS GUI is ... rich in detail.Ok, that sounds like you put an invalid handle somewhere into Orbiter. Orbiter has no symbols (unless you compile it with symbols.................... no), so that message is perfectly fine. What does the log tell you, how far did you come during loading? If you know, how far you went, you can then try next to set a breakpoint at the beginning of the possible Orbiter callbacks and go through your code by executing it in single steps.
I am hunting for the log now. The VS GUI is ... rich in detail.