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: <mk...@us...> - 2003-07-24 04:57:40
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Tools/Recorder In directory sc8-pr-cvs1:/tmp/cvs-serv3478/Recorder Log Message: Directory /cvsroot/csp/APPLICATIONS/CSPSim/Tools/Recorder added to the repository |
|
From: <mk...@us...> - 2003-07-24 04:55:59
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim In directory sc8-pr-cvs1:/tmp/cvs-serv3248 Modified Files: CHANGES.current Log Message: Index: CHANGES.current =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/CHANGES.current,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** CHANGES.current 23 Jul 2003 07:11:56 -0000 1.56 --- CHANGES.current 24 Jul 2003 04:55:56 -0000 1.57 *************** *** 2,5 **** --- 2,18 ---- =========================== + 2003-07-23: onsight + Committed changes to GameScreen to enable toggling of + the DataRecorder. By default this function is mapped + to the 'r' key. The output goes to data-xxx.rec where + xxx is a sequential index starting at 000. A new + output file is started each time the recorder is + toggled. Use Tools/Recorder/RecCSP to convert the + .rec files into readable formats. + + Added "RECORD" indicator to ScreenInfoManager. + + Added 'r' key binding to gamescreen-core.map + 2003-07-22: onsight Increased the default window size to 800x600 so that |
|
From: <mk...@us...> - 2003-07-24 04:54:58
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Tools/HID/Maps In directory sc8-pr-cvs1:/tmp/cvs-serv2986/Maps Modified Files: gamescreen-core.map Log Message: Index: gamescreen-core.map =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Tools/HID/Maps/gamescreen-core.map,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gamescreen-core.map 18 Jul 2003 22:00:58 -0000 1.3 --- gamescreen-core.map 24 Jul 2003 04:54:55 -0000 1.4 *************** *** 32,35 **** --- 32,36 ---- map key:ESCAPE press QUIT map key:p press PAUSE + map key:r press TOGGLE_RECORDER map key:F12 press STATS map key:HOME press CONSOLE |
|
From: <mk...@us...> - 2003-07-24 04:47:51
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Source In directory sc8-pr-cvs1:/tmp/cvs-serv2120/Source Modified Files: ScreenInfoManager.cpp Log Message: Index: ScreenInfoManager.cpp =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/ScreenInfoManager.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ScreenInfoManager.cpp 19 Jun 2003 18:06:29 -0000 1.8 --- ScreenInfoManager.cpp 24 Jul 2003 04:47:48 -0000 1.9 *************** *** 34,41 **** --- 34,43 ---- osg::ref_ptr<Framerate> framerate = new Framerate(offsetpos,ScreenHeight - offsetpos); osg::ref_ptr<ScreenInfo> pause = new ScreenInfo(ScreenWidth-5*offsetpos,ScreenHeight-offsetpos,"PAUSE", "PAUSE"); + osg::ref_ptr<ScreenInfo> record = new ScreenInfo(ScreenWidth-15*offsetpos,ScreenHeight-offsetpos,"RECORD", "RECORD"); osg::ref_ptr<GeneralStats> generalStats = new GeneralStats(offsetpos, ScreenHeight / 3); rootNode->addChild(framerate.get()); rootNode->addChild(pause.get()); + rootNode->addChild(record.get()); rootNode->addChild(generalStats.get()); |
|
From: <mk...@us...> - 2003-07-24 04:41:49
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Include In directory sc8-pr-cvs1:/tmp/cvs-serv1209/Include Modified Files: GameScreen.h Log Message: Index: GameScreen.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/GameScreen.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** GameScreen.h 26 Jun 2003 09:25:45 -0000 1.10 --- GameScreen.h 24 Jul 2003 04:41:46 -0000 1.11 *************** *** 37,40 **** --- 37,41 ---- #include "ScreenInfoManager.h" #include "TerrainObject.h" + #include "DataRecorder.h" *************** *** 64,67 **** --- 65,69 ---- ACTION_INTERFACE(GameScreen, on_Quit); ACTION_INTERFACE(GameScreen, on_Pause); + ACTION_INTERFACE(GameScreen, on_ToggleRecorder); ACTION_INTERFACE(GameScreen, on_Stats); ACTION_INTERFACE(GameScreen, on_Console); *************** *** 122,128 **** TerrainObject::IntersectionHint m_CameraHint; ! /** ! * Text information ! */ osg::ref_ptr<ScreenInfoManager> m_ScreenInfoManager; osg::ref_ptr<osgUtil::SceneView> m_InfoView; --- 124,128 ---- TerrainObject::IntersectionHint m_CameraHint; ! // text information osg::ref_ptr<ScreenInfoManager> m_ScreenInfoManager; osg::ref_ptr<osgUtil::SceneView> m_InfoView; *************** *** 132,139 **** --- 132,144 ---- simdata::Ref<DynamicObject> m_ActiveObject; + // padlock testing simdata::Ref<DynamicObject> m_Padlock; float m_NeckPhi; float m_NeckTheta; bool m_NeckLimit; + + // data recorder + simdata::Ref<DataRecorder> m_DataRecorder; + void setRecorder(bool on); }; |
|
From: <mk...@us...> - 2003-07-24 04:41:49
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Source
In directory sc8-pr-cvs1:/tmp/cvs-serv1209/Source
Modified Files:
GameScreen.cpp
Log Message:
Index: GameScreen.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/GameScreen.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** GameScreen.cpp 30 Jun 2003 22:27:58 -0000 1.21
--- GameScreen.cpp 24 Jul 2003 04:41:46 -0000 1.22
***************
*** 79,82 ****
--- 79,83 ----
BIND_ACTION("QUIT", on_Quit);
BIND_ACTION("PAUSE", on_Pause);
+ BIND_ACTION("TOGGLE_RECORDER", on_ToggleRecorder);
BIND_ACTION("STATS", on_Stats);
BIND_ACTION("CONSOLE", on_Console);
***************
*** 210,213 ****
--- 211,215 ----
m_ScreenInfoManager->setName("ScreenInfoManager");
m_ScreenInfoManager->setStatus("PAUSE", CSPSim::theSim->isPaused());
+ m_ScreenInfoManager->setStatus("RECORD", false);
m_Console = new PyConsole(ScreenWidth, ScreenHeight);
***************
*** 237,240 ****
--- 239,243 ----
scene->setNearObject(m_ActiveObject, false);
}
+ setRecorder(false);
}
m_ActiveObject = object;
***************
*** 285,290 ****
static short i = 0;
setCamera(dt);
! if ((++i)%3 == 0)
m_InfoView->update();
}
--- 288,297 ----
static short i = 0;
setCamera(dt);
! if ((++i)%3 == 0) {
m_InfoView->update();
+ }
+ if (m_DataRecorder.valid()) {
+ m_DataRecorder->timeStamp(dt);
+ }
}
***************
*** 416,419 ****
--- 423,448 ----
CSPSim::theSim->togglePause();
m_ScreenInfoManager->setStatus("PAUSE", !m_ScreenInfoManager->getStatus("PAUSE"));
+ }
+
+ void GameScreen::setRecorder(bool on) {
+ if (on && !m_DataRecorder && m_ActiveObject.valid()) {
+ static int n = 0;
+ char fn[128];
+ sprintf(fn, "data-%03d.rec", n);
+ m_DataRecorder = new DataRecorder(fn);
+ m_ActiveObject->setDataRecorder(m_DataRecorder.get());
+ } else
+ if (!on && m_DataRecorder.valid()) {
+ if (m_ActiveObject.valid()) {
+ m_ActiveObject->setDataRecorder(NULL);
+ }
+ m_DataRecorder->close();
+ m_DataRecorder = NULL;
+ }
+ m_ScreenInfoManager->setStatus("RECORD", m_DataRecorder.valid());
+ }
+
+ void GameScreen::on_ToggleRecorder() {
+ setRecorder(!m_DataRecorder);
}
|
|
From: <mk...@us...> - 2003-07-23 07:12:00
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Source
In directory sc8-pr-cvs1:/tmp/cvs-serv7214/Source
Modified Files:
CSPSim.cpp TerrainObject.cpp VirtualScene.cpp
Log Message:
Index: CSPSim.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/CSPSim.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** CSPSim.cpp 23 Jul 2003 01:28:58 -0000 1.34
--- CSPSim.cpp 23 Jul 2003 07:11:57 -0000 1.35
***************
*** 275,278 ****
--- 275,285 ----
assert(m_Terrain.valid());
m_Terrain->activate();
+
+ // configure the atmosphere for the theater location
+ // this affects mean temperatures, and should not need
+ // to be updated for motion within a given theater.
+ double lat = m_Terrain->getCenter().latitude();
+ double lon = m_Terrain->getCenter().longitude();
+ m_Atmosphere.setPosition(lat, lon);
CSP_LOG(APP, DEBUG, "INIT:: scene");
***************
*** 305,308 ****
--- 312,316 ----
// create a test object (other objects can be created via TestObjects.py)
+ #if 0
CSP_LOG(APP, DEBUG, "INIT:: test vehicle");
***************
*** 337,340 ****
--- 345,349 ----
setActiveObject(ao);
+ #endif
CSP_LOG(APP, DEBUG, "INIT:: gamescreen");
***************
*** 456,463 ****
initTime(date);
- // XXX move this elsewhere
- double lat = simdata::DegreesToRadians(g_Config.getFloat("Testing", "Latitude", 0, true));
- double lon = simdata::DegreesToRadians(g_Config.getFloat("Testing", "Longitude", 0, true));
- m_Atmosphere.setPosition(lat, lon);
m_Atmosphere.setDate(date);
m_Atmosphere.reset();
--- 465,468 ----
Index: TerrainObject.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/TerrainObject.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** TerrainObject.cpp 30 Jun 2003 22:27:57 -0000 1.18
--- TerrainObject.cpp 23 Jul 2003 07:11:57 -0000 1.19
***************
*** 54,57 ****
--- 54,58 ----
m_Width = 0;
m_Height = 0;
+ m_Version = 0;
}
***************
*** 63,66 ****
--- 64,69 ----
{
Object::pack(p);
+ p.pack(m_Name);
+ p.pack(m_Version);
p.pack(m_Center);
p.pack(m_Width);
***************
*** 71,74 ****
--- 74,79 ----
{
Object::unpack(p);
+ p.unpack(m_Name);
+ p.unpack(m_Version);
p.unpack(m_Center);
p.unpack(m_Width);
***************
*** 78,83 ****
void TerrainObject::postCreate() {
! CSP_LOG(TERRAIN, INFO, "Terrain Center @ " << getCenter().asString());
! CSP_LOG(TERRAIN, INFO, "Terrain Size " << getWidth() << " x " << getHeight() << " m");
m_Map.set(getCenter(), getWidth(), getHeight());
}
--- 83,89 ----
void TerrainObject::postCreate() {
! CSP_LOG(TERRAIN, INFO, "Terrain " << m_Name << " (version " << m_Version << ")");
! CSP_LOG(TERRAIN, INFO, " center = " << getCenter().asString());
! CSP_LOG(TERRAIN, INFO, " size = " << getWidth() << " x " << getHeight() << " m");
m_Map.set(getCenter(), getWidth(), getHeight());
}
Index: VirtualScene.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/VirtualScene.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** VirtualScene.cpp 30 Jun 2003 22:27:57 -0000 1.9
--- VirtualScene.cpp 23 Jul 2003 07:11:57 -0000 1.10
***************
*** 417,432 ****
static float t = 0.0;
- /*
- // temporary testing purposes only
- static bool init = false;
- static float lat = 0.0;
- static float lon = 0.0;
- if (!init) {
- lat = simdata::DegreesToRadians(g_Config.getFloat("Testing", "Latitude", 0, true));
- lon = simdata::DegreesToRadians(g_Config.getFloat("Testing", "Longitude", 0, true));
- init = true;
- }
- */
-
if (m_SpinTheWorld || m_ResetTheWorld || (int(t) % 10) == 0 ||
(m_SkyPoint - m_Origin).LengthSquared() > 25.0e+6) {
--- 417,420 ----
***************
*** 443,447 ****
m_Sky->update(0.0, 0.0, CSPSim::theSim->getCurrentTime());
}
- //m_Sky->update(lat, lon, CSPSim::theSim->getCurrentTime());
// greenwich, england (for testing)
//m_Sky->update(0.8985, 0.0, CSPSim::theSim->getCurrentTime());
--- 431,434 ----
|
|
From: <mk...@us...> - 2003-07-23 07:12:00
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Include
In directory sc8-pr-cvs1:/tmp/cvs-serv7214/Include
Modified Files:
CSPSim.i TerrainObject.h
Log Message:
Index: CSPSim.i
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/CSPSim.i,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** CSPSim.i 23 Jul 2003 01:28:58 -0000 1.7
--- CSPSim.i 23 Jul 2003 07:11:57 -0000 1.8
***************
*** 79,82 ****
--- 79,83 ----
obj->setAttitude(q_attitude);
self->getBattlefield()->addUnit(obj);
+ if (!self->getActiveObject()) self->setActiveObject(obj);
}
void createVehicle(const char *path, simdata::LLA lla,
***************
*** 92,97 ****
--- 93,101 ----
obj->setAttitude(q_attitude);
self->getBattlefield()->addUnit(obj);
+ if (!self->getActiveObject()) self->setActiveObject(obj);
}
void setShell(PyObject *shell) { self->getShell()->bind(shell); }
+ std::string const &getTerrainName() { return self->getTheater()->getTerrain()->getName(); }
+ int getTerrainVersion() { return self->getTheater()->getTerrain()->getVersion(); }
}
Index: TerrainObject.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/TerrainObject.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** TerrainObject.h 19 Jul 2003 14:08:25 -0000 1.9
--- TerrainObject.h 23 Jul 2003 07:11:57 -0000 1.10
***************
*** 91,103 ****
void setHit(float ratio, simdata::Vector3 const &normal);
protected:
! bool _hit;
! float _ratio;
! simdata::Vector3 _start;
! simdata::Vector3 _end;
! simdata::Vector3 _point;
! simdata::Vector3 _normal;
};
BEGIN_SIMDATA_XML_VIRTUAL_INTERFACE(TerrainObject)
SIMDATA_XML("center", TerrainObject::m_Center, true)
SIMDATA_XML("width", TerrainObject::m_Width, true)
--- 91,105 ----
void setHit(float ratio, simdata::Vector3 const &normal);
protected:
! bool _hit;
! float _ratio;
! simdata::Vector3 _start;
! simdata::Vector3 _end;
! simdata::Vector3 _point;
! simdata::Vector3 _normal;
};
BEGIN_SIMDATA_XML_VIRTUAL_INTERFACE(TerrainObject)
+ SIMDATA_XML("name", TerrainObject::m_Name, true)
+ SIMDATA_XML("version", TerrainObject::m_Version, true)
SIMDATA_XML("center", TerrainObject::m_Center, true)
SIMDATA_XML("width", TerrainObject::m_Width, true)
***************
*** 122,125 ****
--- 124,129 ----
inline float getWidth() const { return m_Width; }
inline float getHeight() const { return m_Height; }
+ inline std::string const &getName() const { return m_Name; }
+ inline int getVersion() const { return m_Version; }
Projection const & getProjection() const { return m_Map; }
virtual simdata::Vector3 getOrigin(simdata::Vector3 const &) const = 0;
***************
*** 131,134 ****
--- 135,140 ----
float m_Width, m_Height;
Projection m_Map;
+ std::string m_Name;
+ int m_Version;
virtual void pack(simdata::Packer& p) const;
|
|
From: <mk...@us...> - 2003-07-23 07:12:00
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Data/XML/terrain In directory sc8-pr-cvs1:/tmp/cvs-serv7214/Data/XML/terrain Modified Files: balkan.xml Log Message: Index: balkan.xml =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Data/XML/terrain/balkan.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** balkan.xml 26 Jun 2003 09:31:34 -0000 1.3 --- balkan.xml 23 Jul 2003 07:11:57 -0000 1.4 *************** *** 2,5 **** --- 2,7 ---- <Object class="DemeterTerrain"> + <String name="name">Balkan Terrain</String> + <Int name="version">0</Int> <Int name="use_dynamic_textures">0</Int> <Int name="use_texture_compression">1</Int> |
|
From: <mk...@us...> - 2003-07-23 07:11:59
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Data In directory sc8-pr-cvs1:/tmp/cvs-serv7214/Data Modified Files: CSPSim.ini Log Message: Index: CSPSim.ini =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Data/CSPSim.ini,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** CSPSim.ini 23 Jul 2003 01:28:58 -0000 1.12 --- CSPSim.ini 23 Jul 2003 07:11:57 -0000 1.13 *************** *** 7,12 **** [Screen] ! Width = 640 ! Height = 480 FullScreen = 0 --- 7,12 ---- [Screen] ! Width = 800 ! Height = 600 FullScreen = 0 *************** *** 31,39 **** [Testing] Mute = true - Theater = sim:theater.balkan - Latitude = 43.43 - Longitude = 5.5 - Date = 2003-05-15 04:19:30 - Vehicle = sim:vehicles.aircraft.m2k MudBubbleRadius = 40000 AirBubbleRadius = 80000 --- 31,34 ---- *************** *** 41,52 **** ; balkan theater (demeter) ; northern CA theater (chunkedLod) ;Theater = sim:theater.nca - ;Latitude = 37.0 - ;Longitude = -122.0 ;Date = 2003-05-15 14:19:30 - - ;Vehicle = sim:vehicles.aircraft.m3c --- 36,45 ---- ; balkan theater (demeter) + Theater = sim:theater.balkan + Date = 2003-05-15 07:19:30 ; northern CA theater (chunkedLod) ;Theater = sim:theater.nca ;Date = 2003-05-15 14:19:30 |
|
From: <mk...@us...> - 2003-07-23 07:11:59
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Bin
In directory sc8-pr-cvs1:/tmp/cvs-serv7214/Bin
Modified Files:
CSPSim.py TestObjects.py
Log Message:
Index: CSPSim.py
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Bin/CSPSim.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** CSPSim.py 23 Jul 2003 01:48:22 -0000 1.8
--- CSPSim.py 23 Jul 2003 07:11:57 -0000 1.9
***************
*** 93,96 ****
--- 93,97 ----
def compileData(args):
+ datapath = CSP.getDataPath()
cachepath = CSP.getCachePath()
dar = os.path.join(cachepath, "sim.dar")
Index: TestObjects.py
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Bin/TestObjects.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TestObjects.py 22 Jul 2003 07:36:36 -0000 1.3
--- TestObjects.py 23 Jul 2003 07:11:57 -0000 1.4
***************
*** 19,33 ****
import SimData
def create(app):
v = SimData.Vector3
m = SimData.LLA()
vehicle = app.createVehicle
vehicle("sim:vehicles.aircraft.f16", v(10, 10, 1000.2), v(0, 100.0, 0), v(2.0, 2.0, 140.0))
# vehicle("sim:vehicles.aircraft.m2k", v(483010, 499010, 190.2), v(0, 100.0, 0), v(2.0, 2.0, 140.0))
# vehicle("sim:vehicles.aircraft.m2k", v(483025, 499015, 190.2), v(0, 100.0, 0), v(5.0, 0.0, 240.0))
# vehicle("sim:vehicles.aircraft.m2k", v(483040, 499020, 190.2), v(0, 100.0, 0), v(8.0, 1.0, 240.0))
# vehicle("sim:vehicles.aircraft.m2k", v(483055, 499025, 190.2), v(0, 100.0, 0), v(12.0, 3.0, 240.0))
-
# m.setDegrees(37.5, -121.0, 600)
--- 19,58 ----
import SimData
+ ##
+ # Create some test vehicles and other objects. The first vehicle created
+ # will be the initial active object.
+ #
+ # The create() method checks the terrain name (set in XML) and dispatches
+ # the appropriate object creation routine. This is a temporary hack until
+ # the theater code is developed to the point that objects are generated
+ # automatically via a campaign engine.
+
def create(app):
+ terrain = app.getTerrainName()
+ if terrain == "Balkan Terrain":
+ createBalkan(app)
+ elif terrain == "NCA Terrain":
+ createNCA(app)
+
+ def createBalkan(app):
v = SimData.Vector3
m = SimData.LLA()
vehicle = app.createVehicle
+ vehicle("sim:vehicles.aircraft.m2k", v(-29000, -13000, 88.5), v(0, 1.0, 0), v(5.0, 0.0, 0.0))
+ vehicle("sim:vehicles.aircraft.m2k", v(-29000, -13000, 1000), v(0, 100.0, 0), v(5.0, 0.0, 0.0))
+
+ def createNCA(app):
+ v = SimData.Vector3
+ m = SimData.LLA()
+ vehicle = app.createVehicle
+ vehicle("sim:vehicles.aircraft.m2k", v(0, 0, 1200.0), v(0, 100.0, 0), v(5.0, 0.0, 0.0))
vehicle("sim:vehicles.aircraft.f16", v(10, 10, 1000.2), v(0, 100.0, 0), v(2.0, 2.0, 140.0))
+
+
# vehicle("sim:vehicles.aircraft.m2k", v(483010, 499010, 190.2), v(0, 100.0, 0), v(2.0, 2.0, 140.0))
# vehicle("sim:vehicles.aircraft.m2k", v(483025, 499015, 190.2), v(0, 100.0, 0), v(5.0, 0.0, 240.0))
# vehicle("sim:vehicles.aircraft.m2k", v(483040, 499020, 190.2), v(0, 100.0, 0), v(8.0, 1.0, 240.0))
# vehicle("sim:vehicles.aircraft.m2k", v(483055, 499025, 190.2), v(0, 100.0, 0), v(12.0, 3.0, 240.0))
# m.setDegrees(37.5, -121.0, 600)
|
|
From: <mk...@us...> - 2003-07-23 07:11:59
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim
In directory sc8-pr-cvs1:/tmp/cvs-serv7214
Modified Files:
CHANGES.current
Log Message:
Index: CHANGES.current
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/CHANGES.current,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -d -r1.55 -r1.56
*** CHANGES.current 23 Jul 2003 01:28:58 -0000 1.55
--- CHANGES.current 23 Jul 2003 07:11:56 -0000 1.56
***************
*** 3,6 ****
--- 3,24 ----
2003-07-22: onsight
+ Increased the default window size to 800x600 so that
+ the splash screen will show properly.
+
+ Added a name and version number to the XML metadata
+ for terrains. The name is used by TestObjects.py to
+ create theater-specific vehicles at startup until a
+ proper campaign engine is written to generate them.
+
+ The default vehicle construction in CSPSim.cpp has
+ been removed. The first vehicle created in
+ TestObjects.py now serves this purpose.
+
+ Lat/Lon removed from CSPSim.ini. These were used
+ to set the mean seasonal temperature in Atmosphere.cpp,
+ but the center of the terrain (set in the terrain XML
+ metadata) is used directly now.
+
+ 2003-07-22: onsight
Modified CSPSim.ini to reduce the default window
size to 640x480.
|
|
From: <mk...@us...> - 2003-07-23 05:07:53
|
Update of /cvsroot/csp/APPLICATIONS/SimData/Source
In directory sc8-pr-cvs1:/tmp/cvs-serv22001/Source
Modified Files:
Exception.cpp FileUtility.cpp
Removed Files:
main.cpp
Log Message:
Index: Exception.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/SimData/Source/Exception.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Exception.cpp 23 Apr 2003 09:14:22 -0000 1.4
--- Exception.cpp 23 Jul 2003 05:07:51 -0000 1.5
***************
*** 49,52 ****
--- 49,56 ----
}
+ std::string ExceptionBase::getError() {
+ return _type + ": " + _msg;
+ }
+
void ExceptionBase::appendMessage(std::string const &msg) {
_msg += "\n" + msg;
***************
*** 58,62 ****
void ExceptionBase::details() {
! std::cerr << _type << ": " << _msg << std::endl;
}
--- 62,66 ----
void ExceptionBase::details() {
! std::cerr << getError() << std::endl;
}
Index: FileUtility.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/SimData/Source/FileUtility.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** FileUtility.cpp 11 Apr 2003 18:16:22 -0000 1.1
--- FileUtility.cpp 23 Jul 2003 05:07:51 -0000 1.2
***************
*** 111,115 ****
return ".";
}
! return path.substr(0, base-1);
}
--- 111,115 ----
return ".";
}
! return path.substr(0, base+1);
}
--- main.cpp DELETED ---
|
|
From: <mk...@us...> - 2003-07-23 05:07:53
|
Update of /cvsroot/csp/APPLICATIONS/SimData
In directory sc8-pr-cvs1:/tmp/cvs-serv22001
Modified Files:
CHANGES.current
Log Message:
Index: CHANGES.current
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/SimData/CHANGES.current,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** CHANGES.current 23 Jul 2003 02:25:02 -0000 1.51
--- CHANGES.current 23 Jul 2003 05:07:50 -0000 1.52
***************
*** 3,6 ****
--- 3,14 ----
2003-07-22: onsight
+ Fixed a bug in unpack(string) which could trip an assertion
+ for corrupt archives rather than throwing an exception.
+
+ Added GPL headers to Include/SimData/*.i
+
+ Removed Source/main.cpp (not used)
+
+ 2003-07-22: onsight
Applied a patch by Verok Istvan to setup.py which improves the
installation path handling under Linux. This changes the default
|
|
From: <mk...@us...> - 2003-07-23 02:25:06
|
Update of /cvsroot/csp/APPLICATIONS/SimData
In directory sc8-pr-cvs1:/tmp/cvs-serv32595
Modified Files:
CHANGES.current
Log Message:
Index: CHANGES.current
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/SimData/CHANGES.current,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -d -r1.50 -r1.51
*** CHANGES.current 22 Jul 2003 22:46:22 -0000 1.50
--- CHANGES.current 23 Jul 2003 02:25:02 -0000 1.51
***************
*** 14,17 ****
--- 14,23 ----
a new install target such as install_nopython.
+ Fixed ospath::dirname, which was truncating the last couple
+ characters.
+
+ Added getError method to ExceptionBase, which returns a
+ string that combines the error type and message.
+
2003-07-21: onsight
COPYING now correctly contains the GPL license, not the
|
|
From: <mk...@us...> - 2003-07-23 02:24:47
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Source
In directory sc8-pr-cvs1:/tmp/cvs-serv32503/Source
Modified Files:
SimpleConfig.cpp
Log Message:
Index: SimpleConfig.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/SimpleConfig.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** SimpleConfig.cpp 23 Jul 2003 01:28:58 -0000 1.8
--- SimpleConfig.cpp 23 Jul 2003 02:24:44 -0000 1.9
***************
*** 444,448 ****
}
! bool SimpleConfig::hasKey(const char* section, const char* key) const {
std::string index = _hash_index(section, key);
ConfigDictionary::const_iterator i = m_dict.find(index);
--- 444,448 ----
}
! bool SimpleConfig::hasKey(std::string const §ion, std::string const &key) const {
std::string index = _hash_index(section, key);
ConfigDictionary::const_iterator i = m_dict.find(index);
***************
*** 450,454 ****
}
! void SimpleConfig::delKey(const char* section, const char* key) {
std::string index = _hash_index(section, key);
ConfigDictionary::iterator i = m_dict.find(index);
--- 450,454 ----
}
! void SimpleConfig::delKey(std::string const §ion, std::string const &key) {
std::string index = _hash_index(section, key);
ConfigDictionary::iterator i = m_dict.find(index);
***************
*** 463,467 ****
}
! bool SimpleConfig::hasSection(const char* section) const {
ConfigDictionary::const_iterator i = m_last.find(section);
return (i != m_last.end());
--- 463,467 ----
}
! bool SimpleConfig::hasSection(std::string const §ion) const {
ConfigDictionary::const_iterator i = m_last.find(section);
return (i != m_last.end());
***************
*** 475,479 ****
// isn't very likely to be used in the application this class
// was written for. Sorry to all the purists out there. :-(
! void SimpleConfig::delSection(const char* section_name) {
ConfigDictionary::iterator i = m_last.find(section_name);
if (i != m_last.end()) {
--- 475,479 ----
// isn't very likely to be used in the application this class
// was written for. Sorry to all the purists out there. :-(
! void SimpleConfig::delSection(std::string const §ion_name) {
ConfigDictionary::iterator i = m_last.find(section_name);
if (i != m_last.end()) {
|
|
From: <mk...@us...> - 2003-07-23 02:24:47
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Include In directory sc8-pr-cvs1:/tmp/cvs-serv32503/Include Modified Files: SimpleConfig.h Log Message: Index: SimpleConfig.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/SimpleConfig.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** SimpleConfig.h 23 Jul 2003 01:28:58 -0000 1.9 --- SimpleConfig.h 23 Jul 2003 02:24:44 -0000 1.10 *************** *** 222,241 **** * Returns true if a particular section-key pair is defined. */ ! bool hasKey(const char* section, const char* key) const; /** * Remove a key-value pair. */ ! void delKey(const char* section, const char* key); /** * Returns true if a particular section exists. */ ! bool hasSection(const char* section) const; /** * Remove a section and all keys it contains. */ ! void delSection(const char* section); /** --- 222,241 ---- * Returns true if a particular section-key pair is defined. */ ! bool hasKey(std::string const §ion, std::string const &key) const; /** * Remove a key-value pair. */ ! void delKey(std::string const §ion, std::string const &key); /** * Returns true if a particular section exists. */ ! bool hasSection(std::string const §ion) const; /** * Remove a section and all keys it contains. */ ! void delSection(std::string const §ion); /** |
|
From: <mk...@us...> - 2003-07-23 01:48:29
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Bin In directory sc8-pr-cvs1:/tmp/cvs-serv26677 Modified Files: CSPSim.py Log Message: Index: CSPSim.py =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Bin/CSPSim.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** CSPSim.py 23 Jul 2003 01:28:58 -0000 1.7 --- CSPSim.py 23 Jul 2003 01:48:22 -0000 1.8 *************** *** 126,133 **** # do our best to find the correct configuration file ! if os.name == "posix": ! config_paths = [".", "~/.cspsim", "/etc/cspsim", "../Data"] ! else: ! config_paths = [".", "../Data"] config = "CSPSim.ini" --- 126,130 ---- # do our best to find the correct configuration file ! config_paths = [".", "~/.cspsim", "/etc/cspsim", "../Data"] config = "CSPSim.ini" |
|
From: <mk...@us...> - 2003-07-23 01:29:01
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Source
In directory sc8-pr-cvs1:/tmp/cvs-serv24189/Source
Modified Files:
CSPSim.cpp Config.cpp EventMapIndex.cpp ScreenInfo.cpp
SimpleConfig.cpp
Log Message:
Index: CSPSim.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/CSPSim.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** CSPSim.cpp 19 Jul 2003 14:14:37 -0000 1.33
--- CSPSim.cpp 23 Jul 2003 01:28:58 -0000 1.34
***************
*** 212,216 ****
// setup osg search path for external data files
- std::string data_path = getDataPath();
std::string image_path = getDataPath("ImagePath");
std::string model_path = getDataPath("ModelPath");
--- 212,215 ----
***************
*** 230,234 ****
// open the primary data archive
! std::string archive_file = simdata::ospath::join(data_path, "sim.dar");
try {
simdata::DataArchive *sim = new simdata::DataArchive(archive_file.c_str(), 1);
--- 229,234 ----
// open the primary data archive
! std::string cache_path = getCachePath();
! std::string archive_file = simdata::ospath::join(cache_path, "sim.dar");
try {
simdata::DataArchive *sim = new simdata::DataArchive(archive_file.c_str(), 1);
Index: Config.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/Config.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Config.cpp 26 Jun 2003 09:25:23 -0000 1.6
--- Config.cpp 23 Jul 2003 01:28:58 -0000 1.7
***************
*** 46,49 ****
--- 46,66 ----
}
+ std::string getCachePath() {
+ return g_Config.getPath("Paths", "CachePath", ".", true);
+ }
+
+ std::string getConfigPath() {
+ std::string base = g_Config.getConfigurationDirectory();
+ return g_Config.getPath("Paths", "ConfigPath", base, true);
+ }
+
+ std::string getConfigPath(std::string const &pathname) {
+ std::string path = g_Config.getPath("Paths", pathname, ".", true);
+ if (!simdata::ospath::isabs(path)) {
+ path = simdata::ospath::join(getConfigPath(), path);
+ }
+ return path;
+ }
+
std::string getDataPath() {
return g_Config.getPath("Paths", "DataPath", ".", true);
Index: EventMapIndex.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/EventMapIndex.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** EventMapIndex.cpp 26 Jun 2003 09:25:23 -0000 1.6
--- EventMapIndex.cpp 23 Jul 2003 01:28:58 -0000 1.7
***************
*** 76,80 ****
osgDB::DirectoryContents dc;
osgDB::DirectoryContents::iterator file;
! path = getDataPath("InputMapPath");
CSP_LOG(APP, INFO, "Looking for human interface device mappings in '" << path << "'");
dc = osgDB::getDirectoryContents(path);
--- 76,80 ----
osgDB::DirectoryContents dc;
osgDB::DirectoryContents::iterator file;
! path = getConfigPath("InputMapPath");
CSP_LOG(APP, INFO, "Looking for human interface device mappings in '" << path << "'");
dc = osgDB::getDirectoryContents(path);
Index: ScreenInfo.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/ScreenInfo.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** ScreenInfo.cpp 19 Jul 2003 14:08:03 -0000 1.18
--- ScreenInfo.cpp 23 Jul 2003 01:28:58 -0000 1.19
***************
*** 68,76 ****
ScreenInfo::ScreenInfo(float pos_x, float pos_y, std::string const &name, std::string const &text):
! //m_TTFPath("screeninfo.ttf"),
! m_TTFPath("ltype.ttf"),
m_FontSize(20),
! //m_CharacterSize(14),
! m_CharacterSize(11),
m_Text(0) {
m_Text = makeText(pos_x,pos_y - m_CharacterSize, text);
--- 68,76 ----
ScreenInfo::ScreenInfo(float pos_x, float pos_y, std::string const &name, std::string const &text):
! m_TTFPath("screeninfo.ttf"),
! //m_TTFPath("ltype.ttf"),
m_FontSize(20),
! m_CharacterSize(14),
! //m_CharacterSize(11),
m_Text(0) {
m_Text = makeText(pos_x,pos_y - m_CharacterSize, text);
Index: SimpleConfig.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/SimpleConfig.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** SimpleConfig.cpp 22 Jul 2003 15:55:08 -0000 1.7
--- SimpleConfig.cpp 23 Jul 2003 01:28:58 -0000 1.8
***************
*** 406,409 ****
--- 406,417 ----
}
+ std::string SimpleConfig::getConfigurationPath() const {
+ return m_file;
+ }
+
+ std::string SimpleConfig::getConfigurationDirectory() const {
+ return simdata::ospath::dirname(m_file);
+ }
+
bool SimpleConfig::open(const std::string &fn) {
if (fn != "") {
|
|
From: <mk...@us...> - 2003-07-23 01:29:01
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Include
In directory sc8-pr-cvs1:/tmp/cvs-serv24189/Include
Modified Files:
CSPSim.i Config.h SimpleConfig.h
Log Message:
Index: CSPSim.i
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/CSPSim.i,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** CSPSim.i 26 Jun 2003 09:25:45 -0000 1.6
--- CSPSim.i 23 Jul 2003 01:28:58 -0000 1.7
***************
*** 55,58 ****
--- 55,71 ----
+ %exception CSPSim::createVehicle {
+ try {
+ $action
+ } catch (simdata::Exception &e) {
+ std::string msg = e.getType() + ": " + e.getMessage();
+ PyErr_SetString(PyExc_RuntimeError, msg.c_str());
+ SWIG_fail;
+ } catch (...) {
+ PyErr_SetString(PyExc_RuntimeError, "Caught an (unknown) exception in CSPSim::createVehicle");
+ SWIG_fail;
+ }
+ }
+
%extend CSPSim {
void createVehicle(const char *path, simdata::Vector3 position,
***************
*** 82,83 ****
--- 95,99 ----
void setShell(PyObject *shell) { self->getShell()->bind(shell); }
}
+
+ %exception;
+
Index: Config.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/Config.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Config.h 26 Jun 2003 09:25:45 -0000 1.4
--- Config.h 23 Jul 2003 01:28:58 -0000 1.5
***************
*** 40,43 ****
--- 40,57 ----
extern bool openConfig(std::string path, bool report_error=true);
+ /**
+ * Get the main cache path.
+ */
+ extern std::string getCachePath();
+
+ /**
+ * Get the main configuration path.
+ */
+ extern std::string getConfigPath();
+
+ /**
+ * Get the specific configuration path.
+ */
+ extern std::string getConfigPath(std::string const &);
/**
Index: SimpleConfig.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/SimpleConfig.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** SimpleConfig.h 18 Jul 2003 02:00:22 -0000 1.8
--- SimpleConfig.h 23 Jul 2003 01:28:58 -0000 1.9
***************
*** 334,337 ****
--- 334,353 ----
void setPath(const std::string §ion, const std::string &key, const std::string &value);
+ /**
+ * Get the current configuration file path.
+ *
+ * @returns the full path to the configuration file.
+ */
+ std::string getConfigurationPath() const;
+
+ /**
+ * Get the path to the directory containing the current configuration
+ * file.
+ *
+ * @returns the full path to the directory containing the
+ * current configuration file.
+ */
+ std::string getConfigurationDirectory() const;
+
private:
|
|
From: <mk...@us...> - 2003-07-23 01:29:01
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Data In directory sc8-pr-cvs1:/tmp/cvs-serv24189/Data Modified Files: CSPSim.ini Log Message: Index: CSPSim.ini =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Data/CSPSim.ini,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** CSPSim.ini 26 Jun 2003 09:30:03 -0000 1.11 --- CSPSim.ini 23 Jul 2003 01:28:58 -0000 1.12 *************** *** 7,16 **** [Screen] ! Height = 1024 ! Width = 1280 FullScreen = 0 [Paths] ! DataPath = ../Data FontPath = Fonts ModelPath = Models --- 7,18 ---- [Screen] ! Width = 640 ! Height = 480 FullScreen = 0 [Paths] ! CachePath = ../Data ! InputMapPath = Input ! DataPath = /home/mrose/projects/csp/cvs-sf/APPLICATIONS/CSPSim/Data FontPath = Fonts ModelPath = Models *************** *** 18,22 **** SoundPath = Sounds TerrainPath = Terrain ! InputMapPath = Input [View] --- 20,24 ---- SoundPath = Sounds TerrainPath = Terrain ! ConfigPath = ../Data/ [View] *************** *** 29,50 **** [Testing] Mute = true - - ; balkan theater (demeter) Theater = sim:theater.balkan Latitude = 43.43 Longitude = 5.5 Date = 2003-05-15 04:19:30 ; northern CA theater (chunkedLod) ;Theater = sim:theater.nca ;Latitude = 37.0 ! ;Longitude = -122.0 ;Date = 2003-05-15 14:19:30 - Vehicle = sim:vehicles.aircraft.m2k ;Vehicle = sim:vehicles.aircraft.m3c - MudBubbleRadius = 40000 - AirBubbleRadius = 80000 - VisualRadius = 40000 --- 31,52 ---- [Testing] Mute = true Theater = sim:theater.balkan Latitude = 43.43 Longitude = 5.5 Date = 2003-05-15 04:19:30 + Vehicle = sim:vehicles.aircraft.m2k + MudBubbleRadius = 40000 + AirBubbleRadius = 80000 + VisualRadius = 40000 + + ; balkan theater (demeter) ; northern CA theater (chunkedLod) ;Theater = sim:theater.nca ;Latitude = 37.0 ! ;Longitude = -122.0 ;Date = 2003-05-15 14:19:30 ;Vehicle = sim:vehicles.aircraft.m3c |
|
From: <mk...@us...> - 2003-07-23 01:29:01
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Bin
In directory sc8-pr-cvs1:/tmp/cvs-serv24189/Bin
Modified Files:
CSPSim.py
Log Message:
Index: CSPSim.py
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Bin/CSPSim.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** CSPSim.py 22 Jul 2003 07:36:36 -0000 1.6
--- CSPSim.py 23 Jul 2003 01:28:58 -0000 1.7
***************
*** 67,72 ****
print
sys.exit(1)
! datapath = CSP.getDataPath()
! dar = os.path.join(datapath, "sim.dar")
if not os.path.exists(dar):
print
--- 67,72 ----
print
sys.exit(1)
! cachepath = CSP.getCachePath()
! dar = os.path.join(cachepath, "sim.dar")
if not os.path.exists(dar):
print
***************
*** 93,98 ****
def compileData(args):
! datapath = CSP.getDataPath()
! dar = os.path.join(datapath, "sim.dar")
XML = os.path.join(datapath, "XML")
CSP.csplog().setLogLevels(CSP.CSP_ALL, SimData.LOG_ALERT)
--- 93,98 ----
def compileData(args):
! cachepath = CSP.getCachePath()
! dar = os.path.join(cachepath, "sim.dar")
XML = os.path.join(datapath, "XML")
CSP.csplog().setLogLevels(CSP.CSP_ALL, SimData.LOG_ALERT)
***************
*** 124,132 ****
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
--- 124,141 ----
action = None
+ # do our best to find the correct configuration file
+ if os.name == "posix":
+ config_paths = [".", "~/.cspsim", "/etc/cspsim", "../Data"]
+ else:
+ config_paths = [".", "../Data"]
+ config = "CSPSim.ini"
+ for path in config_paths:
+ path = os.path.join(path, "CSPSim.ini")
+ path = os.path.expanduser(path)
+ if os.path.exists(path):
+ config = path
+ break
# process command line options
***************
*** 215,218 ****
--- 224,228 ----
SimData.log().setLogLevels(SimData.LOG_ALL, SimData.LOG_ALERT)
+ print "Loading configuration from '%s'." % config
if not CSP.openConfig(config):
print "Unable to open primary configuration file (%s)" % config
|
|
From: <mk...@us...> - 2003-07-23 01:29:01
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim
In directory sc8-pr-cvs1:/tmp/cvs-serv24189
Modified Files:
CHANGES.current
Log Message:
Index: CHANGES.current
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/CHANGES.current,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** CHANGES.current 22 Jul 2003 16:39:51 -0000 1.54
--- CHANGES.current 23 Jul 2003 01:28:58 -0000 1.55
***************
*** 3,6 ****
--- 3,39 ----
2003-07-22: onsight
+ Modified CSPSim.ini to reduce the default window
+ size to 640x480.
+
+ Added additional path roots to allow for more flexible
+ installation. ConfigPath points to the root directory
+ containing global configuration data (such as input
+ device mappings), CachePath points to the directory
+ containing compiled runtime data (sim.dar). DataPath
+ points to the root directory for "static" data (terrain,
+ images, models, etc). Based on a patch by Verok Istvan.
+
+ Changed ScreenInfo back to using screeninfo.ttf. We
+ cannot freely distribute ltype.ttf, so screeninfo.ttf
+ acts as a generic name for the onscreen text font. By
+ default a GPL'd font (freemono currently) will be
+ distributed using this name. Users are free to replace
+ this file locally with any font they choose.
+
+ CSPSim.py now searches for CSPSim.ini in a slightly
+ more elaborate, platform-dependent way. The current
+ directory always takes precedence. On Linux systems,
+ the search order then continues with ~/.cspsim,
+ /etc/cspsim, and finally ../Data. On Windows just
+ ../Data is checked. If the ini file does not set
+ an explicit ConfigPath, the directory in which the
+ config file was found will be used.
+
+ Added exception handling to the SWIG wrapper for
+ createVehicles(). Errors due to missing data archive
+ paths specified in TestObjects.py display diagnostic
+ error messages and won't crash the program anymore.
+
+ 2003-07-22: onsight
Actually checked in a bunch of changes from the last
changelog entry that I had forgotten to commit.
|
|
From: <mk...@us...> - 2003-07-22 22:46:29
|
Update of /cvsroot/csp/APPLICATIONS/SimData
In directory sc8-pr-cvs1:/tmp/cvs-serv31540
Modified Files:
CHANGES.current
Log Message:
Index: CHANGES.current
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/SimData/CHANGES.current,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** CHANGES.current 22 Jul 2003 18:41:29 -0000 1.49
--- CHANGES.current 22 Jul 2003 22:46:22 -0000 1.50
***************
*** 3,15 ****
2003-07-22: onsight
! Added a patch by VI to setup.py which improves the
! installation path handling under Linux. This changes the
! default static library path from /usr/local/lib to
! {PYTHONLIBPATH}/site-packages/SimData. The install
! currently depends on Python, but one goal of SimData is
! that it should be able to operate as a standalone library
! independent of Python. Subsequent changes to the Makefile
! installation will be needed to achieve this, probably
! involving a new install target such as install_nopython.
2003-07-21: onsight
--- 3,16 ----
2003-07-22: onsight
! Applied a patch by Verok Istvan to setup.py which improves the
! installation path handling under Linux. This changes the default
! static library path from /usr/local/lib to
! {PYTHONLIBPATH}/site-packages/SimData.
!
! The install currently depends on Python, but one goal of SimData
! is that it should be able to operate as a standalone library
! independent of Python. Subsequent changes to the Makefile
! installation will be needed to achieve this, probably involving
! a new install target such as install_nopython.
2003-07-21: onsight
|
|
From: <mk...@us...> - 2003-07-22 21:18:16
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Tools/Terrain/dem2dat
In directory sc8-pr-cvs1:/tmp/cvs-serv13903
Modified Files:
Makefile dem2dat.h
Log Message:
Index: Makefile
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Tools/Terrain/dem2dat/Makefile,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Makefile 21 Jul 2003 07:45:09 -0000 1.1
--- Makefile 22 Jul 2003 21:18:13 -0000 1.2
***************
*** 2,9 ****
dem2dat: dem2dat.cpp dem2dat.h
! g++ -O2 -g dem2dat.cpp -o dem2dat -I/usr/include/python2.2 -lSimData
python: dem2dat_wrap.o
! g++ -shared -lswigpy -ldl -o _dem2dat.so dem2dat_wrap.o -lSimData
dem2dat_wrap.o: dem2dat_wrap.cxx
--- 2,9 ----
dem2dat: dem2dat.cpp dem2dat.h
! g++ -O2 -g dem2dat.cpp -o dem2dat -I/usr/include/python2.2 -lSimData -lz
python: dem2dat_wrap.o
! g++ -shared -lswigpy -ldl -o _dem2dat.so dem2dat_wrap.o -lSimData -lz
dem2dat_wrap.o: dem2dat_wrap.cxx
Index: dem2dat.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Tools/Terrain/dem2dat/dem2dat.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** dem2dat.h 21 Jul 2003 07:45:09 -0000 1.1
--- dem2dat.h 22 Jul 2003 21:18:13 -0000 1.2
***************
*** 37,40 ****
--- 37,41 ----
#include <iostream>
#include <vector>
+ #include <zlib.h>
using namespace simdata;
***************
*** 454,459 ****
x = _title.find("SCALE::");
sscanf(_title.c_str()+x, "SCALE:: %d", &_scale);
! _lat = la0 + la1/60.0 + _lat / 3600.0;
! _lon = lo0 + lo1/60.0 + _lon / 3600.0;
_title = std::string(_title, 0, _title.find_last_not_of(" \t\r\n"));
}
--- 455,463 ----
x = _title.find("SCALE::");
sscanf(_title.c_str()+x, "SCALE:: %d", &_scale);
! int sign;
! sign = la0 >= 0 ? 1 : -1; // XXX what about lat = -0.X?
! _lat = sign*(fabs(la0) + la1/60.0 + _lat / 3600.0);
! sign = lo0 >= 0 ? 1 : -1; // XXX what about lon = -0.X?
! _lon = sign*(fabs(lo0) + lo1/60.0 + _lon / 3600.0);
_title = std::string(_title, 0, _title.find_last_not_of(" \t\r\n"));
}
***************
*** 602,609 ****
bool read(std::string fn) {
! FILE *fp = (FILE*) fopen(fn.c_str(), "rb");
if (!fp) return false;
_read(fp);
! fclose(fp);
}
--- 606,613 ----
bool read(std::string fn) {
! gzFile fp = gzopen(fn.c_str(), "rb");
if (!fp) return false;
_read(fp);
! gzclose(fp);
}
***************
*** 616,624 ****
protected:
! #define READD(x) fread(&(x), sizeof(double), 1, fp);
! #define READI(x) fread(&(x), sizeof(int), 1, fp);
! #define READS(x) fread(&(x), sizeof(unsigned short), 1, fp);
! #define READN(x,n) fread(x, sizeof(char), n, fp);
! void _read(FILE *fp) {
char buffer[256];
READN(buffer, 64);
--- 620,628 ----
protected:
! #define READD(x) gzread(fp, &(x), sizeof(double));
! #define READI(x) gzread(fp, &(x), sizeof(int));
! #define READS(x) gzread(fp, &(x), sizeof(unsigned short));
! #define READN(x,n) gzread(fp, x, sizeof(char) * n);
! void _read(gzFile &fp) {
char buffer[256];
READN(buffer, 64);
|