You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(47) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(140) |
Feb
(98) |
Mar
(152) |
Apr
(104) |
May
(71) |
Jun
(94) |
Jul
(169) |
Aug
(83) |
Sep
(47) |
Oct
(134) |
Nov
(7) |
Dec
(20) |
2004 |
Jan
(41) |
Feb
(14) |
Mar
(42) |
Apr
(47) |
May
(68) |
Jun
(143) |
Jul
(65) |
Aug
(29) |
Sep
(40) |
Oct
(34) |
Nov
(33) |
Dec
(97) |
2005 |
Jan
(29) |
Feb
(30) |
Mar
(9) |
Apr
(37) |
May
(13) |
Jun
(31) |
Jul
(22) |
Aug
(23) |
Sep
|
Oct
(37) |
Nov
(34) |
Dec
(117) |
2006 |
Jan
(48) |
Feb
(6) |
Mar
(2) |
Apr
(71) |
May
(10) |
Jun
(16) |
Jul
(7) |
Aug
(1) |
Sep
(14) |
Oct
(17) |
Nov
(25) |
Dec
(26) |
2007 |
Jan
(8) |
Feb
(2) |
Mar
(7) |
Apr
(26) |
May
|
Jun
(12) |
Jul
(30) |
Aug
(14) |
Sep
(9) |
Oct
(4) |
Nov
(7) |
Dec
(6) |
2008 |
Jan
(10) |
Feb
(10) |
Mar
(6) |
Apr
(8) |
May
|
Jun
(10) |
Jul
(18) |
Aug
(15) |
Sep
(16) |
Oct
(5) |
Nov
(3) |
Dec
(10) |
2009 |
Jan
(11) |
Feb
(2) |
Mar
|
Apr
(15) |
May
(31) |
Jun
(18) |
Jul
(11) |
Aug
(26) |
Sep
(52) |
Oct
(17) |
Nov
(4) |
Dec
|
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <sv...@ww...> - 2005-06-20 04:02:19
|
Author: mkrose Date: 2005-06-19 21:02:10 -0700 (Sun, 19 Jun 2005) New Revision: 1578 Added: trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/cockpit.xml Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/model.xml Log: Add the detailed cockpit xml definition. ==> ALL USERS: RebuildData.py Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1578 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-06-20 03:44:35 UTC (rev 1577) +++ trunk/CSP/CSPSim/CHANGES.current 2005-06-20 04:02:10 UTC (rev 1578) @@ -32,6 +32,10 @@ rotates and don't reflect the actual surroundings. Nevertheless they look fairly nice. + * Add the detailed cockpit xml definition. + +==> ALL USERS: RebuildData.py + 2005-06-18: onsight * Convert F16 UFC to use InputEventChannels instead of static event handlers. ICP button events can then be captured by the UFC system Added: trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/cockpit.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/cockpit.xml 2005-06-20 03:44:35 UTC (rev 1577) +++ trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/cockpit.xml 2005-06-20 04:02:10 UTC (rev 1578) @@ -0,0 +1,132 @@ +<?xml version="1.0" standalone="no"?> + +<Object class="ObjectModel"> + <External name="model_path">F16/DJ/Cockpit.osg</External> + <Vector name="axis_0">1 0 0</Vector> + <Vector name="axis_1">0 1 0</Vector> + <Vector name="view_point">0.0 4.60 1.20</Vector> + <Vector name="hud_placement">0.0 5.0 1.15</Vector> + <Float name="hud_width">0.124</Float> + <Float name="hud_height">0.160</Float> + <Bool name="smooth">false</Bool> + <Enum name="effect">None</Enum> + <List name="debug_points"> + <!-- view point --> + <Vector>0.0 4.45 1.19</Vector> + </List> + <List name="animations"> + <Object class="AnimatedMomentarySwitch"> + <String name="model_id">RTN-SEQ Switch</String> + <List name="event_channel_names"> + <String>ICP_SEQ</String> + <String>ICP_UP</String> + <String>ICP_RTN</String> + <String>ICP_DN</String> + </List> + <Float name="cycle_time">0.5</Float> + </Object> + <Object class="AnimatedMomentarySwitch"> + <String name="model_id">ICP 1</String> + <List name="event_channel_names"> + <String>ICP_1</String> + </List> + <Float name="cycle_time">0.3</Float> + </Object> + <Object class="StateSwitch"> + <String name="channel_name">HUD.AOAIndexer</String> + <String name="model_id">Cockpit.AOAIndexer</String> + <Int name="lod_limit">10</Int> + </Object> + <Object class="AttitudeAnimation"> + <String name="model_id">ADISphere</String> + <Int name="lod_limit">10</Int> + </Object> + <Object class="AnimatedSwitch"> + <String name="channel_name">HUD.FlightPathMarkerSwitch</String> + <String name="model_id">ATT-FPM Switch</String> + <List name="times"><Float>0</Float><Float>0.10</Float><Float>0.199</Float></List> + <Float name="rate">0.40</Float> + <Int name="lod_limit">10</Int> + </Object> + <Object class="AnimatedSwitch"> + <String name="channel_name">HUD.ScalesSwitch</String> + <String name="model_id">W-VAH Switch</String> + <List name="times"><Float>0</Float><Float>0.10</Float><Float>0.199</Float></List> + <Float name="rate">0.40</Float> + <Int name="lod_limit">10</Int> + </Object> + <Object class="AnimatedSwitch"> + <String name="channel_name">HUD.VelocitySwitch</String> + <String name="model_id">CAS Switch</String> + <List name="times"><Float>0</Float><Float>0.10</Float><Float>0.199</Float></List> + <Float name="rate">0.40</Float> + <Int name="lod_limit">10</Int> + </Object> + <Object class="AnimatedSwitch"> + <String name="channel_name">HUD.AltitudeSwitch</String> + <String name="model_id">ALT Radar Switch</String> + <List name="times"><Float>0</Float><Float>0.10</Float><Float>0.199</Float></List> + <Float name="rate">0.40</Float> + <Int name="lod_limit">10</Int> + </Object> + <Object class="AnimatedSwitch"> + <String name="channel_name">HUD.DataSwitch</String> + <String name="model_id">DED Data Switch</String> + <List name="times"><Float>0</Float><Float>0.10</Float><Float>0.199</Float></List> + <Float name="rate">0.40</Float> + <Int name="lod_limit">10</Int> + </Object> + <Object class="DrivenAnimationPath"> + <String name="channel_name">ControlSurfaces.AirbrakeDeflection</String> + <String name="model_id">AirBrakeIndicator</String> + <Float name="gain">0.19098</Float> + </Object> + <Object class="DrivenRotation"> + <String name="channel_name">ControlInputs.ThrottleInput</String> + <String name="model_id">RPMPointer</String> + <Vector name="axis">0 0 1</Vector> + <Bool name="pre_multiply">true</Bool> + <Float name="gain">4.7124</Float> + <Float name="limit_0">0</Float> + <Float name="limit_1">6.28</Float> + </Object> + <Object class="AnimatedSwitch"> + <String name="channel_name">F16.GearHandleUp</String> + <String name="model_id">GearHandleMain</String> + <List name="times"><Float>0.4</Float><Float>0.0</Float></List> + <Int name="lod_limit">10</Int> + </Object> + <Object class="DrivenRotation"> + <String name="channel_name">FlightDynamics.Alpha</String> + <String name="model_id">AOATape</String> + <Vector name="axis">0 0 1</Vector> + <Bool name="pre_multiply">true</Bool> + <Float name="gain">4.7</Float> + <Float name="limit_0">-3.1</Float> + <Float name="limit_1">3.1</Float> + </Object> + <Object class="DrivenRotation"> + <String name="channel_name">FlightDynamics.VerticalVelocity</String> + <String name="model_id">VVITape</String> + <Vector name="axis">0 0 1</Vector> + <Bool name="pre_multiply">true</Bool> + <Float name="gain">0.07771</Float> + <Float name="limit_0">-2.5</Float> + <Float name="limit_1">2.5</Float> + </Object> + <Object class="CounterWheel"> + <String name="channel_name">FlightDynamics.PressureAltitude</String> + <String name="model_id">Altimeter</String> + <Vector name="axis">-1 0 0</Vector> + <Int name="lod_limit">10</Int> + <Float name="gain">0.0328084</Float> + </Object> + <!--Object class="RotarySwitch"> + <String name="channel_name">HUD.FlightPathMarkerSwitch</String> + <String name="model_id">Cockpit.MasterArm</String> + <Vector name="axis">1 0 0</Vector> + <Int name="lod_limit">10</Int> + <List name="angles"><Float>12</Float><Float>0</Float><Float>-12</Float></List> + </Object--> + </List> +</Object> Modified: trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/model.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/model.xml 2005-06-20 03:44:35 UTC (rev 1577) +++ trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/model.xml 2005-06-20 04:02:10 UTC (rev 1578) @@ -1,8 +1,8 @@ <?xml version="1.0" standalone="no"?> <Object class="ObjectModel"> + <String name="label">F16</String> <External name="model_path">F16/DJ/F16DJ.osg</External> - <!--External name="model_path">F16/DJ/dp2.osg</External--> <Vector name="axis_0">1 0 0</Vector> <Vector name="axis_1">0 1 0</Vector> <Vector name="view_point">0.0 4.60 1.20</Vector> @@ -33,23 +33,15 @@ <Vector>-1.100 -0.740 -1.660</Vector> </List> - <List name="animations"> - <Object class="AttitudeAnimation"> - <String name="model_id">ADI</String> - <Int name="lod_limit">10</Int> + <List name="stations"> + <Object class="Station"> + <String name="name">FrontSeat</String> + <Path name="detail_model">cockpit</Path> + <List name="mask_names"><String>Cockpit</String></List> </Object> - <Object class="StateSwitch"> - <String name="channel_name">HUD.AOAIndexer</String> - <String name="model_id">Cockpit.AOAIndexer</String> - <Int name="lod_limit">10</Int> - </Object> - <Object class="AnimatedSwitch"> - <String name="channel_name">HUD.FlightPathMarkerSwitch</String> - <String name="model_id">MasterArmSwitch</String> - <List name="times"><Float>0</Float><Float>0.15</Float><Float>0.30</Float></List> - <Int name="lod_limit">10</Int> - </Object> + </List> + <List name="animations"> <Object class="DrivenRotation"> <String name="channel_name">FlightDynamics.Alpha</String> <String name="model_id">Cockpit.AngleOfAttackTape</String> |
From: <sv...@ww...> - 2005-06-20 03:45:06
|
Author: mkrose Date: 2005-06-19 20:44:35 -0700 (Sun, 19 Jun 2005) New Revision: 1577 Added: trunk/CSP/CSPSim/Data/Models/F16/DJ/COPYING trunk/CSP/CSPSim/Data/Models/F16/DJ/Cockpit.osg trunk/CSP/CSPSim/Data/Models/F16/DJ/images/T-pit-alpha.tga trunk/CSP/CSPSim/Data/Models/F16/DJ/images/T-pit-light.tga trunk/CSP/CSPSim/Data/Models/F16/DJ/images/T-pit01.tga trunk/CSP/CSPSim/Data/Models/F16/DJ/images/T-pit02.tga trunk/CSP/CSPSim/Data/Models/F16/DJ/images/T-pit03.tga trunk/CSP/CSPSim/Data/Models/F16/DJ/images/T-pit04.tga Removed: trunk/CSP/CSPSim/Data/Models/F16/DJ/images/0f16-lak.tga Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/Models/F16/DJ/F16DJ.osg trunk/CSP/CSPSim/Data/Models/F16/DJ/images/T1.tga trunk/CSP/CSPSim/Data/Models/F16/DJ/images/T2.tga trunk/CSP/CSPSim/Data/Models/F16/DJ/images/T3.tga trunk/CSP/CSPSim/Data/Models/F16/DJ/images/T4.tga trunk/CSP/CSPSim/Data/Models/F16/DJ/images/T5.tga trunk/CSP/CSPSim/Data/Models/F16/DJ/images/T6.tga trunk/CSP/CSPSim/Data/Models/F16/DJ/images/T7.tga trunk/CSP/CSPSim/Data/Models/F16/DJ/images/f16-lak.tga Log: Check in a recent version of Lologramme's high detail F16DJ cockpit and associated textures. Also add a COPYING notice for the F16DJ. Crop the f16-lak image to 512x512 to prevent rescaling by OSG. The aircraft model is generated from a newer version of the source model that moves the simple cockpit into a separate group to allow it to be easily hidden when showing the detailed pit. Exterior canopy reflection have been added by hand just to demonstrate the effect. These use a cubemap with canned images in the aircraft reference frame, so they don't move correctly when the aircraft rotates and don't reflect the actual surroundings. Nevertheless they look fairly nice. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1577 Diff omitted (11544781 bytes). |
From: <sv...@ww...> - 2005-06-20 03:16:05
|
Author: mkrose Date: 2005-06-19 20:15:49 -0700 (Sun, 19 Jun 2005) New Revision: 1576 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Source/Animation.cpp Log: Add a new animation class for momentary switches (e.g., icp push buttons and data control switch). Also add support for bool channels in animations previously took only enum channels. Small bug fix in the counter wheel animation and other minor cleanup. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1576 Diff omitted (12113 bytes). |
From: <sv...@ww...> - 2005-06-20 01:53:04
|
Author: mkrose Date: 2005-06-19 18:52:54 -0700 (Sun, 19 Jun 2005) New Revision: 1575 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/CockpitInterface.h trunk/CSP/CSPSim/Include/GameScreen.h trunk/CSP/CSPSim/Include/HID.h trunk/CSP/CSPSim/Include/InputEventChannel.h trunk/CSP/CSPSim/Include/InputInterface.h trunk/CSP/CSPSim/Include/MapEvent.h trunk/CSP/CSPSim/Include/Systems/AircraftInputSystem.h trunk/CSP/CSPSim/Source/CockpitInterface.cpp trunk/CSP/CSPSim/Source/GameScreen.cpp trunk/CSP/CSPSim/Source/HID.cpp trunk/CSP/CSPSim/Source/InputInterface.cpp trunk/CSP/CSPSim/Source/Systems/AircraftInputSystem.cpp Log: Refactor input event dispatch to pass an event struct to the handler rather than individual arguments. Minor simplifications and cleanup of the input interface and hid code. Added a "drag" flag to click events to indicate if the mouse has been moving with a button pressed. This is used to prevent accidental cockpit switch picking when panning the view with the mouse. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1575 Diff omitted (37668 bytes). |
From: <sv...@ww...> - 2005-06-19 18:21:04
|
Author: mkrose Date: 2005-06-19 11:20:58 -0700 (Sun, 19 Jun 2005) New Revision: 1574 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/Views/CameraKinematics.h trunk/CSP/CSPSim/Source/Views/CameraKinematics.cpp Log: Reduce the sensitivity of the camera panning (mouse and keyboard) when the field of view is narrow. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1574 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-06-19 18:20:27 UTC (rev 1573) +++ trunk/CSP/CSPSim/CHANGES.current 2005-06-19 18:20:58 UTC (rev 1574) @@ -5,6 +5,9 @@ * Add an extra side leaning movement of the torso when looking down in the cockpit to help see around obstacles. + * Reduce the sensitivity of the camera panning (mouse and keyboard) when + the field of view is narrow. + 2005-06-18: onsight * Convert F16 UFC to use InputEventChannels instead of static event handlers. ICP button events can then be captured by the UFC system Modified: trunk/CSP/CSPSim/Include/Views/CameraKinematics.h =================================================================== --- trunk/CSP/CSPSim/Include/Views/CameraKinematics.h 2005-06-19 18:20:27 UTC (rev 1573) +++ trunk/CSP/CSPSim/Include/Views/CameraKinematics.h 2005-06-19 18:20:58 UTC (rev 1574) @@ -35,12 +35,13 @@ const float m_MinimumDistanceOffset, m_AbsoluteMaximumDistance; double m_Phi, m_Theta; + float m_FOVScale; float m_PanRatePhi, m_PanRateTheta, m_ZoomRate; double m_DistanceToObject, m_MinimumDistance; double m_Accel; bool m_ExternalPan; - void rotateTheta(double dt) { m_Theta += m_Accel * m_PanRateTheta * dt; } - void rotatePhi(double dt) { m_Phi += m_Accel * m_PanRatePhi * dt; } + void rotateTheta(double dt) { m_Theta += m_Accel * m_PanRateTheta * dt * m_FOVScale; } + void rotatePhi(double dt) { m_Phi += m_Accel * m_PanRatePhi * dt * m_FOVScale; } void scale(double dt); float smooth(double value, float min_value,float max_value) const; public: Modified: trunk/CSP/CSPSim/Source/Views/CameraKinematics.cpp =================================================================== --- trunk/CSP/CSPSim/Source/Views/CameraKinematics.cpp 2005-06-19 18:20:27 UTC (rev 1573) +++ trunk/CSP/CSPSim/Source/Views/CameraKinematics.cpp 2005-06-19 18:20:58 UTC (rev 1574) @@ -47,6 +47,7 @@ if (m_PanRateTheta != 0.0 || m_PanRatePhi != 0.0) { m_Accel = std::min(3.0, m_Accel + 1.0 * dt); } + m_FOVScale = std::min(CSPSim::theSim->getScene()->getViewAngle() / 40.0, 1.0); rotateTheta(dt); rotatePhi(dt); scale(dt); @@ -69,10 +70,11 @@ m_DisplacementCoefficient(0.001), m_MinimumDistanceOffset(10.0), m_AbsoluteMaximumDistance(80000.0), - m_Accel(1.0) { + m_FOVScale(1.0), + m_Accel(1.0), + m_ExternalPan(false) { reset(); } - void CameraKinematics::clampPhi(float min_phi, float max_phi, bool smooth_on) { if (smooth_on && m_PanRatePhi != 0.0) { m_PanRatePhi = simdata::sign(m_PanRatePhi) * smooth(m_Phi, min_phi, max_phi) * m_BaseRate; @@ -163,8 +165,8 @@ m_PanRatePhi = 0.0; m_PanRateTheta = 0.0; m_Accel = std::min(3.0, m_Accel + 0.1 * (dx * dx + dy * dy)); - m_Theta -= dx * m_Accel * m_DisplacementCoefficient; - m_Phi -= dy * m_Accel * m_DisplacementCoefficient; + m_Theta -= dx * m_Accel * m_DisplacementCoefficient * m_FOVScale; + m_Phi -= dy * m_Accel * m_DisplacementCoefficient * m_FOVScale; m_ExternalPan = true; } |
From: <sv...@ww...> - 2005-06-19 18:20:35
|
Author: mkrose Date: 2005-06-19 11:20:27 -0700 (Sun, 19 Jun 2005) New Revision: 1573 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/Views/InternalView.h trunk/CSP/CSPSim/Source/Views/InternalView.cpp Log: Add an extra side leaning movement of the torso when looking down in the cockpit to help see around obstacles. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1573 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-06-18 07:05:49 UTC (rev 1572) +++ trunk/CSP/CSPSim/CHANGES.current 2005-06-19 18:20:27 UTC (rev 1573) @@ -1,6 +1,10 @@ Version 0.4.0 (in progress) =========================== +2005-06-19: onsight + * Add an extra side leaning movement of the torso when looking down in + the cockpit to help see around obstacles. + 2005-06-18: onsight * Convert F16 UFC to use InputEventChannels instead of static event handlers. ICP button events can then be captured by the UFC system Modified: trunk/CSP/CSPSim/Include/Views/InternalView.h =================================================================== --- trunk/CSP/CSPSim/Include/Views/InternalView.h 2005-06-18 07:05:49 UTC (rev 1572) +++ trunk/CSP/CSPSim/Include/Views/InternalView.h 2005-06-19 18:20:27 UTC (rev 1573) @@ -59,6 +59,7 @@ double m_NeckPhi; double m_NeckTheta; double m_TorsoTheta; + double m_TorsoSideLean; double m_FlipTime; const double m_EyeRate; const double m_NeckRate; @@ -81,26 +82,7 @@ void moveViewpoint(simdata::Vector3& ep, simdata::Vector3& lp, simdata::Vector3& up, double dt); bool inVisualRange(Contact contact) const; }; -/* - float m_OldPhi, m_OldTheta; - float m_NeckPhi, m_NeckTheta, m_psi; - bool m_NeckLimit; - void constrainPadlocked(simdata::Vector3& ep, simdata::Vector3& lp, simdata::Vector3& up, double dt); - void constrainNotPadlocked(simdata::Vector3& ep, simdata::Vector3& lp, simdata::Vector3& up, double dt); - bool m_Padlocked; - void setPadlocked(); - bool checkPadlocked(); -public: - PadlockView(size_t vm); - virtual void activate(); - virtual void updateView(simdata::Vector3& ep, simdata::Vector3& lp, simdata::Vector3& up, double dt); -}; - -*/ - - - #endif // __INTERNALVIEW_H__ Modified: trunk/CSP/CSPSim/Source/Views/InternalView.cpp =================================================================== --- trunk/CSP/CSPSim/Source/Views/InternalView.cpp 2005-06-18 07:05:49 UTC (rev 1572) +++ trunk/CSP/CSPSim/Source/Views/InternalView.cpp 2005-06-19 18:20:27 UTC (rev 1573) @@ -48,6 +48,7 @@ m_NeckPhi(0), m_NeckTheta(0), m_TorsoTheta(0), + m_TorsoSideLean(0), m_FlipTime(0), m_EyeRate(simdata::toRadians(90.0)), m_NeckRate(simdata::toRadians(90.0)), @@ -219,7 +220,7 @@ // + don't padlock into cockpit -- and lean to the side if the target is below! // lose lock if out of view for too long -- could extrapolate linear velocity, reacquire if nearby // + don't padlock outside of fov - // padlock nearest to fov center, cycle outward + // + padlock nearest to fov center, cycle outward // model neck motion by system, export for remote animation! double theta = m_CameraKinematics->getTheta(); @@ -240,8 +241,7 @@ // Turn torso only if necessary { - double lean_below = std::max(0.0, -0.4 - phi); - double excess = std::max(0.0, std::abs(theta) - m_EyeTurnLimit - m_NeckTurnLimit + lean_below); + double excess = std::max(0.0, std::abs(theta) - m_EyeTurnLimit - m_NeckTurnLimit); double limit = m_TorsoRate * dt; double delta = simdata::clampTo(excess * sign_theta - m_TorsoTheta, -limit, limit); double turn_limit = m_TorsoTurnLimit * simdata::clampTo(3.0 - G, 0.0, 1.0); @@ -249,6 +249,17 @@ } theta -= m_TorsoTheta; + // Lean slightly when looking down and to the side in order to see around obstacles. + { + const double max_side_lean = 0.12; // meters + double side_lean = simdata::clampTo((-0.24 - phi) * 10.0, 0.0, 1.0) * std::max(0.0, sin(std::abs(2.0 * theta))); + side_lean = - sign_theta * std::max(0.0, side_lean - 2.0 * std::abs(m_TorsoTheta)) * max_side_lean; + double limit = m_TorsoRate * dt; + double delta = simdata::clampTo(side_lean - m_TorsoSideLean, -limit, limit); + m_TorsoSideLean = simdata::clampTo(m_TorsoSideLean + delta, -max_side_lean, max_side_lean); + } + + // Degrade neck turn rate above 3 G. const double g_rate_factor = simdata::clampTo(2.0 - 0.33 * G, 0.0, 1.0); @@ -297,7 +308,7 @@ eyes = neck_rotation * eyes; const double lean_angle = (3.14 * 60.0 / 180.0); const double lean_distance = std::abs(0.2 * m_TorsoTheta); - simdata::Vector3 lean_offset(lean_distance * cos(lean_angle) * simdata::sign(-m_TorsoTheta), lean_distance * sin(lean_angle), 0.0); + simdata::Vector3 lean_offset(lean_distance * cos(lean_angle) * simdata::sign(-m_TorsoTheta) + m_TorsoSideLean, lean_distance * sin(lean_angle), 0.0); const double total_phi = m_EyePhi + m_NeckPhi; const double total_theta = m_EyeTheta + m_NeckTheta + m_TorsoTheta; simdata::Vector3 dir(-cos(total_phi)*sin(total_theta), cos(total_phi)*cos(total_theta), sin(total_phi)); |
From: <sv...@ww...> - 2005-06-18 07:05:56
|
Author: mkrose Date: 2005-06-18 00:05:49 -0700 (Sat, 18 Jun 2005) New Revision: 1572 Modified: trunk/CSP/SimCore/Util/Callback.h Log: Fix a compiler error. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1572 Modified: trunk/CSP/SimCore/Util/Callback.h =================================================================== --- trunk/CSP/SimCore/Util/Callback.h 2005-06-18 05:00:54 UTC (rev 1571) +++ trunk/CSP/SimCore/Util/Callback.h 2005-06-18 07:05:49 UTC (rev 1572) @@ -131,7 +131,7 @@ * Up to four arguments are supported. * TODO Extend to as many arguments as sigc supports. */ -template <class ret, class arg1=sigc::nil, class arg2=sigc::nil, class arg3=sigc::nil, class arg4=sigc::nil> +template <class ret, class arg1=sigc::nil, class arg2=sigc::nil, class arg3=sigc::nil, class arg4=sigc::nil, class end=sigc::nil> struct callback { }; /** Template specialization for no arguments. |
From: <sv...@ww...> - 2005-06-18 05:01:01
|
Author: mkrose Date: 2005-06-17 22:00:54 -0700 (Fri, 17 Jun 2005) New Revision: 1571 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/FlightDynamicsChannels.h trunk/CSP/CSPSim/Include/Systems/AircraftFlightSensors.h trunk/CSP/CSPSim/Source/Channels.cpp trunk/CSP/CSPSim/Source/Systems/AircraftFlightSensors.cpp Log: Add PressureAltitude and VerticalVelocity channels. These are updated by AircraftFlightSensors and currently record exact values (no sensor modeling yet). Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1571 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-06-18 04:58:46 UTC (rev 1570) +++ trunk/CSP/CSPSim/CHANGES.current 2005-06-18 05:00:54 UTC (rev 1571) @@ -8,6 +8,10 @@ can also use the channels to transmit events back to the UFC system when clicked on in the 3D cockpit. + * Add PressureAltitude and VerticalVelocity channels. These are updated + by AircraftFlightSensors and currently record exact values (no sensor + modeling yet). + 2005-06-16: onsight * Refactor SimCore/Util/Callback.h. The new code achieves the same effect with a cleaner interface and much simpler logic. Corresponding Modified: trunk/CSP/CSPSim/Include/FlightDynamicsChannels.h =================================================================== --- trunk/CSP/CSPSim/Include/FlightDynamicsChannels.h 2005-06-18 04:58:46 UTC (rev 1570) +++ trunk/CSP/CSPSim/Include/FlightDynamicsChannels.h 2005-06-18 05:00:54 UTC (rev 1571) @@ -35,6 +35,8 @@ static const char *Airspeed; static const char *QBar; static const char *GForce; + static const char *PressureAltitude; + static const char *VerticalVelocity; }; } Modified: trunk/CSP/CSPSim/Include/Systems/AircraftFlightSensors.h =================================================================== --- trunk/CSP/CSPSim/Include/Systems/AircraftFlightSensors.h 2005-06-18 04:58:46 UTC (rev 1570) +++ trunk/CSP/CSPSim/Include/Systems/AircraftFlightSensors.h 2005-06-18 05:00:54 UTC (rev 1571) @@ -51,6 +51,8 @@ DataChannel<double>::Ref b_Density; DataChannel<double>::Ref b_Mach; DataChannel<double>::Ref b_CAS; + DataChannel<double>::Ref b_PressureAltitude; + DataChannel<double>::Ref b_VerticalVelocity; private: double m_Distance; Modified: trunk/CSP/CSPSim/Source/Channels.cpp =================================================================== --- trunk/CSP/CSPSim/Source/Channels.cpp 2005-06-18 04:58:46 UTC (rev 1570) +++ trunk/CSP/CSPSim/Source/Channels.cpp 2005-06-18 05:00:54 UTC (rev 1571) @@ -61,6 +61,8 @@ const char *FlightDynamics::Airspeed = "FlightDynamics.Airspeed"; const char *FlightDynamics::QBar = "FlightDynamics.QBar"; const char *FlightDynamics::GForce = "FlightDynamics.G"; + const char *FlightDynamics::PressureAltitude = "FlightDynamics.PressureAltitude"; + const char *FlightDynamics::VerticalVelocity = "FlightDynamics.VerticalVelocity"; const char *Conditions::WindVelocity = "Conditions.WindVelocity"; const char *Conditions::Pressure = "Conditions.Pressure"; Modified: trunk/CSP/CSPSim/Source/Systems/AircraftFlightSensors.cpp =================================================================== --- trunk/CSP/CSPSim/Source/Systems/AircraftFlightSensors.cpp 2005-06-18 04:58:46 UTC (rev 1570) +++ trunk/CSP/CSPSim/Source/Systems/AircraftFlightSensors.cpp 2005-06-18 05:00:54 UTC (rev 1571) @@ -29,6 +29,7 @@ #include <Systems/AircraftFlightSensors.h> #include <ConditionsChannels.h> +#include <FlightDynamicsChannels.h> #include <KineticsChannels.h> #include <Atmosphere.h> #include <CSPSim.h> @@ -58,6 +59,8 @@ b_Density->value() = 1.25; // nominal sea-level air density b_WindVelocity->value() = simdata::Vector3::ZERO; } + b_VerticalVelocity->value() = b_Velocity->value().z(); + b_PressureAltitude->value() = pos.z(); // FIXME roll in atmospheric pressure variations return 0.0; //return 0.101; } @@ -75,6 +78,8 @@ b_Temperature = bus->registerLocalDataChannel<double>(bus::Conditions::Temperature, 300); b_Mach = bus->registerLocalDataChannel<double>(bus::Conditions::Mach, 0.0); b_CAS = bus->registerLocalDataChannel<double>(bus::Conditions::CAS, 0.0); + b_PressureAltitude = bus->registerLocalDataChannel<double>(bus::FlightDynamics::PressureAltitude, 0.0); + b_VerticalVelocity = bus->registerLocalDataChannel<double>(bus::FlightDynamics::VerticalVelocity, 0.0); } void AircraftFlightSensors::getInfo(InfoList &info) const { |
From: <sv...@ww...> - 2005-06-18 04:58:52
|
Author: mkrose Date: 2005-06-17 21:58:46 -0700 (Fri, 17 Jun 2005) New Revision: 1570 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Source/F16/UpFrontControls.cpp trunk/CSP/CSPSim/Source/F16/UpFrontControls.h Log: Convert F16 UFC to use InputEventChannels instead of static event handlers. ICP button events can then be captured by the UFC system and by the corresponding animation handlers. The animation handlers can also use the channels to transmit events back to the UFC system when clicked on in the 3D cockpit. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1570 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-06-17 06:55:16 UTC (rev 1569) +++ trunk/CSP/CSPSim/CHANGES.current 2005-06-18 04:58:46 UTC (rev 1570) @@ -1,6 +1,13 @@ Version 0.4.0 (in progress) =========================== +2005-06-18: onsight + * Convert F16 UFC to use InputEventChannels instead of static event + handlers. ICP button events can then be captured by the UFC system + and by the corresponding animation handlers. The animation handlers + can also use the channels to transmit events back to the UFC system + when clicked on in the 3D cockpit. + 2005-06-16: onsight * Refactor SimCore/Util/Callback.h. The new code achieves the same effect with a cleaner interface and much simpler logic. Corresponding Modified: trunk/CSP/CSPSim/Source/F16/UpFrontControls.cpp =================================================================== --- trunk/CSP/CSPSim/Source/F16/UpFrontControls.cpp 2005-06-17 06:55:16 UTC (rev 1569) +++ trunk/CSP/CSPSim/Source/F16/UpFrontControls.cpp 2005-06-18 04:58:46 UTC (rev 1570) @@ -24,12 +24,12 @@ #include "UpFrontControls.h" +#include "InputEventChannel.h" +#include "PageALOW.h" #include "PageCNI.h" -#include "PageALOW.h" #include "PageLIST.h" #include "PageSTPT.h" -#include <iostream> SIMDATA_REGISTER_INTERFACE(UpFrontControls) DEFINE_INPUT_INTERFACE(UpFrontControls) @@ -42,10 +42,43 @@ m_PageMap["STPT"] = new PageSTPT; } +UpFrontControls::~UpFrontControls() { } + +// helper for defining button handlers +#define UFC_REGISTER(CONTROL) \ + bus->registerChannel(new InputEventChannel(#CONTROL, this, &UpFrontControls::CONTROL)); + void UpFrontControls::registerChannels(Bus *bus) { - m_Display = bus->registerLocalDataChannel<AlphaNumericDisplay::Ref>("DED", new AlphaNumericDisplay(26, 5)); + m_Display = bus->registerLocalDataChannel<AlphaNumericDisplay::Ref>("DED", new AlphaNumericDisplay(26, 5)); + UFC_REGISTER(ICP_0); + UFC_REGISTER(ICP_1); + UFC_REGISTER(ICP_2); + UFC_REGISTER(ICP_3); + UFC_REGISTER(ICP_4); + UFC_REGISTER(ICP_5); + UFC_REGISTER(ICP_6); + UFC_REGISTER(ICP_7); + UFC_REGISTER(ICP_8); + UFC_REGISTER(ICP_9); + UFC_REGISTER(ICP_COM1); + UFC_REGISTER(ICP_COM2); + UFC_REGISTER(ICP_LIST); + UFC_REGISTER(ICP_IFF); + UFC_REGISTER(ICP_AA); + UFC_REGISTER(ICP_AG); + UFC_REGISTER(ICP_RCL); + UFC_REGISTER(ICP_SEQ); + UFC_REGISTER(ICP_RTN); + UFC_REGISTER(ICP_ENTR); + UFC_REGISTER(ICP_UP); + UFC_REGISTER(ICP_DN); + UFC_REGISTER(ICP_INC); + UFC_REGISTER(ICP_DEC); } +#undef UFC_REGISTER + + void UpFrontControls::importChannels(Bus* bus) { for (PageMap::iterator i = m_PageMap.begin(); i != m_PageMap.end(); ++i) { i->second->importChannels(bus); @@ -72,7 +105,6 @@ void UpFrontControls::ICP_INC() { transition(getActivePage()->ICP_INC()); } void UpFrontControls::ICP_DEC() { transition(getActivePage()->ICP_DEC()); } - void UpFrontControls::ICP_RTN() { m_Override = 0; transition("CNI"); Modified: trunk/CSP/CSPSim/Source/F16/UpFrontControls.h =================================================================== --- trunk/CSP/CSPSim/Source/F16/UpFrontControls.h 2005-06-17 06:55:16 UTC (rev 1569) +++ trunk/CSP/CSPSim/Source/F16/UpFrontControls.h 2005-06-18 04:58:46 UTC (rev 1570) @@ -42,7 +42,7 @@ // partially work depending on the system implementations. -class UpFrontControls: public System { +class UpFrontControls: public System, public sigc::trackable { public: SIMDATA_OBJECT(UpFrontControls, 0, 0) @@ -50,37 +50,16 @@ END_SIMDATA_XML_INTERFACE DECLARE_INPUT_INTERFACE(UpFrontControls, System) - BIND_ACTION("ICP_0", ICP_0); - BIND_ACTION("ICP_1", ICP_1); - BIND_ACTION("ICP_2", ICP_2); - BIND_ACTION("ICP_3", ICP_3); - BIND_ACTION("ICP_4", ICP_4); - BIND_ACTION("ICP_5", ICP_5); - BIND_ACTION("ICP_6", ICP_6); - BIND_ACTION("ICP_7", ICP_7); - BIND_ACTION("ICP_8", ICP_8); - BIND_ACTION("ICP_9", ICP_9); - BIND_ACTION("ICP_COM1", ICP_COM1); - BIND_ACTION("ICP_COM2", ICP_COM2); - BIND_ACTION("ICP_IFF", ICP_IFF); - BIND_ACTION("ICP_LIST", ICP_LIST); - BIND_ACTION("ICP_AA", ICP_AA); - BIND_ACTION("ICP_AG", ICP_AG); - BIND_ACTION("ICP_RCL", ICP_RCL); - BIND_ACTION("ICP_ENTR", ICP_ENTR); - BIND_ACTION("ICP_RTN", ICP_RTN); - BIND_ACTION("ICP_SEQ", ICP_SEQ); - BIND_ACTION("ICP_UP", ICP_UP); - BIND_ACTION("ICP_DN", ICP_DN); - BIND_ACTION("ICP_INC", ICP_INC); - BIND_ACTION("ICP_DEC", ICP_DEC); + // the various icp button events are declared dynamically in registerChannels END_INPUT_INTERFACE UpFrontControls(); + ~UpFrontControls(); virtual void registerChannels(Bus*); virtual void importChannels(Bus*); +protected: // event handlers virtual void ICP_0(); virtual void ICP_1(); |
From: <sv...@ww...> - 2005-06-17 06:55:23
|
Author: mkrose Date: 2005-06-16 23:55:16 -0700 (Thu, 16 Jun 2005) New Revision: 1569 Added: trunk/CSP/CSPSim/Include/InputEventChannel.h Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj Log: Add a new channel type for connecting input events to the bus. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1569 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-06-17 06:52:33 UTC (rev 1568) +++ trunk/CSP/CSPSim/CHANGES.current 2005-06-17 06:55:16 UTC (rev 1569) @@ -9,6 +9,8 @@ channel to request that the value be changed. The owner of the channel can register a callback for such requests. + * Add a new channel type for connecting input events to the bus. + 2005-06-14: onsight * Upgrade to use sigc 2.0. All users will need to install libsigc++ 2.0.6 or newer. Version 1.2 is no longer needed. Added: trunk/CSP/CSPSim/Include/InputEventChannel.h =================================================================== --- trunk/CSP/CSPSim/Include/InputEventChannel.h 2005-06-17 06:52:33 UTC (rev 1568) +++ trunk/CSP/CSPSim/Include/InputEventChannel.h 2005-06-17 06:55:16 UTC (rev 1569) @@ -0,0 +1,96 @@ +// Combat Simulator Project +// Copyright (C) 2005 The Combat Simulator Project +// http://csp.sourceforge.net +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +/** + * @file InputEventChannel.h + * + **/ + + +#ifndef __INPUTEVENTCHANNEL_H__ +#define __INPUTEVENTCHANNEL_H__ + +#include <Bus.h> +#include <InputInterface.h> + + +/** A specialized channel for accessing input events from the system bus. + * Provides a general signal mechanism similar to a push data channel, but + * unlike a DataChannel has no internal state. The channel is bound to + * a specific input event which triggers the signal. The signal may also + * be triggered directly using the signal() method. + * + * An example that motivated the creation of this class is the ICP interface + * of the F16. Each button has a corresponding input event, which needs to + * be handled by both the system that implements the ICP functionality and + * the animation callback that drives the button animation in the 3D cockpit. + * Similar dispatch must occur when the user clicks on the button in the 3D + * cockpit. + * + * The system creates an InputEventChannel for each button that is bound to + * the corresponding input event (typically a keypress). Both the system and + * the animation callback register handlers for the event. When an animation + * callback detects a click on its button, it manually triggers the event + * signal. From the perspective of the handlers, both event types are + * equivalent. + */ +class InputEventChannel: public ChannelBase, public sigc::trackable { +public: + /** Construct a new InputEventChannel bound to a specific input event. The + * channel name must be the same as the event name. The input interface + * will typically be the System subclass that registers the channnel. + */ + InputEventChannel(std::string const &name, InputInterface *input_interface): ChannelBase(name, ACCESS_SHARED) { + input_interface->bindActionEvent(name, sigc::mem_fun(*this, &InputEventChannel::onInputEvent)); + } + /** A convenience method to construct an InputEventChannel and bind a callback + * method in one step. Useful when the System creating and registering the + * channel does not need to retain a private reference. Note that the instance + * class must be a subclass sigC::trackable (and that System is not). + */ + template <class C> + InputEventChannel(std::string const &name, C* instance, void (C::*method)()): ChannelBase(name, ACCESS_SHARED) { + connect(instance, method); + instance->bindActionEvent(name, sigc::mem_fun(*this, &InputEventChannel::onInputEvent)); + } + + /** Connect a new signal handler to the channel. The handler will be called + * whenever the corresponding input event is received, and when the signal() + * method is called. + */ + template <class C> + sigc::connection connect(C *object, void (C::*callback)()) const { + return m_Signal.connect(sigc::mem_fun(*object, callback)); + } + + /** Signal all connected handlers. + */ + void signal() const { m_Signal.emit(); } + +protected: + virtual ~InputEventChannel() { } + +private: + void onInputEvent(int, int) { signal(); } + mutable sigc::signal<void> m_Signal; +}; + + +#endif // __INPUTEVENTCHANNEL_H__ + Modified: trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj =================================================================== --- trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj 2005-06-17 06:52:33 UTC (rev 1568) +++ trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj 2005-06-17 06:55:16 UTC (rev 1569) @@ -622,6 +622,9 @@ RelativePath="..\..\Include\InputEvent.h"> </File> <File + RelativePath="..\..\Include\InputEventChannel.h"> + </File> + <File RelativePath="..\..\Include\InputInterface.h"> </File> <File |
From: <sv...@ww...> - 2005-06-17 06:52:41
|
Author: mkrose Date: 2005-06-16 23:52:33 -0700 (Thu, 16 Jun 2005) New Revision: 1568 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/Bus.h trunk/CSP/CSPSim/Include/GameScreen.h trunk/CSP/CSPSim/Source/F16/F16GearDynamics.cpp trunk/CSP/CSPSim/Source/F16/F16GearDynamics.h trunk/CSP/CSPSim/Source/GameScreen.cpp trunk/CSP/SimCore/Battlefield/LocalBattlefield.cpp trunk/CSP/SimCore/Battlefield/LocalBattlefield.h trunk/CSP/SimCore/Util/Callback.h Log: Refactor SimCore/Util/Callback.h. The new code achieves the same effect with a cleaner interface and much simpler logic. Corresponding changes to the files that use these classes. Also added a new feature for local channels that allows holders of a const reference to the channel to request that the value be changed. The owner of the channel can register a callback for such requests. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1568 Diff omitted (24774 bytes). |
From: <sv...@ww...> - 2005-06-15 08:42:14
|
Author: mkrose Date: 2005-06-15 01:42:02 -0700 (Wed, 15 Jun 2005) New Revision: 1567 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/Bus.h trunk/CSP/CSPSim/Include/CockpitInterface.h trunk/CSP/CSPSim/Include/InputInterface.h trunk/CSP/CSPSim/SConscript trunk/CSP/CSPSim/Source/CockpitInterface.cpp trunk/CSP/SimCore/SConscript trunk/CSP/SimCore/Util/Callback.h Log: Upgrade to use sigc 2.0. All users will need to install libsigc++ 2.0.6 or newer. Version 1.2 is no longer needed. ==> WINDOWS USERS: The project file needs to be updated to point to the sigc 2.0 library and headers. (The scons build has already been updated.) Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1567 Diff omitted (15245 bytes). |
From: <sv...@ww...> - 2005-06-12 03:44:08
|
Author: mkrose Date: 2005-06-11 20:44:02 -0700 (Sat, 11 Jun 2005) New Revision: 1566 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/gear.xml Log: Increase the spring constant of the F16 front landing gear. ==> ALL USERS: CompileData.py Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1566 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-06-12 03:42:30 UTC (rev 1565) +++ trunk/CSP/CSPSim/CHANGES.current 2005-06-12 03:44:02 UTC (rev 1566) @@ -17,6 +17,10 @@ ==> ALL USERS: RebuildData.py and regenerate Inputs/gamescreen.hid. + * Increase the spring constant of the F16 front landing gear. + +==> ALL USERS: CompileData.py + 2005-06-06: onsight * Partially fix depth buffer problem with airbase structures. The floor of the open hangars will still z-fight with the Modified: trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/gear.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/gear.xml 2005-06-12 03:42:30 UTC (rev 1565) +++ trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/gear.xml 2005-06-12 03:44:02 UTC (rev 1566) @@ -16,7 +16,7 @@ The 3d model has 0.089 m of displacement for a complete compression. --> <Float name="compression_limit">0.0895</Float> - <Float name="K">350000.0</Float> + <Float name="K">450000.0</Float> <Float name="beta">20000.0</Float> <Float name="brake_limit">0.0</Float> |
From: <sv...@ww...> - 2005-06-12 03:42:38
|
Author: mkrose Date: 2005-06-11 20:42:30 -0700 (Sat, 11 Jun 2005) New Revision: 1565 Added: trunk/CSP/CSPSim/Include/SceneConstants.h trunk/CSP/CSPSim/Include/Station.h trunk/CSP/CSPSim/Source/Station.cpp Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/model.xml trunk/CSP/CSPSim/Include/AircraftObject.h trunk/CSP/CSPSim/Include/DynamicObject.h trunk/CSP/CSPSim/Include/GameScreen.h trunk/CSP/CSPSim/Include/ObjectModel.h trunk/CSP/CSPSim/Include/VirtualScene.h trunk/CSP/CSPSim/Source/AircraftObject.cpp trunk/CSP/CSPSim/Source/CSPSim.cpp trunk/CSP/CSPSim/Source/ConsoleCommands.cpp trunk/CSP/CSPSim/Source/DynamicObject.cpp trunk/CSP/CSPSim/Source/GameScreen.cpp trunk/CSP/CSPSim/Source/ObjectModel.cpp trunk/CSP/CSPSim/Source/SConscript trunk/CSP/CSPSim/Source/TankObject.cpp trunk/CSP/CSPSim/Source/VirtualScene.cpp trunk/CSP/CSPSim/Tools/HID/Maps/gamescreen-core.map trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj Log: Add support for multiple player positions ("stations") within a vehicle. Each station can have a high-detail model that is swapped in on demand. Fix object labels so that they are rendered correctly. Labels can be toggled by pressing 'l' in the simulation. Change some internal interfaces to use Bus* instead of Bus::Ref. ==> ALL USERS: RebuildData.py and regenerate Inputs/gamescreen.hid. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1565 Diff omitted (92267 bytes). |
From: <sv...@ww...> - 2005-06-12 03:22:51
|
Author: mkrose Date: 2005-06-11 20:22:42 -0700 (Sat, 11 Jun 2005) New Revision: 1564 Modified: trunk/CSP/SimCore/Util/StringTools.cpp trunk/CSP/SimCore/Util/StringTools.h Log: Add string utility functions for trimming whitespace. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1564 Modified: trunk/CSP/SimCore/Util/StringTools.cpp =================================================================== --- trunk/CSP/SimCore/Util/StringTools.cpp 2005-06-12 03:20:39 UTC (rev 1563) +++ trunk/CSP/SimCore/Util/StringTools.cpp 2005-06-12 03:22:42 UTC (rev 1564) @@ -46,3 +46,18 @@ } } +std::string TrimString(std::string const &str, std::string const &chars) { + const std::string::size_type begin = str.find_first_not_of(chars); + const std::string::size_type end = str.find_last_not_of(chars); + return begin == std::string::npos ? "" : str.substr(begin, (1 + end) - begin); +} + +std::string LeftTrimString(std::string const &str, std::string const &chars) { + const std::string::size_type begin = str.find_first_not_of(chars); + return begin == std::string::npos ? "" : str.substr(begin); +} + +std::string RightTrimString(std::string const &str, std::string const &chars) { + const std::string::size_type end = str.find_last_not_of(chars); + return end == std::string::npos ? "" : str.substr(0, end + 1); +} Modified: trunk/CSP/SimCore/Util/StringTools.h =================================================================== --- trunk/CSP/SimCore/Util/StringTools.h 2005-06-12 03:20:39 UTC (rev 1563) +++ trunk/CSP/SimCore/Util/StringTools.h 2005-06-12 03:22:42 UTC (rev 1564) @@ -48,6 +48,15 @@ StringTokenizer(const std::string &str, const std::string &delimiters = " ,\n"); }; +/** Remove leading and trailing whitespace, or other characters if specified. */ +std::string TrimString(std::string const &str, std::string const &chars = " \n\r\t"); +/** Remove leading whitespace, or other characters if specified. */ +std::string LeftTrimString(std::string const &str, std::string const &chars = " \n\r\t"); + +/** Remove trailing whitespace, or other characters if specified. */ +std::string RightTrimString(std::string const &str, std::string const &chars = " \n\n\t"); + + #endif // __SIMCORE_UTIL_STRINGTOOLS_H__ |
From: <sv...@ww...> - 2005-06-12 03:20:57
|
Author: mkrose Date: 2005-06-11 20:20:39 -0700 (Sat, 11 Jun 2005) New Revision: 1563 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Source/Animation.cpp Log: Allow animations to be disconnected from a bus. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1563 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-06-12 03:18:33 UTC (rev 1562) +++ trunk/CSP/CSPSim/CHANGES.current 2005-06-12 03:20:39 UTC (rev 1563) @@ -4,6 +4,8 @@ 2005-06-11: onsight * Fix a bug that caused absurdly large turbulence. + * Allow animations to be disconnected from a bus. + 2005-06-06: onsight * Partially fix depth buffer problem with airbase structures. The floor of the open hangars will still z-fight with the Modified: trunk/CSP/CSPSim/Source/Animation.cpp =================================================================== --- trunk/CSP/CSPSim/Source/Animation.cpp 2005-06-12 03:18:33 UTC (rev 1562) +++ trunk/CSP/CSPSim/Source/Animation.cpp 2005-06-12 03:20:39 UTC (rev 1563) @@ -92,19 +92,22 @@ } /** Bind to a named data channel. Returns true on success, and logs errors - * on failure. + * on failure. If bus is null the channel is detached and the method returns + * false. */ bool bind(Bus *bus, std::string const &name) { - assert(bus); - try { - m_Channel = bus->getChannel(name, false); - } catch (simdata::ConversionError &) { - CSP_LOG(OBJECT, WARNING, "Incompatible channel " << name << " for animation; expected double"); - return false; + m_Channel = 0; + if (bus) { + try { + m_Channel = bus->getChannel(name, false); + } catch (simdata::ConversionError &) { + CSP_LOG(OBJECT, WARNING, "Incompatible channel " << name << " for animation; expected double"); + return false; + } + if (!m_Channel) { + CSP_LOG(OBJECT, WARNING, "Unable to bind channel " << name << " for animation"); + } } - if (!m_Channel) { - CSP_LOG(OBJECT, WARNING, "Unable to bind channel " << name << " for animation"); - } return m_Channel.valid(); } @@ -139,19 +142,22 @@ } /** Bind to the named data channel. Returns true on success, and logs errors - * on failure. + * on failure. If bus is null the channel is detached and the method returns + * false; */ bool bind(Bus *bus, std::string const &name) { - assert(bus); - try { - m_Channel = bus->getChannel(name, false); - } catch (simdata::ConversionError &) { - CSP_LOG(OBJECT, WARNING, "Incompatible channel " << name << " for animation; expected enumlink"); - return false; + m_Channel = 0; + if (bus) { + try { + m_Channel = bus->getChannel(name, false); + } catch (simdata::ConversionError &) { + CSP_LOG(OBJECT, WARNING, "Incompatible channel " << name << " for animation; expected enumlink"); + return false; + } + if (!m_Channel) { + CSP_LOG(OBJECT, WARNING, "Unable to bind channel " << name << " for animation"); + } } - if (!m_Channel) { - CSP_LOG(OBJECT, WARNING, "Unable to bind channel " << name << " for animation"); - } return m_Channel.valid(); } @@ -993,12 +999,13 @@ traverse(node, nv); } virtual bool bindChannels(Bus *bus) { - assert(bus); m_Channel = 0; - try { - m_Channel = bus->getChannel(m_Animation->getChannelName(), false); - } catch (simdata::ConversionError &) { - CSP_LOG(OBJECT, WARNING, "Incompatible channel (" << m_Animation->getChannelName() << ") type for DrivenVectorialTranslation"); + if (bus) { + try { + m_Channel = bus->getChannel(m_Animation->getChannelName(), false); + } catch (simdata::ConversionError &) { + CSP_LOG(OBJECT, WARNING, "Incompatible channel (" << m_Animation->getChannelName() << ") type for DrivenVectorialTranslation"); + } } return m_Channel.valid(); } |
From: <sv...@ww...> - 2005-06-12 03:18:42
|
Author: mkrose Date: 2005-06-11 20:18:33 -0700 (Sat, 11 Jun 2005) New Revision: 1562 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/Systems/AircraftFlightSensors.h trunk/CSP/CSPSim/Source/Atmosphere.cpp trunk/CSP/CSPSim/Source/Systems/AircraftFlightSensors.cpp Log: Fix a bug that caused absurdly large turbulence. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1562 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-06-08 00:50:13 UTC (rev 1561) +++ trunk/CSP/CSPSim/CHANGES.current 2005-06-12 03:18:33 UTC (rev 1562) @@ -1,6 +1,9 @@ Version 0.4.0 (in progress) =========================== +2005-06-11: onsight + * Fix a bug that caused absurdly large turbulence. + 2005-06-06: onsight * Partially fix depth buffer problem with airbase structures. The floor of the open hangars will still z-fight with the Modified: trunk/CSP/CSPSim/Include/Systems/AircraftFlightSensors.h =================================================================== --- trunk/CSP/CSPSim/Include/Systems/AircraftFlightSensors.h 2005-06-08 00:50:13 UTC (rev 1561) +++ trunk/CSP/CSPSim/Include/Systems/AircraftFlightSensors.h 2005-06-12 03:18:33 UTC (rev 1562) @@ -35,6 +35,8 @@ EXTEND_SIMDATA_XML_INTERFACE(AircraftFlightSensors, System) END_SIMDATA_XML_INTERFACE + AircraftFlightSensors(); + protected: virtual double onUpdate(double dt); virtual void importChannels(Bus *bus); Modified: trunk/CSP/CSPSim/Source/Atmosphere.cpp =================================================================== --- trunk/CSP/CSPSim/Source/Atmosphere.cpp 2005-06-08 00:50:13 UTC (rev 1561) +++ trunk/CSP/CSPSim/Source/Atmosphere.cpp 2005-06-12 03:18:33 UTC (rev 1562) @@ -171,7 +171,7 @@ m_TurbulenceZ = noise.generate(1000, true, 10.0, 1.0, 0.0); for (i = 0; i < 1000; i++) { float a; - a= m_TurbulenceX[i]; + a = m_TurbulenceX[i]; m_TurbulenceX[i] *= 10.0f * a * fabsf(a); a = m_TurbulenceY[i]; m_TurbulenceY[i] *= 10.0f * a * fabsf(a); @@ -234,18 +234,27 @@ const double f = h - idx; wind.x() += m_WindAltX[idx]*(1.0-f) + m_WindAltX[idx+1]*f; wind.y() += m_WindAltY[idx]*(1.0-f) + m_WindAltY[idx+1]*f; - return wind * m_WindScale * m_GustModulation; + wind *= m_WindScale * m_GustModulation; + if (wind.length() > 100.0) { // XXX remove me + std::cout << "strong wind! " << m_WindScale << " " << m_GustModulation << " " << wind << "\n"; + } + return wind; } simdata::Vector3 Atmosphere::getTurbulence(simdata::Vector3 const &p, double dist) const { + assert(dist >= 0.0 && dist < 2e+9); int idx = simdata::clampTo(static_cast<int>(p.z() * (1000.0 / 15000.0)), 0, 999); double a = std::max(m_TurbulenceAltA[idx], 0.0f); float b = std::max(m_TurbulenceAltB[idx], 0.0f); + assert(m_TurbulenceBlend >= 0.0 && m_TurbulenceBlend <= 1.0); a = a * (1.0 - m_TurbulenceBlend) + b * m_TurbulenceBlend; if (a <= 0.0) return simdata::Vector3::ZERO; - if (dist < 0.0) dist = - dist; - idx = static_cast<int>(dist * 0.1) % 1000; - return simdata::Vector3(a * m_TurbulenceX[idx], a * m_TurbulenceY[idx], a * m_TurbulenceZ[idx]); + idx = std::max(0, static_cast<int>(dist * 0.1)) % 1000; + const simdata::Vector3 turbulence(a * m_TurbulenceX[idx], a * m_TurbulenceY[idx], a * m_TurbulenceZ[idx]); + if (turbulence.length() > 100.0) { // XXX remove me + std::cout << "strong turbulence! " << a << " " << turbulence << " " << m_TurbulenceX[idx] << " " << idx << " " << dist << " " << m_TurbulenceBlend << "\n"; + } + return turbulence; } void Atmosphere::setPosition(double lat, double lon) { @@ -306,11 +315,9 @@ const float f = static_cast<float>(m_GustIndex - index); const float gust = m_GustTime[index%1000] * (1.0f - f) + m_GustTime[(index+1)%1000] * f; m_GustModulation = std::max(1.0, 1.0 + gust); - //std::cout << getWind(simdata::Vector3::ZERO) << " " << m_GustModulation << std::endl; if (m_FastUpdate < 3.0) return false; dt = m_FastUpdate; m_FastUpdate = 0.0; - std::cout << "wind scale = " << m_WindScale << ", gust = " << m_GustModulation << "\n"; return true; } @@ -351,7 +358,7 @@ } } } else { - m_TurbulenceBlend += dt * 0.0003; + m_TurbulenceBlend -= dt * 0.0003; if (m_TurbulenceBlend < 0.0) { Perlin1D noise; noise.set(0.9, 6); Modified: trunk/CSP/CSPSim/Source/Systems/AircraftFlightSensors.cpp =================================================================== --- trunk/CSP/CSPSim/Source/Systems/AircraftFlightSensors.cpp 2005-06-08 00:50:13 UTC (rev 1561) +++ trunk/CSP/CSPSim/Source/Systems/AircraftFlightSensors.cpp 2005-06-12 03:18:33 UTC (rev 1562) @@ -34,10 +34,11 @@ #include <CSPSim.h> - SIMDATA_REGISTER_INTERFACE(AircraftFlightSensors) +AircraftFlightSensors::AircraftFlightSensors(): m_Distance(0) { } + double AircraftFlightSensors::onUpdate(double dt) { simdata::Vector3 pos = b_Position->value(); double speed = b_Velocity->value().length(); |
From: <sv...@ww...> - 2005-06-08 00:50:20
|
Author: wolverine Date: 2005-06-07 17:50:13 -0700 (Tue, 07 Jun 2005) New Revision: 1561 Modified: trunk/CSP/CSPSim/Source/VirtualScene.cpp Log: changes to compile on windows Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1561 Modified: trunk/CSP/CSPSim/Source/VirtualScene.cpp =================================================================== --- trunk/CSP/CSPSim/Source/VirtualScene.cpp 2005-06-08 00:49:50 UTC (rev 1560) +++ trunk/CSP/CSPSim/Source/VirtualScene.cpp 2005-06-08 00:50:13 UTC (rev 1561) @@ -815,12 +815,12 @@ bool VirtualScene::pick(int x, int y) { if (m_NearObjectGroup->getNumChildren() > 0) { assert(m_NearObjectGroup->getNumChildren() == 1); - osg::Vec3 near; - osg::Vec3 far; + osg::Vec3 var_near; + osg::Vec3 var_far; const int height = m_NearView->getViewport()->height(); - if (m_NearView->projectWindowXYIntoObject(x, height - y, near, far)) { + if (m_NearView->projectWindowXYIntoObject(x, height - y, var_near, var_far)) { osgUtil::IntersectVisitor iv; - osg::ref_ptr<osg::LineSegment> line_segment = new osg::LineSegment(near, far); + osg::ref_ptr<osg::LineSegment> line_segment = new osg::LineSegment(var_near, var_far); iv.addLineSegment(line_segment.get()); m_NearView->getSceneData()->accept(iv); osgUtil::IntersectVisitor::HitList &hits = iv.getHitList(line_segment.get()); |
From: <sv...@ww...> - 2005-06-08 00:49:59
|
Author: wolverine Date: 2005-06-07 17:49:50 -0700 (Tue, 07 Jun 2005) New Revision: 1560 Modified: trunk/CSP/CSPSim/Include/CockpitInterface.h Log: changes to compile on windows Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1560 Modified: trunk/CSP/CSPSim/Include/CockpitInterface.h =================================================================== --- trunk/CSP/CSPSim/Include/CockpitInterface.h 2005-06-07 07:08:25 UTC (rev 1559) +++ trunk/CSP/CSPSim/Include/CockpitInterface.h 2005-06-08 00:49:50 UTC (rev 1560) @@ -89,7 +89,7 @@ public: virtual void registerChannels(Bus *bus); - virtual void bindEvents(InputInterface *interface); + virtual void bindEvents(InputInterface *pInterface); virtual void addElement(CockpitElement *element); private: |
From: <sv...@ww...> - 2005-06-07 07:08:32
|
Author: mkrose Date: 2005-06-07 00:08:25 -0700 (Tue, 07 Jun 2005) New Revision: 1559 Modified: trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/fcs.xml Log: Forgot the generated m2k fcs file in rev 1557. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1559 Modified: trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/fcs.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/fcs.xml 2005-06-07 07:07:00 UTC (rev 1558) +++ trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/fcs.xml 2005-06-07 07:08:25 UTC (rev 1559) @@ -2,7 +2,7 @@ <!-- *** WARNING: THIS IS A GENERATED FILE *** Think twice before editing this file directly! - Generated from /b/mrose/projects/csp/CSP.cockpit/CSP/CSPSim/Tools/FlightControlSystem/m2k at Wed Apr 27 19:23:29 2005 + Generated from /b/mrose/projects/csp/CSP.cockpit/CSP/CSPSim/Tools/FlightControlSystem/m2k at Mon Jun 6 20:53:46 2005 --> <Object class="FlightControlSystem"> <List name="nodes"> @@ -16,8 +16,8 @@ <Object class="OutputChannel"> <Key name="id">aileron_deflection</Key> <String name="channel">ControlSurfaces.AileronDeflection</String> - <Float name="clamp_hi">0.436332312999</Float> - <Float name="clamp_lo">-0.279252680319</Float> + <Float name="clamp_hi">0.279252680319</Float> + <Float name="clamp_lo">-0.436332312999</Float> <Float name="gain">0.0174532925199</Float> <Key name="input">da_f</Key> <Float name="rate_limit_dec">-1.3962634016</Float> @@ -80,8 +80,8 @@ <Object class="Adder"> <Key name="id">de_left</Key> - <Float name="clamp_hi">25</Float> - <Float name="clamp_lo">-16</Float> + <Float name="clamp_hi">16</Float> + <Float name="clamp_lo">-25</Float> <Float name="gain_a">-1.0</Float> <Float name="gain_b">-1.0</Float> <Key name="input_a">elevator_pitch_deflection_command</Key> @@ -96,8 +96,8 @@ <Object class="Adder"> <Key name="id">de_right</Key> - <Float name="clamp_hi">25</Float> - <Float name="clamp_lo">-16</Float> + <Float name="clamp_hi">16</Float> + <Float name="clamp_lo">-25</Float> <Float name="gain_a">-1.0</Float> <Float name="gain_b">1.0</Float> <Key name="input_a">elevator_pitch_deflection_command</Key> @@ -122,8 +122,8 @@ <Object class="OutputChannel"> <Key name="id">elevator_deflection</Key> <String name="channel">ControlSurfaces.ElevatorDeflection</String> - <Float name="clamp_hi">0.436332312999</Float> - <Float name="clamp_lo">-0.279252680319</Float> + <Float name="clamp_hi">0.279252680319</Float> + <Float name="clamp_lo">-0.436332312999</Float> <Float name="gain">0.0174532925199</Float> <Key name="input">de_f</Key> <Float name="rate_limit_dec">-1.0471975512</Float> @@ -140,7 +140,7 @@ <Object class="Integrator"> <Key name="id">elevator_deviation_integrator</Key> <Float name="clamp_hi">25.0</Float> - <Float name="clamp_lo">-25.0</Float> + <Float name="clamp_lo">-16.0</Float> <Float name="gain">5.0</Float> <Key name="input">reduced_elevator_deviation</Key> </Object> @@ -159,8 +159,8 @@ <Object class="Adder"> <Key name="id">elevator_pitch_deflection_command</Key> - <Float name="clamp_hi">16</Float> - <Float name="clamp_lo">-25</Float> + <Float name="clamp_hi">25</Float> + <Float name="clamp_lo">-16</Float> <Float name="gain_a">8.0</Float> <Key name="input_a">reduced_elevator_deviation</Key> <Key name="input_b">elevator_deviation_integrator</Key> @@ -175,8 +175,8 @@ <Object class="OutputChannel"> <Key name="id">elevron_deflection_left</Key> <String name="channel">ControlSurfaces.LeftElevronDeflection</String> - <Float name="clamp_hi">0.436332312999</Float> - <Float name="clamp_lo">-0.279252680319</Float> + <Float name="clamp_hi">0.279252680319</Float> + <Float name="clamp_lo">-0.436332312999</Float> <Float name="gain">0.0174532925199</Float> <Key name="input">de_left_f</Key> <Float name="rate_limit_dec">-1.3962634016</Float> @@ -186,8 +186,8 @@ <Object class="OutputChannel"> <Key name="id">elevron_deflection_right</Key> <String name="channel">ControlSurfaces.RightElevronDeflection</String> - <Float name="clamp_hi">0.436332312999</Float> - <Float name="clamp_lo">-0.279252680319</Float> + <Float name="clamp_hi">0.279252680319</Float> + <Float name="clamp_lo">-0.436332312999</Float> <Float name="gain">0.0174532925199</Float> <Key name="input">de_right_f</Key> <Float name="rate_limit_dec">-1.3962634016</Float> |
From: <sv...@ww...> - 2005-06-07 07:07:07
|
Author: mkrose Date: 2005-06-07 00:07:00 -0700 (Tue, 07 Jun 2005) New Revision: 1558 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/GameScreen.h trunk/CSP/CSPSim/Include/VirtualScene.h trunk/CSP/CSPSim/Include/VirtualScene.i trunk/CSP/CSPSim/Source/CSPSim.cpp trunk/CSP/CSPSim/Source/GameScreen.cpp trunk/CSP/CSPSim/Source/ScreenInfo.cpp trunk/CSP/CSPSim/Source/Sky.cpp trunk/CSP/CSPSim/Source/VirtualScene.cpp Log: Fix a major rendering bug. Replaces various workarounds for improper gl state handling with correct state sharing between sceneviews. Add a new "very far" sceneview for drawing the sky dome and related objects. Increase the sky dome radius to 1000 km. Cleanup up the scene construction code. Move the info view out of GameScreen and into VirtualScene. Arguably the former is the more logical place, but managing all the sceneviews from a single class is advantageous. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1558 Diff omitted (41182 bytes). |
From: <sv...@ww...> - 2005-06-07 04:51:29
|
Author: mkrose Date: 2005-06-06 21:51:21 -0700 (Mon, 06 Jun 2005) New Revision: 1557 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/fm.xml trunk/CSP/CSPSim/Tools/FlightControlSystem/m2k/outputs.py trunk/CSP/CSPSim/Tools/FlightControlSystem/m2k/pitch.py Log: Fix reversed limits on m2k elevator deflection. Tweak cm_0, cm_a, and cd_a to give somewhat less unrealistic behavior. Still totally ad-hoc. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1557 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-06-07 03:45:27 UTC (rev 1556) +++ trunk/CSP/CSPSim/CHANGES.current 2005-06-07 04:51:21 UTC (rev 1557) @@ -11,6 +11,10 @@ * Increase the ABS cycle rate to improve braking performance. + * Fix reversed limits on m2k elevator deflection. Tweak cm_0, + cm_a, and cd_a to give somewhat less unrealistic behavior. + Still totally ad-hoc. + 2005-06-05: onsight * Finally remove screen size globals. Add screen size hints to terrain classes. Also add an debug config flag to disable Modified: trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/fm.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/fm.xml 2005-06-07 03:45:27 UTC (rev 1556) +++ trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/fm.xml 2005-06-07 04:51:21 UTC (rev 1557) @@ -17,7 +17,7 @@ <!-- Drag Parameters --> <Float name="cd0">0.06</Float> - <Float name="cd_a">0.07</Float> + <Float name="cd_a">0.18</Float> <Float name="cd_de">0.0703</Float> <Float name="cd_db">0.0876</Float> <Table2 name="cd_m_a"> @@ -84,8 +84,8 @@ <!--Float name="cl_dh">0.62</Float--> <!-- Pitch Moment Parameters --> - <Float name="cm0">0.2</Float> - <Float name="cm_a">-1.0</Float> + <Float name="cm0">0.06</Float> + <Float name="cm_a">-0.6</Float> <!--Float name="cm_a">-3.5</Float--> <Float name="cm_adot">-3.61</Float> <Float name="cm_q">-53</Float><!-- <0 --> Modified: trunk/CSP/CSPSim/Tools/FlightControlSystem/m2k/outputs.py =================================================================== --- trunk/CSP/CSPSim/Tools/FlightControlSystem/m2k/outputs.py 2005-06-07 03:45:27 UTC (rev 1556) +++ trunk/CSP/CSPSim/Tools/FlightControlSystem/m2k/outputs.py 2005-06-07 04:51:21 UTC (rev 1557) @@ -40,8 +40,8 @@ class elevron_deflection_left(OutputChannel): channel = "ControlSurfaces.LeftElevronDeflection" - clamp_lo = radians(-16) - clamp_hi = radians(25) + clamp_lo = radians(-25) + clamp_hi = radians(16) input = "de_left_f" gain = DegreesToRadians rate_limit_dec = radians(-80) @@ -49,8 +49,8 @@ class elevron_deflection_right(OutputChannel): channel = "ControlSurfaces.RightElevronDeflection" - clamp_lo = radians(-16) - clamp_hi = radians(25) + clamp_lo = radians(-25) + clamp_hi = radians(16) input = "de_right_f" gain = DegreesToRadians rate_limit_dec = radians(-80) @@ -58,8 +58,8 @@ class aileron_deflection(OutputChannel): channel = "ControlSurfaces.AileronDeflection" - clamp_lo = radians(-16) - clamp_hi = radians(25) + clamp_lo = radians(-25) + clamp_hi = radians(16) input = "da_f" gain = DegreesToRadians rate_limit_dec = radians(-80) @@ -67,8 +67,8 @@ class elevator_deflection(OutputChannel): channel = "ControlSurfaces.ElevatorDeflection" - clamp_lo = radians(-16) - clamp_hi = radians(25) + clamp_lo = radians(-25) + clamp_hi = radians(16) input = "de_f" gain = DegreesToRadians rate_limit_dec = radians(-60) Modified: trunk/CSP/CSPSim/Tools/FlightControlSystem/m2k/pitch.py =================================================================== --- trunk/CSP/CSPSim/Tools/FlightControlSystem/m2k/pitch.py 2005-06-07 03:45:27 UTC (rev 1556) +++ trunk/CSP/CSPSim/Tools/FlightControlSystem/m2k/pitch.py 2005-06-07 04:51:21 UTC (rev 1557) @@ -12,16 +12,16 @@ input_b = "da_program" gain_a = -1.0 gain_b = 1.0 - clamp_lo = -16 - clamp_hi = 25 + clamp_lo = -25 + clamp_hi = 16 class de_left(Adder): input_a = "elevator_pitch_deflection_command" input_b = "da_program" gain_a = -1.0 gain_b = -1.0 - clamp_lo = -16 - clamp_hi = 25 + clamp_lo = -25 + clamp_hi = 16 class de_f(Adder): input_a = "de_left_f" @@ -101,12 +101,12 @@ input_a = "reduced_elevator_deviation" input_b = "elevator_deviation_integrator" gain_a = 8.0 - clamp_lo = -25 - clamp_hi = 16 + clamp_lo = -16 + clamp_hi = 25 class elevator_deviation_integrator(Integrator): input = "reduced_elevator_deviation" gain = 5.0 - clamp_lo = -25.0 + clamp_lo = -16.0 clamp_hi = 25.0 |
From: <sv...@ww...> - 2005-06-07 03:45:34
|
Author: mkrose Date: 2005-06-06 20:45:27 -0700 (Mon, 06 Jun 2005) New Revision: 1556 Modified: trunk/CSP/CSPSim/Include/InputInterface.h trunk/CSP/CSPSim/Source/LogoScreen.cpp Log: Trivial cleanup. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1556 Modified: trunk/CSP/CSPSim/Include/InputInterface.h =================================================================== --- trunk/CSP/CSPSim/Include/InputInterface.h 2005-06-07 02:40:26 UTC (rev 1555) +++ trunk/CSP/CSPSim/Include/InputInterface.h 2005-06-07 03:45:27 UTC (rev 1556) @@ -396,6 +396,7 @@ void bindMotionEvent(std::string const &id, MotionEventSlot const &slot) { runtimeDispatch()->bindMotion(id, slot); } + protected: /** Internal */ Modified: trunk/CSP/CSPSim/Source/LogoScreen.cpp =================================================================== --- trunk/CSP/CSPSim/Source/LogoScreen.cpp 2005-06-07 02:40:26 UTC (rev 1555) +++ trunk/CSP/CSPSim/Source/LogoScreen.cpp 2005-06-07 03:45:27 UTC (rev 1556) @@ -73,20 +73,6 @@ // serialized? typedef std::vector<std::string> StrVec; StrVec file_name; - /* - file_name.push_back("CSPLogo.bmp"); - file_name.push_back("moonrise1.png"); - file_name.push_back("crescent.png"); - file_name.push_back("sunlight2.png"); - file_name.push_back("sunset4.png"); - file_name.push_back("console2.png"); - file_name.push_back("TLabMultitex.jpeg"); - file_name.push_back("landing-2.png"); - file_name.push_back("vista.png"); - file_name.push_back("ground-fog.png"); - file_name.push_back("fx2.jpeg"); - */ - file_name.push_back("Logo/CSPLogo.jpg"); file_name.push_back("Logo/moonrise1.jpg"); file_name.push_back("Logo/crescent.jpg"); @@ -142,7 +128,7 @@ float w = scale * m_width, h = scale * m_height; m_LogoView->setProjectionMatrixAsOrtho2D(-w,w,-h,h); osg::FrameStamp *fs = new osg::FrameStamp(); - m_LogoView-> setFrameStamp(fs); + m_LogoView->setFrameStamp(fs); // create geometry osg::Geometry* geom = new osg::Geometry; |
From: <sv...@ww...> - 2005-06-07 02:40:34
|
Author: mkrose Date: 2005-06-06 19:40:26 -0700 (Mon, 06 Jun 2005) New Revision: 1555 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Source/LandingGear.cpp Log: Increase the ABS cycle rate to improve braking performance. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1555 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-06-07 02:37:56 UTC (rev 1554) +++ trunk/CSP/CSPSim/CHANGES.current 2005-06-07 02:40:26 UTC (rev 1555) @@ -9,6 +9,8 @@ Another approach would be to add an option to enable polygon offset without disabling depth writes. + * Increase the ABS cycle rate to improve braking performance. + 2005-06-05: onsight * Finally remove screen size globals. Add screen size hints to terrain classes. Also add an debug config flag to disable Modified: trunk/CSP/CSPSim/Source/LandingGear.cpp =================================================================== --- trunk/CSP/CSPSim/Source/LandingGear.cpp 2005-06-07 02:37:56 UTC (rev 1554) +++ trunk/CSP/CSPSim/Source/LandingGear.cpp 2005-06-07 02:40:26 UTC (rev 1555) @@ -177,7 +177,7 @@ // then builds up gradually over the next couple hundred milliseconds, repeating ad // nauseum if the wheel continues to skid. if (b_BrakeCommand.valid()) { - double f = std::min(dt * 5.0, 1.0); // ad-hoc time constant + double f = std::min(dt * 10.0, 1.0); // ad-hoc time constant double brake_command = simdata::clampTo(b_BrakeCommand->value(), 0.0, 1.0); m_Brake = m_Brake * (1.0 - f) + brake_command * f; } |
From: <sv...@ww...> - 2005-06-07 02:38:04
|
Author: mkrose Date: 2005-06-06 19:37:56 -0700 (Mon, 06 Jun 2005) New Revision: 1554 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/XML/theater/balkan/Lightpylon1/model.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/bureau01/model.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/flag01/model.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/hangar/model.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/hangar2/model.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/objectives.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/runway/model.xml trunk/CSP/CSPSim/Data/XML/theater/balkan/tower1/model.xml Log: Partially fix depth buffer problem with airbase structures. The floor of the open hangars will still z-fight with the terrain. Probably the best solution would be to create a separate 3D model for the floor that uses polygon offset. Another approach would be to add an option to enable polygon offset without disabling depth writes. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1554 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-06-06 07:07:16 UTC (rev 1553) +++ trunk/CSP/CSPSim/CHANGES.current 2005-06-07 02:37:56 UTC (rev 1554) @@ -1,6 +1,14 @@ Version 0.4.0 (in progress) =========================== +2005-06-06: onsight + * Partially fix depth buffer problem with airbase structures. + The floor of the open hangars will still z-fight with the + terrain. Probably the best solution would be to create a + separate 3D model for the floor that uses polygon offset. + Another approach would be to add an option to enable polygon + offset without disabling depth writes. + 2005-06-05: onsight * Finally remove screen size globals. Add screen size hints to terrain classes. Also add an debug config flag to disable Modified: trunk/CSP/CSPSim/Data/XML/theater/balkan/Lightpylon1/model.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/theater/balkan/Lightpylon1/model.xml 2005-06-06 07:07:16 UTC (rev 1553) +++ trunk/CSP/CSPSim/Data/XML/theater/balkan/Lightpylon1/model.xml 2005-06-07 02:37:56 UTC (rev 1554) @@ -3,14 +3,7 @@ <Object class="ObjectModel"> <External name="model_path">Lightpylon1/Lightpylon1.osg</External> <Vector name="axis_0">1 0 0</Vector> - <Vector name="axis_1">0 1.0 0.0</Vector> - <Vector name="offset">0 0 0</Vector> - <Float name="polygon_offset">-1</Float> - <!--Bool name="lighting">false</Bool--> - <Float name="scale">1.0</Float> - <!--List name="contacts"> - <Vector>0.0 0.0 0.0</Vector> - </List--> + <Vector name="axis_1">0 1 0</Vector> <Bool name="smooth">true</Bool> <Bool name="filter">true</Bool> </Object> Modified: trunk/CSP/CSPSim/Data/XML/theater/balkan/bureau01/model.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/theater/balkan/bureau01/model.xml 2005-06-06 07:07:16 UTC (rev 1553) +++ trunk/CSP/CSPSim/Data/XML/theater/balkan/bureau01/model.xml 2005-06-07 02:37:56 UTC (rev 1554) @@ -3,14 +3,7 @@ <Object class="ObjectModel"> <External name="model_path">bureau01/bureau01.3ds</External> <Vector name="axis_0">1 0 0</Vector> - <Vector name="axis_1">0 1.0 0.0</Vector> - <Vector name="offset">0 0 0</Vector> - <Float name="polygon_offset">-1</Float> - <!--Bool name="lighting">false</Bool--> - <Float name="scale">1.0</Float> - <!--List name="contacts"> - <Vector>0.0 0.0 0.0</Vector> - </List--> + <Vector name="axis_1">0 1 0</Vector> <Bool name="smooth">true</Bool> <Bool name="filter">true</Bool> </Object> Modified: trunk/CSP/CSPSim/Data/XML/theater/balkan/flag01/model.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/theater/balkan/flag01/model.xml 2005-06-06 07:07:16 UTC (rev 1553) +++ trunk/CSP/CSPSim/Data/XML/theater/balkan/flag01/model.xml 2005-06-07 02:37:56 UTC (rev 1554) @@ -3,15 +3,8 @@ <Object class="ObjectModel"> <External name="model_path">flag01/flag01.osg</External> <Vector name="axis_0">1 0 0</Vector> - <Vector name="axis_1">0 1.0 0.0</Vector> - <Vector name="offset">0 0 0.0</Vector> - <Float name="polygon_offset">-1</Float> - <Bool name="lighting">true</Bool> + <Vector name="axis_1">0 1 0</Vector> <!--Int name="cull_face">1</Int--> - <Float name="scale">1.0</Float> - <!--List name="contacts"> - <Vector>0.0 0.0 0.0</Vector> - </List--> <Bool name="smooth">true</Bool> <Bool name="filter">true</Bool> </Object> Modified: trunk/CSP/CSPSim/Data/XML/theater/balkan/hangar/model.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/theater/balkan/hangar/model.xml 2005-06-06 07:07:16 UTC (rev 1553) +++ trunk/CSP/CSPSim/Data/XML/theater/balkan/hangar/model.xml 2005-06-07 02:37:56 UTC (rev 1554) @@ -3,11 +3,8 @@ <Object class="ObjectModel"> <External name="model_path">Hangar/hangar01.3ds</External> <Vector name="axis_0">1 0 0</Vector> - <Vector name="axis_1">0 1.0 0.0</Vector> - <Vector name="offset">0 0 0</Vector> - <Float name="polygon_offset">-1</Float> + <Vector name="axis_1">0 1 0</Vector> <Int name="cull_face">0</Int> - <Float name="scale">1.0</Float> <Bool name="smooth">true</Bool> <Bool name="filter">true</Bool> </Object> Modified: trunk/CSP/CSPSim/Data/XML/theater/balkan/hangar2/model.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/theater/balkan/hangar2/model.xml 2005-06-06 07:07:16 UTC (rev 1553) +++ trunk/CSP/CSPSim/Data/XML/theater/balkan/hangar2/model.xml 2005-06-07 02:37:56 UTC (rev 1554) @@ -3,15 +3,7 @@ <Object class="ObjectModel"> <External name="model_path">hangar02/hangar02.3ds</External> <Vector name="axis_0">1 0 0</Vector> - <Vector name="axis_1">0 1.0 0.0</Vector> - <Vector name="offset">0 0 0.0</Vector> - <Float name="polygon_offset">-1</Float> - <Bool name="lighting">true</Bool> - <!--Int name="cull_face">1</Int--> - <Float name="scale">1.0</Float> - <!--List name="contacts"> - <Vector>0.0 0.0 0.0</Vector> - </List--> + <Vector name="axis_1">0 1 0</Vector> <Bool name="smooth">true</Bool> <Bool name="filter">true</Bool> </Object> Modified: trunk/CSP/CSPSim/Data/XML/theater/balkan/objectives.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/theater/balkan/objectives.xml 2005-06-06 07:07:16 UTC (rev 1553) +++ trunk/CSP/CSPSim/Data/XML/theater/balkan/objectives.xml 2005-06-07 02:37:56 UTC (rev 1554) @@ -8,10 +8,9 @@ test objects must be updated to use simdata LLA tags before they can be added back into the theater. --> - <Object class="Objective"> + <Object class="Objective"> <Path name="model">airbase</Path> <LLA name="position">41.54 15.65 0.0</LLA> - <!--LLA name="position">41.521 15.655 0.0</LLA--> <Float name="orientation">0</Float> <Int name="strategic_value_modifier">0</Int> </Object> Modified: trunk/CSP/CSPSim/Data/XML/theater/balkan/runway/model.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/theater/balkan/runway/model.xml 2005-06-06 07:07:16 UTC (rev 1553) +++ trunk/CSP/CSPSim/Data/XML/theater/balkan/runway/model.xml 2005-06-07 02:37:56 UTC (rev 1554) @@ -3,11 +3,9 @@ <Object class="ObjectModel"> <External name="model_path">Runway/runway.3ds</External> <Vector name="axis_0">1 0 0</Vector> - <Vector name="axis_1">0 1.0 0.0</Vector> - <Vector name="offset">0 0 0</Vector> + <Vector name="axis_1">0 1 0</Vector> <Float name="polygon_offset">-20</Float> <Int name="cull_face">0</Int> - <Float name="scale">1.0</Float> <Bool name="smooth">true</Bool> <Bool name="filter">true</Bool> </Object> Modified: trunk/CSP/CSPSim/Data/XML/theater/balkan/tower1/model.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/theater/balkan/tower1/model.xml 2005-06-06 07:07:16 UTC (rev 1553) +++ trunk/CSP/CSPSim/Data/XML/theater/balkan/tower1/model.xml 2005-06-07 02:37:56 UTC (rev 1554) @@ -3,15 +3,7 @@ <Object class="ObjectModel"> <External name="model_path">tower1/tower1.3ds</External> <Vector name="axis_0">1 0 0</Vector> - <Vector name="axis_1">0 1.0 0.0</Vector> - <Vector name="offset">0 0 0.0</Vector> - <Float name="polygon_offset">-1</Float> - <Bool name="lighting">true</Bool> - <!--Int name="cull_face">1</Int--> - <Float name="scale">1.0</Float> - <!--List name="contacts"> - <Vector>0.0 0.0 0.0</Vector> - </List--> + <Vector name="axis_1">0 1 0</Vector> <Bool name="smooth">true</Bool> <Bool name="filter">true</Bool> </Object> |