From: <mk...@us...> - 2003-10-19 18:52:27
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Source In directory sc8-pr-cvs1:/tmp/cvs-serv25221/Source Modified Files: Tag: systems Engine.cpp Log Message: Index: Engine.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/Engine.cpp,v retrieving revision 1.6.2.2 retrieving revision 1.6.2.3 diff -C2 -d -r1.6.2.2 -r1.6.2.3 *** Engine.cpp 29 Sep 2003 06:46:11 -0000 1.6.2.2 --- Engine.cpp 19 Oct 2003 18:03:34 -0000 1.6.2.3 *************** *** 53,65 **** float ThrustData::getMil(float altitude, float mach) const { ! return m_mil_thrust.getValue(mach, altitude); } float ThrustData::getIdle(float altitude, float mach) const { ! return m_idle_thrust.getValue(mach, altitude); } float ThrustData::getAb(float altitude, float mach) const { ! return m_ab_thrust.getValue(mach, altitude); } --- 53,65 ---- float ThrustData::getMil(float altitude, float mach) const { ! return m_mil_thrust[altitude][mach]; } float ThrustData::getIdle(float altitude, float mach) const { ! return m_idle_thrust[altitude][mach]; } float ThrustData::getAb(float altitude, float mach) const { ! return m_ab_thrust[altitude][mach]; } *************** *** 138,141 **** --- 138,142 ---- if (!bus) return; b_ThrottleInput = bus->getChannel("ControlInputs.ThrottleInput"); + b_Mach = bus->getChannel("Conditions.Mach"); } *************** *** 159,165 **** if (!m_Engine.empty()) { float altitude = static_cast<float>(m_PositionLocal->z()); ! float speed = static_cast<float>(m_VelocityBody->length()); ! // XXX get this from the bus eventually ! float mach = static_cast<float>(CSPSim::theSim->getAtmosphere()->getMach(speed, altitude)); float throttle = static_cast<float>(b_ThrottleInput->value()); throttle = throttle * 1.05263 + std::max(0.0, throttle-0.95) * 20.0; --- 160,164 ---- if (!m_Engine.empty()) { float altitude = static_cast<float>(m_PositionLocal->z()); ! float mach = static_cast<float>(b_Mach->value()); float throttle = static_cast<float>(b_ThrottleInput->value()); throttle = throttle * 1.05263 + std::max(0.0, throttle-0.95) * 20.0; *************** *** 181,185 **** } ! void EngineDynamics::getInfo(InfoList &info) { std::stringstream line; line.setf(std::ios::fixed | std::ios::showpos); --- 180,184 ---- } ! void EngineDynamics::getInfo(InfoList &info) const { std::stringstream line; line.setf(std::ios::fixed | std::ios::showpos); |