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-04-29 01:37:17
|
Author: mkrose Date: 2005-04-28 18:37:10 -0700 (Thu, 28 Apr 2005) New Revision: 1528 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k.xml Log: Move the m2k center of mass forward to put more weight on the nose gear, which was slipping/skidding far too easily. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1528 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-04-29 01:35:12 UTC (rev 1527) +++ trunk/CSP/CSPSim/CHANGES.current 2005-04-29 01:37:10 UTC (rev 1528) @@ -6,6 +6,9 @@ from "jumping" after a hard landing. (Ultimately this regime should break the gear.) + * Move the m2k center of mass forward to put more weight on the nose + gear, which was slipping/skidding far too easily. + 2005-04-27: onsight * Remove dead code from PhysicsModel and BaseDynamics. Modified: trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k.xml 2005-04-29 01:35:12 UTC (rev 1527) +++ trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k.xml 2005-04-29 01:37:10 UTC (rev 1528) @@ -17,7 +17,7 @@ 0.0 55427.0 1764.0 0.0 1764.0 252326.0 </Matrix> - <Vector name="reference_center_of_mass_offset">0.0 -0.3 0</Vector> + <Vector name="reference_center_of_mass_offset">0.0 1.0 0</Vector> <Path name="human_systems">m2k.systems</Path> <Path name="remote_systems">m2k.remote</Path> |
From: <sv...@ww...> - 2005-04-29 01:35:20
|
Author: mkrose Date: 2005-04-28 18:35:12 -0700 (Thu, 28 Apr 2005) New Revision: 1527 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Source/LandingGear.cpp Log: Tweak gear stiffening at compression limit to prevent the aircraft from "jumping" after a hard landing. (Ultimately this regime should break the gear.) Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1527 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-04-28 06:36:35 UTC (rev 1526) +++ trunk/CSP/CSPSim/CHANGES.current 2005-04-29 01:35:12 UTC (rev 1527) @@ -1,6 +1,11 @@ Version 0.4.0 (in progress) =========================== +2005-04-28: onsight + * Tweak gear stiffening at compression limit to prevent the aircraft + from "jumping" after a hard landing. (Ultimately this regime should + break the gear.) + 2005-04-27: onsight * Remove dead code from PhysicsModel and BaseDynamics. Modified: trunk/CSP/CSPSim/Source/LandingGear.cpp =================================================================== --- trunk/CSP/CSPSim/Source/LandingGear.cpp 2005-04-28 06:36:35 UTC (rev 1526) +++ trunk/CSP/CSPSim/Source/LandingGear.cpp 2005-04-29 01:35:12 UTC (rev 1527) @@ -259,12 +259,27 @@ b_WOW->value() = false; // no ground reaction force } else { + // FIXME in computing vCompression, only the normal force is taken into + // account, but other components can matter if m_Motion isn't vertical. + // (e.g. when brakes are applied) + + // calculate strut compression speed + double vCompression = - dot(vBody, normalGroundBody) * motionNormal; + // restrict compression speed to reasonable limits (faster than this means + // the gear will probably break in a moment anyway) + vCompression = simdata::clampTo(vCompression, -10.0, 10.0); + const double old_compression = m_Compression; + // are we overcompressed? if (compression >= m_CompressionLimit) { m_Compression = m_CompressionLimit; - // stiffen the response - compression += (compression - m_Compression) * 10.0; + // stiffen the response, but only if we are not already decompressing + // too quickly (prevents launching the aircraft up when the gear gets + // overcompressed --- although eventually the gear should just break + // in this case). + double extra = simdata::clampTo(20.0 * (vCompression + 0.5), 0.0, 10.0); + compression += (compression - m_Compression) * extra; // TODO: break the gear if overcompression is too high (should // actually be keyed by normalForce below). } else { @@ -275,16 +290,7 @@ m_Position = max_position + m_Motion * m_Compression; // determine reaction force - // - // FIXME in computing vCompression, only the normal force is taken into - // account, but other components can matter if m_Motion isn't vertical. - // (e.g. when brakes are applied) - - // calculate strut compression speed - double vCompression = - dot(vBody, normalGroundBody) * motionNormal; - // restrict to reasonable limits (faster than this means the gear will - // probably break in a moment anyway) - vCompression = simdata::clampTo(vCompression, -10.0, 10.0); + // ground support (in response to strut compression + damping) double normalForce = (m_K * compression + m_Beta * vCompression) * motionNormal; |
From: <sv...@ww...> - 2005-04-28 06:36:42
|
Author: mkrose Date: 2005-04-27 23:36:35 -0700 (Wed, 27 Apr 2005) New Revision: 1526 Modified: trunk/CSP/CSPSim/Bin/TestObjects.py trunk/CSP/CSPSim/CHANGES.current Log: Add both an F16 and an M2k at startup. Minor adjustments to the initial elevation so they don't fall and bounce. Use <spacebar> to toggle between them. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1526 Modified: trunk/CSP/CSPSim/Bin/TestObjects.py =================================================================== --- trunk/CSP/CSPSim/Bin/TestObjects.py 2005-04-28 06:33:39 UTC (rev 1525) +++ trunk/CSP/CSPSim/Bin/TestObjects.py 2005-04-28 06:36:35 UTC (rev 1526) @@ -38,7 +38,8 @@ v = SimData.Vector3 m = SimData.LLA() vehicle = app.createVehicle - vehicle("sim:vehicles.aircraft.m2k", v(-29495, -10530, 88.5), v(0, 0, 0), v(0.0, 0.0, 180.0)) + vehicle("sim:vehicles.aircraft.F16DJ", v(-29495, -10530, 87.8), v(0, 0, 0), v(0.0, 0.0, 180.0)) + vehicle("sim:vehicles.aircraft.m2k", v(-29510, -10530, 87.8), v(0, 0, 0), v(0.0, 0.0, 180.0)) #vehicle("sim:vehicles.aircraft.m2k", v(-29413, -10980, 98.75), v(0, 100.0, 0), v(5.0, 0.0, 180.0)) #vehicle("sim:vehicles.aircraft.m2k", v(-29413, -10980, 108.75), v(0, 100.0, 0), v(5.0, 0.0, 180.0)) #vehicle("sim:vehicles.aircraft.m2k", v(-29413, -10980, 118.75), v(0, 100.0, 0), v(5.0, 0.0, 180.0)) Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-04-28 06:33:39 UTC (rev 1525) +++ trunk/CSP/CSPSim/CHANGES.current 2005-04-28 06:36:35 UTC (rev 1526) @@ -41,6 +41,10 @@ * Fix potential problem with the .ini path test at startup. + * Add both an F16 and an M2k at startup. Minor adjustments to the initial + elevation so they don't fall and bounce. Use <spacebar> to toggle between + them. + 2005-04-25: delta * Need to include a few headers to avoid a syntax error (g++ and vc++ don't manage forward class declaration equivalently). |
From: <sv...@ww...> - 2005-04-28 06:33:46
|
Author: mkrose Date: 2005-04-27 23:33:39 -0700 (Wed, 27 Apr 2005) New Revision: 1525 Modified: trunk/CSP/CSPSim/Bin/CSPSim.py trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Demo/Win/CSPSim.py Log: Fix potential problem with the .ini path test at startup. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1525 Modified: trunk/CSP/CSPSim/Bin/CSPSim.py =================================================================== --- trunk/CSP/CSPSim/Bin/CSPSim.py 2005-04-28 06:22:44 UTC (rev 1524) +++ trunk/CSP/CSPSim/Bin/CSPSim.py 2005-04-28 06:33:39 UTC (rev 1525) @@ -273,7 +273,11 @@ def findConfig(): # do our best to find the correct configuration file - config_paths = [".", "~/.cspsim", "/etc/cspsim", os.path.join(os.path.dirname(__file__), "../Data")] + config_paths = [".", "~/.cspsim", "/etc/cspsim"] + try: + config_paths.append(os.path.join(os.path.dirname(__file__), "../Data")) + except NameError: + pass config = "CSPSim.ini" for path in config_paths: Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-04-28 06:22:44 UTC (rev 1524) +++ trunk/CSP/CSPSim/CHANGES.current 2005-04-28 06:33:39 UTC (rev 1525) @@ -39,6 +39,8 @@ * Fix a small bug in the F16 yaw control circuit. Stops rudder jitter. + * Fix potential problem with the .ini path test at startup. + 2005-04-25: delta * Need to include a few headers to avoid a syntax error (g++ and vc++ don't manage forward class declaration equivalently). Modified: trunk/CSP/CSPSim/Demo/Win/CSPSim.py =================================================================== --- trunk/CSP/CSPSim/Demo/Win/CSPSim.py 2005-04-28 06:22:44 UTC (rev 1524) +++ trunk/CSP/CSPSim/Demo/Win/CSPSim.py 2005-04-28 06:33:39 UTC (rev 1525) @@ -272,15 +272,14 @@ def findConfig(): # do our best to find the correct configuration file - config_paths = [".", "~/.cspsim", "/etc/cspsim"] - try: - cwd = os.path.join(os.path.dirname(__file__)) - config_paths.append(cwd) - except NameError: - pass - - config_paths.append("../Data") + config_paths = [".", "~/.cspsim", "/etc/cspsim"] + try: + config_paths.append(os.path.join(os.path.dirname(__file__), "../Data")) + except NameError: + pass + config_paths.append("../Data") + config = "CSPSim.ini" for path in config_paths: path = os.path.join(path, "CSPSim.ini") |
From: <sv...@ww...> - 2005-04-28 06:22:52
|
Author: mkrose Date: 2005-04-27 23:22:44 -0700 (Wed, 27 Apr 2005) New Revision: 1524 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/fcs.xml trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/sensors.py trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/yaw.py Log: Fix a small bug in the F16 yaw control circuit. Stops rudder jitter. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1524 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-04-28 05:36:56 UTC (rev 1523) +++ trunk/CSP/CSPSim/CHANGES.current 2005-04-28 06:22:44 UTC (rev 1524) @@ -37,6 +37,8 @@ * Tweaked the m2k flight model slightly to allow the aircraft to reach higher AOA. The new values are entirely ad-hoc. + * Fix a small bug in the F16 yaw control circuit. Stops rudder jitter. + 2005-04-25: delta * Need to include a few headers to avoid a syntax error (g++ and vc++ don't manage forward class declaration equivalently). Modified: trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/fcs.xml =================================================================== --- trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/fcs.xml 2005-04-28 05:36:56 UTC (rev 1523) +++ trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/fcs.xml 2005-04-28 06:22:44 UTC (rev 1524) @@ -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/F16 at Mon Apr 25 23:45:46 2005 + Generated from /b/mrose/projects/csp/CSP.cockpit/CSP/CSPSim/Tools/FlightControlSystem/F16 at Wed Apr 27 23:08:32 2005 --> <Object class="FlightControlSystem"> <List name="nodes"> @@ -179,13 +179,11 @@ <Float name="dlef_qbar_ps">-9.05</Float> </Object> - <Object class="Adder3"> + <Object class="Adder"> <Key name="id">dr</Key> <Float name="gain_b">0.75</Float> - <Float name="gain_c">-0.5</Float> <Key name="input_a">limited_yaw_command</Key> <Key name="input_b">yaw_rate_f</Key> - <Key name="input_c">lateral_acceleration_compensation</Key> </Object> <Object class="LagFilter"> @@ -324,12 +322,6 @@ <String name="channel">Kinetics.AccelerationBody</String> </Object> - <Object class="Scale"> - <Key name="id">lateral_acceleration_compensation</Key> - <Float name="gain">1.97142857143</Float> - <Key name="input">lateral_acceleration</Key> - </Object> - <Object class="OutputChannel"> <Key name="id">leading_edge_deflection</Key> <String name="channel">ControlSurfaces.LeadingEdgeDeflection</String> @@ -542,6 +534,12 @@ <Float name="rate_limit_inc">1.0471975512</Float> </Object> + <!-- Roll rate in radians/sec. --> + <Object class="InputVectorYChannel"> + <Key name="id">roll_rate</Key> + <String name="channel">Kinetics.AngularVelocityBody</String> + </Object> + <Object class="OutputChannel"> <Key name="id">rudder_deflection</Key> <String name="channel">ControlSurfaces.RudderDeflection</String> Modified: trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/sensors.py =================================================================== --- trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/sensors.py 2005-04-28 05:36:56 UTC (rev 1523) +++ trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/sensors.py 2005-04-28 06:22:44 UTC (rev 1524) @@ -33,9 +33,9 @@ """Pitch rate in radians/sec.""" channel = "Kinetics.AngularVelocityBody" -#class roll_rate(InputVectorYChannel): -# """Roll rate in radians/sec.""" -# channel = "Kinetics.AngularVelocityBody" +class roll_rate(InputVectorYChannel): + """Roll rate in radians/sec.""" + channel = "Kinetics.AngularVelocityBody" class yaw_rate(InputVectorZChannel): """Yaw rate in radians/sec.""" Modified: trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/yaw.py =================================================================== --- trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/yaw.py 2005-04-28 05:36:56 UTC (rev 1523) +++ trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/yaw.py 2005-04-28 06:22:44 UTC (rev 1524) @@ -21,18 +21,42 @@ input = "yaw_rate" gain = RadiansToDegrees -class dr(Adder3): +class dr(Adder): input_a = "limited_yaw_command" input_b = "yaw_rate_f" - input_c = "lateral_acceleration_compensation" gain_b = 0.75 - gain_c = -0.5 class dr_f(LagFilter): input = "dr" a = 20.2 -class lateral_acceleration_compensation(Scale): - input = "lateral_acceleration" - gain = 19.32 / 9.8 # in g's +# TODO aoa >= 29 deg +""" +class roll_to_yaw_factor(Multiply): + input_a = roll_rate # rad/s + input_b = alpha_f # deg +class yaw_roll_target(Adder): + input_a = "yaw_rate" + input_b = "roll_to_yaw_factor" + gain_a = RadiansToDegrees + gain_b = -1.0 + +class yaw_roll_target_f(LeadLagFilter): + input = "yaw_roll_target" + a = 15.0 + b = 5.0 + c = 3.0 + +class yaw_roll_target_f2(LeadFilter): + input = "yaw_roll_target_f" + gain = 1.5 + a = 1.0 + +class yaw_target(Adder3): + input_a = "yaw_roll_target_f2" + input_b = "lateral_acceleration" + input_c = "zero" # TODO + gain_a = 0.5 + gain_b = 0.5 * 19.32 / 9.8 # in g's +""" |
Author: mkrose Date: 2005-04-27 22:36:56 -0700 (Wed, 27 Apr 2005) New Revision: 1523 Added: trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/fcs.xml trunk/CSP/CSPSim/Tools/FlightControlSystem/m2k/ trunk/CSP/CSPSim/Tools/FlightControlSystem/m2k/__init__.py trunk/CSP/CSPSim/Tools/FlightControlSystem/m2k/constants.py trunk/CSP/CSPSim/Tools/FlightControlSystem/m2k/fcs.py trunk/CSP/CSPSim/Tools/FlightControlSystem/m2k/inputs.py trunk/CSP/CSPSim/Tools/FlightControlSystem/m2k/monitoring.py trunk/CSP/CSPSim/Tools/FlightControlSystem/m2k/nws.py trunk/CSP/CSPSim/Tools/FlightControlSystem/m2k/outputs.py trunk/CSP/CSPSim/Tools/FlightControlSystem/m2k/pitch.py trunk/CSP/CSPSim/Tools/FlightControlSystem/m2k/roll.py trunk/CSP/CSPSim/Tools/FlightControlSystem/m2k/sensors.py trunk/CSP/CSPSim/Tools/FlightControlSystem/m2k/speedbrake.py Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/fcs.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/gear.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/fm.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/gear.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/model.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/systems.xml trunk/CSP/CSPSim/Include/BaseDynamics.h trunk/CSP/CSPSim/Include/ControlNode.h trunk/CSP/CSPSim/Include/LandingGear.h trunk/CSP/CSPSim/Include/LandingGearChannels.h trunk/CSP/CSPSim/Include/PhysicsModel.h trunk/CSP/CSPSim/Source/BaseDynamics.cpp trunk/CSP/CSPSim/Source/Channels.cpp trunk/CSP/CSPSim/Source/Collision.cpp trunk/CSP/CSPSim/Source/F16/F16GearDynamics.cpp trunk/CSP/CSPSim/Source/F16/F16GearDynamics.h trunk/CSP/CSPSim/Source/FlightControlSystem.cpp trunk/CSP/CSPSim/Source/LandingGear.cpp trunk/CSP/CSPSim/Source/PhysicsModel.cpp trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/inputs.py trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/nasa.py trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/outputs.py trunk/CSP/CSPSim/Tools/FlightControlSystem/NodeConstructor.py Log: * Remove dead code from PhysicsModel and BaseDynamics. * Add a dynamics variable to PhysicsModel and BaseDynamics to access the center of mass offset in local coordinates during the numerical integration. This is useful for dynamics classes that need to compute force based on the physical location of the aircraft (e.g. ground collisions and landing gear). This position is also available via the Kinetics::ModelPosition channel, but the channel is only updated after each time step. * Added dedicated channels for wheel brake and steering command, one each per landing gear. The fcs is now used to connect the actual input channels (e.g., rudder input) to the corresponding landing gear channels. This makes it relatively easy to insert aircraft-specific logic, such as disabling nose wheel steering when no WOW signal from the front landing gear. Added corresponding fcs logic for the f16 and m2k. * Fixed a bug that prevented FCS output channels from binding to the data recorder. * Improved gear response modelling when the shock absorber is extending rapidly. * Implemented a LeadLagFilter control node for the fcs and added a BooleanSwitch class to select between two input channels using a boolean channel. * Added a FlightControlSystem based fcs for the m2k. Implements simple g-limiting using parts of the f16 fcs circuit. Also handle combining elevator and aileron signals to deflect the trailing edge control surfaces. Simplifies the m2k animation definitions somewhat. * Tweaked the m2k flight model slightly to allow the aircraft to reach higher AOA. The new values are entirely ad-hoc. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1523 Diff omitted (85731 bytes). |
From: <sv...@ww...> - 2005-04-25 20:09:35
|
Author: delta Date: 2005-04-25 13:09:09 -0700 (Mon, 25 Apr 2005) New Revision: 1522 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Demo/Aircraft_KeyBinding.txt trunk/CSP/CSPSim/Demo/GameScreen_KeyBinding.txt trunk/CSP/CSPSim/Include/ControlInputsChannels.h trunk/CSP/CSPSim/Source/AircraftObject.cpp trunk/CSP/CSPSim/Source/CSPSim.cpp trunk/CSP/CSPSim/Source/F16/F16GearDynamics.cpp trunk/CSP/CSPSim/Source/F16/FLCS.cpp Log: * Need to include a few headers to avoid a syntax error (g++ and vc++ don't manage forward class declaration equivalently). * Avoid a few warnings. * Other minor changes. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1522 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-04-25 07:28:15 UTC (rev 1521) +++ trunk/CSP/CSPSim/CHANGES.current 2005-04-25 20:09:09 UTC (rev 1522) @@ -1,13 +1,21 @@ Version 0.4.0 (in progress) =========================== +2005-04-25: delta + * Need to include a few headers to avoid a syntax error (g++ and vc++ don't + manage forward class declaration equivalently). + + * Avoid a few warnings. + + * Other minor changes. + 2005-04-24: onsight * More gear animation refactoring. Merged the gear sequence and structure animations into a single class. Split part of TimedSequence into a SharedSequence base class and created a DrivenSequence subclass. * Added rate limiting for steering. This is just a temporary measure until - steering control is intergrated into the fcs. + steering control is integrated into the fcs. * Adjusted gear stiffness, damping, and position for the F16. Modified: trunk/CSP/CSPSim/Demo/Aircraft_KeyBinding.txt =================================================================== --- trunk/CSP/CSPSim/Demo/Aircraft_KeyBinding.txt 2005-04-25 07:28:15 UTC (rev 1521) +++ trunk/CSP/CSPSim/Demo/Aircraft_KeyBinding.txt 2005-04-25 20:09:09 UTC (rev 1522) @@ -1,3 +1,5 @@ +us keyboard + 'DOWN ': INC_ELEVATOR 'DOWN': STOP_INC_ELEVATOR 'UP': DEC_ELEVATOR Modified: trunk/CSP/CSPSim/Demo/GameScreen_KeyBinding.txt =================================================================== --- trunk/CSP/CSPSim/Demo/GameScreen_KeyBinding.txt 2005-04-25 07:28:15 UTC (rev 1521) +++ trunk/CSP/CSPSim/Demo/GameScreen_KeyBinding.txt 2005-04-25 20:09:09 UTC (rev 1522) @@ -1,3 +1,5 @@ +us keyboard + '0': CAMERA_VIEW_0 '1': CAMERA_VIEW_1 '2': CAMERA_VIEW_2 Modified: trunk/CSP/CSPSim/Include/ControlInputsChannels.h =================================================================== --- trunk/CSP/CSPSim/Include/ControlInputsChannels.h 2005-04-25 07:28:15 UTC (rev 1521) +++ trunk/CSP/CSPSim/Include/ControlInputsChannels.h 2005-04-25 20:09:09 UTC (rev 1522) @@ -35,6 +35,7 @@ static const char *RudderInput; static const char *LeftBrakeInput; static const char *RightBrakeInput; + static const char *SteeringInput; static const char *ThrottleInput; static const char *AirbrakeInput; }; Modified: trunk/CSP/CSPSim/Source/AircraftObject.cpp =================================================================== --- trunk/CSP/CSPSim/Source/AircraftObject.cpp 2005-04-25 07:28:15 UTC (rev 1521) +++ trunk/CSP/CSPSim/Source/AircraftObject.cpp 2005-04-25 20:09:09 UTC (rev 1522) @@ -25,6 +25,7 @@ #include <SimData/Math.h> #include "AircraftObject.h" +#include "Animation.h" #include "AnimationSequence.h" #include "KineticsChannels.h" #include "Collision.h" Modified: trunk/CSP/CSPSim/Source/CSPSim.cpp =================================================================== --- trunk/CSP/CSPSim/Source/CSPSim.cpp 2005-04-25 07:28:15 UTC (rev 1521) +++ trunk/CSP/CSPSim/Source/CSPSim.cpp 2005-04-25 20:09:09 UTC (rev 1522) @@ -35,6 +35,7 @@ #include "CSPSim.h" #include "Animation.h" +#include "AnimationSequence.h" #include "Atmosphere.h" #include "Config.h" //#include "ConsoleCommands.h" Modified: trunk/CSP/CSPSim/Source/F16/F16GearDynamics.cpp =================================================================== --- trunk/CSP/CSPSim/Source/F16/F16GearDynamics.cpp 2005-04-25 07:28:15 UTC (rev 1521) +++ trunk/CSP/CSPSim/Source/F16/F16GearDynamics.cpp 2005-04-25 20:09:09 UTC (rev 1522) @@ -25,6 +25,7 @@ #include "F16Channels.h" #include "F16GearDynamics.h" +#include "GearAnimation.h" #include <SimData/Math.h> #include <SimData/Conversions.h> Modified: trunk/CSP/CSPSim/Source/F16/FLCS.cpp =================================================================== --- trunk/CSP/CSPSim/Source/F16/FLCS.cpp 2005-04-25 07:28:15 UTC (rev 1521) +++ trunk/CSP/CSPSim/Source/F16/FLCS.cpp 2005-04-25 20:09:09 UTC (rev 1522) @@ -185,7 +185,7 @@ alpha_break1 = 10.0; // what is alpha_break2, and are any of the slopes different? } - double reduced_pitch_rate = m_PitchRateSchedule[b_QBar->value()] * 0.7 * m_PitchRateDeltaFilter.value(); + double reduced_pitch_rate = m_PitchRateSchedule[static_cast<float>(b_QBar->value())] * 0.7 * m_PitchRateDeltaFilter.value(); double alpha_break1_compensation = reduced_pitch_rate + alpha_f - alpha_break1; double g_limit = std::max(0.0, 0.322 * alpha_break1_compensation) + 0.334 * m_PitchRateDeltaFilter.value() + g_minus_1; m_GLimitFilter.update(g_limit, timer.dt()); @@ -245,7 +245,7 @@ limit = simdata::clampTo(limit, 0.0, 228.0); limit = 308.0 - limit; - double roll_command = m_RollCommandSchedule[b_RollInput->value() * 80.0]; + double roll_command = m_RollCommandSchedule[static_cast<float>(b_RollInput->value() * 80.0)]; if (b_TakeoffLandingGains->value()) { roll_command = 0.50 * roll_command; } else { |
Author: mkrose Date: 2005-04-25 00:28:15 -0700 (Mon, 25 Apr 2005) New Revision: 1521 Added: trunk/CSP/CSPSim/Include/AnimationSequence.h trunk/CSP/CSPSim/Include/GearAnimation.h trunk/CSP/CSPSim/Source/AnimationSequence.cpp trunk/CSP/CSPSim/Source/GearAnimation.cpp Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/fcs.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/gear.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/model.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16DJ.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/gear.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/model.xml trunk/CSP/CSPSim/Include/Animation.h trunk/CSP/CSPSim/Include/DynamicObject.h trunk/CSP/CSPSim/Include/KineticsChannels.h trunk/CSP/CSPSim/Include/LandingGear.h trunk/CSP/CSPSim/Include/ObjectModel.h trunk/CSP/CSPSim/Include/PhysicsModel.h trunk/CSP/CSPSim/Source/AircraftObject.cpp trunk/CSP/CSPSim/Source/Animation.cpp trunk/CSP/CSPSim/Source/Channels.cpp trunk/CSP/CSPSim/Source/Collision.cpp trunk/CSP/CSPSim/Source/DynamicObject.cpp trunk/CSP/CSPSim/Source/F16/F16GearDynamics.cpp trunk/CSP/CSPSim/Source/F16/F16GearDynamics.h trunk/CSP/CSPSim/Source/LandingGear.cpp trunk/CSP/CSPSim/Source/ObjectModel.cpp trunk/CSP/CSPSim/Source/PhysicsModel.cpp trunk/CSP/CSPSim/Source/SConscript trunk/CSP/CSPSim/Source/Systems/AircraftInputSystem.cpp trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/outputs.py trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/yaw.py trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj Log: * More gear animation refactoring. Merged the gear sequence and structure animations into a single class. Split part of TimedSequence into a SharedSequence base class and created a DrivenSequence subclass. * Added rate limiting for steering. This is just a temporary measure until steering control is intergrated into the fcs. * Adjusted gear stiffness, damping, and position for the F16. * Set the 3D model offset to zero for both the M2k and F16 and added a center of mass offset to DynamicObject. GlobalPosition now represents the model position and is exported as the Kinetics::ModelPosition channel. The center of mass position replaces the Kinetics::Position channel and is used for physics calculations. An extra transform node at the top of the scene model provides the necessary offset to rotate around the center of mass. * Added a new type of debug marker ("debug_points") to ObjectModel. These are similar in appearance to contact points (actually, small yellow diamonds instead of large red diamonds) but have no physical interaction. Should be useful for testing landing gear position and view point. ===> ALL USERS: RebuildData.py Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1521 Diff omitted (133999 bytes). |
From: <sv...@ww...> - 2005-04-24 12:15:44
|
Author: delta Date: 2005-04-24 05:15:32 -0700 (Sun, 24 Apr 2005) New Revision: 1520 Added: trunk/CSP/CSPSim/Demo/ trunk/CSP/CSPSim/Demo/Aircraft_KeyBinding.txt trunk/CSP/CSPSim/Demo/GameScreen_KeyBinding.txt trunk/CSP/CSPSim/Demo/Win/ trunk/CSP/CSPSim/Demo/Win/CSPSim.py trunk/CSP/CSPSim/Demo/Win/ShellEnvironment.py trunk/CSP/CSPSim/Demo/Win/TestObjects.py trunk/CSP/CSPSim/Demo/Win/py2exe_cspsim_setup.py Modified: trunk/CSP/CSPSim/CHANGES.current Log: * Slight modifications to the python scripts to prepare a new demo. Changes are checked under Demo/Win. py2exe_cspsim_setup.py as well as modified python scripts are intended to be run from inside CSPSim/Bin (of course, once the module py2exe is installed). A lot of stuff could be added to this script to make it more robust and facilitate the release of a demo. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1520 Diff omitted (20074 bytes). |
From: <sv...@ww...> - 2005-04-21 12:03:23
|
Author: delta Date: 2005-04-21 05:03:10 -0700 (Thu, 21 Apr 2005) New Revision: 1519 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/Models/F16/DJ/F16DJ.osg trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/gear.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/model.xml trunk/CSP/CSPSim/Include/Animation.h trunk/CSP/CSPSim/Source/Animation.cpp trunk/CSP/CSPSim/Source/ObjectModel.cpp Log: * Added a facultative (sim)data std::string member (m_NormalizedTimeChannel) in TimedSequence to warranty different (normalized time) channel names. At some point, a static unsigned int could be used and incremented automatically if a channel name is not provided to assure a 1-1 naming. * Wheel steering support has been added; it's controled by "ControlInputs.RudderInput". F16DJ.osg has been manually modified (adding a dummy transform node) to allow this binding to work. If this mod could be done in modeler program, it could save a bit of time on both side, developper and modeler (the node needs to be named). ModelProcessor::apply has been slightly rewritten. * DrivenRotation::Callback::operator() has changed again. OS? :) ===> ALL USERS: RebuildData.py Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1519 Diff omitted (746383 bytes). |
From: <sv...@ww...> - 2005-04-17 11:50:40
|
Author: delta Date: 2005-04-17 04:46:28 -0700 (Sun, 17 Apr 2005) New Revision: 1518 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/Models/F16/DJ/F16DJ.osg trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/gear.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/model.xml trunk/CSP/CSPSim/Include/Animation.h trunk/CSP/CSPSim/Include/LandingGear.h trunk/CSP/CSPSim/Include/Views/CameraAgent.h trunk/CSP/CSPSim/Include/VirtualScene.h trunk/CSP/CSPSim/Source/GameScreen.cpp trunk/CSP/CSPSim/Source/LandingGear.cpp trunk/CSP/CSPSim/Source/Views/CameraAgent.cpp trunk/CSP/CSPSim/Source/VirtualScene.cpp Log: * TimedSequence has been slightly modified to allow "multiple" independant AnimationCallbacks on the same node. It's used in LandingGear to switch between animations. GearStructureAnimation passes on implementation to control its animation members. F16's gear.xml and model.xml have been modified consequently. * Cosmetic mods to CameraAgent. * Added a context id factory (as recommended by osg when using multiple sceneviews) in VirtualScene. Disabled for now. * Other minor changes. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1518 Diff omitted (4092359 bytes). |
From: <sv...@ww...> - 2005-04-10 12:12:58
|
Author: delta Date: 2005-04-10 05:12:33 -0700 (Sun, 10 Apr 2005) New Revision: 1517 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Source/F16/AlphaNumericDisplay.h trunk/CSP/CSPSim/Source/F16/DataEntry.h trunk/CSP/CSPSim/Source/F16/F16HUD.cpp trunk/CSP/CSPSim/Source/F16/F16InputSystem.h trunk/CSP/CSPSim/Source/HUD/HUD.h trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj Log: * Updated vcproj. * Minor fixes to the vs build. Great job OS! Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1517 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-04-10 09:12:45 UTC (rev 1516) +++ trunk/CSP/CSPSim/CHANGES.current 2005-04-10 12:12:33 UTC (rev 1517) @@ -1,6 +1,13 @@ Version 0.4.0 (in progress) =========================== +2005-04-10: delta + * Updated vcproj. + + * Minor fixes to the vs build. + +Great job OS! + 2005-04-09: onsight * Finally checking in a large chunk of changes I've been working on for many weeks that begin the implementation of the f16 detailed Modified: trunk/CSP/CSPSim/Source/F16/AlphaNumericDisplay.h =================================================================== --- trunk/CSP/CSPSim/Source/F16/AlphaNumericDisplay.h 2005-04-10 09:12:45 UTC (rev 1516) +++ trunk/CSP/CSPSim/Source/F16/AlphaNumericDisplay.h 2005-04-10 12:12:33 UTC (rev 1517) @@ -31,6 +31,10 @@ #include <vector> #include <SimData/Ref.h> +#if !defined(__GNUC__) && !defined(snprintf) +#define snprintf _snprintf +#endif + class AlphaNumericDisplay: public simdata::Referenced { public: typedef enum { NORMAL, INVERSE } Video; Modified: trunk/CSP/CSPSim/Source/F16/DataEntry.h =================================================================== --- trunk/CSP/CSPSim/Source/F16/DataEntry.h 2005-04-10 09:12:45 UTC (rev 1516) +++ trunk/CSP/CSPSim/Source/F16/DataEntry.h 2005-04-10 12:12:33 UTC (rev 1517) @@ -37,6 +37,9 @@ #include <SimData/Vector3.h> #include <cmath> +#if !defined(__GNUC__) && !defined(snprintf) +#define snprintf _snprintf +#endif ////// // todo Modified: trunk/CSP/CSPSim/Source/F16/F16HUD.cpp =================================================================== --- trunk/CSP/CSPSim/Source/F16/F16HUD.cpp 2005-04-10 09:12:45 UTC (rev 1516) +++ trunk/CSP/CSPSim/Source/F16/F16HUD.cpp 2005-04-10 12:12:33 UTC (rev 1517) @@ -761,10 +761,10 @@ for (int i=-4; i <= 4; ++i) { float angle = i * simdata::toRadians(10.0); float r1 = r0 - 0.0015; - if (i == 4 or i == -4) { + if ((i == 4) || (i == -4)) { angle *= 4.5/4.0; } - if (i == 0 or std::abs(i) > 2) { + if ((i == 0) || (std::abs(i) > 2)) { r1 = r0 - 0.003; } rolltape.drawLine(r1 * sin(angle), y0 - r1 * cos(angle), r0 * sin(angle), y0 - r0 * cos(angle)); Modified: trunk/CSP/CSPSim/Source/F16/F16InputSystem.h =================================================================== --- trunk/CSP/CSPSim/Source/F16/F16InputSystem.h 2005-04-10 09:12:45 UTC (rev 1516) +++ trunk/CSP/CSPSim/Source/F16/F16InputSystem.h 2005-04-10 12:12:33 UTC (rev 1517) @@ -26,7 +26,7 @@ #ifndef __F16INPUTSYSTEM_H__ #define __F16INPUTSYSTEM_H__ -#include <System/AircraftInputSystem.h> +#include <Systems/AircraftInputSystem.h> class F16InputSystem: public AircraftInputSystem { Modified: trunk/CSP/CSPSim/Source/HUD/HUD.h =================================================================== --- trunk/CSP/CSPSim/Source/HUD/HUD.h 2005-04-10 09:12:45 UTC (rev 1516) +++ trunk/CSP/CSPSim/Source/HUD/HUD.h 2005-04-10 12:12:33 UTC (rev 1517) @@ -30,6 +30,10 @@ #include <osg/PositionAttitudeTransform> #include <osgText/Text> +#if !defined(__GNUC__) && !defined(snprintf) +#define snprintf _snprintf +#endif + namespace osg { class ClipNode; } namespace osg { class Geode; } namespace osg { class Geometry; } Modified: trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj =================================================================== --- trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj 2005-04-10 09:12:45 UTC (rev 1516) +++ trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj 2005-04-10 12:12:33 UTC (rev 1517) @@ -272,22 +272,6 @@ <File RelativePath="..\..\Source\HID.cpp"> </File> - <Filter - Name="HUD" - Filter=""> - <File - RelativePath="..\..\Source\HUD\HUD.cpp"> - </File> - <File - RelativePath="..\..\Source\HUD\PitchLadder.cpp"> - </File> - <File - RelativePath="..\..\Source\HUD\Tape.cpp"> - </File> - <File - RelativePath="..\..\Source\HUD\Text.cpp"> - </File> - </Filter> <File RelativePath="..\..\Source\InputEvent.cpp"> </File> @@ -352,6 +336,22 @@ RelativePath="..\..\Source\VirtualScene.cpp"> </File> <Filter + Name="HUD" + Filter=""> + <File + RelativePath="..\..\Source\HUD\HUD.cpp"> + </File> + <File + RelativePath="..\..\Source\HUD\PitchLadder.cpp"> + </File> + <File + RelativePath="..\..\Source\HUD\Tape.cpp"> + </File> + <File + RelativePath="..\..\Source\HUD\Text.cpp"> + </File> + </Filter> + <Filter Name="Theater" Filter=""> <File @@ -433,6 +433,55 @@ </FileConfiguration> </File> </Filter> + <Filter + Name="F16" + Filter=""> + <File + RelativePath="..\..\Source\F16\AlphaNumericDisplay.cpp"> + </File> + <File + RelativePath="..\..\Source\F16\DataEntryPage.cpp"> + </File> + <File + RelativePath="..\..\Source\F16\F16Channels.cpp"> + </File> + <File + RelativePath="..\..\Source\F16\F16GearDynamics.cpp"> + </File> + <File + RelativePath="..\..\Source\F16\F16HUD.cpp"> + </File> + <File + RelativePath="..\..\Source\F16\F16INS.cpp"> + </File> + <File + RelativePath="..\..\Source\F16\F16System.cpp"> + </File> + <File + RelativePath="..\..\Source\F16\FLCS.cpp"> + </File> + <File + RelativePath="..\..\Source\F16\GroundAvoidanceAdvisory.cpp"> + </File> + <File + RelativePath="..\..\Source\F16\NavigationSystem.cpp"> + </File> + <File + RelativePath="..\..\Source\F16\PageCNI.cpp"> + </File> + <File + RelativePath="..\..\Source\F16\PageLIST.cpp"> + </File> + <File + RelativePath="..\..\Source\F16\PanelHUD.cpp"> + </File> + <File + RelativePath="..\..\Source\F16\Radio.cpp"> + </File> + <File + RelativePath="..\..\Source\F16\UpFrontControls.cpp"> + </File> + </Filter> </Filter> <Filter Name="Header Files" @@ -533,22 +582,6 @@ <File RelativePath="..\..\Include\HID.h"> </File> - <Filter - Name="HUD" - Filter=""> - <File - RelativePath="..\..\Source\HUD\HUD.h"> - </File> - <File - RelativePath="..\..\Source\HUD\PitchLadder.h"> - </File> - <File - RelativePath="..\..\Source\HUD\Tape.h"> - </File> - <File - RelativePath="..\..\Source\HUD\Text.h"> - </File> - </Filter> <File RelativePath="..\..\Include\InputEvent.h"> </File> @@ -634,6 +667,22 @@ RelativePath="..\..\Include\VirtualScene.h"> </File> <Filter + Name="HUD" + Filter=""> + <File + RelativePath="..\..\Source\HUD\HUD.h"> + </File> + <File + RelativePath="..\..\Source\HUD\PitchLadder.h"> + </File> + <File + RelativePath="..\..\Source\HUD\Tape.h"> + </File> + <File + RelativePath="..\..\Source\HUD\Text.h"> + </File> + </Filter> + <Filter Name="Theater" Filter=""> <File |
From: <sv...@ww...> - 2005-04-10 09:12:53
|
Author: mkrose Date: 2005-04-10 02:12:45 -0700 (Sun, 10 Apr 2005) New Revision: 1516 Added: trunk/CSP/CSPSim/Include/Steerpoint.h Log: Forgot one header. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1516 Added: trunk/CSP/CSPSim/Include/Steerpoint.h =================================================================== --- trunk/CSP/CSPSim/Include/Steerpoint.h 2005-04-10 08:54:52 UTC (rev 1515) +++ trunk/CSP/CSPSim/Include/Steerpoint.h 2005-04-10 09:12:45 UTC (rev 1516) @@ -0,0 +1,95 @@ +// 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 Steerpoint.h + * + **/ + +#ifndef __STEERPOINT_H__ +#define __STEERPOINT_H__ + +#include <SimData/Ref.h> +#include <SimData/Date.h> +#include <SimData/Vector3.h> +#include <SimData/GeoPos.h> +#include <Projection.h> + + +/** Base class for representing steerpoints / waypoints. It is intended to contain both + * standard steerpoint data (e.g. position) and AI cues (e.g. formation, action). Very + * specialized behavior should go in subclasses. + */ +class Steerpoint: public simdata::Referenced { +public: + struct OffsetPoint { + OffsetPoint(): enabled(false), range(0.0), bearing(0.0), elevation(0.0) { } + OffsetPoint(float range_, float bearing_, float elevation_): enabled(true), range(range_), bearing(bearing_), elevation(elevation_) { } + bool enabled; + float range; + float bearing; + float elevation; + }; + + typedef simdata::Ref<Steerpoint> Ref; + + Steerpoint(Projection::CRef projection, int index, std::string const &label, simdata::Vector3 const &position): + m_Projection(projection), m_Index(index), m_Label(label), m_Position(position) { assert(projection.valid()); updateLLA(); } + + Steerpoint(Projection::CRef projection, int index, std::string const &label, simdata::LLA const &lla): + m_Projection(projection), m_Index(index), m_Label(label), m_LLA(lla) { assert(projection.valid()); updatePosition(); } + + virtual ~Steerpoint() { } + + virtual int index() const { return m_Index; } + virtual simdata::DateZulu const &time() const { return m_Time; } + virtual simdata::Vector3 const &position() const { return m_Position; } + virtual simdata::LLA const &lla() const { return m_LLA; } + virtual float altitude() const { return m_LLA.altitude(); } + + virtual void setAltitude(float altitude) { m_LLA.set(m_LLA.latitude(), m_LLA.longitude(), altitude); updatePosition(); } + virtual void setPosition(simdata::Vector3 const &position) { m_Position = position; updateLLA(); } + virtual void setPosition(simdata::LLA const &position) { m_LLA = position; updatePosition(); } + virtual void setTime(simdata::DateZulu const &time) { m_Time = time; } + + virtual void setOffsetAimpoint0(OffsetPoint const &point) { m_OffsetAimpoint0 = point; } + virtual void setOffsetAimpoint1(OffsetPoint const &point) { m_OffsetAimpoint1 = point; } + virtual OffsetPoint const &OffsetAimpoint0() const { return m_OffsetAimpoint0; } + virtual OffsetPoint const &OffsetAimpoint1() const { return m_OffsetAimpoint1; } + +private: + void updatePosition() { m_Position = m_Projection->convert(m_LLA); } + void updateLLA() { m_LLA = m_Projection->convert(m_Position); } + + // TODO AI/mission planning cues: formation, action + + Projection::CRef m_Projection; + int m_Index; + std::string m_Label; + simdata::DateZulu m_Time; + simdata::Vector3 m_Position; + simdata::LLA m_LLA; + + OffsetPoint m_OffsetAimpoint0; + OffsetPoint m_OffsetAimpoint1; + OffsetPoint m_VisualInitialPoint; + OffsetPoint m_VisualReferencePoint; +}; + +#endif // __STEERPOINT_H__ |
From: <sv...@ww...> - 2005-04-10 08:55:01
|
Author: mkrose Date: 2005-04-10 01:54:52 -0700 (Sun, 10 Apr 2005) New Revision: 1515 Added: trunk/CSP/CSPSim/Data/Fonts/f16hud.sfd trunk/CSP/CSPSim/Data/Fonts/hud.ttf trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/fcs.xml trunk/CSP/CSPSim/Source/F16/ trunk/CSP/CSPSim/Source/F16/AlphaNumericDisplay.cpp trunk/CSP/CSPSim/Source/F16/AlphaNumericDisplay.h trunk/CSP/CSPSim/Source/F16/DataEntry.h trunk/CSP/CSPSim/Source/F16/DataEntryPage.cpp trunk/CSP/CSPSim/Source/F16/DataEntryPage.h trunk/CSP/CSPSim/Source/F16/F16Channels.cpp trunk/CSP/CSPSim/Source/F16/F16Channels.h trunk/CSP/CSPSim/Source/F16/F16GearDynamics.cpp trunk/CSP/CSPSim/Source/F16/F16GearDynamics.h trunk/CSP/CSPSim/Source/F16/F16HUD.cpp trunk/CSP/CSPSim/Source/F16/F16HUD.h trunk/CSP/CSPSim/Source/F16/F16INS.cpp trunk/CSP/CSPSim/Source/F16/F16InputSystem.cpp trunk/CSP/CSPSim/Source/F16/F16InputSystem.h trunk/CSP/CSPSim/Source/F16/F16System.cpp trunk/CSP/CSPSim/Source/F16/F16System.h trunk/CSP/CSPSim/Source/F16/FLCS.cpp trunk/CSP/CSPSim/Source/F16/GroundAvoidanceAdvisory.cpp trunk/CSP/CSPSim/Source/F16/GroundAvoidanceAdvisory.h trunk/CSP/CSPSim/Source/F16/NavigationSystem.cpp trunk/CSP/CSPSim/Source/F16/NavigationSystem.h trunk/CSP/CSPSim/Source/F16/PageALOW.h trunk/CSP/CSPSim/Source/F16/PageCNI.cpp trunk/CSP/CSPSim/Source/F16/PageCNI.h trunk/CSP/CSPSim/Source/F16/PageLIST.cpp trunk/CSP/CSPSim/Source/F16/PageLIST.h trunk/CSP/CSPSim/Source/F16/PageSTPT.h trunk/CSP/CSPSim/Source/F16/PanelHUD.cpp trunk/CSP/CSPSim/Source/F16/PanelHUD.h trunk/CSP/CSPSim/Source/F16/Radio.cpp trunk/CSP/CSPSim/Source/F16/Radio.h trunk/CSP/CSPSim/Source/F16/SpecialFonts.h trunk/CSP/CSPSim/Source/F16/UpFrontControls.cpp trunk/CSP/CSPSim/Source/F16/UpFrontControls.h trunk/CSP/CSPSim/Tools/FlightControlSystem/ trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/ trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/__init__.py trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/inputs.py trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/leadingedge.py trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/monitoring.py trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/nasa.py trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/outputs.py trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/pitch.py trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/roll.py trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/sensors.py trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/speedbrake.py trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/trailingedge.py trunk/CSP/CSPSim/Tools/FlightControlSystem/F16/yaw.py trunk/CSP/CSPSim/Tools/FlightControlSystem/GenerateNetwork.py trunk/CSP/CSPSim/Tools/FlightControlSystem/NodeConstructor.py trunk/CSP/CSPSim/Tools/FlightControlSystem/Normalize.py Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/Models/F16/DJ/F16DJ.osg trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/fm.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/gear.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/model.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/systems.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16DJ.xml trunk/CSP/CSPSim/Include/Animation.h trunk/CSP/CSPSim/Include/ObjectModel.h trunk/CSP/CSPSim/Source/Animation.cpp trunk/CSP/CSPSim/Source/LandingGear.cpp trunk/CSP/CSPSim/Source/ObjectModel.cpp trunk/CSP/CSPSim/Source/SConscript trunk/CSP/CSPSim/Tools/HID/Examples/aircraft.map trunk/CSP/CSPSim/Tools/HID/Maps/aircraft-core.map trunk/CSP/CSPSim/Tools/HID/Maps/gamescreen-core.map Log: Finally checking in a large chunk of changes I've been working on for many weeks that begin the implementation of the f16 detailed model. This includes a flight control system, parts of the nav hud, a few ded pages, flight model and landing gear tweaks, and many other details. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1515 Diff omitted (331470 bytes). |
From: <sv...@ww...> - 2005-04-07 20:02:50
|
Author: delta Date: 2005-04-07 13:02:41 -0700 (Thu, 07 Apr 2005) New Revision: 1514 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/Animation.h trunk/CSP/CSPSim/Source/HUD/Text.cpp trunk/CSP/CSPSim/Source/LandingGear.cpp Log: * Minor fix to the vc build (snprintf isn't supported). * Minor initialization fix to ser the gear being extended. At some point, initialization values should be set in xml. * Added a bool isDisabled() method in TimedSequece. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1514 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-04-04 04:03:31 UTC (rev 1513) +++ trunk/CSP/CSPSim/CHANGES.current 2005-04-07 20:02:41 UTC (rev 1514) @@ -1,5 +1,14 @@ Version 0.4.0 (in progress) =========================== + +2005-04-06: delta + * Minor fix to the vc build (snprintf isn't supported). + + * Minor initialization fix to set the gear being extended. At + some point, initialization values should be set in xml. + + * Added a bool isDisabled() method in TimedSequece. + 2005-04-03: onsight * Increase the left/right panning limits for the in-cockpit view. Modified: trunk/CSP/CSPSim/Include/Animation.h =================================================================== --- trunk/CSP/CSPSim/Include/Animation.h 2005-04-04 04:03:31 UTC (rev 1513) +++ trunk/CSP/CSPSim/Include/Animation.h 2005-04-07 20:02:41 UTC (rev 1514) @@ -553,7 +553,10 @@ b_ReferenceTime->value() = m_TimeAnimationProxy->clamp(m_TimeAnimationProxy->gett_0()+b_NormalizedTime->value()*m_TimeAnimationProxy->getTimeLength()); } - + + bool isDisabled() const { + return std::abs(m_Direction) > 0.0001f; + } protected: bool isEnd() const { return 1.0 - b_NormalizedTime->value() < 0.0001; @@ -607,10 +610,12 @@ } double onUpdate(double dt) { - double t = b_ReferenceTime->value(); - t += m_Direction*dt; - t = m_TimeAnimationProxy->clamp(t); - setTimeValues(t); + if (isDisabled()) { + double t = b_ReferenceTime->value(); + t += m_Direction*dt; + t = m_TimeAnimationProxy->clamp(t); + setTimeValues(t); + } return 0.016; } Modified: trunk/CSP/CSPSim/Source/HUD/Text.cpp =================================================================== --- trunk/CSP/CSPSim/Source/HUD/Text.cpp 2005-04-04 04:03:31 UTC (rev 1513) +++ trunk/CSP/CSPSim/Source/HUD/Text.cpp 2005-04-07 20:02:41 UTC (rev 1514) @@ -22,13 +22,27 @@ * **/ +#ifndef __GNUC__ +#define snprintf _snprintf +#endif #include <HUD/Text.h> #include <osgText/Text> #include <cstdio> +//#include <iomanip> +//#include <sstream> +using namespace std; void StandardFormatter::format(char *buffer, int len, float value) { + + // make buffer a std::string& + //stringstream line(buffer); + //line.precision(0); + //line.setf(ios::fixed); + //line << setw(len) << value; + //buffer = line.str(); + snprintf(buffer, len, m_Format.c_str(), value); } Modified: trunk/CSP/CSPSim/Source/LandingGear.cpp =================================================================== --- trunk/CSP/CSPSim/Source/LandingGear.cpp 2005-04-04 04:03:31 UTC (rev 1513) +++ trunk/CSP/CSPSim/Source/LandingGear.cpp 2005-04-07 20:02:41 UTC (rev 1514) @@ -634,8 +634,8 @@ assert(bus!=0); b_WOW = bus->registerLocalDataChannel<bool>(bus::LandingGear::WOW, false); b_FullyRetracted = bus->registerLocalDataChannel<bool>(bus::LandingGear::FullyRetracted, false); - b_FullyExtended = bus->registerLocalDataChannel<bool>(bus::LandingGear::FullyExtended, false); - b_GearExtendSelected = bus->registerLocalDataChannel<bool>(bus::LandingGear::GearExtendSelected, false); + b_FullyExtended = bus->registerLocalDataChannel<bool>(bus::LandingGear::FullyExtended, true); + b_GearExtendSelected = bus->registerLocalDataChannel<bool>(bus::LandingGear::GearExtendSelected, true); for (unsigned i = 0; i < m_Gear.size(); ++i) { m_Gear[i]->registerChannels(bus); } |
From: <sv...@ww...> - 2005-04-04 04:03:38
|
Author: mkrose Date: 2005-04-03 21:03:31 -0700 (Sun, 03 Apr 2005) New Revision: 1513 Added: trunk/CSP/CSPSim/Source/HUD/ trunk/CSP/CSPSim/Source/HUD/HUD.cpp trunk/CSP/CSPSim/Source/HUD/HUD.h trunk/CSP/CSPSim/Source/HUD/PitchLadder.cpp trunk/CSP/CSPSim/Source/HUD/PitchLadder.h trunk/CSP/CSPSim/Source/HUD/Tape.cpp trunk/CSP/CSPSim/Source/HUD/Tape.h trunk/CSP/CSPSim/Source/HUD/Text.cpp trunk/CSP/CSPSim/Source/HUD/Text.h Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Source/SConscript trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj Log: Add generic HUD classes for implementing heads up displays. Note that the HUD directory follows a new convention where the headers and source files are in the same directory. This is already done in SimCore and elsewhere, but until now CSPSim has been using a separate Include directory for all headers. This may cause the windows build to break if CSPSim/Source is not in the include path. Over time headers may be migrated from Include to Source until eventually Include can be removed altogether. At that point Source will also be eliminated so that all source and header files related to CSPSim will live in CSP/CSPSim/ and specific subdirectories. CSP/ will be the common include path for all subcomponents of CSP (e.g. SimCore, SimData, etc.), and headers in CSPSim will be referred to with a CSPSim/ prefix. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1513 Diff omitted (51809 bytes). |
From: <sv...@ww...> - 2005-04-03 18:40:49
|
Author: mkrose Date: 2005-04-03 11:40:42 -0700 (Sun, 03 Apr 2005) New Revision: 1512 Added: trunk/CSP/CSPSim/Include/LandingGearChannels.h Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/LandingGear.h trunk/CSP/CSPSim/Source/Channels.cpp trunk/CSP/CSPSim/Source/LandingGear.cpp Log: Export sensor data from individual landing gears. Predefine channel names for landing gear. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1512 Diff omitted (17089 bytes). |
From: <sv...@ww...> - 2005-04-03 17:01:40
|
Author: mkrose Date: 2005-04-03 10:01:34 -0700 (Sun, 03 Apr 2005) New Revision: 1511 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/Systems/AircraftInputSystem.h Log: Make the input event handlers in AircraftInputSystem virtual. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1511 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-04-03 17:00:12 UTC (rev 1510) +++ trunk/CSP/CSPSim/CHANGES.current 2005-04-03 17:01:34 UTC (rev 1511) @@ -5,6 +5,8 @@ * Fix a bug in the data recorder decoder. + * Make the input event handlers in AircraftInputSystem virtual. + 2005-04-02: onsight * Add a DataChannel constructor that can be used for channel data types that don't have public copy constructors. Modified: trunk/CSP/CSPSim/Include/Systems/AircraftInputSystem.h =================================================================== --- trunk/CSP/CSPSim/Include/Systems/AircraftInputSystem.h 2005-04-03 17:00:12 UTC (rev 1510) +++ trunk/CSP/CSPSim/Include/Systems/AircraftInputSystem.h 2005-04-03 17:01:34 UTC (rev 1511) @@ -125,36 +125,36 @@ END_INPUT_INTERFACE public: - void setThrottle(double); - void setRudder(double); - void setRoll(double); - void setPitch(double); - void setWheelBrake(double); - void setAirbrake(double); - void IncPitch(); - void noIncPitch(); - void DecPitch(); - void noDecPitch(); - void IncRoll(); - void noIncRoll(); - void DecRoll(); - void noDecRoll(); - void IncRudder(); - void noIncRudder(); - void DecRudder(); - void noDecRudder(); - void IncThrottle(); - void noIncThrottle(); - void DecThrottle(); - void noDecThrottle(); - void WheelBrakePulse(); - void WheelBrakeOn(); - void WheelBrakeOff(); - void WheelBrakeToggle(); - void OpenAirbrake(); - void CloseAirbrake(); - void IncAirbrake(); - void DecAirbrake(); + virtual void setThrottle(double); + virtual void setRudder(double); + virtual void setRoll(double); + virtual void setPitch(double); + virtual void setWheelBrake(double); + virtual void setAirbrake(double); + virtual void IncPitch(); + virtual void noIncPitch(); + virtual void DecPitch(); + virtual void noDecPitch(); + virtual void IncRoll(); + virtual void noIncRoll(); + virtual void DecRoll(); + virtual void noDecRoll(); + virtual void IncRudder(); + virtual void noIncRudder(); + virtual void DecRudder(); + virtual void noDecRudder(); + virtual void IncThrottle(); + virtual void noIncThrottle(); + virtual void DecThrottle(); + virtual void noDecThrottle(); + virtual void WheelBrakePulse(); + virtual void WheelBrakeOn(); + virtual void WheelBrakeOff(); + virtual void WheelBrakeToggle(); + virtual void OpenAirbrake(); + virtual void CloseAirbrake(); + virtual void IncAirbrake(); + virtual void DecAirbrake(); protected: virtual void importChannels(Bus *bus); |
From: <sv...@ww...> - 2005-04-03 17:00:18
|
Author: mkrose Date: 2005-04-03 10:00:12 -0700 (Sun, 03 Apr 2005) New Revision: 1510 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Tools/Recorder/csprec Log: Fix a bug in the data recorder decoder. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1510 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-04-03 16:58:44 UTC (rev 1509) +++ trunk/CSP/CSPSim/CHANGES.current 2005-04-03 17:00:12 UTC (rev 1510) @@ -3,6 +3,8 @@ 2005-04-03: onsight * Increase the left/right panning limits for the in-cockpit view. + * Fix a bug in the data recorder decoder. + 2005-04-02: onsight * Add a DataChannel constructor that can be used for channel data types that don't have public copy constructors. Modified: trunk/CSP/CSPSim/Tools/Recorder/csprec =================================================================== --- trunk/CSP/CSPSim/Tools/Recorder/csprec 2005-04-03 16:58:44 UTC (rev 1509) +++ trunk/CSP/CSPSim/Tools/Recorder/csprec 2005-04-03 17:00:12 UTC (rev 1510) @@ -54,7 +54,7 @@ self.channels = channels = [] self.output = output = [] for i in range(n): - name = f.read(64) + name = f.read(100) name = name[0:name.find("\0")] channels.append(name) n = len(channels) @@ -83,7 +83,12 @@ set[type] = value self.min_data[type] = min(self.min_data[type], value) self.max_data[type] = max(self.max_data[type], value) + for i in range(n): + if self.min_data[i] > self.max_data[i]: + self.min_data[i] = 0.0 + self.max_data[i] = 0.0 + def dumpTab(self): print "time\t%s" % '\t'.join(self.channels) for timestamp, set in self.output: |
From: <sv...@ww...> - 2005-04-03 16:58:52
|
Author: mkrose Date: 2005-04-03 09:58:44 -0700 (Sun, 03 Apr 2005) New Revision: 1509 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Source/Views/View.cpp Log: Increase the left/right panning limits for the in-cockpit view. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1509 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-04-03 09:59:30 UTC (rev 1508) +++ trunk/CSP/CSPSim/CHANGES.current 2005-04-03 16:58:44 UTC (rev 1509) @@ -1,5 +1,7 @@ Version 0.4.0 (in progress) =========================== +2005-04-03: onsight + * Increase the left/right panning limits for the in-cockpit view. 2005-04-02: onsight * Add a DataChannel constructor that can be used for channel data types Modified: trunk/CSP/CSPSim/Source/Views/View.cpp =================================================================== --- trunk/CSP/CSPSim/Source/Views/View.cpp 2005-04-03 09:59:30 UTC (rev 1508) +++ trunk/CSP/CSPSim/Source/Views/View.cpp 2005-04-03 16:58:44 UTC (rev 1509) @@ -81,9 +81,10 @@ } void InternalView::constrain() { - float limit = simdata::PI_2; - m_CameraKinematics->clampPhi(m_CameraKinematics->getPhi(), -limit, limit); - m_CameraKinematics->clampTheta(m_CameraKinematics->getTheta(), -limit, limit); + const float limit_phi = simdata::PI_2; + const float limit_theta = 1.5 * simdata::PI_2; + m_CameraKinematics->clampPhi(m_CameraKinematics->getPhi(), -limit_phi, limit_phi); + m_CameraKinematics->clampTheta(m_CameraKinematics->getTheta(), -limit_theta, limit_theta); } void InternalView::update(simdata::Vector3& ep, simdata::Vector3& lp, simdata::Vector3& up, double /*dt*/) { @@ -291,9 +292,10 @@ } void PadlockView::constrainNotPadlocked(simdata::Vector3& /*ep*/, simdata::Vector3& /*lp*/, simdata::Vector3& /*up*/, double /*dt*/) { - float limit = simdata::PI_2; - m_CameraKinematics->clampPhi(m_CameraKinematics->getPhi(), -limit, limit); - m_CameraKinematics->clampTheta(m_CameraKinematics->getTheta(), -limit, limit); + const float limit_phi = simdata::PI_2; + const float limit_theta = 1.5 * simdata::PI_2; + m_CameraKinematics->clampPhi(m_CameraKinematics->getPhi(), -limit_phi, limit_phi); + m_CameraKinematics->clampTheta(m_CameraKinematics->getTheta(), -limit_theta, limit_theta); } void PadlockView::update(simdata::Vector3& ep, simdata::Vector3& lp, simdata::Vector3& up, double dt) { |
From: <sv...@ww...> - 2005-04-03 09:59:38
|
Author: mkrose Date: 2005-04-03 01:59:30 -0800 (Sun, 03 Apr 2005) New Revision: 1508 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/F16/DJ/gear.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/gear.xml trunk/CSP/CSPSim/Data/XML/vehicles/aircraft/m2k/model.xml trunk/CSP/CSPSim/Include/Animation.h trunk/CSP/CSPSim/Include/LandingGear.h trunk/CSP/CSPSim/Source/Controller.cpp trunk/CSP/CSPSim/Source/LandingGear.cpp Log: Refactor landing gear classes and animations. Tighten the binding between LandingGear and the classes that drive the gear animations, removing some channels from the bus that are now passed directly. Also added comments to the landing gear classes and expanded the TimedSequence interface. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1508 Diff omitted (63256 bytes). |
From: <sv...@ww...> - 2005-04-02 21:13:07
|
Author: mkrose Date: 2005-04-02 13:12:59 -0800 (Sat, 02 Apr 2005) New Revision: 1507 Modified: trunk/CSP/CSPSim/Source/VirtualScene.cpp Log: Oops, forgot a file in the last changeset. This also includes a trivial cleanup in the fog initialization. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1507 Modified: trunk/CSP/CSPSim/Source/VirtualScene.cpp =================================================================== --- trunk/CSP/CSPSim/Source/VirtualScene.cpp 2005-04-02 21:01:57 UTC (rev 1506) +++ trunk/CSP/CSPSim/Source/VirtualScene.cpp 2005-04-02 21:12:59 UTC (rev 1507) @@ -376,12 +376,9 @@ osg::StateSet * pFogState = m_FogGroup->getOrCreateStateSet(); osg::Fog* fog = new osg::Fog; fog->setMode(osg::Fog::LINEAR); + fog->setFogCoordinateSource(osg::Fog::FRAGMENT_DEPTH); fog->setDensity(0.3f); - if (m_FogEnabled) { - pFogState->setAttributeAndModes(fog, osg::StateAttribute::ON); - } else { - pFogState->setAttributeAndModes(fog, osg::StateAttribute::OFF); - } + pFogState->setAttributeAndModes(fog, m_FogEnabled ? osg::StateAttribute::ON : osg::StateAttribute::OFF); m_FogGroup->setStateSet(pFogState); m_FrameStamp = new osg::FrameStamp; @@ -514,7 +511,7 @@ } if (m_SpinTheWorld) m_Sky->spinTheWorld(); if (m_Terrain.valid()) { - simdata::LLA m = m_Terrain->getProjection().convert(m_Origin); + simdata::LLA m = m_Terrain->getProjection()->convert(m_Origin); m_Sky->update(m.latitude(), m.longitude(), CSPSim::theSim->getCurrentTime()); } else { m_Sky->update(0.0, 0.0, CSPSim::theSim->getCurrentTime()); |
From: <sv...@ww...> - 2005-04-02 21:02:03
|
Author: mkrose Date: 2005-04-02 13:01:57 -0800 (Sat, 02 Apr 2005) New Revision: 1506 Added: trunk/CSP/CSPSim/Source/Projection.cpp Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/CSPSim.i trunk/CSP/CSPSim/Include/Projection.h trunk/CSP/CSPSim/Include/TerrainObject.h trunk/CSP/CSPSim/Source/SConscript trunk/CSP/CSPSim/Source/TerrainObject.cpp trunk/CSP/CSPSim/Source/Theater.cpp trunk/CSP/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj Log: Move map projection code out of Projection.h, create an abstract Projection base class, use reference counting instead of hard references for accessing the active projection. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1506 Diff omitted (21140 bytes). |
From: <sv...@ww...> - 2005-04-02 20:54:12
|
Author: mkrose Date: 2005-04-02 12:54:03 -0800 (Sat, 02 Apr 2005) New Revision: 1505 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/FlightDynamics.h trunk/CSP/CSPSim/Include/FlightModel.h trunk/CSP/CSPSim/Source/FlightDynamics.cpp Log: Export qBar and G channels. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1505 Modified: trunk/CSP/CSPSim/CHANGES.current =================================================================== --- trunk/CSP/CSPSim/CHANGES.current 2005-04-02 19:49:46 UTC (rev 1504) +++ trunk/CSP/CSPSim/CHANGES.current 2005-04-02 20:54:03 UTC (rev 1505) @@ -13,6 +13,8 @@ * Convert channel strings to channel name constants and connect angular velocity (in body coordinates) channel. + * Export qBar and G channels. + 2005-03-12: delta * Reformated GearAnimation and related classes as Systems. Adjusted xml files consequently. Cleaned up GearDynamics. Modified: trunk/CSP/CSPSim/Include/FlightDynamics.h =================================================================== --- trunk/CSP/CSPSim/Include/FlightDynamics.h 2005-04-02 19:49:46 UTC (rev 1504) +++ trunk/CSP/CSPSim/Include/FlightDynamics.h 2005-04-02 20:54:03 UTC (rev 1505) @@ -1,17 +1,17 @@ -// Combat Simulator Project - FlightSim Demo -// Copyright (C) 2002 The Combat Simulator Project +// Combat Simulator Project +// Copyright (C) 2002-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. @@ -78,15 +78,18 @@ DataChannel<simdata::Vector3>::CRef b_WindVelocity; // export channels - DataChannel<double>::Ref b_Alpha; // current angle of attack - DataChannel<double>::Ref b_Beta; // side slip angle + DataChannel<double>::Ref b_Alpha; // current angle of attack + DataChannel<double>::Ref b_Beta; // side slip angle DataChannel<double>::Ref b_Airspeed; + DataChannel<double>::Ref b_QBar; // dynamic pressure + DataChannel<double>::Ref b_G; // G force (includes gravity) double m_Beta; double m_Alpha; - double m_Alpha0; // discrete AOA + double m_Alpha0; // discrete AOA double m_AlphaDot; double m_Airspeed; + double m_QBar; simdata::Vector3 m_WindVelocityBody; Modified: trunk/CSP/CSPSim/Include/FlightModel.h =================================================================== --- trunk/CSP/CSPSim/Include/FlightModel.h 2005-04-02 19:49:46 UTC (rev 1504) +++ trunk/CSP/CSPSim/Include/FlightModel.h 2005-04-02 20:54:03 UTC (rev 1505) @@ -115,7 +115,7 @@ m_Beta = beta; m_Beta_float = static_cast<float>(m_Beta); m_AirSpeed = airspeed; - m_qBarS = m_HalfWingArea * qBar * airspeed * airspeed; + m_qBarS = m_HalfWingArea * 2.0 * qBar; m_Inv2V = 0.5 / std::max(0.5, airspeed); } Modified: trunk/CSP/CSPSim/Source/FlightDynamics.cpp =================================================================== --- trunk/CSP/CSPSim/Source/FlightDynamics.cpp 2005-04-02 19:49:46 UTC (rev 1504) +++ trunk/CSP/CSPSim/Source/FlightDynamics.cpp 2005-04-02 20:54:03 UTC (rev 1505) @@ -1,17 +1,17 @@ -// Combat Simulator Project - FlightSim Demo -// Copyright (C) 2002 The Combat Simulator Project +// Combat Simulator Project +// Copyright (C) 2002-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. @@ -24,10 +24,14 @@ #include <FlightDynamics.h> #include <FlightModel.h> #include <CSPSim.h> +#include <ConditionsChannels.h> +#include <ControlSurfacesChannels.h> +#include <FlightDynamicsChannels.h> #include <KineticsChannels.h> -#include <SimCore/Util/Log.h> +#include <SimCore/Util/Log.h> #include <SimData/Math.h> +#include <SimData/Key.h> #include <sstream> #include <iomanip> @@ -37,9 +41,7 @@ using simdata::toDegrees; using simdata::toRadians; -using bus::Kinetics; - SIMDATA_REGISTER_INTERFACE(FlightDynamics) @@ -48,7 +50,8 @@ m_Alpha(0.0), m_Alpha0(0.0), m_AlphaDot(0.0), - m_Airspeed(1.0) + m_Airspeed(1.0), + m_QBar(0.0) { } @@ -57,21 +60,23 @@ void FlightDynamics::registerChannels(Bus *bus) { assert(bus!=0); - b_Alpha = bus->registerLocalDataChannel<double>("FlightDynamics.Alpha", 0.0); - b_Beta = bus->registerLocalDataChannel<double>("FlightDynamics.Beta", 0.0); - b_Airspeed = bus->registerLocalDataChannel<double>("FlightDynamics.Airspeed", 0.0); + b_Alpha = bus->registerLocalDataChannel<double>(bus::FlightDynamics::Alpha, 0.0); + b_Beta = bus->registerLocalDataChannel<double>(bus::FlightDynamics::Beta, 0.0); + b_Airspeed = bus->registerLocalDataChannel<double>(bus::FlightDynamics::Airspeed, 0.0); + b_QBar = bus->registerLocalDataChannel<double>(bus::FlightDynamics::QBar, 0.0); + b_G = bus->registerLocalDataChannel<double>(bus::FlightDynamics::GForce, 0.0); } void FlightDynamics::importChannels(Bus *bus) { assert(bus!=0); - b_Aileron = bus->getChannel("ControlSurfaces.AileronDeflection"); - b_Elevator = bus->getChannel("ControlSurfaces.ElevatorDeflection"); - b_Rudder = bus->getChannel("ControlSurfaces.RudderDeflection"); - b_Airbrake = bus->getChannel("ControlSurfaces.AirbrakeDeflection"); - b_Density = bus->getChannel("Conditions.Density"); - b_WindVelocity = bus->getChannel("Conditions.WindVelocity"); - b_GroundZ = bus->getChannel(Kinetics::GroundZ); - b_AccelerationBody = bus->getChannel(Kinetics::AccelerationBody); + b_Aileron = bus->getChannel(bus::ControlSurfaces::AileronDeflection); + b_Elevator = bus->getChannel(bus::ControlSurfaces::ElevatorDeflection); + b_Rudder = bus->getChannel(bus::ControlSurfaces::RudderDeflection); + b_Airbrake = bus->getChannel(bus::ControlSurfaces::AirbrakeDeflection); + b_Density = bus->getChannel(bus::Conditions::Density); + b_WindVelocity = bus->getChannel(bus::Conditions::WindVelocity); + b_GroundZ = bus->getChannel(bus::Kinetics::GroundZ); + b_AccelerationBody = bus->getChannel(bus::Kinetics::AccelerationBody); } void FlightDynamics::initializeSimulationStep(double dt) { @@ -83,7 +88,7 @@ void FlightDynamics::computeForceAndMoment(double x) { updateAirflow(x); double agl = m_PositionLocal->z() - b_GroundZ->value(); - m_FlightModel->setAirstream(m_Alpha, m_AlphaDot, m_Beta, m_Airspeed, b_Density->value()); + m_FlightModel->setAirstream(m_Alpha, m_AlphaDot, m_Beta, m_Airspeed, m_QBar); m_FlightModel->setKinetics(*m_AngularVelocityBody, agl); m_Force = m_FlightModel->calculateForce(); m_Moment = m_FlightModel->calculateMoment(); @@ -95,12 +100,15 @@ b_Alpha->value() = m_Alpha; b_Beta->value() = m_Beta; b_Airspeed->value() = m_Airspeed; + b_QBar->value() = m_QBar; + double G = m_Attitude->invrotate(simdata::Vector3::ZAXIS).z(); + b_G->value() = G + b_AccelerationBody->value().z() / 9.806; } void FlightDynamics::updateAirflow(double h) { simdata::Vector3 airflowBody = *m_VelocityBody - m_WindVelocityBody; m_Airspeed = airflowBody.length(); - m_Alpha = -atan2(airflowBody.z(), airflowBody.y()); + m_Alpha = -atan2(airflowBody.z(), airflowBody.y()); if (h > 0.0) { m_AlphaDot = ( m_Alpha - m_Alpha0 ) / h; @@ -113,17 +121,18 @@ // beta is 0 when v velocity (i.e. side velocity) is 0; note here v is m_AirflowBody.x() //m_Beta = atan2(airflowBody.x(), airflowBody.y()); m_Beta = asin(airflowBody.x()/(1.0 + m_Airspeed)); + + // Dynamic pressure = 1/2 p V^2 (N/m^2) + m_QBar = 0.5 * m_Airspeed * m_Airspeed * b_Density->value(); } void FlightDynamics::getInfo(InfoList &info) const { std::stringstream line; - double G = m_Attitude->invrotate(simdata::Vector3::ZAXIS).z(); - G += b_AccelerationBody->value().z() / 9.806; line.setf(std::ios::fixed | std::ios::showpos); line << "AOA: " << std::setprecision(1) << std::setw(5) << toDegrees(m_Alpha) << ", Sideslip: " << std::setprecision(1) << std::setw(5) << toDegrees(m_Beta) << ", Airspeed: " << std::setprecision(1) << std::setw(6) << m_Airspeed - << ", G: " << std::setprecision(1) << std::setw(4) << G; + << ", G: " << std::setprecision(1) << std::setw(4) << b_G->value(); info.push_back(line.str()); } |
From: <sv...@ww...> - 2005-04-02 19:49:54
|
Author: mkrose Date: 2005-04-02 11:49:46 -0800 (Sat, 02 Apr 2005) New Revision: 1504 Modified: trunk/CSP/CSPSim/CHANGES.current trunk/CSP/CSPSim/Include/Controller.h trunk/CSP/CSPSim/Include/DynamicObject.h trunk/CSP/CSPSim/Source/AircraftObject.cpp trunk/CSP/CSPSim/Source/Controller.cpp trunk/CSP/CSPSim/Source/DynamicObject.cpp trunk/CSP/CSPSim/Source/Engine.cpp trunk/CSP/CSPSim/Source/Systems/AircraftFlightSensors.cpp trunk/CSP/CSPSim/Source/Systems/AircraftInputSystem.cpp trunk/CSP/CSPSim/Source/Systems/AircraftSimpleFCS.cpp Log: Convert channel strings to channel name constants and connect angular velocity (in body coordinates) channel. Browse at: https://www.zerobar.net/viewcvs/viewcvs.cgi?view=rev&rev=1504 Diff omitted (16166 bytes). |