From: <sv...@ww...> - 2005-04-02 19:10:07
|
Author: mkrose Date: 2005-04-02 11:09:59 -0800 (Sat, 02 Apr 2005) New Revision: 1503 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/PhysicsModel.h trunk/CSP/CSPSim/Source/AircraftPhysicsModel.cpp trunk/CSP/CSPSim/Source/PhysicsModel.cpp Log: Export angular velocity in body coordinates from PhysicsModel. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1503 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-04-02 17:53:21 UTC (rev 1502) +++ trunk/CSP/CSPSim/CHANGES.current 2005-04-02 19:09:59 UTC (rev 1503) @@ -8,6 +8,8 @@ * Add headers and a common source file for declaring top-level bus channel names. + * Export angular velocity in body coordinates from PhysicsModel. + 2005-03-12: delta * Reformated GearAnimation and related classes as Systems. Adjusted xml files consequently. Cleaned up GearDynamics. Modified: trunk/CSP/CSPSim/Include/PhysicsModel.h =================================================================== --- trunk/CSP/CSPSim/Include/PhysicsModel.h 2005-04-02 17:53:21 UTC (rev 1502) +++ trunk/CSP/CSPSim/Include/PhysicsModel.h 2005-04-02 19:09:59 UTC (rev 1503) @@ -129,6 +129,7 @@ DataChannel<simdata::Vector3>::Ref b_Position; DataChannel<simdata::Vector3>::Ref b_Velocity; DataChannel<simdata::Vector3>::Ref b_AngularVelocity; + DataChannel<simdata::Vector3>::Ref b_AngularVelocityBody; DataChannel<simdata::Vector3>::Ref b_AccelerationBody; DataChannel<simdata::Quat>::Ref b_Attitude; Modified: trunk/CSP/CSPSim/Source/AircraftPhysicsModel.cpp =================================================================== --- trunk/CSP/CSPSim/Source/AircraftPhysicsModel.cpp 2005-04-02 17:53:21 UTC (rev 1502) +++ trunk/CSP/CSPSim/Source/AircraftPhysicsModel.cpp 2005-04-02 19:09:59 UTC (rev 1503) @@ -129,6 +129,7 @@ assert(b_Position.valid()); assert(b_Velocity.valid()); assert(b_AngularVelocity.valid()); + assert(b_AngularVelocityBody.valid()); assert(b_Attitude.valid()); assert(b_AccelerationBody.valid()); m_WeightLocal = - b_Mass->value() * gravity * simdata::Vector3::ZAXIS; @@ -190,6 +191,7 @@ // returns vehicle data members b_Velocity->value() = m_VelocityLocal; b_AngularVelocity->value() = m_AngularVelocityLocal; + b_AngularVelocityBody->value() = localToBody(m_AngularVelocityLocal); b_Attitude->value() = m_Attitude; // the fixed-frame acceleration in body coordinates, *not* m_LinearAccelBody, which is the // rotating-frame acceleration. to clarify the difference, note that for an aircraft in a Modified: trunk/CSP/CSPSim/Source/PhysicsModel.cpp =================================================================== --- trunk/CSP/CSPSim/Source/PhysicsModel.cpp 2005-04-02 17:53:21 UTC (rev 1502) +++ trunk/CSP/CSPSim/Source/PhysicsModel.cpp 2005-04-02 19:09:59 UTC (rev 1503) @@ -127,6 +127,7 @@ b_Position = bus->getSharedChannel(Kinetics::Position, true, true); b_Velocity = bus->getSharedChannel(Kinetics::Velocity, true, true); b_AngularVelocity = bus->getSharedChannel(Kinetics::AngularVelocity, true, true); + b_AngularVelocityBody = bus->getSharedChannel(Kinetics::AngularVelocityBody, true, true); b_Attitude = bus->getSharedChannel(Kinetics::Attitude, true, true); b_AccelerationBody = bus->getSharedChannel(Kinetics::AccelerationBody, true, true); b_Mass = bus->getChannel(Kinetics::Mass); |