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: <de...@us...> - 2003-04-03 10:41:36
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim In directory sc8-pr-cvs1:/tmp/cvs-serv6028 Modified Files: CHANGES.current Log Message: no message Index: CHANGES.current =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/CHANGES.current,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** CHANGES.current 28 Mar 2003 19:20:24 -0000 1.11 --- CHANGES.current 3 Apr 2003 10:41:32 -0000 1.12 *************** *** 2,5 **** --- 2,22 ---- =========================== + LINUX USERS: you need to add NumericalMethod.cpp to your Makefile. + + 2003-04-03: delta + .net project updated; debug and release are maintained. + + Rewritten DynamicalSystem interface; you need now, to define a + vector field as a method of DynamicalSystem (which inherites from + VectorField). You need to furnish the NumericalMethod used to approximate + the exact solution of your ODE (use setNumericalMethod). AeroDynamics is + now a DynamicalSystem. + + Merging Onsight code on airflow, collision and landing gear; this code is not + yet enabled. + + Cleaning code in CSPSim.cpp, AeroDynamics.cpp and .h; added NumericalMethod.cpp + and NumericalMethod.h. + 2003-03-28: delta .net project updated: CSPSimDLL (release mode is maintained) |
|
From: <de...@us...> - 2003-04-03 10:41:13
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/VisualStudio/CSPSimDLL In directory sc8-pr-cvs1:/tmp/cvs-serv5648 Modified Files: CSPSimDLL.vcproj Log Message: no message Index: CSPSimDLL.vcproj =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CSPSimDLL.vcproj 28 Mar 2003 19:19:22 -0000 1.3 --- CSPSimDLL.vcproj 3 Apr 2003 10:41:10 -0000 1.4 *************** *** 41,49 **** Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" ! AdditionalDependencies="opengl32.lib SDL.lib osgDBd.lib DemeterVisualC6d.lib osgTextd.lib osgUtild.lib osgParticled.lib osgd.lib _cSimData.lib odbc32.lib odbccp32.lib" OutputFile=".\Debug/CSPSimDLL.dll" LinkIncremental="2" SuppressStartupBanner="TRUE" ! AdditionalLibraryDirectories="C:/Python22/libs, ../../../../THIRDPARTYLIBS/lib" IgnoreDefaultLibraryNames="msvcrt.lib" GenerateDebugInformation="TRUE" --- 41,49 ---- Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" ! AdditionalDependencies="opengl32.lib SDL.lib osgDBd.lib DemeterVisualC6d.lib osgTextd.lib osgUtild.lib osgParticled.lib osgd.lib _cSimDatad.lib odbc32.lib odbccp32.lib" OutputFile=".\Debug/CSPSimDLL.dll" LinkIncremental="2" SuppressStartupBanner="TRUE" ! AdditionalLibraryDirectories="C:/Python22/Lib/site-packages/SimData,C:/Python22/libs, ../../../../THIRDPARTYLIBS/lib" IgnoreDefaultLibraryNames="msvcrt.lib" GenerateDebugInformation="TRUE" *************** *** 222,225 **** --- 222,228 ---- </File> <File + RelativePath="..\..\Source\NumericalMethod.cpp"> + </File> + <File RelativePath="..\..\Source\ObjectModel.cpp"> </File> *************** *** 310,313 **** --- 313,319 ---- </File> <File + RelativePath="..\..\Include\DynamicalSystem.h"> + </File> + <File RelativePath="..\..\Include\EventMapIndex.h"> </File> *************** *** 346,349 **** --- 352,358 ---- </File> <File + RelativePath="..\..\Include\NumericalMethod.h"> + </File> + <File RelativePath="..\..\Include\OGLText.h"> </File> *************** *** 410,414 **** <Tool Name="VCCustomBuildTool" ! CommandLine="C:\progra~1\SWIG-1.3.17\swig -c++ -python -noexcept -DWIN32 -I..\..\Include -IC:\Python22\include -o ..\..\Source\$(InputName)_wrap.cpp ..\..\Source\$(InputName).i" Outputs="..\..\Source\$(InputName)_wrap.cpp"/> </FileConfiguration> --- 419,424 ---- <Tool Name="VCCustomBuildTool" ! CommandLine="C:\progra~1\SWIG-1.3.17\swig -c++ -python -noexcept -DWIN32 -I..\..\Include -IC:\Python22\include -o ..\..\Source\$(InputName)_wrap.cpp ..\..\Source\$(InputName).i ! " Outputs="..\..\Source\$(InputName)_wrap.cpp"/> </FileConfiguration> |
|
From: <de...@us...> - 2003-04-03 10:41:01
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/VisualStudio/CSPSimAppli In directory sc8-pr-cvs1:/tmp/cvs-serv5406 Modified Files: CSPSimAppli.vcproj Log Message: no message Index: CSPSimAppli.vcproj =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/VisualStudio/CSPSimAppli/CSPSimAppli.vcproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CSPSimAppli.vcproj 22 Mar 2003 02:27:11 -0000 1.1 --- CSPSimAppli.vcproj 3 Apr 2003 10:40:58 -0000 1.2 *************** *** 22,27 **** Name="VCCLCompilerTool" InlineFunctionExpansion="1" ! AdditionalIncludeDirectories="../../Include,../../../SimData/Include,../../../../THIRDPARTYLIBS/include,../../../../THIRDPARTYLIBS/Demeter,C:/Python22/include,../../SimData/include" ! PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS" StringPooling="TRUE" RuntimeLibrary="2" --- 22,27 ---- Name="VCCLCompilerTool" InlineFunctionExpansion="1" ! AdditionalIncludeDirectories="../../Include,../../../../THIRDPARTYLIBS/include,../../../../THIRDPARTYLIBS/Demeter,C:/Python22/include" ! PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS,__CSPSIM_EXE__" StringPooling="TRUE" RuntimeLibrary="2" *************** *** 44,48 **** LinkIncremental="1" SuppressStartupBanner="TRUE" ! AdditionalLibraryDirectories="C:/Python22/libs,../../../../THIRDPARTYLIBS/lib" SubSystem="1"/> <Tool --- 44,48 ---- LinkIncremental="1" SuppressStartupBanner="TRUE" ! AdditionalLibraryDirectories="C:/Python22/libs,C:/Python22/Lib/site-packages/SimData,../../../../THIRDPARTYLIBS/lib" SubSystem="1"/> <Tool *************** *** 70,74 **** <Configuration Name="Debug|Win32" ! OutputDirectory=".\../../Bin" IntermediateDirectory=".\Debug" ConfigurationType="1" --- 70,74 ---- <Configuration Name="Debug|Win32" ! OutputDirectory="./../../Bin" IntermediateDirectory=".\Debug" ConfigurationType="1" *************** *** 80,84 **** Optimization="0" AdditionalIncludeDirectories="../../Include,../../../SimData/Include,../../../../THIRDPARTYLIBS/include,../../../../THIRDPARTYLIBS/Demeter,C:/Python22/include,../../SimData/include,../../../THIRDPARTYLIBS/demeter" ! PreprocessorDefinitions="WIN32,_DEBUG,_WINDOWS" BasicRuntimeChecks="3" RuntimeLibrary="3" --- 80,84 ---- Optimization="0" AdditionalIncludeDirectories="../../Include,../../../SimData/Include,../../../../THIRDPARTYLIBS/include,../../../../THIRDPARTYLIBS/Demeter,C:/Python22/include,../../SimData/include,../../../THIRDPARTYLIBS/demeter" ! PreprocessorDefinitions="WIN32,_DEBUG,_WINDOWS,__CSPSIM_EXE__" BasicRuntimeChecks="3" RuntimeLibrary="3" *************** *** 103,107 **** LinkIncremental="1" SuppressStartupBanner="TRUE" ! AdditionalLibraryDirectories="C:/Python22/libs,../../../../THIRDPARTYLIBS/lib" IgnoreDefaultLibraryNames="msvcrt.lib" GenerateDebugInformation="TRUE" --- 103,107 ---- LinkIncremental="1" SuppressStartupBanner="TRUE" ! AdditionalLibraryDirectories="C:\Python22\Lib\site-packages\SimData,C:/Python22/libs,../../../../THIRDPARTYLIBS/lib" IgnoreDefaultLibraryNames="msvcrt.lib" GenerateDebugInformation="TRUE" *************** *** 157,167 **** </File> <File ! RelativePath="..\..\Source\BaseScreen.cpp"> </File> <File ! RelativePath="..\..\Source\CSPSim.cpp"> </File> <File ! RelativePath="..\..\Source\CSP_wrap.cpp"> </File> <File --- 157,167 ---- </File> <File ! RelativePath="..\..\Source\Atmosphere.cpp"> </File> <File ! RelativePath="..\..\Source\BaseScreen.cpp"> </File> <File ! RelativePath="..\..\Source\CSPSim.cpp"> </File> <File *************** *** 172,175 **** --- 172,181 ---- </File> <File + RelativePath="..\..\Source\Console.cpp"> + </File> + <File + RelativePath="..\..\Source\ConsoleCommands.cpp"> + </File> + <File RelativePath="..\..\Source\DynamicObject.cpp"> </File> *************** *** 196,199 **** --- 202,208 ---- </File> <File + RelativePath="..\..\Source\LandingGear.cpp"> + </File> + <File RelativePath="..\..\Source\LogStream.cpp"> </File> *************** *** 208,211 **** --- 217,223 ---- </File> <File + RelativePath="..\..\Source\NumericalMethod.cpp"> + </File> + <File RelativePath="..\..\Source\ObjectModel.cpp"> </File> *************** *** 250,253 **** --- 262,268 ---- </File> <File + RelativePath="..\..\Source\cCSP_wrap.cpp"> + </File> + <File RelativePath="..\..\Source\main.cpp"> </File> *************** *** 287,290 **** --- 302,311 ---- </File> <File + RelativePath="..\..\Include\Console.h"> + </File> + <File + RelativePath="..\..\Include\ConsoleCommands.h"> + </File> + <File RelativePath="..\..\Include\DirVectorDrawable.h"> </File> *************** *** 314,317 **** --- 335,341 ---- </File> <File + RelativePath="..\..\Include\LandingGear.h"> + </File> + <File RelativePath="..\..\Include\LogStream.h"> </File> *************** *** 326,329 **** --- 350,356 ---- </File> <File + RelativePath="..\..\Include\NumericalMethod.h"> + </File> + <File RelativePath="..\..\Include\ObjectModel.h"> </File> *************** *** 385,403 **** </Filter> <File ! RelativePath="..\..\Source\CSP.i"> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCustomBuildTool" ! CommandLine="C:\progra~1\SWIG-1.3.17\swig -c++ -python -noexcept -DWIN32 -I..\..\Include -o ..\..\Source\$(InputName)_wrap.cpp ..\..\Source\$(InputName).i" ! Outputs="..\..\Source\$(InputName)_wrap.cpp"/> ! </FileConfiguration> ! <FileConfiguration ! Name="Debug|Win32"> ! <Tool ! Name="VCCustomBuildTool" ! CommandLine="C:\progra~1\SWIG-1.3.17\swig -c++ -python -noexcept -DWIN32 -I..\..\Include -o ..\..\Source\$(InputName)_wrap.cpp ..\..\Source\$(InputName).i ! " ! Outputs="..\..\Source\$(InputName)_wrap.cpp"/> </FileConfiguration> </File> --- 412,422 ---- </Filter> <File ! RelativePath="..\..\Source\cCSP.i"> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCustomBuildTool" ! CommandLine="C:\progra~1\SWIG-1.3.17\swig -c++ -python -noexcept -DWIN32 -I..\..\Include -IC:\Python22\include -o ..\..\Source\$(InputName)_wrap.cpp ..\..\Source\$(InputName).i" ! Outputs="..\..\Source\$(InputName)_wrap.cpp ..\..\Bin\$(InputName).py"/> </FileConfiguration> </File> |
|
From: <de...@us...> - 2003-04-03 10:40:45
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Source
In directory sc8-pr-cvs1:/tmp/cvs-serv5076
Modified Files:
DynamicalSystem.cpp CSPSim.cpp AircraftObject.cpp
AeroDynamics.cpp
Log Message:
no message
Index: DynamicalSystem.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/DynamicalSystem.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DynamicalSystem.cpp 12 Mar 2003 21:38:43 -0000 1.1
--- DynamicalSystem.cpp 3 Apr 2003 10:40:42 -0000 1.2
***************
*** 25,178 ****
#include <cmath>
#include <iostream>
#include "DynamicalSystem.h"
- double const DynamicalSystem::PGROW = -0.20;
- double const DynamicalSystem::PSHRNK = -0.25;
- double const DynamicalSystem::FCOR = 0.06666666; // 1.0/15.0
-
- double const DynamicalSystem::SAFETY = 0.9;
- double const DynamicalSystem::ERRCON = 6.0e-4;
-
- unsigned int const DynamicalSystem::MAXSTP = 10000;
- double const DynamicalSystem::TINY = std::numeric_limits<float>::epsilon();//1.0e-30;
-
-
- //===========================================================================
-
- std::vector<double> const &DynamicalSystem::rk4(std::vector<double> const &y,
- std::vector<double> const &dydx,
- double x, double h)
- {
- static std::vector<double> yout(m_NVariable), yt(m_NVariable), dyt(m_NVariable),
- dym(m_NVariable);
-
- double hh = h * 0.5;
- unsigned short i = 0;
! for (; i < m_NVariable; ++i)
! yt[i] = y[i] + hh * dydx[i];
!
! double xh = x + hh;
!
! dyt = f(xh, yt);
! for (i = 0; i < m_NVariable; ++i)
! yt[i] = y[i] + hh * dyt[i];
!
! dym = f(xh, yt);
! for (i = 0; i < m_NVariable; ++i) {
! yt[i] = y[i] + h * dym[i];
! dym[i] += dyt[i];
! }
!
! dyt = f(x + h, yt);
! double h6 = h / 6.0;
! for (i = 0; i < m_NVariable; ++i)
! yout[i] = y[i] + h6 * (dydx[i] + dyt[i] + 2.0 * dym[i]);
!
! return yout;
}
! //===========================================================================
!
! std::vector<double> const &DynamicalSystem::rkqc(std::vector<double> &y,
! std::vector<double> &dydx,
! double &x, double htry, double eps,
! std::vector<double> const &yscal,
! double &hdid, double &hnext)
! {
! static std::vector<double> ytemp, ysav, dysav;
!
! double xsav = x;
! ysav = y;
! dysav = dydx;
! double h = htry;
! unsigned short i;
! bool loop = true;
! do {
! double hh = 0.5 * h;
! ytemp = rk4(ysav, dysav, xsav, hh);
! x = xsav + hh;
! dydx = f(x, ytemp);
! y = rk4(ytemp, dydx, x, hh);
! x = xsav + h;
! if (x == xsav) {
! std::cout << "Step size too small in routine RKQC\n" << std::endl;
! loop = false;
! }
! else {
! ytemp = rk4(ysav, dysav, xsav, h);
! double errmax = 0.0;
! for (i = 0; i < m_NVariable; ++i) {
! ytemp[i] -= y[i]; // ytemp[i] = y[i] - ytemp[i];
! double temp = fabs(ytemp[i] / yscal[i]);
! if (errmax < temp)
! errmax = temp;
! }
! errmax /= eps;
! if (errmax <= 1.0) {
! hdid = h;
! hnext = (errmax > ERRCON ?
! SAFETY * h * exp(PGROW * log(errmax)) : 4.0 * h);
! loop = false;
! }
! else
! h *= SAFETY * exp(PSHRNK * log(errmax));
! }
! }
! while ( loop );
! for (i = 0; i < m_NVariable; ++i)
! y[i] += ytemp[i] * FCOR;
! return y;
}
! //===========================================================================
!
! std::vector<double> const &DynamicalSystem::odeint(std::vector<double> const & ystart,
! double x1, double x2,
! double eps, double h1, double hmin,
! unsigned int &nok, unsigned int &nbad)
! {
! static std::vector<double> y, dydx, yscal(m_NVariable);
! double hnext, hdid;
! double x = x1;
! double h = (x2 > x1) ? fabs(h1) : -fabs(h1);
! nok = nbad = 0;
! y = ystart;
! unsigned int nstp = 0;
! do {
! ++nstp;
! dydx = f(x, y);
! for (unsigned short i = 0;i < m_NVariable; ++i)
! yscal[i] = fabs(y[i]) + fabs(dydx[i] * h) + TINY;
!
! if ((x+h-x2)*(x+h-x1) > 0.0) h = x2 - x;
! y = rkqc(y, dydx, x, h, eps, yscal, hdid, hnext);
! if ( hdid == h ) ++nok; else ++nbad;
! if ( (x-x2) * (x2-x1) >= 0.0 )
! return y;
! else {
! if (fabs(hnext) <= hmin) {
! std::cout << "Step size too small in ODEINT\n" << std::endl;
! nstp = MAXSTP;
! }
! h = hnext;
! }
}
- while ( nstp < MAXSTP );
- std::cout << "Too many steps in routine ODEINT\n" << std::endl;
- return ystart;
- }
! //=================================================================
! std::vector<double> const &DynamicalSystem::RungeKutta(std::vector<double> const &y0,
! double t1, double t2)
! {
! static std::vector<double> result;
! unsigned int nok,nbad;
! result = odeint(y0, t1, t2, m_precision, m_hestimate, m_hmin, nok, nbad);
! //std::cout << "nok =" << nok << "; nbad = " << nbad << "\n";
! return result;
! }
--- 25,63 ----
#include <cmath>
#include <iostream>
+ #include <limits>
#include "DynamicalSystem.h"
! DynamicalSystem::DynamicalSystem(unsigned short dimension):
! VectorField(dimension),
! _numericalMethod(0) {
}
! DynamicalSystem::~DynamicalSystem() {
! if (_numericalMethod) {
! delete _numericalMethod;
! _numericalMethod = 0;
! }
}
! DynamicalSystem::DynamicalSystem(VectorField* pf):
! VectorField(*pf) {
! if (!_numericalMethod)
! _numericalMethod->setVectorField(pf);
! }
! void DynamicalSystem::setNumericalMethod(NumericalMethod* pnumericalMethod){
! _numericalMethod = pnumericalMethod;
}
! std::vector<double> const& DynamicalSystem::flow(std::vector<double>& y0, double t0, double dt) const {
! static std::vector<double> y;
! y = _numericalMethod->enhancedSolve(y0, t0, dt);
! if (_numericalMethod->failed()) {
! std::cout << "quick solve is required\n";
! y = _numericalMethod->quickSolve(y0, t0, dt);
! }
! return y;
! }
Index: CSPSim.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/CSPSim.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** CSPSim.cpp 27 Mar 2003 20:34:01 -0000 1.16
--- CSPSim.cpp 3 Apr 2003 10:40:42 -0000 1.17
***************
*** 622,742 ****
}
- /*
- int CSPSim::InitConsole()
- {
- CSP_LOG(CSP_APP, CSP_DEBUG, "CSPSim::InitConsole()...");
-
- SDL_Rect Con_rect;
- Con_rect.x = Con_rect.y = 0;
- Con_rect.w = Con_rect.h = 300;
-
- std::string font_path = g_Config.getPath("Paths", "FontPath", ".", true);
- std::string console_font = ospath::join(font_path, "ConsoleFont.bmp");
-
- m_ConsoleFont = DT_LoadFont(console_font.c_str(), 0);
- m_pConsole = CON_Init(console_font.c_str(), m_SDLScreen, 100, Con_rect);
- CON_Alpha(m_pConsole, 50);
-
- // Add some commands to the console
- CON_AddCommand(&KillProgram, "quit");
- CON_AddCommand(&AlphaChange, "alpha");
- CON_AddCommand(&Move, "move");
- CON_AddCommand(&Resize, "resize");
- CON_AddCommand(&ListCommands, "listcommands");
-
- #ifdef _WIN32
- // I don't have this function in SDL_Console 1.3 on Linux
- CON_AddDefaultCommand(&DefaultCommand);
- #endif
-
- CON_ListCommands(m_pConsole);
-
- return 0;
- }
-
-
- void CSPSim::ShowPaused()
- {
- DT_DrawText("PAUSED", m_SDLScreen, m_ConsoleFont, m_SDLScreen->w - 36, 0);
- }
-
-
- void CSPSim::ShowPlaneInfo()
- {
- if (m_ActiveObject.isNull()) return;
-
- int width = m_SDLScreen->w;
- simdata::Vector3 direction = m_ActiveObject->getDirection();
- simdata::Vector3 upVector = m_ActiveObject->getUpDirection();
-
- char buffer[256];
- snprintf(buffer, 255, "Direction: [%.3f, %.3f, %.3f]", direction.x, direction.y, direction.z);
- DT_DrawText(buffer, m_SDLScreen, m_ConsoleFont, width - 200, m_SDLScreen->h - 80);
-
- snprintf(buffer, 255, "Up: [%.3f, %.3f, %.3f]", upVector.x, upVector.y, upVector.z);
- DT_DrawText(buffer, m_SDLScreen, m_ConsoleFont, width - 200, m_SDLScreen->h - 60);
-
- int latX, latY;
- m_ActiveObject->getLatticePosition(latX, latY);
- snprintf(buffer, 255, "Lattice: [ %d, %d ]", latX, latY);
- DT_DrawText(buffer, m_SDLScreen, m_ConsoleFont, width - 200, m_SDLScreen->h - 40);
- }
-
-
- void CSPSim::ShowStats(float fps)
- {
- char framerate[64];
- char buffer[256];
- static float maxFps = 0.0, minFps = 500.0;
-
- maxFps = max(maxFps, fps);
- minFps = min(minFps, fps);
-
- sprintf(framerate, "%.2f FPS min: %.2f max: %.2f", fps, minFps, maxFps);
- DT_DrawText(framerate, m_SDLScreen, m_ConsoleFont, 1, 0);
-
- sprintf(framerate, "%.2f FPS min: %.2f max: %.2f", fps, minFps, maxFps);
- simdata::SimDate artificial_time = m_CurrentTime;
- artificial_time.addTime(m_Battlefield->getSpin());
- std::string date = "Date: " + artificial_time.asString();
- DT_DrawText(date.c_str(), m_SDLScreen, m_ConsoleFont, 1, 20);
-
- sprintf(buffer, "Terrain Polygons: %d", m_Battlefield->getTerrainPolygonsRendered());
- DT_DrawText(buffer, m_SDLScreen, m_ConsoleFont, 1, m_SDLScreen->h - 160);
-
-
- if (!m_ActiveObject.isNull()) {
- simdata::Vector3 pos = m_ActiveObject->getLocalPosition();
- snprintf(buffer, 255, "LocalPosition: [%.3f, %.3f, %.3f]", pos.x, pos.y, pos.z);
- DT_DrawText(buffer, m_SDLScreen, m_ConsoleFont, 1, m_SDLScreen->h - 80);
-
- pos = m_ActiveObject->getGlobalPosition();
- snprintf(buffer, 255, "GlobalPosition: [%.3f, %.3f, %.3f]", pos.x, pos.y, pos.z);
- DT_DrawText(buffer, m_SDLScreen, m_ConsoleFont, 1, m_SDLScreen->h - 60);
-
- simdata::Vector3 vel = m_ActiveObject->getVelocity();
- snprintf(buffer, 255, "Velocity: [%.3f, %.3f, %.3f]", vel.x, vel.y, vel.z);
- DT_DrawText(buffer, m_SDLScreen, m_ConsoleFont, 1, m_SDLScreen->h - 40);
-
- std::vector<std::string> stats;
- std::vector<std::string>::iterator stat;
- m_ActiveObject->getStats(stats);
- int y = 40;
- for (stat = stats.begin(); stat != stats.end(); stat++, y+=20) {
- DT_DrawText(stat->c_str(), m_SDLScreen, m_ConsoleFont, 1, y);
- if (y > m_SDLScreen->h - 180) break;
- }
- // frame rate logging versus position
- // this is a temporary hack to look for problematic terrain tiles
-
- static float next_dump = 0.0;
- if (m_ElapsedTime > next_dump) {
- next_dump = m_ElapsedTime + 10.0;
- CSP_LOG(CSP_APP, CSP_WARN, m_FrameRate << endl << buffer);
- }
-
- }
- }
-
-
- */
--- 622,623 ----
Index: AircraftObject.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/AircraftObject.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** AircraftObject.cpp 27 Mar 2003 20:33:59 -0000 1.10
--- AircraftObject.cpp 3 Apr 2003 10:40:42 -0000 1.11
***************
*** 468,472 ****
//flightmodel needs to return out of spec parameters for subsequent
//damage modelling.
- //m_FlightModel->setGroundPosition(m_GroundZ);
m_FlightModel->setGroundZ(m_GroundZ);
--- 468,471 ----
Index: AeroDynamics.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/AeroDynamics.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** AeroDynamics.cpp 26 Mar 2003 22:19:51 -0000 1.12
--- AeroDynamics.cpp 3 Apr 2003 10:40:42 -0000 1.13
***************
*** 197,202 ****
m_CurrentForceTotal = simdata::Vector3::ZERO;
- m_ForcesBody = simdata::Vector3::ZERO;
-
m_alpha = 0.0;
m_alpha0 = 0.0;
--- 197,200 ----
***************
*** 227,233 ****
{
[...979 lines suppressed...]
- if ( p_setting >=0.0 ) {
- return p_setting * p_mMax;
- } else {
- return -p_setting * p_mMin;
- }
- }
- */
-
-
- /*
- double AeroDynamics::ControlSensibility(double p_x) const
- { // smooth the joystick controls
-
- double z = p_x * p_x;
- double y = p_x * z * ( 2.0 - z );
-
- return y;
- }
- */
--- 1058,1059 ----
|
|
From: <de...@us...> - 2003-04-03 10:40:30
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Include
In directory sc8-pr-cvs1:/tmp/cvs-serv4810
Modified Files:
DynamicObject.h DynamicalSystem.h AeroDynamics.h
Log Message:
no message
Index: DynamicObject.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/DynamicObject.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** DynamicObject.h 21 Mar 2003 20:08:35 -0000 1.5
--- DynamicObject.h 3 Apr 2003 10:40:22 -0000 1.6
***************
*** 85,88 ****
--- 85,90 ----
void EnableSmoke();
+ bool isNearGround();
+
protected:
***************
*** 115,118 ****
--- 117,121 ----
bool m_Local;
bool m_Human;
+ bool m_NearGround;
simdata::Matrix3 m_Inertia;
Index: DynamicalSystem.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/DynamicalSystem.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DynamicalSystem.h 12 Mar 2003 21:38:16 -0000 1.1
--- DynamicalSystem.h 3 Apr 2003 10:40:22 -0000 1.2
***************
*** 27,74 ****
#define __DYNAMICALSYSTEM_H__
- #include <limits>
#include <vector>
! class DynamicalSystem
! {
! unsigned short const m_NVariable;
! std::vector<double> const & rkqc(std::vector<double> &y,
! std::vector<double> &dyx,
! double &x, double htry, double eps,
! std::vector<double> const &yscal,
! double &hdid, double &hnext);
! std::vector<double> const &odeint(std::vector<double> const & ystart,
! double x1, double x2,
! double eps, double h1, double hmin,
! unsigned int &nok, unsigned int &nbad);
!
! static double const PGROW ;
! static double const PSHRNK;
! static double const FCOR;
!
! static double const SAFETY;
! static double const ERRCON;
!
! static unsigned int const MAXSTP;
! static double const TINY;
! double m_precision, m_hmin, m_hestimate;
public:
! std::vector<double> const & rk4(std::vector<double> const & y,
! std::vector<double> const & dyx,
! double x, double h);
! std::vector<double> const & RungeKutta(std::vector<double> const &y0,
! double t1, double t2);
! DynamicalSystem(
! unsigned short NVariable,
! double Precision = 1.e-3, //1.e-4
! double Hmin = 0.0,
! double Hestimate = 1.e-2):
! m_NVariable(NVariable),
! m_precision(Precision),
! m_hmin(Hmin),
! m_hestimate(Hestimate)
! {;};
! protected:
! virtual std::vector<double> const &f(double, std::vector<double> &) = 0;
};
! #endif
--- 27,46 ----
#define __DYNAMICALSYSTEM_H__
#include <vector>
! #include "NumericalMethod.h"
!
!
! class DynamicalSystem: public VectorField {
! NumericalMethod* _numericalMethod;
public:
! DynamicalSystem(unsigned short dimension);
! DynamicalSystem(VectorField* pf);
! ~DynamicalSystem();
! //void setVectorField(VectorField* pf);
! void setNumericalMethod(NumericalMethod* pnumericalMethod);
! std::vector<double> const& flow(std::vector<double>& y0, double t0, double dt) const;
};
!
! #endif //__DYNAMICALSYSTEM_H__
!
Index: AeroDynamics.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/AeroDynamics.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** AeroDynamics.h 22 Mar 2003 12:38:56 -0000 1.6
--- AeroDynamics.h 3 Apr 2003 10:40:22 -0000 1.7
***************
*** 50,53 ****
--- 50,54 ----
};
+ class AeroVectorField;
/**
***************
*** 56,60 ****
*/
class AeroDynamics: public simdata::Object, public Physics, protected DynamicalSystem
! {
public:
SIMDATA_OBJECT(AeroDynamics, 0, 0)
--- 57,61 ----
*/
class AeroDynamics: public simdata::Object, public Physics, protected DynamicalSystem
! {
public:
SIMDATA_OBJECT(AeroDynamics, 0, 0)
***************
*** 120,127 ****
protected:
float m_WingSpan;
double m_WingChord; // chord length
double m_WingArea; // surface area of wings
! double m_stallAOA; // stall AOA
float m_DeMax;
--- 121,131 ----
protected:
+ //vector field which determines trajectory and behaviour of this dynamical system
+ std::vector<double> const& _f(double x, std::vector<double>& y);
+
float m_WingSpan;
double m_WingChord; // chord length
double m_WingArea; // surface area of wings
! double m_stallAOA; // stall AOA
float m_DeMax;
***************
*** 201,204 ****
--- 205,212 ----
protected:
+ // FIXME: needs to be moved in a mother class
+ bool isNearGround();
+
+
std::vector<double> const &f(double x, std::vector<double> &y);
void bindToBody(std::vector<double> const &y);
***************
*** 210,216 ****
double CalculateDragCoefficient() const;
double CalculateSideCoefficient() const;
- double CalculateDynamicPressure(double alt) const;
- double CalculateGravity(double const p_altitude) const;
- double CalculateAirDensity(double const alt) const;
double CalculateRollMoment(double const qbarS) const;
double CalculatePitchMoment(double const qbarS) const;
--- 218,221 ----
***************
*** 223,228 ****
simdata::Vector3 BodyToLocal(const simdata::Vector3 & vec);
void BodyToLocal();
-
- simdata::Matrix3 MakeAngularVelocityMatrix(simdata::Vector3 u);
simdata::Vector3 const& LiftVector();
--- 228,231 ----
***************
*** 230,239 ****
simdata::Vector3 const& SideVector() const;
- /*
- double ControlSensibility(double p_x) const; // control joystick sensibility
- double ControlInputValue(double p_gForce) const; // decrease deflection value to lower G
- double CIVbasis(double p_t) const;
- */
-
double m_depsilon; // Gforce control feedback stall
unsigned short m_Maxi; // number of FM iteration
--- 233,236 ----
***************
*** 242,247 ****
double m_ElevatorInput; // desired elevator deflection
- //double SetControl(double const p_setting, double const & p_mMax, double const & p_mMin) const;
-
// control surfaces
double m_Aileron;
--- 239,242 ----
***************
*** 251,257 ****
double m_Thrust;
- // calculated forces
- double m_qBarFactor;
-
simdata::Vector3 m_CurrentForceTotal;
simdata::Vector3 m_GravityForce;
--- 246,249 ----
***************
*** 267,270 ****
--- 259,263 ----
double m_gForce; // current g acceleration
+ double m_qBarFactor; // 0.5 * WingSpan * density (updated 1 time in a simulation step)
double m_Gravity; // current gravitational acceleration
simdata::Vector3 m_GravityWorld; // current gravity vector in earth coordinates
***************
*** 288,291 ****
--- 281,286 ----
simdata::Vector3 m_VelocityLocal; // velocity in earth coordinates
simdata::Vector3 m_VelocityBody; // (U,V,W) velocity in body coordinates
+ simdata::Vector3 m_AirflowBody; // air flow velocity in body coordinate
+ simdata::Vector3 m_WindLocal; // wind velocity in local coordinates
simdata::Vector3 m_AngularVelocityLocal;// angular velocity in earth coordinates
simdata::Vector3 m_AngularVelocityBody; // (P,Q,R) angular velocity in body coordinates
***************
*** 295,298 ****
--- 290,294 ----
bool m_Bound;
+ bool m_NearGround;
simdata::Vector3 *m_Position;
simdata::Vector3 *m_Velocity;
|
|
From: <de...@us...> - 2003-04-03 10:19:22
|
Update of /cvsroot/csp/APPLICATIONS/SimData/VisualStudio
In directory sc8-pr-cvs1:/tmp/cvs-serv20845
Modified Files:
SimData.sln
Log Message:
no message
Index: SimData.sln
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/SimData/VisualStudio/SimData.sln,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SimData.sln 18 Mar 2003 06:44:22 -0000 1.1
--- SimData.sln 3 Apr 2003 10:19:18 -0000 1.2
***************
*** 10,15 ****
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
! {F9948756-70B5-4328-8A6A-F4BE5A521A27}.Debug.ActiveCfg = Release|Win32
! {F9948756-70B5-4328-8A6A-F4BE5A521A27}.Debug.Build.0 = Release|Win32
{F9948756-70B5-4328-8A6A-F4BE5A521A27}.Release.ActiveCfg = Release|Win32
{F9948756-70B5-4328-8A6A-F4BE5A521A27}.Release.Build.0 = Release|Win32
--- 10,15 ----
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
! {F9948756-70B5-4328-8A6A-F4BE5A521A27}.Debug.ActiveCfg = Debug|Win32
! {F9948756-70B5-4328-8A6A-F4BE5A521A27}.Debug.Build.0 = Debug|Win32
{F9948756-70B5-4328-8A6A-F4BE5A521A27}.Release.ActiveCfg = Release|Win32
{F9948756-70B5-4328-8A6A-F4BE5A521A27}.Release.Build.0 = Release|Win32
|
|
From: <de...@us...> - 2003-03-28 19:28:36
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/VisualStudio In directory sc8-pr-cvs1:/tmp/cvs-serv18572 Removed Files: CSPWin.py Log Message: no message --- CSPWin.py DELETED --- |
|
From: <de...@us...> - 2003-03-28 19:22:39
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/VisualStudio/CSPSimDLL In directory sc8-pr-cvs1:/tmp/cvs-serv21244 Modified Files: CSPSimDLL.vcproj Log Message: no message Index: CSPSimDLL.vcproj =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/VisualStudio/CSPSimDLL/CSPSimDLL.vcproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CSPSimDLL.vcproj 22 Mar 2003 16:08:02 -0000 1.2 --- CSPSimDLL.vcproj 28 Mar 2003 19:19:22 -0000 1.3 *************** *** 84,88 **** InlineFunctionExpansion="1" AdditionalIncludeDirectories="../../Include,C:/Python22/include,../../../../THIRDPARTYLIBS/include,../../../../THIRDPARTYLIBS/Demeter" ! PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;CSPSIMDLL_EXPORTS;_STLP_USE_OWN_NAMESPACE" StringPooling="TRUE" RuntimeLibrary="2" --- 84,88 ---- InlineFunctionExpansion="1" AdditionalIncludeDirectories="../../Include,C:/Python22/include,../../../../THIRDPARTYLIBS/include,../../../../THIRDPARTYLIBS/Demeter" ! PreprocessorDefinitions="CSP_NDEBUG;WIN32;NDEBUG;_WINDOWS;_USRDLL;CSPSIMDLL_EXPORTS" StringPooling="TRUE" RuntimeLibrary="2" *************** *** 102,106 **** AdditionalOptions="/MACHINE:I386" AdditionalDependencies="osgText.lib DemeterVisualC6.lib opengl32.lib SDL.lib _cSimData.lib osgParticle.lib osgUtil.lib osgDB.lib osg.lib odbc32.lib odbccp32.lib" ! OutputFile="../../Bin/_CSP.dll" LinkIncremental="1" SuppressStartupBanner="TRUE" --- 102,106 ---- AdditionalOptions="/MACHINE:I386" AdditionalDependencies="osgText.lib DemeterVisualC6.lib opengl32.lib SDL.lib _cSimData.lib osgParticle.lib osgUtil.lib osgDB.lib osg.lib odbc32.lib odbccp32.lib" ! OutputFile="../../Bin/_cCSP.dll" LinkIncremental="1" SuppressStartupBanner="TRUE" *************** *** 171,177 **** </File> <File - RelativePath="..\..\Source\CSP_wrap.cpp"> - </File> - <File RelativePath="..\..\Source\Colorspace.cpp"> </File> --- 171,174 ---- *************** *** 267,270 **** --- 264,270 ---- </File> <File + RelativePath="..\..\Source\cCSP_wrap.cpp"> + </File> + <File RelativePath="..\..\Source\sky.cpp"> </File> *************** *** 405,423 **** </Filter> <File ! RelativePath="..\..\Source\CSP.i"> ! <FileConfiguration ! Name="Debug|Win32"> ! <Tool ! Name="VCCustomBuildTool" ! CommandLine="C:\progra~1\SWIG-1.3.17\swig -c++ -python -noexcept -DWIN32 -I..\..\Include -o ..\..\Source\$(InputName)_wrap.cpp ..\..\Source\$(InputName).i ! " ! Outputs="..\..\Source\$(InputName)_wrap.cpp"/> ! </FileConfiguration> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCustomBuildTool" ! CommandLine="C:\progra~1\SWIG-1.3.17\swig -c++ -python -noexcept -DWIN32 -IC:/Python22/include -I../../Include -o ..\..\Source\$(InputName)_wrap.cpp ..\..\Source\$(InputName).i ! " Outputs="..\..\Source\$(InputName)_wrap.cpp"/> </FileConfiguration> --- 405,414 ---- </Filter> <File ! RelativePath="..\..\Source\cCSP.i"> <FileConfiguration Name="Release|Win32"> <Tool Name="VCCustomBuildTool" ! CommandLine="C:\progra~1\SWIG-1.3.17\swig -c++ -python -noexcept -DWIN32 -I..\..\Include -IC:\Python22\include -o ..\..\Source\$(InputName)_wrap.cpp ..\..\Source\$(InputName).i" Outputs="..\..\Source\$(InputName)_wrap.cpp"/> </FileConfiguration> |
|
From: <de...@us...> - 2003-03-28 19:21:14
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim
In directory sc8-pr-cvs1:/tmp/cvs-serv21699
Modified Files:
CHANGES.current
Log Message:
no message
Index: CHANGES.current
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/CHANGES.current,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** CHANGES.current 27 Mar 2003 22:59:38 -0000 1.10
--- CHANGES.current 28 Mar 2003 19:20:24 -0000 1.11
***************
*** 1,4 ****
--- 1,13 ----
Version 0.3.1 (in progress)
===========================
+
+ 2003-03-28: delta
+ .net project updated: CSPSimDLL (release mode is maintained)
+ You can run python scripts from commandline without invoking python
+ interpreter. For example, to rebuild data: "RebuildData.py <CR>" or
+ to run CSP, "CSPSim.py <CR>".
+
+ Removed CSPWin.py, CompileData.py and RebuildData.py from /VisualStudio.
+
2003-03-27: onsight
Created Bin directory and moved all Python scripts and
***************
*** 60,63 ****
--- 69,77 ----
doesn't make the display jitter.
+ 2003-03-23: delta
+ added a key to toggle diamond contact marks
+
+ added initialization of pause text
+
2003-03-22: onsight
Added mute option to CSPSim.ini.
***************
*** 68,72 ****
CSPSim.PYTHON now compiles the data automatically if Sim.dar is
not found. You still need to run with the --compile-data option
! whenever the XML files change, or when the CPSSim object storage
format changes. In the latter case, also specify the --rebuild
option to recompile all the source data.
--- 82,86 ----
CSPSim.PYTHON now compiles the data automatically if Sim.dar is
not found. You still need to run with the --compile-data option
! whenever the XML files change, or when the CPSim object storage
format changes. In the latter case, also specify the --rebuild
option to recompile all the source data.
***************
*** 76,80 ****
Added CSPWin.py, CompileData.py, and RebuildData.py to
! VisualStuVdio. It should be possible to double-click on these
from Windows to launch CSPSim, compile changes to the data, or
rebuild the data from scratch. This assumes of course that
--- 90,94 ----
Added CSPWin.py, CompileData.py, and RebuildData.py to
! VisualStudio. It should be possible to double-click on these
from Windows to launch CSPSim, compile changes to the data, or
rebuild the data from scratch. This assumes of course that
***************
*** 148,152 ****
needs some improvements but it should be better now. Note that
osgText has been entirely reimplemented. Although, we didn t use
! it, we ll need to switch to it soon: more flexible interface,
robuster and faster code.
--- 162,166 ----
needs some improvements but it should be better now. Note that
osgText has been entirely reimplemented. Although, we didn t use
! it yet, we ll need to switch to it soon: more flexible interface,
robuster and faster code.
***************
*** 161,165 ****
as a vector field may be defined.
! Aerodynamics inherites now from DynamicalSystem. I ve done some
minor cleaning in code and implement some helper functions to
use with dynamical system. Call to this numerical method occurs
--- 175,179 ----
as a vector field may be defined.
! Aerodynamics inherites now from DynamicalSystem. Done some
minor cleaning in code and implement some helper functions to
use with dynamical system. Call to this numerical method occurs
***************
*** 175,180 ****
SoundPath = ../Data/Sounds
! Changed the radius of skydome to 64000 (hardcoded!, pkz Onsight,
check it)
Others changes are minor.
--- 189,195 ----
SoundPath = ../Data/Sounds
! Changed the radius of skydome to 64000 (hardcoded!, plz Onsight,
check it)
Others changes are minor.
+
|
|
From: <de...@us...> - 2003-03-28 19:12:30
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/VisualStudio In directory sc8-pr-cvs1:/tmp/cvs-serv18674 Removed Files: RebuildData.py CompileData.py Log Message: no message --- RebuildData.py DELETED --- --- CompileData.py DELETED --- |
|
From: <de...@us...> - 2003-03-28 19:06:38
|
Update of /cvsroot/csp/APPLICATIONS/SimData/VisualStudio In directory sc8-pr-cvs1:/tmp/cvs-serv16067 Modified Files: SimData.vcproj Log Message: no message Index: SimData.vcproj =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/SimData/VisualStudio/SimData.vcproj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SimData.vcproj 22 Mar 2003 02:16:03 -0000 1.3 --- SimData.vcproj 28 Mar 2003 19:06:34 -0000 1.4 *************** *** 176,179 **** --- 176,182 ---- </File> <File + RelativePath="..\Source\Noise.cpp"> + </File> + <File RelativePath="..\Source\Object.cpp"> </File> *************** *** 191,195 **** </File> <File ! RelativePath="..\Source\Spread.cpp"> </File> <File --- 194,198 ---- </File> <File ! RelativePath="..\Source\Real.cpp"> </File> <File *************** *** 298,304 **** <File RelativePath="..\Include\SimData\Real.h"> - </File> - <File - RelativePath="..\Include\SimData\Spread.h"> </File> <File --- 301,304 ---- |
|
From: <de...@us...> - 2003-03-28 19:06:03
|
Update of /cvsroot/csp/APPLICATIONS/SimData/Source
In directory sc8-pr-cvs1:/tmp/cvs-serv15808
Modified Files:
Noise.cpp
Log Message:
no message
Index: Noise.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/SimData/Source/Noise.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Noise.cpp 26 Mar 2003 10:13:55 -0000 1.1
--- Noise.cpp 28 Mar 2003 19:05:58 -0000 1.2
***************
*** 94,103 ****
for (i=0; i<n; i++) {
double f = i*s;
! buffer[i] = (float) (getValue(f)*amplitude + offset);
}
if (periodic) {
s = 1.0 / n;
for (i=0; i<n/2; i++) {
! float f = 0.5 + i*s;
float a = buffer[i];
float b = buffer[n-i-1];
--- 94,103 ----
for (i=0; i<n; i++) {
double f = i*s;
! buffer[i] = static_cast<float>(getValue(f)*amplitude + offset);
}
if (periodic) {
s = 1.0 / n;
for (i=0; i<n/2; i++) {
! float f = static_cast<float>(0.5 + i*s);
float a = buffer[i];
float b = buffer[n-i-1];
|
|
From: <de...@us...> - 2003-03-28 19:05:23
|
Update of /cvsroot/csp/APPLICATIONS/SimData/Include/SimData
In directory sc8-pr-cvs1:/tmp/cvs-serv15548
Modified Files:
Interpolate.h
Log Message:
no message
Index: Interpolate.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/Interpolate.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Interpolate.h 26 Mar 2003 05:08:02 -0000 1.3
--- Interpolate.h 28 Mar 2003 19:05:20 -0000 1.4
***************
*** 42,46 ****
--- 42,48 ----
#include <vector>
#include <cstdio>
+
#include <SimData/Enum.h>
+ #include <SimData/Export.h>
***************
*** 63,67 ****
* @author Mark Rose <mr...@st...>
*/
! class InterpolatedData: public BaseType {
/*
--- 65,69 ----
* @author Mark Rose <mr...@st...>
*/
! class SIMDATA_EXPORT InterpolatedData: public BaseType {
/*
***************
*** 138,142 ****
* @author Mark Rose <mr...@st...>
*/
! class Table: public InterpolatedData {
public:
--- 140,144 ----
* @author Mark Rose <mr...@st...>
*/
! class SIMDATA_EXPORT Table: public InterpolatedData {
public:
|
|
From: <de...@us...> - 2003-03-28 19:05:05
|
Update of /cvsroot/csp/APPLICATIONS/SimData
In directory sc8-pr-cvs1:/tmp/cvs-serv15325
Modified Files:
setup.py
Log Message:
no message
Index: setup.py
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/SimData/setup.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** setup.py 27 Mar 2003 03:43:29 -0000 1.12
--- setup.py 28 Mar 2003 19:04:57 -0000 1.13
***************
*** 37,48 ****
if len(sys.argv) == 2:
! command = sys.argv[1]
! if command == "check_version":
! old = sys.version[:5] < min_python_version
! if old:
! print >>sys.stderr, "SimData requires Python version %s or higher. (current version is %s)" % \
! (min_python_version, sys.version[:5])
! sys.exit(old)
!
from distutils.core import setup
from distutils.core import Extension
--- 37,48 ----
if len(sys.argv) == 2:
! command = sys.argv[1]
! if command == "check_version":
! old = sys.version[:5] < min_python_version
! if old:
! print >>sys.stderr, "SimData requires Python version %s or higher. (current version is %s)" % \
! (min_python_version, sys.version[:5])
! sys.exit(old)
!
from distutils.core import setup
from distutils.core import Extension
***************
*** 118,189 ****
class build_swig_ext(build_ext):
!
! swig_options = ''
! def build_extension(self, ext):
! self.ext = ext
! build_ext.build_extension(self, ext)
!
! def swig_sources (self, sources):
! """Walk the list of source files in 'sources', looking for SWIG
! interface (.i) files. Run SWIG on all that are found, and
! return a modified 'sources' list with SWIG source files replaced
! by the generated C (or C++) files.
! """
! new_sources = []
! swig_sources = []
! swig_targets = {}
! # XXX this drops generated C/C++ files into the source tree, which
! # is fine for developers who want to distribute the generated
! # source -- but there should be an option to put SWIG output in
! # the temp dir.
! self.swig_cpp = 1
! if self.swig_cpp:
! target_ext = '.cpp'
! else:
! target_ext = '.c'
! for source in sources:
! (base, ext) = os.path.splitext(source)
! if ext == ".i": # SWIG interface file
! new_sources.append(base + target_ext)
! swig_sources.append(source)
! swig_targets[source] = new_sources[-1]
! else:
! new_sources.append(source)
! if not swig_sources:
! return new_sources
! swig = self.find_swig()
! swig_cmd = [swig, "-python", "-c++"] + build_swig_ext.options.split()
!
! if 1 or self.inplace:
! fullname = self.get_ext_fullname(self.ext.name)
! modpath = string.split(fullname, '.')
! package = string.join(modpath[0:-1], '.')
! base = modpath[-1]
! build_py = self.get_finalized_command('build_py')
! package_dir = build_py.get_package_dir(package)
! else:
! package_dir = self.build_lib
! for source in swig_sources:
! target = swig_targets[source]
! self.announce("swigging %s to %s" % (source, target))
! self.spawn(swig_cmd + ["-o", target, source])
! (base, ext) = os.path.splitext(source)
! proxy_full = base + '.py'
! proxy = os.path.basename(proxy_full)
! proxy_lib = os.path.join(self.build_lib, os.path.join(package_dir, proxy))
! print proxy_full, "=>", proxy_lib
! os.rename(proxy_full, proxy_lib)
! return new_sources
orig_build_ext = build_ext
--- 118,189 ----
class build_swig_ext(build_ext):
!
! swig_options = ''
! def build_extension(self, ext):
! self.ext = ext
! build_ext.build_extension(self, ext)
!
! def swig_sources (self, sources):
! """Walk the list of source files in 'sources', looking for SWIG
! interface (.i) files. Run SWIG on all that are found, and
! return a modified 'sources' list with SWIG source files replaced
! by the generated C (or C++) files.
! """
! new_sources = []
! swig_sources = []
! swig_targets = {}
! # XXX this drops generated C/C++ files into the source tree, which
! # is fine for developers who want to distribute the generated
! # source -- but there should be an option to put SWIG output in
! # the temp dir.
! self.swig_cpp = 1
! if self.swig_cpp:
! target_ext = '.cpp'
! else:
! target_ext = '.c'
! for source in sources:
! (base, ext) = os.path.splitext(source)
! if ext == ".i": # SWIG interface file
! new_sources.append(base + target_ext)
! swig_sources.append(source)
! swig_targets[source] = new_sources[-1]
! else:
! new_sources.append(source)
! if not swig_sources:
! return new_sources
! swig = self.find_swig()
! swig_cmd = [swig, "-python", "-c++"] + build_swig_ext.options.split()
!
! if 1 or self.inplace:
! fullname = self.get_ext_fullname(self.ext.name)
! modpath = string.split(fullname, '.')
! package = string.join(modpath[0:-1], '.')
! base = modpath[-1]
! build_py = self.get_finalized_command('build_py')
! package_dir = build_py.get_package_dir(package)
! else:
! package_dir = self.build_lib
! for source in swig_sources:
! target = swig_targets[source]
! self.announce("swigging %s to %s" % (source, target))
! self.spawn(swig_cmd + ["-o", target, source])
! (base, ext) = os.path.splitext(source)
! proxy_full = base + '.py'
! proxy = os.path.basename(proxy_full)
! proxy_lib = os.path.join(self.build_lib, os.path.join(package_dir, proxy))
! print proxy_full, "=>", proxy_lib
! os.rename(proxy_full, proxy_lib)
! return new_sources
orig_build_ext = build_ext
***************
*** 191,303 ****
if os.name == "posix":
! # changes the compiler from gcc to g++
! from distutils import sysconfig
! save_init_posix = sysconfig._init_posix
! def gpp_init_posix():
! print 'gpp_init_posix: changing gcc to g++'
! save_init_posix()
! g = sysconfig._config_vars
! g['CC'] = 'g++'
! g['LDSHARED'] = 'g++ -shared'
! sysconfig._init_posix = gpp_init_posix
sources = [
! "BaseType",
! "DataArchive",
! "Date",
! "Enum",
! "Exception",
! "External",
! "GeoPos",
! "HashUtility",
! "InterfaceRegistry",
! "Interpolate",
! "List",
! "LogStream",
! "Math",
! "Matrix3",
! "Object",
! "Noise",
! "Pack",
! "Path",
! "Quaternion",
! "Random",
! "Real",
! "TypeAdapter",
! "Vector3",
! "Version",
]
headers = [
! "BaseType.h",
! "Conversions.h",
! "DataArchive.h",
! "Date.h",
! "Enum.h",
! "Exception.h",
! "Export.h",
! "External.h",
! "GeoPos.h",
! "GlibCsp.h",
! "hash_map.h",
! "HashUtility.h",
! "Integer.h",
! "InterfaceRegistry.h",
! "Interpolate.h",
! "List.h",
! "Log.h",
! "LogStream.h",
! "Math.h",
! "Matrix3.h",
! "Noise.h",
! "ns-simdata.h",
! "Object.h",
! "ObjectInterface.h",
! "Pack.h",
! "Path.h",
! "Quaternion.h",
! "Random.h",
! "Real.h",
! "String.h",
! "TypeAdapter.h",
! "Types.h",
! "Vector3.h",
! "Vector3.inl",
! "Version.h",
]
interfaces = [
! "cSimData.i",
! "BaseType.i",
! "Conversions.i",
! "DataArchive.i",
! "Date.i",
! "Enum.i",
! "Exception.i",
! "External.i",
! "filemap.i",
! "GeoPos.i",
! "HashUtility.i",
! "InterfaceRegistry.i",
! "Interpolate.i",
! "List.i",
! "Log.i",
! "Math.i",
! "Matrix3.i",
! "Noise.i",
! "Object.i",
! "Pack.i",
! "Path.i",
! "Random.i",
! "Real.i",
! "String.i",
! "Types.i",
! "vector.i",
! "Vector3.i",
]
def fullpath(path, ext, list):
! return map(lambda x: path+x+ext, list)
main_interface = ["cSimData.i"]
--- 191,303 ----
if os.name == "posix":
! # changes the compiler from gcc to g++
! from distutils import sysconfig
! save_init_posix = sysconfig._init_posix
! def gpp_init_posix():
! print 'gpp_init_posix: changing gcc to g++'
! save_init_posix()
! g = sysconfig._config_vars
! g['CC'] = 'g++'
! g['LDSHARED'] = 'g++ -shared'
! sysconfig._init_posix = gpp_init_posix
sources = [
! "BaseType",
! "DataArchive",
! "Date",
! "Enum",
! "Exception",
! "External",
! "GeoPos",
! "HashUtility",
! "InterfaceRegistry",
! "Interpolate",
! "List",
! "LogStream",
! "Math",
! "Matrix3",
! "Object",
! "Noise",
! "Pack",
! "Path",
! "Quaternion",
! "Random",
! "Real",
! "TypeAdapter",
! "Vector3",
! "Version",
]
headers = [
! "BaseType.h",
! "Conversions.h",
! "DataArchive.h",
! "Date.h",
! "Enum.h",
! "Exception.h",
! "Export.h",
! "External.h",
! "GeoPos.h",
! "GlibCsp.h",
! "hash_map.h",
! "HashUtility.h",
! "Integer.h",
! "InterfaceRegistry.h",
! "Interpolate.h",
! "List.h",
! "Log.h",
! "LogStream.h",
! "Math.h",
! "Matrix3.h",
! "Noise.h",
! "ns-simdata.h",
! "Object.h",
! "ObjectInterface.h",
! "Pack.h",
! "Path.h",
! "Quaternion.h",
! "Random.h",
! "Real.h",
! "String.h",
! "TypeAdapter.h",
! "Types.h",
! "Vector3.h",
! "Vector3.inl",
! "Version.h",
]
interfaces = [
! "cSimData.i",
! "BaseType.i",
! "Conversions.i",
! "DataArchive.i",
! "Date.i",
! "Enum.i",
! "Exception.i",
! "External.i",
! "filemap.i",
! "GeoPos.i",
! "HashUtility.i",
! "InterfaceRegistry.i",
! "Interpolate.i",
! "List.i",
! "Log.i",
! "Math.i",
! "Matrix3.i",
! "Noise.i",
! "Object.i",
! "Pack.i",
! "Path.i",
! "Random.i",
! "Real.i",
! "String.i",
! "Types.i",
! "vector.i",
! "Vector3.i",
]
def fullpath(path, ext, list):
! return map(lambda x: path+x+ext, list)
main_interface = ["cSimData.i"]
***************
*** 316,344 ****
if len(sys.argv)>=2:
! command = sys.argv[1]
! if command.startswith("make_install"):
! make_install(command.endswith("win"), sys.argv[2:])
! if command == "python_include_path":
! print sysconfig.get_python_inc()
! sys.exit(0)
cSimData = Extension("SimData._cSimData",
sources + main_interface_fullpath,
! include_dirs = includes,
! define_macros = defines,
! libraries = libraries,
! extra_compile_args = cflags,
! )
setup(name="SimData",
version=VERSION,
! description="Simulation Data Abstraction Library",
author="Mark Rose",
author_email="mr...@st...",
url="http://csp.sourceforge.net/wiki/",
packages=['SimData'],
! headers = headers_fullpath + interfaces_fullpath + main_interface_fullpath,
! ext_modules = [cSimData],
! )
!
!
--- 316,342 ----
if len(sys.argv)>=2:
! command = sys.argv[1]
! if command.startswith("make_install"):
! make_install(command.endswith("win"), sys.argv[2:])
! if command == "python_include_path":
! print sysconfig.get_python_inc()
! sys.exit(0)
cSimData = Extension("SimData._cSimData",
sources + main_interface_fullpath,
! include_dirs = includes,
! define_macros = defines,
! libraries = libraries,
! extra_compile_args = cflags,
! )
setup(name="SimData",
version=VERSION,
! description="Simulation Data Abstraction Library",
author="Mark Rose",
author_email="mr...@st...",
url="http://csp.sourceforge.net/wiki/",
packages=['SimData'],
! headers = headers_fullpath + interfaces_fullpath + main_interface_fullpath,
! ext_modules = [cSimData],
! )
|
|
From: <de...@us...> - 2003-03-28 19:04:32
|
Update of /cvsroot/csp/APPLICATIONS/SimData
In directory sc8-pr-cvs1:/tmp/cvs-serv15147
Modified Files:
CHANGES.current
Log Message:
no message
Index: CHANGES.current
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/SimData/CHANGES.current,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** CHANGES.current 28 Mar 2003 11:18:28 -0000 1.16
--- CHANGES.current 28 Mar 2003 19:04:28 -0000 1.17
***************
*** 2,5 ****
--- 2,13 ----
===========================
+ 2003-03-28: delta
+ updated .net project (release mode is maintained)
+
+ Once SimData is compiled, in command line, write:
+ setup.py make_install_win
+ from APPLICATIONS/SimData to copy all headers and binaries needed
+ for csp.
+
2003-03-27: onsight
Added push_back() methods for int, double, and string to
***************
*** 28,33 ****
directives. Still more to be done.
! *** ANY MSVC USERS: PLEASE UPDATE THE PROJECT FILE TO INCLUDE ***
! *** NOISE.CPP AND REAL.CPP, AND REMOVE SPREAD.CPP ***
2003-03-25: onsight
--- 36,43 ----
directives. Still more to be done.
! 2003-03-26: delta
! Removed Spread.cpp and added Noise.cpp and Real.cpp
!
! Added export symbol to Table and InterpolatedData classes.
2003-03-25: onsight
|
|
From: <mk...@us...> - 2003-03-28 18:49:06
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Bin
In directory sc8-pr-cvs1:/tmp/cvs-serv8588
Modified Files:
CompileData.py
Log Message:
Index: CompileData.py
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Bin/CompileData.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CompileData.py 27 Mar 2003 22:59:39 -0000 1.1
--- CompileData.py 28 Mar 2003 18:48:59 -0000 1.2
***************
*** 1,4 ****
import sys
- sys.path = ['../Source'] + sys.path
sys.argv.append("--compile-data")
--- 1,3 ----
|
|
From: <mk...@us...> - 2003-03-28 18:39:54
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Bin
In directory sc8-pr-cvs1:/tmp/cvs-serv4902
Modified Files:
RebuildData.py
Log Message:
Index: RebuildData.py
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Bin/RebuildData.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** RebuildData.py 27 Mar 2003 22:59:39 -0000 1.1
--- RebuildData.py 28 Mar 2003 18:39:48 -0000 1.2
***************
*** 1,4 ****
import sys
- sys.path = ['../Source'] + sys.path
sys.argv.append("--compile-data")
--- 1,3 ----
|
|
From: <mk...@us...> - 2003-03-28 18:19:42
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Bin In directory sc8-pr-cvs1:/tmp/cvs-serv29052 Removed Files: Console.py Log Message: --- Console.py DELETED --- |
|
From: <mk...@us...> - 2003-03-28 18:18:29
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Source
In directory sc8-pr-cvs1:/tmp/cvs-serv28518
Added Files:
cCSP.i
Log Message:
--- NEW FILE: cCSP.i ---
%module cCSP
%{
#include <SimData/HashUtility.h>
#include <SimData/Exception.h>
#include <SimData/Types.h>
#include <SimData/DataArchive.h>
#include <SimData/InterfaceRegistry.h>
#include "CSPSim.h"
%}
%include exception.i
%include std_string.i
%include std_vector.i
%import "SimData/cSimData.i"
%include "VirtualBattlefield.i"
%include "CSPSim.i"
//%include "SimpleConfig.i"
%include "Config.i"
/*
%include "SimObject.i"
%include "SimTankObject.i"
%include "AeroDynamics.i"
%include "TerrainObject.i"
*/
|
|
From: <mk...@us...> - 2003-03-28 18:17:47
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Source In directory sc8-pr-cvs1:/tmp/cvs-serv28141 Removed Files: CSP.i CSPSim.py Shell.py ShellEnvironment.py Log Message: --- CSP.i DELETED --- --- CSPSim.py DELETED --- --- Shell.py DELETED --- --- ShellEnvironment.py DELETED --- |
|
From: <mk...@us...> - 2003-03-28 18:03:40
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Source In directory sc8-pr-cvs1:/tmp/cvs-serv22192 Modified Files: Makefile.in Log Message: Index: Makefile.in =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/Makefile.in,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Makefile.in 26 Mar 2003 10:21:38 -0000 1.7 --- Makefile.in 28 Mar 2003 18:03:34 -0000 1.8 *************** *** 1,4 **** --- 1,6 ---- TOPDIR = .. + BIN = $(TOPDIR)/Bin + #SUBDIRS = FX *************** *** 63,67 **** MKDEP = $(CXX) -M $(CFLAGS) SWDEP = $(SWIG) -M $(SWOPTS) ! DEPFILES = $(addprefix $(DEPDIR)/,$(addsuffix .d, $(SOURCES))) $(DEPDIR)/CSP.i.swigdep DEPFILTER = DEPS_MAGIC := $(shell mkdir $(DEPDIR) > /dev/null 2>&1 || :) --- 65,69 ---- MKDEP = $(CXX) -M $(CFLAGS) SWDEP = $(SWIG) -M $(SWOPTS) ! DEPFILES = $(addprefix $(DEPDIR)/,$(addsuffix .d, $(SOURCES))) $(DEPDIR)/cCSP.i.swigdep DEPFILTER = DEPS_MAGIC := $(shell mkdir $(DEPDIR) > /dev/null 2>&1 || :) *************** *** 75,79 **** rm -f $(SOURCES:%.cpp=%.o) rm -f lib*.a ! rm -f _CSP.so CSP_wrap.* rm -f $(DEPDIR)/*.d --- 77,81 ---- rm -f $(SOURCES:%.cpp=%.o) rm -f lib*.a ! rm -f $(BIN)/_cCSP.so $(BIN)/cCSP.py cCSP_wrap.* rm -f $(DEPDIR)/*.d *************** *** 109,122 **** @$(SWDEP) $(DEPFILTER) -o $(<:.i=_wrap.cpp) $< > $@ ! _CSP.so: $(OBJECTS) CSP_wrap.o ! $(CXX) $(LDOPTS) -o$@ $^ $(LIBS) CSPapp: $(OBJECTS) main.o $(CXX) -lswigpy -lpython2.2 -o$@ $^ $(LIBS) ! CSP_wrap.cpp: CSP.i $(SWIG) $(SWOPTS) -o $@ $< ! CSP_wrap.o: CSP_wrap.cpp $(CXX) -c $(SWCXXF) $(@:.o=.cpp) --- 111,125 ---- @$(SWDEP) $(DEPFILTER) -o $(<:.i=_wrap.cpp) $< > $@ ! _cCSP.so: $(OBJECTS) cCSP_wrap.o ! $(CXX) $(LDOPTS) -o$(BIN)/$@ $^ $(LIBS) CSPapp: $(OBJECTS) main.o $(CXX) -lswigpy -lpython2.2 -o$@ $^ $(LIBS) ! cCSP_wrap.cpp: cCSP.i $(SWIG) $(SWOPTS) -o $@ $< + mv cCSP.py $(BIN) ! cCSP_wrap.o: cCSP_wrap.cpp $(CXX) -c $(SWCXXF) $(@:.o=.cpp) *************** *** 130,133 **** cd $(TOPDIR) && ./configure ! all: Makefile build-subdirs _CSP.so #CSPapp --- 133,136 ---- cd $(TOPDIR) && ./configure ! all: Makefile build-subdirs _cCSP.so #CSPapp |
|
From: <mk...@us...> - 2003-03-28 11:24:39
|
Update of /cvsroot/csp/APPLICATIONS/SimData/Include/SimData
In directory sc8-pr-cvs1:/tmp/cvs-serv17793/Include/SimData
Modified Files:
InterfaceRegistry.h
Log Message:
Index: InterfaceRegistry.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/SimData/Include/SimData/InterfaceRegistry.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** InterfaceRegistry.h 21 Mar 2003 18:23:38 -0000 1.11
--- InterfaceRegistry.h 28 Mar 2003 11:18:28 -0000 1.12
***************
*** 115,118 ****
--- 115,127 ----
self->set(p, name, TypeAdapter(v));
}
+ virtual void push_back(Object *p, const char *name, const char *v) {
+ self->push_back(p, name, TypeAdapter(v));
+ }
+ virtual void push_back(Object *p, const char *name, int v) {
+ self->push_back(p, name, TypeAdapter(v));
+ }
+ virtual void push_back(Object *p, const char *name, double v) {
+ self->push_back(p, name, TypeAdapter(v));
+ }
virtual void push_back(Object *p, const char *name, const BaseType &v) {
self->push_back(p, name, TypeAdapter(v));
|
|
From: <mk...@us...> - 2003-03-28 11:18:36
|
Update of /cvsroot/csp/APPLICATIONS/SimData
In directory sc8-pr-cvs1:/tmp/cvs-serv17793
Modified Files:
CHANGES.current
Log Message:
Index: CHANGES.current
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/SimData/CHANGES.current,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** CHANGES.current 27 Mar 2003 10:37:06 -0000 1.15
--- CHANGES.current 28 Mar 2003 11:18:28 -0000 1.16
***************
*** 2,5 ****
--- 2,11 ----
===========================
+ 2003-03-27: onsight
+ Added push_back() methods for int, double, and string to
+ InterfaceRegistry. These are needed for XML <List>'s of these
+ basic types. Lists of objects derived from BaseType already
+ worked.
+
2003-03-26: onsight
Modified setup.py to byte compile the python scripts during
|
|
From: <mk...@us...> - 2003-03-27 22:59:44
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim
In directory sc8-pr-cvs1:/tmp/cvs-serv23034
Modified Files:
CHANGES.current
Log Message:
Index: CHANGES.current
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/CHANGES.current,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** CHANGES.current 27 Mar 2003 03:37:11 -0000 1.9
--- CHANGES.current 27 Mar 2003 22:59:38 -0000 1.10
***************
*** 1,4 ****
--- 1,17 ----
Version 0.3.1 (in progress)
===========================
+ 2003-03-27: onsight
+ Created Bin directory and moved all Python scripts and
+ libraries there.
+
+ Renamed CSP.i, CSP.py, _CSP.so/dll to cCSP to avoid confusion
+ as to which is the real application to run the sim. To run
+ the sim now, change to Bin and run CSPSim.py (or, under
+ Windows, run 'python CSPSim.py' or double-click on CSPSim.py).
+ The Linux Makefile is updated but the Windows project file
+ still needs to be changed.
+
+ Removed references to x36.map from gamescreen-core.map.
+
2003-03-26: onsight
Reorganized the Tools/HID directory. The "standard" maps are
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Bin
In directory sc8-pr-cvs1:/tmp/cvs-serv23034/Bin
Added Files:
CSPSim.py CompileData.py Console.py RebuildData.py Shell.py
ShellEnvironment.py
Log Message:
--- NEW FILE: CSPSim.py ---
#!/usr/bin/python -O
import sys, os.path
#import Shell
#from SimData.Compile import Compiler, CompilerUsageError
# enable lazy loading of shared library modules if available
if hasattr(sys, "setdlopenflags"):
sys.setdlopenflags(0x101)
def printUsage():
print "Combat Simulator Project - CSPSim"
print
print " Primary options:"
print " --compile-data run the data compiler"
print " --config=path path to config (.ini) file"
print " --help help message"
def runCSPSim(args):
if len(args):
print "Unrecognized option '%s'" % args[0]
print
printUsage()
print
sys.exit(1)
datapath = CSP.getDataPath()
dar = os.path.join(datapath, "Sim.dar")
if not os.path.exists(dar):
print
print "Static data archive '%s' not found." % dar
compileData([])
import Shell
app = CSP.CSPSim()
app.init()
app.setShell(Shell.Shell())
app.run()
app.cleanup()
print "CSPSim normal exit."
def compileData(args):
datapath = CSP.getDataPath()
dar = os.path.join(datapath, "Sim.dar")
XML = os.path.join(datapath, "XML")
#print "compile %s %s" % (XML, dar)
try:
from SimData.Compile import Compiler, CompilerUsageError
except:
print
print "ERROR: unable to load the SimData data compiler module."
print
print "Please verify the SimData has been installed correctly in your Python"
print "site-local directory. See the SimData README file for instructions."
print
sys.exit(1)
compiler = Compiler()
try:
compiler.parse([""] + args + [XML, dar])
except CompilerUsageError, e:
if e.getMessage():
print e
printUsage()
print
compiler.printUsage()
print
sys.exit(1)
compiler.compileAll()
print
action = None
config = "../Data/CSPSim.ini"
if os.path.exists("CSPSim.ini") or not os.path.exists(config):
config = "CSPSim.ini"
# process command line options
program = sys.argv[0]
all_args = sys.argv[1:]
other_args = []
for arg in all_args:
if arg == '--compile-data':
action = compileData
elif arg in ("--help", "-h", "-help"):
if action == None:
print
printUsage()
print
sys.exit(1)
else:
other_args.append(arg)
elif arg.startswith("--config="):
config = arg[9:]
else:
other_args.append(arg)
if action is None:
action = runCSPSim
# load simdata
try:
import SimData
except Exception, e:
msg = str(e)
if len(msg) > 60:
msg = msg.replace(": ", ":\n ")
print """
ERROR: Unable to import SimData.
%s
""" % msg,
if str(e).find("symbol") >= 0:
print """
Unresolved symbols often indicate missing libraries or improper link options.
""",
print """
Please verify that SimData has been properly installed on your system. See
the README file in the SimData distribution for details.
"""
sys.exit(1)
SimData.log().set_output("SimData.log")
SimData.log().setLogLevels(SimData.LOG_ALL, SimData.LOG_DEBUG)
try:
import cCSP as CSP
except Exception, e:
msg = str(e)
if len(msg) > 60:
msg = msg.replace(": ", ":\n ")
print """
ERROR: Unable to import cCSP.py
%s
""" % msg,
if str(e).find("No module named") >= 0:
print """
Some required files appear to be missing. Please verify that you have
successfully built CSPSim. See the README for details. If you are
still having trouble, ask for help on the forums at
http://csp.sourceforge.net/forum
"""
else:
print """
See the README files for additional information. If you are still having
trouble, ask for help on the forums at
http://csp.sourceforge.net/forum
"""
sys.exit(1)
SimData.log().setLogLevels(SimData.LOG_ALL, SimData.LOG_ALERT)
if not CSP.openConfig(config):
print "Unable to open primary configuration file (%s)" % config
sys.exit(0)
action(other_args)
--- NEW FILE: CompileData.py ---
import sys
sys.path = ['../Source'] + sys.path
sys.argv.append("--compile-data")
import CSPSim
--- NEW FILE: Console.py ---
import Tkinter, CSP
import traceback, sys
import threading
class Scrolled:
def __init__(self, barx, bary):
self.barx = barx
self.bary = bary
if barx is not None:
barx['command'] = self.__scrollXHandler
self["xscrollcommand"] = barx.set
if bary is not None:
bary['command'] = self.__scrollYHandler
self["yscrollcommand"] = bary.set
def __scrollXHandler(self, *L):
op, count = L[0], L[1]
if op == "scroll":
units = L[2]
self.xview_scroll(count, units)
else:
self.xview_moveto(count)
def __scrollYHandler(self, *L):
op, count = L[0], L[1]
if op == "scroll":
units = L[2]
self.yview_scroll(count, units)
else:
self.yview_moveto(count)
class SmartEntry(Tkinter.Entry, Scrolled):
def __init__(self, barx, bary, hwindow, *args, **opts):
Tkinter.Entry.__init__(self, *args, **opts)
Scrolled.__init__(self, barx, bary)
self.hwindow = hwindow
self.contents = Tkinter.StringVar()
self["textvariable"] = self.contents
self.bind('<Up>', self.up)
self.bind('<Down>', self.down)
self.bind('<Key-Return>', self.enter)
self.history=['']
self.idx = 0
self.command = ''
self.cb = None
def setCallback(self, cb):
self.cb = cb
def getCommand(self):
return self.command
def save(self):
if self.idx == 0:
self.history[-1] = self.contents.get()
def enter(self, event):
self.command = self.contents.get()
self.idx = 0
if len(self.command) > 0:
self.idx = 0
self.save()
self.hwindow.add(">>> " + self.command)
self.history.append('')
self.contents.set('')
if self.cb is not None:
self.cb(self)
def jump(self, idx):
if idx >= 0 and idx < len(self.history):
self.idx = idx
command = self.history[-1-idx]
self.contents.set(command)
self.icursor(len(command))
def up(self, event):
self.save()
self.jump(self.idx + 1)
def down(self, event):
self.jump(self.idx - 1)
class History(Tkinter.Text, Scrolled):
def __init__(self, barx, bary, *args, **opts):
Tkinter.Text.__init__(self, *args, **opts)
Scrolled.__init__(self, barx, bary)
def add(self, line):
self['state'] = Tkinter.NORMAL
self.insert(Tkinter.END, line+"\n")
self['state'] = Tkinter.DISABLED
self.see(Tkinter.END)
font = ("Courier", "14")
class TkThread(threading.Thread):
def __init__(self, sim):
threading.Thread.__init__(self)
self.sim = sim
def __del__(self):
print dir(self)
print self.__dict__
print "~THREAD"
def run(self):
self.build()
self.toplevel.deiconify()
self.toplevel.mainloop()
self.toplevel.withdraw()
self.clean()
self.sim.endConsole()
print "THREAD COMPLETE."
def clean(self):
self.toplevel.destroy()
self.root.destroy()
del self.root
del self.toplevel
del self.frame
del self.entry
del self.history
def build(self):
self.root = Tkinter.Tk()
self.root.withdraw()
self.toplevel = Tkinter.Toplevel()
self.toplevel.protocol("WM_DELETE_WINDOW", self.exit)
self.frame = Tkinter.Frame(self.toplevel)
self.frame.master.title("CSP Console")
self.frame.pack(expand=1, fill="both")
frame = Tkinter.Frame(self.frame)
frame.pack(expand=1, fill="both")
scroll = Tkinter.Scrollbar(frame, orient=Tkinter.VERTICAL)
self.history = History(None, scroll, frame, height=20, width=80, state=Tkinter.DISABLED, takefocus=0, selectbackground="blue", selectforeground="white")
self.history.pack(expand=1, side='left', fill="both")
scroll.pack(side='right', expand=0, fill="y")
frame = Tkinter.Frame(self.frame)
frame.pack(expand=0, fill="both")
scroll = Tkinter.Scrollbar(frame, orient=Tkinter.HORIZONTAL)
self.entry = SmartEntry(scroll, None, self.history, frame, width=80, bg="white")
self.entry.bind('<Escape>', self.exit)
self.entry.pack(side='top', fill="x")
self.entry.setCallback(self.do)
scroll.pack(side='bottom', fill="x")
self.locals = {}
def do(self, entry):
command = entry.getCommand()
if command.strip() == "quit":
self.exit()
return
gl = CSP.__dict__
try:
self.history.add(str(eval(command, gl, self.locals)))
except:
try:
exec(command, gl, self.locals)
except:
msg = ''.join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2]))
self.history.add(msg)
def exit(self, *args):
#print self.entry.contents.get()
self.frame.quit()
class Console:
def __init__(self, sim):
self.sim = sim
def run(self):
thread = TkThread(self.sim)
thread.start()
print "THREAD STARTED."
if __name__ == "__main__":
Console().run()
--- NEW FILE: RebuildData.py ---
import sys
sys.path = ['../Source'] + sys.path
sys.argv.append("--compile-data")
sys.argv.append("--rebuild")
import CSPSim
--- NEW FILE: Shell.py ---
import traceback, sys
class Shell:
def __init__(self):
import ShellEnvironment
self.locals = ShellEnvironment.__dict__
self.globals = ShellEnvironment.__dict__
def run(self, command):
result = ""
try:
result = eval(command, self.globals, self.locals)
if result is None:
result = ""
else:
result = str(result)
except:
try:
exec(command, self.globals, self.locals)
except:
msg = ''.join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2]))
result = msg
return result.strip()
--- NEW FILE: ShellEnvironment.py ---
import cCSP as CSP
theSim = CSP.cvar.CSPSim_theSim
copyright = """
Combat Simulator Project - FlightSim Demo
Copyright (C) 2002 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.
"""
quit = "Press <ESC> to exit the shell."
exit = quit
help = """The help system is not yet implemented.
To get you started, you can use up and down arrows to move
through the command history. The builtin dir() command
lists items defined in the local namespace. You can also
type dir(object) to see methods and variable that object
defines. When you are done, press <ESC> to exit the shell."""
|