From: <mk...@us...> - 2003-08-13 11:53:21
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Tools/Terrain/dem2dat In directory sc8-pr-cvs1:/tmp/cvs-serv9681 Modified Files: Makefile dem2dat.h Log Message: Index: Makefile =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Tools/Terrain/dem2dat/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile 22 Jul 2003 21:18:13 -0000 1.2 --- Makefile 13 Aug 2003 11:34:30 -0000 1.3 *************** *** 1,13 **** all: dem2dat 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 ! g++ -c -fPIC -O2 -g dem2dat_wrap.cxx -I/usr/include/python2.2 dem2dat_wrap.cxx: dem2dat.i dem2dat.h ! swig -c -c++ -python -noexcept -I/usr/include/python2.2 dem2dat.i --- 1,17 ---- + PYTHONLIB = /usr/lib/python2.2/site-packages + PYTHONINC = /usr/include/python2.2 + all: dem2dat dem2dat: dem2dat.cpp dem2dat.h ! g++ -O2 -g dem2dat.cpp -o dem2dat -I$(PYTHONINC) -L$(PYTHONLIB)/SimData -lSimData -lz python: dem2dat_wrap.o ! g++ -shared -lswigpy -ldl -o _dem2dat.so dem2dat_wrap.o -L$(PYTHONLIB)/SimData -lSimData -lz dem2dat_wrap.o: dem2dat_wrap.cxx ! g++ -c -fPIC -O2 -g dem2dat_wrap.cxx -I$(PYTHONINC) dem2dat_wrap.cxx: dem2dat.i dem2dat.h ! swig -c -c++ -python -noexcept -I$(PYTHONINC) dem2dat.i ! Index: dem2dat.h =================================================================== RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Tools/Terrain/dem2dat/dem2dat.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** dem2dat.h 22 Jul 2003 21:18:13 -0000 1.2 --- dem2dat.h 13 Aug 2003 11:34:30 -0000 1.3 *************** *** 38,41 **** --- 38,42 ---- #include <vector> #include <zlib.h> + #include <cassert> using namespace simdata; *************** *** 341,346 **** UTM ref_utm = getReferenceUTM(); LLA ref_lla = getReferenceLLA(); ! int l0 = int((ref_lla.latitude()*180.0/G_PI+90)*8+0.5); ! int l1 = int((ref_lla.longitude()*180.0/G_PI+180)*8+0.5); sprintf(fn, "%04d_%04d.dat", l0, l1); _fn = fn; --- 342,347 ---- UTM ref_utm = getReferenceUTM(); LLA ref_lla = getReferenceLLA(); ! int l0 = int((ref_lla.latitude()*180.0/simdata::PI+90)*8+0.5); ! int l1 = int((ref_lla.longitude()*180.0/simdata::PI+180)*8+0.5); sprintf(fn, "%04d_%04d.dat", l0, l1); _fn = fn; *************** *** 598,603 **** static std::string DATname(double lat, double lon) { ! int l0 = int((RadiansToDegrees(lat)+90)*8+0.5); ! int l1 = int((RadiansToDegrees(lon)+180)*8+0.5); char fn[60]; sprintf(fn, "%04d_%04d.dat", l0, l1); --- 599,604 ---- static std::string DATname(double lat, double lon) { ! int l0 = int((simdata::toDegrees(lat)+90)*8+0.5); ! int l1 = int((simdata::toDegrees(lon)+180)*8+0.5); char fn[60]; sprintf(fn, "%04d_%04d.dat", l0, l1); *************** *** 613,617 **** bool read(double lat, double lon) { ! read(DATname(DegreesToRadians(lat), DegreesToRadians(lon))); } --- 614,618 ---- bool read(double lat, double lon) { ! read(DATname(simdata::toRadians(lat), simdata::toRadians(lon))); } |