03.31.2006 16:11
elog
Val mentioned a program called elog, which is a very interesting
little web application.
We started putting together a fink package, but it is quite a ways away from working. http://schwehr.org/software/fink/elog/
We started putting together a fink package, but it is quite a ways away from working. http://schwehr.org/software/fink/elog/
03.31.2006 08:14
svn server side move
Just tried my first server size move of a file through subversion:
$ svn mv https://cowfish.unh.edu/projects/seismic-py/trunk/segy.py \ https://cowfish.unh.edu/projects/seismic-py/trunk/seismic/segy.py
Committed revision 337.
$ cd && svn update A seismic/segy.py D segy.py Updated to revision 337.
03.31.2006 07:34
Other sources for fink debs
I would like to do something like this for ccom a soon as I get a
server for it.
http://sidbox.homelinux.org/
http://sidbox.homelinux.org/
This is where I put my compiled debs for future use when I tinker with fink. If you are using fink/10.4-transitional you could save some times using my repositories, just add:There is also http://www.gtlib.gatech.edu/pub/fink/fink/
deb http://sidbox.homelinux.org/fink stable main crypto deb http://sidbox.homelinux.org/fink unstable main crypto
at the end of your /sw/etc/apt/sources.list and:
UseBinaryDist: true
into your /sw/etc/fink.conf
03.30.2006 16:43
Dynamically pulling out all of the database fields
Here is a quick example to go with the previous on. I am sure this is
not the best way to do it, but it works. For each row in the
database, I want to print out all the fields with their values.
results = usermapper.select_text('select * from msg1 where mmsi=353556000 order by messageId')
for r in results: for attribute in r._managed_attributes.keys(): print attribute,': ',r.__getattribute__(attribute)
03.30.2006 16:18
reading sqlalchemy data
Question: What exactly is the difference between the __repr__ and __str__ class methods?
I figured out how to do the object relational mapping so that database comes back as a list of objects. A couple points about this code. First, I had to change messageId to be the primary_key. Second. The online docs have a mistake. It should not be "results=mapper.select_text" What I have below works. Third, printing just r gives things like '<__main__.Msg1 object at 0x1009970>'. I probably need to add a __repr__ to make print nice.
#!/usr/bin/env python import os,sys from sqlalchemy import * db = create_engine('sqlite://filename=ais.db' ) msg1table = Table('msg1', db, # unique index Column('messageId', Integer,primary_key = True) ,Column('mmsi',Integer, index=True) ,Column('lon',Float) ,Column('lat',Float) ,Column('SOG',Float) ,Column('ROT',Float) ,Column('time',TIMESTAMP) ) class Msg1(object): pass # Yikes msg1mapper = mapper(Msg1,msg1table) results = msg1mapper.select_text('select * from msg1 where mmsi=353556000 order by messageId') for r in results: print r.lon, r.latRunning this gives:
PYTHONPATH=.. ./ais-sql2geozui -70.7583333333 43.08 -70.7583166667 43.0799833333 -70.7583166667 43.08 -70.7583 43.08 -70.7583 43.0799833333 -70.7583 43.0799833333
03.30.2006 15:40
OpenEV on fink
I've hit a roadblock at the moment trying to build openEV in fink.
I am using a cvs checkout from today of OpenEV for the build.
/sw/include/glib-2.0/gobject/gtype.h is giving me trouble here.
#if GLIB_SIZEOF_LONG == GLIB_SIZEOF_SIZE_T typedef gulong GType; #else /* hm, shouldn't happen? */ typedef gsize GType; #endifHere is my current configure scripts:
CFLAGS="-I/sw/include/gtk-1.2 -I/sw/include/glib-1.2 -I/sw/lib/glib/include \ -I/usr/X11R6/include -I/sw/include/pygtk-2.0 -I/sw/include/gdal1 \ -I/sw/include" LDFLAGS="-L/sw/lib" \ ./configure --prefix=/Users/schwehr/Desktop/openev
03.30.2006 12:56
sioseis script
Here is a little sioseis script from Becca. This does not work for
all datasets. For example, my Humboldt Slide dataset was not
correctable in this way.
First her intro:
First her intro:
I have got the heave correction to work for wire in-out issues where you can't see the multiple! I took the depth profile from fledermaus and converted it to twtt and used it as a picked water bottom. To do this I imported the xy data points that I used to make the vertical curtain and draped them on the seafloor, made a note of the depth of each one and then converted that depth into twt (using 1500 m/s), Then I made a file with the shot number and the fleder seafloor depth and used that in the script below. It only works if there is not significent layback.And the script:
-Becca
pre> #!/usr/bin/env bash
# for shifting when you've picked the multiple/know the seafloor depth or time declare -r FNO="94000" declare -r LNO="111047" declare -r BASENAME=ice2003_B7
sioseis << eof procs diskin header mix wbt wbt2 header2 prout shift diskoa end
diskin set 0 .5 ipath $BASENAME.sgy end end
header fno $FNO lnO $LNO ftr 1 ltr 99 l6 = l3 end end
mix type 4 lhdr 59 weight 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 end end
wbt ! shot-time pairs for fleder picked seafloor gets asigned to r50 `cat B7.sf` end
wbt2 ! pick the water bottom from the original data, using the method that works best beneath index 60 ! put this pick in real word 60
! peak pos sepp .07 .09 track .01 lprint 2 end ! thres .1e-08 track .005 end ! peak pos sepp 0.01 0.25 track 0.005 lprint 2 end solrat 6 ses 0.0010 0.0020 sel 0.1 0.25 lprint 2 end ! solrat 4 ses .001 .005 sel .2 .3 lprint 2 end end
header2 fno $FNO lno $LNO ftr 1 ltr 99 ! substitute the picked water column depth for the theoretical r59 = r50 - r60 end end prout indices r50 r59 r60 fno $FNO lno $LNO noinc 100 end end shift indices r59 end end diskoa ofmt 1 opath $BASENAME-flt.sgy end end end eof
03.30.2006 11:59
sqlalchemy insert
So now on to inserting some data into the database with sqlalchemy.
It does not look like a list of dictionaries is possible, but this is
not so bad. This example is a little complicated because I am
translating between the ais VDM module names and what I might want to
call things in the database. Who wants to write out Longitude all the
time when 'lon' is pretty well known?
aiskeys = [ ['UserID','mmsi'] ,['Longitude','lon'] ,['Latitude','lat'] ,['SOG','SOG'] ,['ROT','ROT'] ] for key in aiskeys: insdict[key[1]] = fields[key[0]] insdict['time'] = ais.nmeamessages.zdaDict2TIMESTAMP(timeDict) msg1table.insert().execute(insdict)The insertion dictionary looks like this:
insdict = { 'mmsi': 353556000, 'lon': -70.75833333333334, 'lat': 43.079999999999998, 'SOG': 0, 'ROT': 0, 'time': '2006-03-26 13:39:21' }Then I can pull data on the command line:
sqlite ais.db 'select * from msg1' | tr '|' '\t' 353556000 -70.7583333333 43.08 0 0 2006-03-26 13:39:21 353556000 -70.7583166667 43.0799833333 0 0 2006-03-26 13:39:31 224632000 -70.7909966667 43.103435 1 128 2006-03-26 13:39:32 353556000 -70.7583166667 43.08 0 0 2006-03-26 13:39:42 353556000 -70.7583 43.08 0 0 2006-03-26 13:39:51 224632000 -70.7909933333 43.10343 1 128 2006-03-26 13:40:03 224632000 -70.7909933333 43.10343 1 128 2006-03-26 13:40:03 224632000 -70.7909933333 43.10343 1 128 2006-03-26 13:40:03 353556000 -70.7583 43.0799833333 0 0 2006-03-26 13:40:11 ...Wow, that was a little complicated for a first example, but it was so easy to write.
03.30.2006 11:21
First database creation with sqlalchemy
A quick look in the sqlite driver within sqlalchemy show that it is
using the pysqlite2 driver (for sqlite3) and if not, it falls back on
pysqlite which is will only generate sqlite2 databases. sqlite2 is
pretty clunky, so I need to get the pysqlite2 drivers into fink soon!
Here is how they do conditional driver loading. An interesting read:
try: from pysqlite2 import dbapi2 as sqlite except: try: sqlite = __import__('sqlite') # skip ourselves except: sqlite = NoneNow here is my first attempt at creating a database via sqlalchemy:
#!/usr/bin/env python '''Use SQLAlchemy to create/add data to a database''' from sqlalchemy import * import os if os.access('ais.db',os.W_OK): os.remove('ais.db') # db = create_engine('sqlite://filename=ais.db',echo=True) # msg1table = Table('msg1', db, # unique index Column('messageId', Integer,unique=True) ,Column('mmsi',Integer, index=True) ,Column('lon',Float) ,Column('lat',Float) ,Column('SOG',Float) ,Column('ROT',Float) ,Column('time',TIMESTAMP) ).create()Running it looks like this. The key is the "echo=True".
./ais-sqlalchemy [2006-03-30 11:18:44,781] [engine]: CREATE TABLE msg1( messageId INTEGER, mmsi INTEGER, lon NUMERIC(10, 2), lat NUMERIC(10, 2), SOG NUMERIC(10, 2), ROT NUMERIC(10, 2), time TIMESTAMP )Since I don't have the newer driver, the above code generates and sqlite2 database.
[2006-03-30 11:18:44,803] [engine]: None [2006-03-30 11:18:44,838] [engine]: CREATE UNIQUE INDEX ux_messageId ON msg1 (messageId) [2006-03-30 11:18:44,838] [engine]: None [2006-03-30 11:18:44,842] [engine]: CREATE INDEX ix_mmsi ON msg1 (mmsi) [2006-03-30 11:18:44,842] [engine]: None
less ais.db
** This file contains an SQLite 2.1 database **^@ ...
sqlite ais.db '.tables' msg1
sqlite ais.db '.schema msg1' CREATE TABLE msg1( messageId INTEGER, mmsi INTEGER, lon NUMERIC(10, 2), lat NUMERIC(10, 2), SOG NUMERIC(10, 2), ROT NUMERIC(10, 2), time TIMESTAMP ); CREATE INDEX ix_mmsi ON msg1 (mmsi); CREATE UNIQUE INDEX ux_messageId ON msg1 (messageId);
03.30.2006 10:47
SQLAlchemy - weird python code
I have just started to play with SQLAlchemy now that I have working fink packages for setuptools and SQLAlchemy. I promise will check them in when the sf.net CVS server comes back online. In the process, I am working on creating a db of AIS data. In ipython I wanted some more info on various time functionality and I got quite a surpise.
In [23]: sqlalchemy.Time? Type: type Base Class: <type 'type'> String Form: <class 'sqlalchemy.types.Time'> Namespace: Interactive File: /sw/lib/python2.4/site-packages/sqlalchemy/types.py Docstring: <no docstring>No doc string? I figured I could go look at the source and see what is goind on. Maybe the doc string was getting nuked somehow? Nope! I found this in /sw/lib/python2.4/site-packages/sqlalchemy/types.py:
In [24]: help(sqlalchemy.Time)
Help on class Time in module sqlalchemy.types:
class Time(TypeEngine) | Method resolution order: | Time | TypeEngine | __builtin__.object | | Methods inherited from TypeEngine: | | __init__(self, *args, **kwargs) | | adapt_args(self) ...
... class DateTime(TypeEngine): passSay what? First off, there is not inline documentation or comments. Secondly, a class with just pass? So this will inherit the parents functionality, but appear as a different object. Is that the point?
class Date(TypeEngine): pass
class Time(TypeEngine): pass
class Binary(TypeEngine): def __init__(self, length=None): self.length = length def convert_bind_param(self, value, engine): return engine.dbapi().Binary(value) def convert_result_value(self, value, engine): return value def get_constructor_args(self): return {'length':self.length} ...
03.30.2006 08:10
OpenSoundings
Randomness of the web. I was looking for that sf.net status page since they appear to be having a cvs outage when I ran into
OpenSounding:
A tool for decoding and presenting Geotechnical Sounding data (such as CPTu). Formats supported are the SGF standard as defined by the Swedish Geotechnical Society (www.sgf.net), and used by a number of commercial products, aswell as Generic text
03.29.2006 19:17
setuptools gets closer
I think I found the trouble for setup tools install from fink....
/sw/lib/python2.4/site-packages/easy-install.pth was:
/sw/src/fink.build/root-setuptools-py24-0.6a10-1/sw/lib/python2.4/site-packages\ /setuptools-0.6a10-py2.4.eggWhich should not have all that stuff in the beginning:
/sw/lib/python2.4/site-packages/setuptools-0.6a10-py2.4.egg
03.29.2006 18:27
CruiseControl or BuildBot
Brian L mentioned Cruise Control which
is a continuous build process system. Sounds interesting. I hadn't
gotten into BuildBot yet. I need to evaluate the two.
03.29.2006 10:06
Mac X11 unhappy
I am starting to have strange problems with X11. Often xterms popup
and disappear. Then when they have been iconofied, the come back
looking like this. It would be a lot easier to track down if these
were consistant problems, but they only happen occasionally.
03.29.2006 09:57
openscience - how to make money from open source
From http://www.openscience.org/blog/. How to make money from Open Source scientific software
... However, their code is not open. And this, I think, is a real problem. Imagine a skeptical researcher who is sent a paper to review. Further imagine that this paper uses this company's software, and the skeptical researcher doesn't have the money for a license. He or she therefore can't "look under the hood" to verify what's going on if they have some questions about how the code is calculating something relevant to the paper. There are good reasons that this company doesn;t give away their code; they like to put food on the table, and they don't trust the rest of the community to shell out the money for their programs if the code were available for free.
So, I'm left with a dilemma. I want this company to do well, to hire more of my students in the future, and to continue to produce high quality code. I also want the codes that we use in my field to be available for skeptical review. So today, I'm starting a set of posts in which I'll try to hash out the following question: How can people make money from open source scientific software? ...
03.29.2006 09:45
web mapping services
http://www.perrygeo.net/wordpress/?p=35
Web Mapping Services (WMS) are not always my prefered option for accessing data; relying on a remote server to generate a pretty picture of the data is hardly a substitute for having the raw data in hand. But for many cases, I just need a decent looking basemap image and don't want to download gigabytes of data, especially if that data is updated frequently. ...
03.29.2006 08:33
setuptools tests
To play with setuptools, I has to do a little extra work. I
downloaded the zip from the cheeseshop and did this.
cd ~/Desktop mkdir setuptools && cd setuptools wget http://cheeseshop.python.org/packages/source/s/setuptools/setuptools-0.6a10.zipIf I did not put the target site-packages location in PYTHONPATH it failed to install.
mkdir -p /Users/schwehr/Desktop/setuptools/sw/lib/python2.4/site-packages
PYTHONPATH=/Users/schwehr/Desktop/setuptools/sw/lib/python2.4/site-packages/ \ python setup.py install --root=/Users/schwehr/Desktop/setuptools/
03.29.2006 08:13
py-setuptools Portfile
Here is the port file for py-setyptools:
cat /opt/local/var/db/dports/sources/rsync.rsync.darwinports.org_dpupdate_dports/python/py-setuptools/Portfile
# $Id: Portfile,v 1.1 2005/12/15 00:55:31 blb Exp $
PortSystem 1.0 PortGroup python24 1.0 name py-setuptools version 0.6a8 categories-append devel maintainers blb@opendarwin.org description distutils enhancement for build and distribution long_description \ setuptools is a collection of enhancements to the Python distutils that \ allow you to more easily build and distribute Python packages, \ especially ones that have dependencies on other packages.
platforms darwin
homepage http://peak.telecommunity.com/DevCenter/setuptools master_sites http://cheeseshop.python.org/packages/source/s/setuptools/ distname setuptools-${version} use_zip yes
checksums md5 3eecdf66c1a2cf8a6556bc00b69d572a
post-destroot { xinstall -m 755 -d ${destroot}/${prefix}/share/doc/${name} xinstall -m 644 -W ${worksrcpath} EasyInstall.txt api_tests.txt \ pkg_resources.txt setuptools.txt \ ${destroot}/${prefix}/share/doc/${name} }
03.29.2006 07:54
python setuptools
There are two very interesting looking database abstraction layers for
python that both require setuptools. setuptools is not in fink, but
it is in darwinports, so I am installing it that way to see how
darwinports handles it. Hopefully after setuptools, I can go back and
add wxoptparse to fink too! That would be great! I still haven't
managed to get wxglade working yet.
http://py-setuptools.darwinports.com/
sudo port install py-setuptoolsI should have added "-v -d" to the above.
03.29.2006 07:17
How to stop worrying and love the blob
A while back (Fall 2004), I made a presentation entitled "How to stop
worrying and love the blob." Needless to say I missed the target with
my audience completely, but now OpenBSD has a very similiar theme (but
no Dr. Strangelove references).
03.29.2006 07:08
supporting OpenSSH (OpenBSD)
I bought an OpenBSD CD. What are you doing to support the puffer fish?
Linux supporters fiddle while OpenSSH burns
http://openbsd.org/orders.html
Linux supporters fiddle while OpenSSH burns
http://openbsd.org/orders.html
03.28.2006 13:52
Ship tracks from AIS
Yes, I am having fun. I am only using sqlite and gnuplot so far, but
I will keep stepping it up. The numbers in the key are the ship
UserID/MMSI.
03.28.2006 13:03
Greg Stein's talk
Thanks to Roland for this link.
"In 5-10 years, most of the software you use will be free"
"In 5-10 years, most of the software you use will be free"
Greg Stein, chairman of the Apache Software Foundation, currently with Google, delivered this keynote on Wednesday morning at EclipseCon 2006. It was titled "Comparing Apache and Eclipse".A very interesting read! Could be very controversial to some. Quite the contrast to listening to the AVSP interviews with some folks at ESRI that I was listening to earlier today.
03.28.2006 11:20
python interpreter for fink?
How do I correctly set the python interpreter using setup.py for
scripts that end up in /sw/bin and what about name clashes? Guess I
only allow one version of python? That just does not seem right.
Plus, what I am doing now is not safe:
#!/usr/bin/env pythonThen what happens when the user changes their path to pull some other python before the one that I am counting on? distutils must have thought about this, no?
03.28.2006 11:02
signed integers using BitVector
This not the most clever implementation of twos complement signed
integer decoding, but it seems to work. I am putting this here since
Avi is holding off on additional functionality in BitVector until the
end of his semester. He did fix the bitvec[-1]=0 reverse accessor bug
today, so the code below could be even simpler.
#!/usr/bin/env python from BitVector import BitVector
def setBitVectorSize(bv,size=8): """Pad a BitVector with 0's on the left until it is at least the size specified
@param bv: BitVector that needs to meet a minimim size @type bv: BitVector @param size: Minimum number of bits to make the new BitVector @type size: int @return: BitVector that is size bits or larger @rtype: BitVector
@todo: What to do if the vector is larger than size? """ pad=BitVector(bitlist=[0]) while len(bv)<size: bv = pad + bv return bv
def addone(bv): ''' Add one bit to a bit vector. Overflows are silently dropped. >>> print addone(BitVector(bitstring='1100')) 1101 >>> print addone(BitVector(bitstring='1111')) 0000
@param bv: Add one to these bits @type bv: BitVector @return: Bits with one added @rtype: BitVector ''' new = bv r = range(1,len(bv)+1) for i in r: index = len(bv)-i if 0==bv[index]: new[index]=1 break new[index]=0 return new
def subone(bv): ''' Subtract one bit from a bit vector
>>> print subone(BitVector(bitstring='1111')) 1110 >>> print subone(BitVector(bitstring='0010')) 0001 >>> print subone(BitVector(bitstring='0000')) 1111
@param bv: Bits to add one bit to the right side @type bv: BitVector @rtype: BitVector ''' new = bv r = range(1,len(bv)+1) for i in r: index = len(bv)-i if 1==bv[index]: new[index]=0 break new[index]=1 return new
def bvFromSignedInt(intVal,bitSize=None): ''' Create a twos complement BitVector from a signed integer.
Positives must have a '0' in the left hand position.
>>> print bvFromSignedInt(0,bitSize=4) 0000 >>> print bvFromSignedInt(1,bitSize=4) 0001 >>> print bvFromSignedInt(7,bitSize=4) 0111
Negative numbers must have a '1' in the left hand position.
>>> print bvFromSignedInt(-1,bitSize=4) 1111 >>> print bvFromSignedInt(-2,bitSize=4) 1110 >>> print bvFromSignedInt(-7,bitSize=4) 1001
@param bv: Bits to subtract one bit from the right side @type bv: BitVector @rtype: BitVector ''' bv = setBitVectorSize(BitVector(intVal=abs(intVal)),bitSize-1) assert(bitSize-1==len(bv)) # FIX: what to do about overflow beyond bitSize? if intVal>=0: bv = BitVector(intVal=0) + bv else: bv = subone(bv) bv = ~bv bv = BitVector(intVal=1) + bv return bv def signedIntFromBV(bv): ''' Interpret a bit vector as an signed integer. int(BitVector) defaults to treating the bits as an unsigned int. Assumes twos complement representation.
U{http://en.wikipedia.org/wiki/Twos_complement}
Positive values decode like so:
>>> signedIntFromBV(BitVector(bitstring='0000')) 0 >>> signedIntFromBV(BitVector(bitstring='0101')) 5
Here are some negative integer examples:
>>> signedIntFromBV(BitVector(bitstring='1111')) -1 >>> signedIntFromBV(BitVector(bitstring='1110')) -2 >>> signedIntFromBV(BitVector(bitstring='1010')) -6 >>> signedIntFromBV(BitVector(bitstring='1001')) -7
@param bv: Bits to treat as an signed int @type bv: BitVector @return: Signed integer @rtype: int
@note: Does not know the difference between byte orders. ''' if 0==bv[0]: return int(bv) # Nope, so it is negative return -(int(addone(~(bv[1:]))))
03.28.2006 09:49
First AIS ship location decoding
This is not so exciting for those who have been using AIS for quite a
while (e.g. Matt and Roland) but it is pretty exciting for me. First,
this morning I created functions for the BitVector class that go to
and from signed integers. That was pretty cool by itself, but that
fix the last hurdle to fully decoding the longitude and latitudes from
AIS messages 1-3. Those fields use signed integers of 10000 minute
increments to store the location. Being in the western hemisphere, I
was expecting negative longitudes (e.g. NOT 373 degrees).
To give ais-py a sanity test, I did a quick dump of the location and got these values for one message:
To give ais-py a sanity test, I did a quick dump of the location and got these values for one message:
MMSI/UserID Longitude Latitude SpeedOverGround 353556000 -70.7583 43.07995 0Google Maps/Local was kind enough to show me that this is indeed the salt hauler that was docked in Portsmouth over the weekend.
03.28.2006 09:37
Hydrologic sensor data
The CUAHSI () has a Hydrologic Information
System that looks interesting. How do I access this data is a
programmatic way (e.g. via python)?
Here is the USGS New Hampshire webpage. I am not too excited to do web scraping.
Of related interest: NASA/JPL's sensor webs project
Here is the USGS New Hampshire webpage. I am not too excited to do web scraping.
Of related interest: NASA/JPL's sensor webs project
03.27.2006 14:03
online python book - testing and packaging
Python 201 --
(Slightly) Advanced Python Topics by Dave Kuhlman looks pretty
interesting. Some stuff is not how I do it in the testing section,
but this is definitely worth a read.
03.27.2006 13:25
How OS X Executes Applications
How OS X Executes Applications by 0xFE. Looks like a good read and not too long.
03.25.2006 18:22
pyserial
pyserial is great! Here is how hard it was to create a very
basic logging program.
#!/usr/bin/env python import time import serial
ser = serial.Serial('/dev/tty.KeySerial1',38400,timeout=2) log=open('ais.log','a') log.write('# START LOGGING AT GMTTIME: '+str(time.gmtime())+'\n')
i=0 while True: i += 1 line = ser.readline() print i,len(line),':',line if len(line)>0: log.write('# GMTTIME: '+str(time.gmtime())+'\n') log.write(line) log.flush()
03.25.2006 14:29
Mac OSX speedups
Making
An Operating System Faster (10 Things Apple Did To Make Mac OS X
Faster). An interesting read. Of note is how to make gcc precompiled
headers for faster compiles.
% gcc -x c-header -c foo.h % ls foo.* foo.c foo.h foo.gch
03.25.2006 14:02
Portsmouth port noise
This is not bothering us, but it seems to be bothering some of the
neighbors. The ships are not there that often. I would tend to side
with the local shipping businesses. Yes, I can hear them unloading
the salt right now.
Port Asked To Cut Overnight Work
PORTSMOUTH, N.H. -- Neighbors and a legislator are asking the Port of New Hampshire in Portsmouth to stop overnight work so they can get some sleep. ...
03.25.2006 13:58
Vessel tracking in the news
High-tech trackers: A
local initiative to track vessels in and out of the Port of Hampton
Roads is now being used in San Diego.
PORTSMOUTH -- A Coast Guard and Navy vessel tracking initiative that began in Hampton Roads in 2001 is going national.
The Joint Harbor Operations Center, which monitors ships on local waterways through a combination of radar systems, cameras and vessel tracking devices, is now being implemented in San Diego. ... "This center is about maintaining awareness," said Capt. Robert O'Brien, the Coast Guard's captain of the port in Hampton Roads. "And that awareness is key to the safety of our port." ... The JHOC, as it's called, has evolved greatly from its early days operating with only a handful of people out of the old watchtower on the Elizabeth River at Norfolk Naval Station. Since the summer of 2004, the center has been headquartered at the Coast Guard base in Portsmouth, with millions of dollars worth of computers, software and equipment. ... The idea for such a center is the brainchild of Capt. Joseph Bouchard, the former commanding officer at the Norfolk Naval Station. ...
03.25.2006 08:57
First light - SR162 AIS Receiver
I just received my first AIS message. Not doing anything fancy. Just
watching through minicom (installed via fink) using a KeySpan
USA-19HS. It is set to 38.4k 8N1 looking at /dev/tty.KeySerial1. I
just installed the latest KeySpan driver, so /dev/*USA* is no more.
I can't wait to get the RM808 back from service so I can see what it puts out.
Note: Do not unplug the keyspan while the port it is still open. That set off a kernal trap saying I had to use the power button to restart my laptop.
SR162 AIS Receiver RECE FRQ R1F1619750 RECE FRQ R2F1620250 INT RATE I38400 !AIVDM,1,1,,A,13F>Lh0P00JstMJHbOQskOvJ087h,0*5A !AIVDM,2,1,1,A,v>W`lPt40030Ph0FhhQP1<v00C1W@8<4FS0?h000@P81O0P605P0PPm6,0*09 !AIVDM,2,2,1,A,P004P`4,2*75 !AIVDM,1,1,,B,13F>Lh0P01JstLjHbOUrp?v80D00,0*46I have to decode the messages, but this may be the Qing Ping Hai registered in Panama with an IMO number of 8308915. It took a few minutes to get all those messages.
I can't wait to get the RM808 back from service so I can see what it puts out.
Note: Do not unplug the keyspan while the port it is still open. That set off a kernal trap saying I had to use the power button to restart my laptop.
03.24.2006 07:50
line numbering for Marine Geology
This is the suggestion for how to do line numbering that I got from Marine Geology.
Please find below a sample on how you will prepare your LaTeX document with line number:Unfortunately that did not work for me. It mangled the title and abstract. I can not figure out how to no use \begin{frontmatter} which also stops the line numbering at the end of frontmatter. Also, the line number stops for the figure captions. Bummer. Here is the skeleton of what I did:
\documentclass{elsart} \usepackage{lineno} \begin{document} \linenumbers \title{A Framework for Language Identification} \author{John Smith, John Doe, John JohnJohn} \address{Speech and Audio Research Laboratory,\\ Technology Way,\\ A City, AUSTRALIA, 4001.\\ \{jsmith, jdoe, johnjohnjohn\}@unversity.edu} \begin{abstract} Whilst several examples of segment based approaches to Language Identification (LID) have been published, they are not as good as this one. \end{abstract}
%\documentclass{elsart} \documentclass[doublespacing]{elsart} % MARINE GEOLOGY DOUBLE SPACED \usepackage{lineno} % LINE NUMBER PACKAGE \usepackage{natbib} \usepackage{amssymb} \usepackage{graphicx} \usepackage{array} \usepackage{lscape} % landscape \usepackage[usenames]{color}I hope that helps someone. I was not able to find this on the Elsevier web site. Their latex help page seems to have lost most of its content.
\begin{document} \begin{frontmatter} \title{Origin of continental margin morphology: submarine-slide or downslope current-controlled bedforms, a rock magnetic approach} ... \end{frontmatter} \linenumbers % Tell latex lineno package to start using line numbers \section{Introduction} Rest of the paper...
03.23.2006 10:29
more public repositories
Nathan has setup 3 more public subversion projects for me.
xsonar is my protoized update to the USGS xsoanr sidescan. That means I converted K&R function prototypes to modern ANSI-C prototypes.
terrain is the same old terrain that tries to convert height field grids between a number of different formats (gmt grids, lightwave, Alias obj, OpenInventor, PDS, Vicar). Lightwave is a pretty crazy format, so my support for it has a lot of troubles.
- https://cowfish.unh.edu/projects/seismic-py/
- https://cowfish.unh.edu/projects/terrain/
- https://cowfish.unh.edu/projects/xsonar/
xsonar is my protoized update to the USGS xsoanr sidescan. That means I converted K&R function prototypes to modern ANSI-C prototypes.
terrain is the same old terrain that tries to convert height field grids between a number of different formats (gmt grids, lightwave, Alias obj, OpenInventor, PDS, Vicar). Lightwave is a pretty crazy format, so my support for it has a lot of troubles.
03.23.2006 06:21
fink build reports
This is good news. I don't mean that it is good that some things are
not building, but it is good that there is a master list of things
that are not building. There are a few of mine that are not building.
PPC: http://fink.opendarwin.org/build/2006-03-09/ppc/out/report.html
x86: http://fink.opendarwin.org/build/2006-03-09/i386/out/report.html
PPC: http://fink.opendarwin.org/build/2006-03-09/ppc/out/report.html
x86: http://fink.opendarwin.org/build/2006-03-09/i386/out/report.html
03.22.2006 22:10
Spotlight command line
This sounds like a good thing to be able to do: Using Spotlight from the OS X Commandline
$ mdfind gmt.info
/Users/schwehr/Desktop/gmt.info.kds /sw/fink/10.3/stable/main/finkinfo/sci/gmt.info /sw/fink/10.4/stable/main/finkinfo/sci/gmt.info /sw/fink/10.3/unstable/main/finkinfo/sci/gmt.info /sw/fink/10.4/unstable/main/finkinfo/sci/gmt.info /sw/fink/10.4-transitional/stable/main/finkinfo/sci/gmt.info /sw/fink/10.4-transitional/unstable/main/finkinfo/sci/gmt.info /Users/schwehr/Desktop/gmt.info /Users/schwehr/projects/xcore/doc/backup.txt ...
03.22.2006 12:50
3D view on the Navionics Platinum
Take a look at the screen shots on this web page of the Navionics
Platinum here
and here http://www.panbo.com/yae/archives/001119.html
http://www.navionics.com/PlatinumCharts.asp
http://www.navionics.com/PlatinumCharts.asp
03.22.2006 11:11
Maritime academy in Portsmouth
http://www.seacoastonline.com/news/03222006/business/93865.htm
... Parker has trained as a lawyer and a ship captain. He's worked for more than three decades as a maritime legal expert and a yacht and ship broker. But Parker, a native of the fishing-famous town of Gloucester, Mass., said for years he's thought of creating a flexible, cost-effective and well-credentialed academy for both the recreational boating and commercial shipping markets. ... Classes will begin April 17 at the AMA offices on Brewery Lane just off Islington Street. Parker said he plans to start small by offering basic U.S. Coast Guard certification classes. ...
03.22.2006 10:46
First public svn repository - density
This is exciting. Nathan just migrated the first of my projects
to subversion. This one is under the GPL, so I am allowing full
subversion read access. Check it out at:
https://cowfish.unh.edu/projects/density
I passed Nathan a dump file that I generated from cvs2svn like this:
https://cowfish.unh.edu/projects/density
I passed Nathan a dump file that I generated from cvs2svn like this:
cvs2svn --dump-only --dumpfile ../../density.svndump densityInside the density subdir from within my cvs repository were these files:
AMScrunch.f,v VolHeader.C,v s_bootstrap.C,v AUTHOR,v VolHeader.H,v s_bootstrap.help2man,v Attic as1-crypt.s,v s_bootstrap_cmd.ggo.in,v Bootstrap.C,v as2-slump.s,v sample.wpt,v Bootstrap.H,v as2xyz.bash,v simpleview.C,v Cdf.C,v as3-undef.s,v simpleview.help2man.in,v Cdf.H,v axes.iv,v simpleview.in,v ChangeLog,v bootvol-thesis.bash,v simpleview_cmd.ggo.in,v Density.C,v debug.H,v spin_gnuplot.C,v Density.H,v debug.bash,v spin_gnuplot_cmd.ggo.in,v DensityFlagged.C,v demos.bash,v splitdepth.py,v DensityFlagged.H,v density-sml.jpg,v vol2vol.C,v Doxyfile,v density.info.in,v vol2vol_cmd.ggo.in,v Eigs.C,v eigs2xyz.py,v vol_iv.C,v Eigs.H,v endian.C,v vol_iv_cmd.ggo.in,v HEADER-files.html,v getgroups-ol92.bash,v volhdr_edit.C,v HEADER.html,v histogram.C,v volhdr_edit_cmd.ggo.in,v INSTALL,v histogram_cmd.ggo.in,v volinfo.C,v InventorUtilities.C,v hsva.cpt,v volinfo_cmd.ggo.in,v InventorUtilities.H,v is_equal.c,v volmakecmap.C,v LICENSE.GPL,v kdsPmagL.H,v volmakecmap_cmd.ggo.in,v Makefile,v makeCDF.C,v xyz_iv.C,v Makefile.endian,v makemovie.bash,v xyz_iv_cmd.ggo.in,v README.txt,v one.bash,v xyzdensity.C,v SiteSigma.C,v regression.bash,v xyzdensity.help2man,v SiteSigma.H,v render.C,v xyzdensity_cmd.ggo.in,v TODO,v render.in,v xyzvol_cmp.C,v VERSION,v render_cmd.ggo.in,v xyzvol_cmp_cmd.ggo.in,v VecAngle.C,v rgba.cpt,v VecAngle.H,v rosenbaum-ams-stripped.dat,vThat should give you some sense of how the svn tree is built based off of the rcs formated ,v files.
03.22.2006 10:15
svn ignore
I am working on understanding how to use svn's ignore tag so that svg
status skips things like python byte compiled files (*.pyc). This
does not work the same way that .cvsignore works. Here is a quick
example.
$ svn status ? version.pyc ? verbosity.pyc ? BitVector-1.2 ? dist ? html ? MANIFEST ? ais.pyc M ais.pyThat is great, but I also want to ignore the html subdirectory.
$ cd && svn propset svn:ignore "*.pyc" . property 'svn:ignore' set on '.'
$ svn status ? BitVector-1.2 ? dist ? html ? MANIFEST M . M ais.py
$ cd && svn propset svn:ignore "html" . property 'svn:ignore' set on '.'Whoops. *.pyc came back to life! Instead, I discovered that propedit will bring up my text editor to do the job and that new lines between each entry works.
$ svn status ? version.pyc ? verbosity.pyc ? BitVector-1.2 ? dist ? MANIFEST ? ais.pyc M . M ais.py
svn propedit svn:ignore .I then put in this
html *.pyc MANIFEST dist BitVector*And now my svn status is much nicer.
$ svn status M . M ais.py
03.22.2006 08:01
Python Testing Tools
Python Testing Tools Taxonomy
Bitten looks especially interesting.
Bitten looks especially interesting.
Bitten is a Python-based framework for collecting various software metrics via continuous integration. It builds on Trac to provide an integrated web-based user interface.
03.21.2006 16:41
epydoc 3.0a fink package
I just put together a quick and dirty fink info package for epydoc
3.0alpha. I want to give it a try on a new python module I am working
on and pydoc really is not up to what I would like to do.
epydoc-py.info
Doh... why doesn't fink validate know about the MIT license?
epydoc-py.info
Doh... why doesn't fink validate know about the MIT license?
03.21.2006 13:20
cvs2svn
I am finally converting my CVS repository that I used throughout my
time working on my thesis into a subversion (svn) repository. Here is
what I had to do. The first step was to tar up the CVS repository on
my server. Names are ever evolving, so I will just put them in for
historical kicks.
ssh my.server.com # cd projects/xcore/ ls -l Master total 0 drwxr-xr-x 38 schwehr schwehr 1292 4 Nov 2002 CVSROOT drwxr-xr-x 8 schwehr schwehr 272 21 Mar 09:34 dotfiles drwxr-xr-x 5 schwehr schwehr 170 12 Feb 10:58 xcore # tar cf Master.tar Master bzip2 -9 Master.tar mv Master.tar.bz ~/ exit # cd ~/Desktop/ mkdir ForSVN cd ForSVN scp my.server.com:Master.tar.bz2 . tar xf Master.tar # ### Rearrange things to be happier inside of Master # ls -l Master Master/src Master/doc drwxr-xr-x 38 schwehr staff 1292 Nov 4 2002 CVSROOT drwxr-xr-x 7 schwehr staff 238 Mar 21 13:15 doc drwxr-xr-x 8 schwehr staff 272 Mar 21 08:42 dotfiles drwxr-xr-x 8 schwehr staff 272 Mar 21 13:13 src drwxr-xr-x 5 schwehr staff 170 Feb 12 13:58 thesis # Master/doc: -r--r--r-- 1 schwehr staff 448433 Apr 12 2005 kurt-2004.txt,v -r--r--r-- 1 schwehr staff 273650 Feb 20 12:50 kurt-2005.txt,v -r--r--r-- 1 schwehr staff 53270 Mar 21 10:45 kurt-2006.txt,v drwxr-xr-x 8 schwehr staff 272 Mar 21 10:44 segy-py -r--r--r-- 1 schwehr staff 10016 Mar 21 10:45 todo.txt,v # Master/src: drwxr-xr-x 51 schwehr staff 1734 Mar 21 11:26 Terrain drwxr-xr-x 92 schwehr staff 3128 Mar 21 11:26 density drwxr-xr-x 6 schwehr staff 204 Mar 21 11:26 mypy drwxr-xr-x 27 schwehr staff 918 Mar 21 11:26 pmag-kds-py drwxr-xr-x 47 schwehr staff 1598 Mar 21 11:26 segy-py drwxr-xr-x 6 schwehr staff 204 Mar 21 11:26 xsonar # cd Master/src && mv segy-py seismic-py cd Master && rm -rf CVSROOT # This is why I work on a copy mv Master schwehr mkdir svnrepoNow do the conversion, but the first time I tried, it failed like this:
$ cvs2svn -s svnrepo/schwehr schwehr yada yada ===== pass 2 ===== Checking for blocked exclusions... Checking for forced tags with commits... Checking for tag/branch mismatches... ERROR: The following symbols are tags in some files and branches in others. Use --force-tag, --force-branch and/or --exclude to resolve the symbols. 'start' is a tag in 351 files, a branch in 4 files and has commits in 4 files.So I then tried
cvs2svn --force-tag=start -s svnrepo/schwehr schwehr ... ===== pass 2 ===== Checking for blocked exclusions... Checking for forced tags with commits... ERROR: The following branches cannot be forced to be tags because they have commits: 'start'So I made them all branches. I hope this does not give me trouble.
cvs2svn --force-branch=start -s svnrepo/schwehr schwehr tic tock... cvs2svn Statistics: ===============--- Total CVS Files: 2365 Total CVS Revisions: 8885 Total Unique Tags: 13 Total Unique Branches: 9 CVS Repos Size in KB: 110389 Total SVN Commits: 5591 First Revision Date: Sat Jul 6 13:05:09 2002 Last Revision Date: Tue Mar 21 11:27:42 2006 ===============--- Timings: ===============--- pass 1: 52 seconds pass 2: 2 seconds pass 3: 0 seconds pass 4: 3 seconds pass 5: 20 seconds pass 6: 0 seconds pass 7: 0 seconds pass 8: 964 seconds total: 1043 secondsAnd finally, to import my stuff into the new svn tree... first to see what dump-only does. This file is pretty large. My 30MB CVS repository jumped to 180MB
cvs2svn --dump-only --force-branch=start --dumpfile schwehr.svndump svnrepo/schwehrSo maybe build the dump the way roland did:
svnadmin dump schwehr --deltas > schwehr.svndump.deltasAnd testing out the repository, I am doing a local checkout.
cd mkdir test cd test svn checkout file://localhost/home/schwehr/svnrepo/schwehr ls -la schwehr/ total 12 drwxrwxr-x 7 schwehr schwehr 4096 Mar 21 14:55 .svn/ drwxrwxr-x 13 schwehr schwehr 4096 Mar 21 14:54 branches/ drwxrwxr-x 15 schwehr schwehr 4096 Mar 21 14:55 tags/ drwxrwxr-x 8 schwehr schwehr 4096 Mar 21 14:54 trunk/More later when this is spliced into the server.
03.21.2006 12:32
Mapping Human Activity in the Marine Environment
Mapping Human Activity in the Marine Environment [slashgeo]
Other news... SAIC Celebrates Opening of Advanced Radar Research and Development and Production Center in Florida [gisuser.com]
This report summarizes the results of the workshop (convened by the National Marine Protected Areas (MPA) Center Science Institute) that brought together 20 social scientists, geographers, and GIS specialists from government agencies, universities, and non-governmental organizations with expertise in characterizing human use patterns in the marine environment with the aid of GIS tools. The goal of the workshop was to develop general design criteria for a practical participatory method or a suite of methods to collect spatial data on human use patterns to inform local and regional MPA planning processes.Bummer... this is mostly abstracts. Maybe there is good stuff in the publications section of the US Marine Protected Areas web site.
Other news... SAIC Celebrates Opening of Advanced Radar Research and Development and Production Center in Florida [gisuser.com]
03.21.2006 09:07
mapbender
mapbender
Mapbender is all about maps! Have a look at this map application. You can zoom in, out, pan, click and query, turn layers on and off or add more maps. You can also add new points to the map with the flag button, all Mapbender operators are invited to do so. There are many different possibilities to make use of maps, see some more examples in the Mapbender Gallery. Please observe that this software only shows and manages maps. The maps themselves come from many different Map Services all over the world.Not in fink, but it looks interesting.
Mapbender is the software and portal site for geodata management of OGC OWS architectures. The software provides web technology for managing spatial data services implemented in PHP, JavaScript and XML. It provides a data model and interfaces for displaying, navigating and querying OGC compliant map services. The Mapbender framework furthermore provides authentication and authorization services, OWS proxy functionality, management interfaces for user, group and service administration in WebGIS projects.
03.21.2006 08:38
GNU make .PHONY
I just went and read the GNU make info page on ".PHONY" targets. I
have read this many times, but I guess I never really internalized
what it means I should do. Phony rules are those that do not depend
on files being created. The classic is the clean rule, but I think
test will be more informative. Normally a test rule might look
something like this:
test: cd test && make testor this (depending on your style preference)
test: make -f test/Makefile testIf the test directory exists, make will see that directory and think that everything for test is already done. make will say:
make: `test' is up to date.Clearly, that is not what needs to happen. Make should go run the test! By saying that test is a phony target, make will ignore the test directory and happily run the commands for that target. Here is a dummy test target.
.PHONY: test test: cd test && pwdWhich when run will work just fine:
mkdir test make test cd test && pwd SOME_LONG_PATH/testAnd finally, the info page says this speeds up the make process because make is no longer looking for those targets. This is not a huge speedup, but in large projects this time will add up as the build system gets larger and if building happens frequently.
03.21.2006 07:48
virtual machines
Soon I will be trying to run multiple operating systems on top of Mac
OSX. I bought a copy of Virtual PC. Virtual PC also gives me a legal
copy of XP pro. I will also be trying Q [kju:]
which is QEMU.
It does not look like VMWare works on the Mac.
It is nice to see that there are premade images for Virtual PC of things like Ubuntu (The Breezy Badger) - 5.1.0; Linux i386 disk image for Virtual PC
Others include:
It does not look like VMWare works on the Mac.
It is nice to see that there are premade images for Virtual PC of things like Ubuntu (The Breezy Badger) - 5.1.0; Linux i386 disk image for Virtual PC
Others include:
03.20.2006 12:36
Government Open Source - What is the deal?
COSMIC is
the old NASA code release program. You got to spend a lot of money on
software. I doubt that this program took in more money than it spent.
Plus I still don't see VEVI in their list of programs and I know VEVI
went into COSMIC.
GCN just posted about http://opensource.arc.nasa.gov. Why is there yet another open source license? And why is not more NASA developed software in there? So much code that is written at NASA rots or dies as it sits around doing nothing. I would love to see any of the projects I worked on at Ames go open source... even in those that probably don't work. For example, we worked really hard on a bunch of VxWorks and Linux software for the Marsokhod rover. Much of it has been superseded as new development teams take over after my group mostly left. That's fine, but that old work is probably just gone. It would be great to allow people to view the source code as the read the old journal articles!
GCN just posted about http://opensource.arc.nasa.gov. Why is there yet another open source license? And why is not more NASA developed software in there? So much code that is written at NASA rots or dies as it sits around doing nothing. I would love to see any of the projects I worked on at Ames go open source... even in those that probably don't work. For example, we worked really hard on a bunch of VxWorks and Linux software for the Marsokhod rover. Much of it has been superseded as new development teams take over after my group mostly left. That's fine, but that old work is probably just gone. It would be great to allow people to view the source code as the read the old journal articles!
03.20.2006 12:20
Game processor for military use
Mercury Computer pitches game processor for military use [Government Computer News]
... The Chelmsford, Mass., company is confident that the Cell Broadband Engine, as it is properly known, cannot only replace existing signal-processing technologies, but also introduce real-time radar, sonar and signals intelligence processing into the battlefield itself.I am not sure why this is a "disruptive change" as general CPU's are becoming more and more able to do these kinds of DSP tasks. We don't need the TI DSP chips as much anymore. Many of us have been thinking along these lines (e.g. Alex) since at least 1999, but not for specifically military applications. The Cell architecture is going to take a couple years to come into its stride as the compiler and other tools get better.
The gaming machine processor "is a glimpse of the future," enthused Craig Lund, Mercury chief technology officer. "It's a disruptive change." ...
03.20.2006 07:31
python asserts
I'm trying to build a flexible parser for AIS. There are a number of
issues with the AIS specification that make it hard to parse. AIS is
definitely NOT something that a normal grammar parser can handle
(e.g. LALR and friends). One example is the region section of the
position messages which are 1, 2, and 3. One of the fields is a
region specific 4 byte value. How is the parser to know what region
it is in? And then there is the "bit stuffing" mode that I have not
gotten to yet where the message must have extra bits "stuffed" in
there. I have yet to figure out why this is, but I am suspecting that
certain bit patterns will be misconstrued as the training dataset at
the beginning of each AIS message.
I've decided to go the route of a large setup of lookup tables that embed parse functions that know what to do with a chunk of bits. This is going to get challenging when the fields have interdependencies, but I will just have to refactor at that point.
To make my life safer, I am applying asserts to many of the functions to validate all the input and make python a bit more type safe. I know, this is not very pythonic, but I like to catch errors early. This is currently my function to build one table entry.
The trickiest bit is making sure parseFunction is an executable function. I would rather fail when building the table than go a long time before some rare message hits a bad value for the parseFunction.
And units... I have got to track these. It is critical to know what units a value has. There are too many running around in the marine world. SI, CGS, and nautical. What if someone assumed a depth was in fathoms and it really is feet? That would be 'bad'.
To build up a message dictionary, I do something like this:
I've decided to go the route of a large setup of lookup tables that embed parse functions that know what to do with a chunk of bits. This is going to get challenging when the fields have interdependencies, but I will just have to refactor at that point.
To make my life safer, I am applying asserts to many of the functions to validate all the input and make python a bit more type safe. I know, this is not very pythonic, but I like to catch errors early. This is currently my function to build one table entry.
fieldTypes=['int'] def makeEntry(offset, fieldname, numbits, description='N/A', type='int', parseFunction=parseInt, units='N/A'): """Create the lookup table entryThe first few asserts just check the range of the offset and numbits. These need to be constrained to the maximum sizes of AIS packets. For the 'type' value, this has to be something the code knows about. I want to be able to expose a list of known types to people using this library - the 'fieldTypes' variable.
offset - index of the first bit fieldname - what is this field called. e.g. FIX numbits - number of bits for this field. FIX: what if variable?? Scary. type - dict, int, float??, string, ?? what else. Standard types that are handled. dict must have a parseFunction! parseFunction - function that handles the contents of these bits units - the units after being converted... e.g. degrees/minute """ assert(offset<1000) # FIX: what is the max offset? assert(offset>=0) assert(numbits>0) assert(numbits<1000) # FIX: what is the max message size? assert(fieldTypes.__contains__(type)) # Make sure this is allowed assert(parseFunction != None) import types assert(isinstance(parseInt,types.FunctionType)) # Build the entry now that the world is safe entry = {'fieldname':fieldname, 'startOffset': offset, 'endOffset': offset+numbits-1, 'numbits': numbits, 'description':description, 'type': type, 'parseFunction':parseFunction} return(entry,offset+numbits)
The trickiest bit is making sure parseFunction is an executable function. I would rather fail when building the table than go a long time before some rare message hits a bad value for the parseFunction.
And units... I have got to track these. It is critical to know what units a value has. There are too many running around in the marine world. SI, CGS, and nautical. What if someone assumed a depth was in fathoms and it really is feet? That would be 'bad'.
To build up a message dictionary, I do something like this:
msg={} offset=0 name='MessageID'; entry,offset=makeEntry(offset,name,6); msg[name]=entry name='RepeatIndicator'; entry,offset=makeEntry(offset,name,2); msg[name]=entry name='UserID'; entry,offset=makeEntry(offset,name,30,'MMSI ship id'); msg[name]=entry name='NavStatus'; entry,offset=makeEntry(offset,name,4); msg[name]=entry
03.20.2006 06:34
C++ and python
I am now in a waiting pattern for a couple fink packages to make it
into the CVS tree. I have been enjoying some python coding using the
BitVector module.
C++ Command Pattern for Network Operations reminds me that I should pick up my Design Patterns book again and start reading.
From QuickDraw to Quartz 2D reminds me that I am not really a Mac programmer. I am a software engineer, but I try to avoid too much Mac specific stuff.
Types and Objects in Python - Looking at the BitVector class shows that it is not too hard to create new solid types.
C++ Command Pattern for Network Operations reminds me that I should pick up my Design Patterns book again and start reading.
From QuickDraw to Quartz 2D reminds me that I am not really a Mac programmer. I am a software engineer, but I try to avoid too much Mac specific stuff.
Types and Objects in Python - Looking at the BitVector class shows that it is not too hard to create new solid types.
03.19.2006 08:43
python list comprehensions
I still do not feel comfortable with this kind of thing:
ipython In [1]: l = ['1', 'two', '3'] In [2]: l = ["prepend" + s for s in l] In [3]: print l ['prepend1', 'prependtwo', 'prepend3']And this is even stranger.
In [4]: l = ['1', 'two', '3'] In [6]: map("prefix%s".__mod__,l) Out[6]: ['prefix1', 'prefixtwo', 'prefix3']Now I'm working on cppunit for fink because gnuradio-core requires a newer version than is in fink. Also ran into trouble with fftw3. The tar ball for fftw 3.0.1 disappeared from the ftp server. Doh! Instead, I just used the binary version with a "sudo apt-get install fftw3 fftw3-shlibs"
03.19.2006 07:25
disappearing x windows
I seem to have a case of disappearing xterm windows. Is it just after
a sleep? I open a xterm from the Applications menu, it then flashes
on the screen and is gone. If I open one a few seconds later, it
opens like normal. What gives?
Working on packaging gnu radio for fink. This one may take a while. Shared libs and a whole bunch of separate packages.
Working on packaging gnu radio for fink. This one may take a while. Shared libs and a whole bunch of separate packages.
03.18.2006 22:00
CocoaLab - Learning Mac Programing
http://www.cocoalab.com/developer.htm - How to Become An Xcoder Book - free 60 page pdf book.
I have never really gotten into the whole cocoa programming thing. Maybe I should read this.
I have never really gotten into the whole cocoa programming thing. Maybe I should read this.
03.17.2006 21:39
GMSK in GNU Radio
http://www.gnu.org/software/gnuradio/
December 9, 2005 - GNU Radio 2.6 releaseWill it work on the Mac? It appears so: http://staff.washington.edu/~jon/gr-osx/gr-osx.html
GNU Radio 2.6 includes sending and receiving data at up to 1Mbit/sec using GMSK. There's also support for the new USRP Flex 400 transceiver daughterboards. Handling of all daughterboards has been unified, so most apps will work without modification on any of them. For those of you interested in wireless networking, see especially gnuradio-examples/python/gmsk2. We've got a framework in place to allow you to build and experiment with your own MACs. 2.6 includes the "null MAC". A carrier sense MAC is the next logical step. For additional details see http://comsec.com/wiki?GnuRadio2.X.
03.16.2006 19:28
CARIS additional military layer
http://www.gisuser.com/content/view/8430/
Database-driven Additional Military Layer Product Editor from CARIS Written by CARIS
CARIS announces the release of the Additional Military Layer (AML) Product Editor, the latest addition to the CARIS Hydrographic Production Database (HPD) product suite.Fredericton, NB, Canada - March 16, 2006 - CARIS announces the release of the Additional Military Layer (AML) Product Editor, the latest addition to the CARIS Hydrographic Production Database (HPD) product suite.
The release of AML Product Editor expands upon the existing HPD product suite, which already includes the HPD Source Editor, S-57 ENC Product Editor and Paper Chart Editor.
03.16.2006 19:19
AIS Range Performance monitoring
AIS Range Performance Being Monitored by R&D
An experimental Automatic Identification System (AIS) reception network has been established to analyze range performance and improve the ability to monitor vessel movement. The network, consisting of 20 reception sites at locations from Massachusetts to Hawaii, is used to study potential AIS surveillance performance. The live vessel data obtained by the network are distributed to a number of experimental and operational government information systems, such as the USCG Common Operational Picture. The AIS signals are generally thought to have a short operational range - only a little greater than the visible horizon. Experimentation with receiver design improvements, gain antennas, and attention to radio noise reduction has shown that AIS surveillance systems can frequently receive signals at ranges 2 to 10 times the visible horizon. Site-by-site analysis of range performance for all the reception sites connected to the RDC network is now available on an experimental web page https://ra2.rdc.uscg.gov/NAISprototype/AISdata.htm. The analysis should be of interest to VHF communications system planners, such as those designing high performance AIS facilities and surveillance networks.
Project: Automatic Identification System Research and Development (2410.5)
03.16.2006 19:14
CG Vessel Tracking Project
Vessel Tracking Project (VTP) Moves Toward Transition
The USCG and the U.S. Navy have joined forces in a cooperative partnership, funded with more than $31M of Navy money, that will provide the capability for extracting information from multiple security sources and provide the capability to fuse multi-intelligence data sources. The Vessel Tracking Project (VTP) will be deployed as an operational prototype system to support Maritime Domain Awareness. The cornerstone of this project is the Common Distributed Virtual Database with Information Extraction (CDVD/IE). The CDVD/IE allows a fusion of data with high levels of automation to create highly detailed vessel tracks. The R&D Program, the primary CG liaison to the Naval Research Lab (NRL), has exerted significant influence over this project so that it will provide operational value and near-term return on investment for the CG. The project's first operational capability will be deployed at the Maritime Intelligence Fusion Center (MIFC) Atlantic in July 2006, and additional installations are planned for Maritime Intelligence Fusion Center (MIFC) Pacific and National Maritime Intelligence Center (NMIC). From a long-term transition perspective, initial planning meetings have resulted in the identification and chartering of a joint USCG-USN Transition Working Group.
Project: Department of the Navy USCG Vessel Tracking Project
03.16.2006 14:46
Piscataqua River dredging
http://www.seacoastonline.com/news/03162006/news/92812.htm
NEWINGTON - Port officials and the U.S. Army Corps of Engineers are entering the next phase of planning the expansion of the 800-foot turning basin in the Piscataqua River.
Director of Ports and Harbors Geno Marconi said a new study will determine what type of sediment will need to be removed, the best way to remove it and where it will be sent in order to widen the basin.
Expanding the basin, located in the federal navigation channel between the shores of Eliot, Maine, and Newington, has been discussed for several years. ...
03.16.2006 13:47
Notes to Apple
http://www.macresearch.org/survey_the_transition_to_intel_and_its_impact_on_scientific_computing
Here are some of my responses to that request.
Here are some of my responses to that request.
Please merge your GNU Make tweaks back into the mainline make tree!! It is really frustrating that the standard GNU Make does not work for the Fink project.I would also like to see ports to the Mac (both x86 and PPC) of ESRI tools, Caris, and SGI Performer. Not for me, but for others so that there is a chance of going all Mac for operations (e.g. on-board ships and spacecraft mission control centers)
Would be good if Apple would contribute more to the DarwinPorts and Fink projects. Continual support and improvement of X11 is critical.
The mac package management/receipt system still needs some help.
The firewire camera support is still too complicated. How about an option to work like the old Linux BTB848 drivers where programs can read images from /dev/camera.format (e.g. ppm or pgm).
As a scientist, I just don't have time to struggle through learning Cocoa or Carbon enough to get at some of these APIs.
Please get python to to 2.4.x!
The lake of case sensitivity is driving me nuts with the Mac. The macosx libJPEG is messing with libjpeg. That kind of stuff is really painful.
More, more, more 64 bit support.
I would rather stick with PowerPC than go to Intel.
More CPUs, PCIExpress slots, and RAM please. I want a 16-way PowerPC box with 128GB of RAM and 4 PCI-Express 16-lane graphics cards that all are stereo capable.
How about a Mac OS-X based data-logger/embedded machine. Okay, I know that is crazy and I would rather use Linux where I can control everything, but would be interesting.
Internal RAID arrays would be "huge."
Why not just put the server functionality in every copy of Mac OSX?
03.16.2006 12:40
Touch screens
The World of Smartboards, Sympodiums is about to change by Jefferson Y. Han
Thanks to Roi for pointing this out.
Thanks to Roi for pointing this out.
03.16.2006 07:07
BitVector improvement
Avi tweaked BitVector a little bit to allow the binary or operator to
work on different sized BitVectors. This is great as it make my
function to set grow size of a BitVector that much easier.
In [1]: from BitVector import BitVector In [2]: print BitVector(intVal=1) ^ BitVector(intVal=2) 11 In [3]: print BitVector(intVal=1) ^ BitVector(bitlist=[0,0,0,0,0,0,0,0]) 00000001 In [4]: print BitVector(intVal=1) ^ BitVector(bitlist=[0]*8) 00000001So the new function is just two lines...
def bvSize(bv,size=8): return (bv ^ BitVector(bitlist=[0]*size))Which works like this:
In [6]: print bvSize(BitVector(intVal=123),32) 00000000000000000000000001111011
03.16.2006 06:09
IEEE Vis 2006
Abstracts are due in 5 days...
- IEEE Visualization 2006 - http://vis.computer.org/vis2006/
- IEEE InfoVis 2006 http://conferences.computer.org/infovis/infovis2006/
- IEEE VAST 2006 http://conferences.computer.org/vast/vast2006/
03.14.2006 13:40
BitVector python module
I just added BitVector
1.2 to fink 10.4-transitional/unstable. This is a nice package
for bit twiddling written by Avi Kak at Purdue.
This package makes working with bit level data much easier than it ever was in C or C++. STL in C++ has trouble with bit vectors and the C bit operators are not the most fun. BitVector has the muscle to make the job much more understandable.
This package makes working with bit level data much easier than it ever was in C or C++. STL in C++ has trouble with bit vectors and the C bit operators are not the most fun. BitVector has the muscle to make the job much more understandable.
python from BitVector import BitVector bv = BitVector(bitlist = [ 0,0,1,0]); print bv 0010 print bv[-2] 1 b2=BitVector(intVal=2);print b2 10
03.14.2006 08:19
4 pci express slots - 8 heads
Gigabyte
GA-8N-SLI Quad Royal Motherboard has 4 PCI Express x16 slots. Too
bad this is not the same motherboard that has 4 opteron sockets. Just
think about 8 Opteron Cores with 128 GB of ram and 4 Graphics Cards.
Now combine that with a math library that is able to push some
operations to the graphics cards. That is some serious crunching
power in a small form factor without going with crazy hardware. What
kind of powersuppy and cooling system would be needed? Perhaps just
hook it straight into the buildings AC system.
03.13.2006 13:52
pivy fink packages!
This is VERY exciting! After wanting a swig python API for
OpenInventor for 9 years, I just ran one for the first time today. I
now have fink info files that work for 10.4-transitional.
AWESOME!!!
#!/usr/bin/env python # Copyright (c) 2002, Tamer Fahmy <tamer@tammura.at> import sys from pivy.sogui import * from pivy.coin import * def main(): myWindow = SoGui.init(sys.argv[0]) if myWindow == None: sys.exit(1) # root = SoSeparator() myCamera = SoPerspectiveCamera() myMaterial = SoMaterial() root.addChild(myCamera) root.addChild(SoDirectionalLight()) myMaterial.diffuseColor = (1.0, 0.0, 0.0) # Red root.addChild(myMaterial) root.addChild(SoCone()) # myRenderArea = SoGuiRenderArea(myWindow) # myCamera.viewAll(root, myRenderArea.getViewportRegion()) # myRenderArea.setSceneGraph(root) myRenderArea.setTitle("Hello Cone") myRenderArea.show() # SoGui.show(myWindow) # Display main window SoGui.mainLoop() # Main Inventor event loop # if __name__ == "__main__": main()
03.13.2006 09:43
worldKit
No, this is now World Tool Kit... this is worldKit - a flash based
google maps like system that is released under the GPL license. Now
quick as slick an interface as Google maps/local, but it looks like it
works. I am curious about the RSS integration, but don't have time
right now to dig further.
Note: I am still working on pivy and bitvector packages. For pivy, Tamer let me know that it will not work with swig 1.3.28, so I am packaging swig 1.3.25. Hopefully swig 1.3.29 will clear things up.
Note: I am still working on pivy and bitvector packages. For pivy, Tamer let me know that it will not work with swig 1.3.28, so I am packaging swig 1.3.25. Hopefully swig 1.3.29 will clear things up.
03.13.2006 06:49
Google Mars
I heard this was going to be released soon and now I can finally talk about it.
Google MarsThen click on spacecraft. You will see where all the spacecraft have gone. Now where are Zareh's movies? If you go to the about page, you will eventually end up here:
Flight Into Mariner Valley: The MovieI got to try the HDTV sized version of the movie and it bought my laptop to its knees, but the smaller versions play perfectly Great movie!
03.12.2006 18:36
buildbot
I saw an article today about setting up buildbot to manage servers to
build latest version of software for a project on one or more machines
and decided to update my fink package that I started about a year ago.
I upgraded it to version 0.7.2 and made it now depend on python 2.4,
twisted2-web2, and zopeinterface-py24. I only did the zope thing
because of the articles below. Still have not worked through them.
Need to get my new mac server! I can't wait to have automated
building and testing. Maybe I can even do Mac, Windows, and Linux all
on the same machine using virtualization.
buildbot-py.info
The articles on setup are:
As usual, you will need to put the info file in /sw/fink/10.4-transitional/local/main/finkinfo/devel and download the source from the buildbot home page. The tar.gz goes in /sw/src/
buildbot-py.info
The articles on setup are:
As usual, you will need to put the info file in /sw/fink/10.4-transitional/local/main/finkinfo/devel and download the source from the buildbot home page. The tar.gz goes in /sw/src/
03.11.2006 21:02
SigGraph 2006 in Boston
The title says it all. SigGraph2006 is in Boston
which is just down the road from here. Wow... it is already too late
to submit papers.
03.11.2006 12:55
4 socket opteron = 8 cores
This sounds like it has some pretty decent compute power... 4 socket 1U opteron system with 4 dual core chips:
Supermicro stuns with four-socket, 1U Opteron
http://www.supermicro.com/Aplus/motherboard/Opteron/nForce/H8QC8+.cfm
That would make a nice little cluster with a bunch of these. Issues are just power and cooling.
http://www.supermicro.com/Aplus/motherboard/Opteron/nForce/H8QC8+.cfm
That would make a nice little cluster with a bunch of these. Issues are just power and cooling.
03.11.2006 09:12
swig 1.3.29
I submitted a change request to the swig team asking for a fix so that
swig honors the --program-suffix and --program-prefix configure
options. Wow, what a quick turnaround!
William Fulton (wsfulton) Date: 2006-03-10 22:58
Message: user_id=242951
SWIG has a non-standard way of doing this, use the --with-release-suffix option. For 1.3.29, I've removed this options and fixed the standard ones, namely, --program-prefix and --program-suffix
03.10.2006 15:53
tcpdump
We have a VLinx device that is reading RS422 data and spitting out UDP
broadcast packets. Yesterday, I got pretty confused trying to
understand what it was doing by looking at the tcpdump output. Now
that Roland has a given me his nice little SDL based application to
read UDP traffic, the tcpdump stuff is not as important, but here is
the tcpdump line I just came up with.
sudo tcpdump -i en0 -A -n src IP-ADDRESS-OF-VLINX and udp port 4003
- The "-i en0" reads my mac laptops built in ethernet port.
- "-A" dumps an ascii version of the package payload
- "-n" says just give the numeric port and ip numbers
- "src IP-ADDRESS-OF-VLINX" only receive packets from that address
- "and" logical glue to the next statement
- "udp port 4003" says we only want to see that port.
15:27:54.796096 IP 10.48.2.199.4003 > 255.255.255.255.4003: UDP, length: 14 E..*4.@...9. 0 ............s.!AIVDO,1,1,,,1rks 27.. 15:27:54.800100 IP 10.48.2.199.4003 > 255.255.255.255.4003: UDP, length: 14 E..*4.@...9. 0 ..............018lEgP?w<tSF0rks .G.. 15:27:54.803785 IP 10.48.2.199.4003 > 255.255.255.255.4003: UDP, length: 14 E..*4.@...9. 0 ..............l4Q@>4?wp1d00,rks d.f\ 15:27:54.805363 IP 10.48.2.199.4003 > 255.255.255.255.4003: UDP, length: 6 E.."4.@...9. 0............_)0*78Which is not as nice as
@GZTIM,185.807016 !AIVDO,1,1,,,1018lEgP?w4?wp1l00,0*70 @GZTIM,186.858809 !AIVDO,1,1,,,1018lEgP?w 4?wp1l00,0*70 @GZTIM,187.907003 !AIVDO,1,1,,,1018lEgP?w 4?wp1d00,0*78 @GZTIM,188.955972 !AIVDO,1,1,,,1018lEgP?w 4?wp1d00,0*78 @GZTIM,190.007628 !AIVDO,1,1,,,1018lEgP?w 4?wp1l00,0*70 @GZTIM,191.055809 !AIVDO,1,1,,,1018lEgP?w 4?wp1h00,0*74
03.10.2006 08:45
geonames and georss
http://www.geonames.org/ - does
it an a web api or a way to get all of the database?
Portland Maine map exihibit
http://www.georss.org/ - Geographically Encoded Objects for RSS feeds
Portland Maine map exihibit
http://www.georss.org/ - Geographically Encoded Objects for RSS feeds
03.10.2006 05:35
nmea checksums, doctest, unittest
Here is a nice example python module that illustrates 4 imporant
concepts.
- Using doctest is really easy. Lines 15-18 and 32-38 define some examples that doctest will validate. The python code starts with >>> and is followed by the expected output from that command. At the end of the program (lines 59-60), doctest is called. It will scan through the whole module and validate every doctest formatted example.
- Using unittest is a little bit more work, Lines 48-55 are a basic unittest setup. This can be done much fancier with setup and teardown methods before and after groups of tests and much more.
- On a different note, this module handles NMEA 0183 checksum calculation and validation for AIS and GPS strings. Not very exciting, but it provides an example and shows how the string is OR'ed (^ in python) together.
- Finally, I used "pydoc -w nmeaChecksum.html" to produce the nmeaChecksum web documentation. I still need to give epydoc a try, as it looks more like doxygen. Pydoc is not all that powerful.
1 #!/usr/bin/env python 2 """ 3 Background info on NMEA strings can be had from here: 4 http://gpsd.berlios.de/NMEA.txt 5 """ 6 __version__ = '$Revision: 1.1 $'.split()[1] # See man ident 7 __date__ = '$Date: 2006/03/10 10:11:40 $'.split()[1] 8 __author__ = 'Kurt Schwehr' 9 10 def nmeaChecksumStr(data): 11 """ Take a NMEA 0183 string and compute the checksum 12 13 Checksum is calculated by xor'ing everything between ? or ! and the * 14 15 >>> nmeaChecksumStr("!AIVDM,1,1,,B,35MsUdPOh8JwI:0HUwquiIFH21>i,0*09") 16 '09' 17 >>> nmeaChecksumStr("AIVDM,1,1,,B,35MsUdPOh8JwI:0HUwquiIFH21>i,0") 18 '09' 19 """ 20 21 if data[0]=='!' or data[0]=='?': data = data[1:] 22 if data[-3]=='*': data = data[:-3] 23 sum=0 24 for c in data: sum = sum ^ ord(c) 25 sumHex = "%x" % sum 26 if len(sumHex)==1: sumHex = '0'+sumHex 27 return sumHex 28 29 def isNmeaChecksumValid(nmeaStr): 30 """Return True if the string checks out with the checksum 31 32 >>> isNmeaChecksumValid("!AIVDM,1,1,,B,35MsUdPOh8JwI:0HUwquiIFH21>i,0*09") 33 True 34 35 Corrupted: 36 37 >>> isNmeaChecksumValid("!AIVDM,11,1,,B,35MsUdPOh8JwI:0HUwquiIFH21>i,0*09") 38 False 39 """ 40 if nmeaStr[-3]!='*': False # Bad string without proper checksum 41 checksum=nmeaStr[-2:] 42 if checksum==nmeaChecksumStr(nmeaStr): return True 43 return False 44 45 ###################################################################### 46 # Test code 47 ###################################################################### 48 import unittest 49 class TestChecksum(unittest.TestCase): 50 """Are we computing the checksome correctly?""" 51 def testSimple(self): 52 self.assertEquals('09',nmeaChecksumStr("!AIVDM,1,1,,B,35MsUdPOh8JwI:0HUwquiIFH21>i,0*09")) 53 self.failUnless(isNmeaChecksumValid("!AIVDM,1,1,,B,35MsUdPOh8JwI:0HUwquiIFH21>i,0*09")) 54 # Corrupted 55 self.failUnless(not isNmeaChecksumValid("!AIVDM,11,1,,B,35MsUdPOh8JwI:0HUwquiIFH21>i,0*09")) 56 57 if __name__ == '__main__': 58 unittest.main() 59 import doctest 60 doctest.testmod()
03.10.2006 04:17
converting between characters and their ascii numbers in python
This one stumped me way to long. I figured that it has to be
somewhere in python. This is one of those things that happens through
casting in c.
ipythonhttp://www.python.org/doc/lib/built-in-funcs.html
In [1]: chr(97) Out[1]: 'a'
In [2]: ord('a') Out[2]: 97
03.08.2006 13:06
pyvox
This looks very interesting on the 3D volume rendering/volex front.
Hopefully I will get pivy going soon and maybe can work on adding
voleon support to it. That would be a great combination.
http://cheeseshop.python.org/pypi/Pyvox/0.72
Pyvox (formerly known as BBLimage) is a set of software tools for medical image processing, particularly skull stripping and segmentation of MR brain images; tools to support other applications may be added later. These tools are intended to support researchers who need to prototype new image analysis algorithms or to develop automated image analysis tools for specific image analysis applications. The sequence of processing operations is specified through the scripting language Python, which can be used interactively or in command files; the core image processing algorithms are written in C for efficient processing of volume images.
03.08.2006 10:33
gmtplus 3.4.2
In cleaning house, I have created gmtplus 3.4.2 which now builds with
gmt 4.1.1 on Mac OSX 10.4.5. This code is suffering serious bit rot.
uwmtogmtplus no longer compiles and I do not personally know how to
use it or even test it. All I can say is that it compiles and that
Steve Cande has given me some sample data to go along with the code.
This will be my last attempt to do anything with the code, so I offer
it up to the community. Unless someone puts in some time testing and
debugging gmtplus this is the end of the road for it. I hear that a
lot of the functionality in gmtplus is now in gmt, so hopefully the
few of you that count on gmtplus can migrate to that.
I will be switching hosting services soon and will be loosing my unlimited bandwidth/storage limits, so if you want it, grab this stuff right away:
http://schwehr.org/software/gmtplus/
I will be switching hosting services soon and will be loosing my unlimited bandwidth/storage limits, so if you want it, grab this stuff right away:
http://schwehr.org/software/gmtplus/
03.08.2006 09:48
AIS
We have some progress on the shore based AIS station:
- Andy M. has the RM808 powered up on the bench and it seems happy.
- I got an mmsi identifier from http://www.boatus.com/mmsi/, which is free if you do it online.
03.07.2006 16:20
My brain is melting
I am starting to have strange flashbacks to IRIX/IRIX64/-old-ld/SGI
death throws. I got this on OSX 10.4.5. I was trying to compile
everything with gcc 3.3 since I am linking against all kinds of junk
in fink 10.4-transitional that is c++ and compiled with gcc 3.3. I
forgot that I need to do the same in a couple of external packages.
Maybe that is why fprintf is not defined. Nuts! That should never
happen for a straight C call. Bugger, bugger, bugger.
ld: warning multiple definitions of symbol _dct64 /sw/lib/libSDL_sound.dylib(libmpglib_la-dct64_i386.lo) definition of _dct64 /sw/lib/libmp3lame.dylib(dct64_i386.o) definition of _dct64 ld: Undefined symbols: _fprintf$LDBLStub _snprintf$LDBLStub _vfprintf$LDBLStub _vsnprintf$LDBLStub _printf$LDBLStub _sscanf$LDBLStub make[2]: *** [GeoZui4D] Error 1I even got desparate and added -lc to my link line which is now:
g++-3.3 -g3 -DDEV -Wall -Wno-deprecated -o my-app-please-work 10-billion-billion-object-files \ -L../external-libs/lib -L../external-libs/lib/Tktable2.9 -L/usr/X11R6/lib -L./lib.Darwin -L/sw/lib -lglut -lGLU -lXmu -lXext -lX11 -ljpeg -ltiff -lsmpeg -lSDL_mixer -lSDL -lSDL_sound -lxml2 -lnetcdf_c++ -lnetcdf -lccom -lgdal -lSDL_net -ltogl -lTktable2.9 -lavformat -lavcodec -lavutil -ltk -ltcl -lvorbis -lz -logg -lmp3lame -lvorbisenc -lc -bind_at_load -lSDLmain -lGL -framework Cocoa
03.07.2006 13:18
swig 1.3.28 and pivy 0.3.0
I am currently working up to having a python/OpenInventor API working
on my mac. I can't wait. This is something that Alex, Laurent, and I
have wanted since early 1997.
Pivy needs swig >= 1.3.25, so I have created a local fink package and called it swig1328, but want to have this thing named correctly from the start. Along with the package name being different, I have the swig program named swig1328. What would be a better name/solution?
For a python package, how do I make setup.py use gcc3.3 when it compiles swig generated c++ code?
The reason I'm doing this is that swig 1.3.20 is drastically different than swig 1.3.28 and I hear that many programs can not handle the newer swig.
So close!
Pivy needs swig >= 1.3.25, so I have created a local fink package and called it swig1328, but want to have this thing named correctly from the start. Along with the package name being different, I have the swig program named swig1328. What would be a better name/solution?
For a python package, how do I make setup.py use gcc3.3 when it compiles swig generated c++ code?
The reason I'm doing this is that swig 1.3.20 is drastically different than swig 1.3.28 and I hear that many programs can not handle the newer swig.
So close!
03.07.2006 10:44
proj and pyproj
More fink updates. I am only committing changes to the
10.4-transitional tree right now. If you try any of my fink packages
PLEASE SEND FEEDBACK! Either good or bad, I want to know! I have
updated proj to 4.4.9
which just adds some geos projection stuff. I also upgraded pyproj
to 1.7.
I took a look at wxglade packaging and realize that I need to learn more about the python distribution tools. All of my packages were really simple with everything at a top level. wxpython is a little bit more complicated.
Now I need to get the latest swig together so I can give pivy a try. If I remember right, swig is now radically different then at 1.3.20. I will be looking at swig-1.3.28.
Note to self: It would be really nice to have a blog feature that puts an expiration on some parts of the text. For example, I want to post a link to my gmt test packages for fink, but I want that info to disappear in a few days as it will all end up in the fink cvs tree and I will nuke that web directory when that happens.
I took a look at wxglade packaging and realize that I need to learn more about the python distribution tools. All of my packages were really simple with everything at a top level. wxpython is a little bit more complicated.
Now I need to get the latest swig together so I can give pivy a try. If I remember right, swig is now radically different then at 1.3.20. I will be looking at swig-1.3.28.
Note to self: It would be really nice to have a blog feature that puts an expiration on some parts of the text. For example, I want to post a link to my gmt test packages for fink, but I want that info to disappear in a few days as it will all end up in the fink cvs tree and I will nuke that web directory when that happens.
03.07.2006 08:09
podcasts
Yes, I am pretty nerdy. I admit it. My work world is dominated by
bash, emacs, and other Unix like programs. I enjoy listening to audio
programs (aka podcasts and books on tape) while on the bus to and from
work. I keep looking for great content, but what I find is occasional
good content. A Very Spatial Poscast (AVSP) is not bad and the IT
conversations are sometimes pretty interesting, but the best that I
have found to date (for me at least) is The Linux Show (TLS) which is
now defunct. It was a little over the top on open source politics,
but it did have some tech content. What do I really want? I want
20-30 minute segments that attack some topic and take me 0-60mps in
nothing flat. Teach me something cool. How about how to do something
cool with gdb, emacs, python, whatever. If you know something really
well, share that howto with us. Say you really understand the new '|'
construct in GNU Make. Then tell us all what it is there for and how
to properly use it. Are there any gotchas? Most podcasts seem to be
people telling me how great they are and how many people they know or
know them. Whatever. I just want to learn something fun and/or
powerful that makes my life better.
I should lead by example right? I have to some extent. I had one of my visualization classes video taped and it was/is streamed from somewhere at UCSD if you want to see. I just don't remember where. I also try to do that with this blog... giving myself and others some insight in a length that is somewhat digestible.
If you know something, pick up that microphone, make yourself a script, and make a quick and dirty audio recording and teach us something. BTW, I could care less what is in iTunes for pod casts. What an annoying way to deal with podcasts. I feel like one of those old crusty mainframe guys I used to see wandering the basements of NASA back in the 1980's.
Hey Apple, how about a podcast on how to setup launchd?
fink install dict
I should lead by example right? I have to some extent. I had one of my visualization classes video taped and it was/is streamed from somewhere at UCSD if you want to see. I just don't remember where. I also try to do that with this blog... giving myself and others some insight in a length that is somewhat digestible.
If you know something, pick up that microphone, make yourself a script, and make a quick and dirty audio recording and teach us something. BTW, I could care less what is in iTunes for pod casts. What an annoying way to deal with podcasts. I feel like one of those old crusty mainframe guys I used to see wandering the basements of NASA back in the 1980's.
Hey Apple, how about a podcast on how to setup launchd?
fink install dict
03.06.2006 15:37
trac and mantis
We have been looking into bug tracking systems. I have had a rough
time with bugzilla and want to avoid it. We have tested both MantisBTS and trac Within about 5 minutes I
was really impressed with trac. It has a nice wiki and integrates
with our svn tree... wow! What a pleasure to use. Here is an image
of me looking at the attached diff to a trac item that relates to my
top priority for GeoZui3D. I need to get wxglade into fink.
03.06.2006 10:33
fink updates
I'm made headway on a number of fink packages. My hope is to get
things I need for mapping and visualization up to the latest/greatest
and tested in the next week or two. Here is where I'm at on Monday
morning.
I have GMT 4.1.1 building it seems to be working. I sent it off to a number of GMT folks just now for testing. It is to the point where I can build MB-System 5.0.9 against it. To me that is a pretty good sign! I am having trouble with 10.3. I am note very motivated to work on 10.3 since I only have access to a very slow 5 year old iMac running 10.3 and I'm focusing for my research on using 10.4 as my base platform. (Yes, I will be running virtual PC too and am hoping that I can get Linux going there.) So here is my problem with GMT 4.1.1 in 10.3. Anyone who wants to offer a solution, please email me!
On the Coin/SoQt front, Kyrah, Chris S., and I have things pretty much all working. There seems to be a bug with the SoQt 1.3.x code that prevents both static and shared library generation at the same time. The support from the SIM/Coin folks is always awesome!
I am going to try to go for pyproj and proj very soon. pyproj is way out of date at 5 versions back, so that is a high priority item for me. Projections are one of those things that anyone working in spacial sciences ends struggling with way too often. More and better tools is always a good thing.
I have GMT 4.1.1 building it seems to be working. I sent it off to a number of GMT folks just now for testing. It is to the point where I can build MB-System 5.0.9 against it. To me that is a pretty good sign! I am having trouble with 10.3. I am note very motivated to work on 10.3 since I only have access to a very slow 5 year old iMac running 10.3 and I'm focusing for my research on using 10.4 as my base platform. (Yes, I will be running virtual PC too and am hoping that I can get Linux going there.) So here is my problem with GMT 4.1.1 in 10.3. Anyone who wants to offer a solution, please email me!
grdraster.c: In function `main': grdraster.c:324: error: structure has no member named `xy_off' grdraster.c:325: error: structure has no member named `xy_off' grdraster.c:327: error: structure has no member named `xy_off' grdraster.c:327: error: structure has no member named `xy_off' ... repeats for a number of source files.I am going to try to beef up mbsystem so that it has a -dev splitoff with the static libraries and headers, but I am not sure how that will go and if it will make it into the fink repositories.
On the Coin/SoQt front, Kyrah, Chris S., and I have things pretty much all working. There seems to be a bug with the SoQt 1.3.x code that prevents both static and shared library generation at the same time. The support from the SIM/Coin folks is always awesome!
I am going to try to go for pyproj and proj very soon. pyproj is way out of date at 5 versions back, so that is a high priority item for me. Projections are one of those things that anyone working in spacial sciences ends struggling with way too often. More and better tools is always a good thing.
03.04.2006 20:46
SoQt from CVS builds on Mac OSX 10.4/fink 10.4-transitional
Kyrah got me to back up and start with the configure problem and that
looks like was the key to getting shared libs to build for SoQt from
cvs using Mac OSX 10.4.5/fink 10.4-transitional. Here is how what I
did that works for me with Coin 2.4.4 installed from
10.4-transitional. This requires you to be using bash as your shell.
I remember no to long ago when this kind of syntax made no sense to
me! This forces the use of GCC 3.3 for the compilers.
wget http://ftp.coin3d.org/coin/src/snapshots/SoQt-latest.tar.gz tar xf SoQt-latest.tar.gz cd SoQt QTDIR=/sw CC=gcc-3.3 CXX=g++-3.3 ./configure --without-framework \ --enable-darwin-x11 --with-qt=/sw --enable-shared makeThe question is now, can I make both shared and static libraries at the same time? Looks like appending --enable-static turns off shared library generation right now.
ls src/Inventor/Qt/.libs/*.dylib src/Inventor/Qt/.libs/libSoQt.20.3.1.dylib src/Inventor/Qt/.libs/libSoQt.20.dylib src/Inventor/Qt/.libs/libSoQt.dylib
otool -L src/Inventor/Qt/.libs/libSoQt.dylib src/Inventor/Qt/.libs/libSoQt.dylib: /usr/local/lib/libSoQt.20.dylib (compatibility version 24.0.0, current version 24.1.0) /sw/lib/libqt-mt.3.dylib (compatibility version 3.3.0, current version 3.3.5)
03.03.2006 14:21
pysight!
pysight is for grabbing
isight images from within python!!! I have got to try this out. Who
is this guy who does http://livingcode.org. Sounds like
he is doing quite a number of interesting projects.
03.02.2006 20:04
new density release
I just put together a new release of density. Thanks to Chris and
Kyrah for helping me figure out how to get it to work on 10.4. My
issue with JPEG from before is because of case insensitivity in the
linker. I really prefer case sensitive machines!! The trick is to
use the new DYLD_LIBRARY_PATH variable and make sure that
DYLD_LIBRARY_PATH is unset.
unset DYLD_LIBRARY_PATH if [ -z "$DYLD_FALLBACK_LIBRARY_PATH" ]; then export DYLD_FALLBACK_LIBRARY_PATH=@FINK@/lib else export DYLD_FALLBACK_LIBRARY_PATH=@FINK@/lib:$DYLD_LIBRARY_PATH fiYou can find it at density.
03.01.2006 16:31
Bad apple
Doh! Today has been a tough one. I have been trying to multitask my
way through a large number of issues to get my development environment
back to a happier state. It is a really good thing that I did not
upgrade before I finished my PhD. Here are some of the battles.
GeoZui started using the new "|" rule dependency construct as a easy way to avoid always running configure in each subdir. There may be other ways around this, but this one was simple, so Roland went for it. I figured that I could just update the fink make to be 3.80 and all would be well. That was easy enough, but Max Horn informed me that Apple has made all kinds of tweaks to their gnu make and they did not merge them back into the gnu make tree. So some things will not build with the stock gnu make. BAD APPLE! Please, please, please integrate your changes in or stop using them!
The next is my trouble with Coin3d and clashing libjpeg and the ImageIO framework. I can't follow the advice I found via google to just fink remove libjpeg. That would probably nuke quite a bit! This may be an simage issue, but I am not totally sure. I miss the linux ldd command for programs. What is the equivalent for the Mac? I did make an info file for coin45 2.4.4 which looks close except for this clash problem.
Then cam SoQt 1.3. It seems to be a bit cranky. Something was wrong with the man page install code and it never seemed to generate a shared library. Doh.
Then in working with GeoZui, it looks like the wxglade generated code from Roland is now getting nuked on clean and fink does not have wxglade. No problemo... except that wxglade does not have a setup.py, so I need to create one and hopefully the project will take it.
Yikes. But tomorrow I get to take a short road trip, so that should be fun.
GeoZui started using the new "|" rule dependency construct as a easy way to avoid always running configure in each subdir. There may be other ways around this, but this one was simple, so Roland went for it. I figured that I could just update the fink make to be 3.80 and all would be well. That was easy enough, but Max Horn informed me that Apple has made all kinds of tweaks to their gnu make and they did not merge them back into the gnu make tree. So some things will not build with the stock gnu make. BAD APPLE! Please, please, please integrate your changes in or stop using them!
The next is my trouble with Coin3d and clashing libjpeg and the ImageIO framework. I can't follow the advice I found via google to just fink remove libjpeg. That would probably nuke quite a bit! This may be an simage issue, but I am not totally sure. I miss the linux ldd command for programs. What is the equivalent for the Mac? I did make an info file for coin45 2.4.4 which looks close except for this clash problem.
Then cam SoQt 1.3. It seems to be a bit cranky. Something was wrong with the man page install code and it never seemed to generate a shared library. Doh.
Then in working with GeoZui, it looks like the wxglade generated code from Roland is now getting nuked on clean and fink does not have wxglade. No problemo... except that wxglade does not have a setup.py, so I need to create one and hopefully the project will take it.
Yikes. But tomorrow I get to take a short road trip, so that should be fun.
03.01.2006 13:06
mapdex.org
http://mapdex.org... searched on
Portsmouth and got a whole bunch of broken viewers, but this one
worked.
orthomap
This comes from ArcNews which had a big full page writeup on it talking about how is is done with ArcIMS and WMS.
orthomap
This comes from ArcNews which had a big full page writeup on it talking about how is is done with ArcIMS and WMS.
03.01.2006 08:21
Mac OSX linking issue - libjpeg
I was trying to get all of my tools back in shape with Mac OSX 10.4
(using fink 10.4-transitional) and I ran into a problem. This occurs
with my coin/voleon viewer, simpleview, in density. I just updated
the fink package for coin yesterday so it compiles, but that whole
running thing is eluding me.
If you want to comment, I have made a pasteboard entry... http://paste.lisp.org/display/17370. BTW, I think paste is a pretty handy tool!
./simpleviewAny suggestions? I tried rebuilding libjpeg in fink. No luck. Does this error mean that ImageIO is trying to use libjpeg and is unhappy? Or is it the other way?
dyld: Symbol not found: __cg_jpeg_resync_to_restart Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO Expected in: /sw/lib/libJPEG.dylib ./simpleview: line 15: 4734 Trace/BPT trap $cmd
If you want to comment, I have made a pasteboard entry... http://paste.lisp.org/display/17370. BTW, I think paste is a pretty handy tool!