- Added a redundant (left/right) vacuum pump.
- Modified the rpm vs. suction formula to hit much more realistic numbers. We should be seeing just over 4 inhg at idle and approaching 5 inhg at full throttle.
This commit is contained in:
parent
81af63cfa5
commit
4d09ba71a4
3 changed files with 22 additions and 15 deletions
|
@ -13,10 +13,11 @@
|
|||
|
||||
FGSystemMgr::FGSystemMgr ()
|
||||
{
|
||||
set_subsystem("electrical", new FGElectricalSystem);
|
||||
set_subsystem("pitot", new PitotSystem);
|
||||
set_subsystem("static", new StaticSystem);
|
||||
set_subsystem("vacuum", new VacuumSystem);
|
||||
set_subsystem( "electrical", new FGElectricalSystem );
|
||||
set_subsystem( "pitot", new PitotSystem );
|
||||
set_subsystem( "static", new StaticSystem );
|
||||
set_subsystem( "vacuum-l", new VacuumSystem(0) );
|
||||
set_subsystem( "vacuum-r", new VacuumSystem(1) );
|
||||
}
|
||||
|
||||
FGSystemMgr::~FGSystemMgr ()
|
||||
|
|
|
@ -7,8 +7,9 @@
|
|||
#include <Main/fg_props.hxx>
|
||||
|
||||
|
||||
VacuumSystem::VacuumSystem ()
|
||||
VacuumSystem::VacuumSystem( int i )
|
||||
{
|
||||
num = i;
|
||||
}
|
||||
|
||||
VacuumSystem::~VacuumSystem ()
|
||||
|
@ -16,14 +17,15 @@ VacuumSystem::~VacuumSystem ()
|
|||
}
|
||||
|
||||
void
|
||||
VacuumSystem::init ()
|
||||
VacuumSystem::init()
|
||||
{
|
||||
// TODO: allow index of pump and engine
|
||||
// to be configured.
|
||||
_serviceable_node = fgGetNode("/systems/vacuum[0]/serviceable", true);
|
||||
// TODO: allow index of engine to be
|
||||
// configured.
|
||||
SGPropertyNode *node = fgGetNode("/systems/vacuum", num, true );
|
||||
_serviceable_node = node->getChild("serviceable", 0, true);
|
||||
_rpm_node = fgGetNode("/engines/engine[0]/rpm", true);
|
||||
_pressure_node = fgGetNode("/environment/pressure-inhg", true);
|
||||
_suction_node = fgGetNode("/systems/vacuum[0]/suction-inhg", true);
|
||||
_suction_node = node->getChild("suction-inhg", 0, true);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -48,9 +50,12 @@ VacuumSystem::update (double dt)
|
|||
} else {
|
||||
double rpm = _rpm_node->getDoubleValue();
|
||||
double pressure = _pressure_node->getDoubleValue();
|
||||
suction = pressure * rpm / (rpm + 10000.0);
|
||||
if (suction > 5.0)
|
||||
suction = 5.0;
|
||||
// suction = pressure * rpm / (rpm + 5000.0);
|
||||
// This magic formula yields about 4.1 inhg at 700 rpm and
|
||||
// about 6.0 inhg at 2200 rpm (numbers by observation)
|
||||
suction = 5.39 - 1.0 / ( rpm * 0.00111 );
|
||||
if ( suction < 0.0 ) suction = 0.0;
|
||||
if ( suction > 5.0 ) suction = 5.0;
|
||||
}
|
||||
_suction_node->setDoubleValue(suction);
|
||||
}
|
||||
|
|
|
@ -29,14 +29,14 @@
|
|||
*
|
||||
* Output properties:
|
||||
*
|
||||
* /systems/vacuum[0]/suction-inhg
|
||||
* /systems/vacuum[n]/suction-inhg
|
||||
*/
|
||||
class VacuumSystem : public FGSubsystem
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
VacuumSystem ();
|
||||
VacuumSystem( int i );
|
||||
virtual ~VacuumSystem ();
|
||||
|
||||
virtual void init ();
|
||||
|
@ -46,6 +46,7 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
int num;
|
||||
SGPropertyNode_ptr _serviceable_node;
|
||||
SGPropertyNode_ptr _rpm_node;
|
||||
SGPropertyNode_ptr _pressure_node;
|
||||
|
|
Loading…
Add table
Reference in a new issue