Tuesday, 24 April 2012

on brollies, flashes and angles

I'm trying to understand what really happens using flash bounce in a silvered brolly, so I've done some tests to see what happens. All these are using a 90cm brolly (some special offer I got ages ago). The photos are all taken with the camera and flash on manual and within each series the settings are unchanged.
 
IMG_4469-13.jpg
Naked flash into brolly.
Reference piccy
IMG_4468-12.jpg
flash with single layer of tissue
into brolly.
loses 0.7 stop, and shows
slight yellow cast. At this
distance and angle there is not
a lot of difference in softness.

 
The following photos are all taken with the camera and flash on manual and within each series the settings are unchanged.
The naked series shows a naked canon 270EX II naked on wide. The horizontal dispersion isn't too bad, but vertically the fall off is drastic, with the top and bottom panels fading away to almost nothing (well at least 4 stops down).
IMG_4389-1.jpg
on axis:
centre 95, outer 65-15
IMG_4390-2.jpg
30 degrees:
centre 90, outer 70-12
IMG_4391-3.jpg
45 degres:
centre 75, outer 85-10
IMG_4392-4.jpg
60 degrees:
centre 40, outer 70-10
IMG_4393-5.jpg
75 degrees:
centre n/a, outer 40
IMG_4394-6.jpg
90 degrees

 
The loo paper series shows a canon 280EX II on wide with a small piece of loo paper (1/2 thickness, i.e. 1 of the 2 plys) taped over the flash head. This setup gives really wide dispersion, with minimal fall off until over 45 degrees off-axis. Note that the camera settings are not the same as above, so the two series shouldn't be compared.
The centre is around a stop brighter than the outer part, but this is much better than the naked flash.
IMG_4399-1.jpg
on axis:
centre 120, outer 60 - 80
IMG_4400-2.jpg
approx 30 degrees
centre 110, outer 55
IMG_4401-3.jpg
approx 45 degrees:
centre 110, outer 55
IMG_4402-4.jpg
approx 75 degrees:
centre 80, outer 50
IMG_4403-5.jpg
approx 90 degrees:
all 25

Wednesday, 14 March 2012

Pixel king with speedlite 270EX II

The Pixel Kings give you control over flash power in groups (as with Canon's built in flash control system), but now the Pixel King receiver defines the group for the flash mounted on each PK receiver.

So a Pixel King + 270EX II means you can have all the benefits of radio wireless link, and put the 270 into any group.  It's still just a smallish flash, so you may still need a bigger beast for some things, but where you don't need too much power, these little flashes are small, light and only need to AA batteries.

Saturday, 11 February 2012

compasses and apps using android sensors

The image stability of android apps that use the sensors varies enourmously, many are very jiggly to the extent of being almost unusable.  It seems that the raw sensor data can be pretty noisy, and many apps make little or poor attempts to deal with this.  A few use heavy smoothing to try and fix this, but this increases the lag which doesn't help.

There are a few apps that seem to have tackled the problem successfully, so I shall have to find out how to do this to make my app work well.


  1. Google's skymap is reasonably smooth, but noticeably laggy - could do a lot better 4/10
  2. Sun Path sylde is very jiggly indeed - 2/10
  3. 3D compass is quite responsive, but does tend to go a bit wild 5/10
  4. Steady compass takes a few moments to settle when first started but then is then very steady indeed and has very little lag - just a shame it's only doing it in 2D.  8/10

Tuesday, 7 February 2012

enabling remote access to the database

This sets up the database so you can access it from other computers (for example using psql)

  • amend the hba file to specify access conditions:
    • file: /etc/postgresql/9.1/main/pga_hba.conf
    • append: host    all     all     192.168.1.0/24  trust
  • amend the main config file to listen externally as well as internally
    • file: /etc/postgresql/9.1/main/postgresql.conf
    • amend the line #listen_addresses = 'localhost'
    • to: listen_addresses = '*'
    • (don't forget to remove the #)
  • restart postgresql
    • sudo /etc/init.d/postgresql restart

Sunday, 5 February 2012

roll your own openstreetmap server - Ubuntu 11.10

Looks like there a few benefits from setting up an OSM server on Ubuntu 11.10 as most of the software used is now at 'good' versions - only mapnik lags behind, but while the standard OSM XML files are still not mapnik 2 compliant, that can be a good thing too.
So here's a complete rundown on getting an OSM server up and running.

getting the server ready

I run this sort of thing as a VM on a baby server upstairs. So I've set up a VM with a 100Gb disc (through LVM) ready to build Ubuntu 11.10 server. This disc size is plenty if you're going to use a subset of the data. Here's how I first fire up the VM from the host machine (also running Ubuntu 11.10).
virt-install -n mapnik11 -r 10000 --vcpus=2 \
--os-variant=ubuntuoneiric \
--disk /dev/bigraid/mapnik11 \
--disk device=cdrom,path=../ubuntu-11.10-server-amd64.iso \
--boot cdrom \
--network bridge=virbr0 \
--graphics vnc \
--check-cpu
If you want to know more about this, go search the web.

Installing and basic setup of Ubuntu

I always start with Ubuntu server, as booting up the server install system is soooo much faster than booting into full GUI desktop (which is how the desktop install starts. Once it's built it also boots (and shuts down) in a few seconds (i.e. 5 or 6).
So do a completely straight install of Ubuntu server, with the relevant settings for you. I built mine with 100Gb of filestore (on an LVM logical volume so I can snapshot it), and let the installer partition automatically on the whole disc. Near the end of the install process I select ssh as the only package to install at this stage.
I could install more packages, but as I have an apt-proxy I don't want to install any more until I have the proxy set up.
Once the VM has rebooted I:
  • set up my apt-proxy (irrelevant for you if your not running a proxy)
  • install acpid, nfs server setup nfs server.
    • acpid means you can shutdown your VM with virsh or Virtual Machine Manager
    • nfs server is really handy so you can move files around between machines 9as long as their linux)
    • you'll probably want to set NEED_IDMAPD=yes in /etc/default/nfs-common as well if your running nfs4
  • If you wanna use webmin or other standard tools, now is the time to do that too.
  • If you use a windoze desktop to access things, you probably want to install Samba at this stage, but personally I'm all linux here so I've never used Samba.
sudo apt-get install acpid nfs-kernel-server

Installing database, gis and other things you will need

At this point if your internet connection isn't too fast, start downloading the openstreetmap data to save time later. You can go for the whole thing, or (probably a better idea to start with at least) you can get a regional subset.
I usually use the british isles (about 650Mb). The whole planet is around 20Gb as of now.
Most of the following is derived from this guide, updated to work with Ubuntu 11.10 and where practical to use packages that are standard in Ubuntu 11.10. I have copied the relevant info over from there where relevant.


sudo apt-get install acpid build-essential libxml2-dev libtool libgeos-dev libpq-dev libbz2-dev proj subversion autoconf postgresql postgresql-9.1-postgis

  • add the line kernel.shmmax = 268435456 to /etc/sysctl.conf
    • performance tweaks to help the database server
  • sysctl -p will force params to be reloaded (and get this changed value setup)
  • and there are changes to make to the postgres config file as well: change the following settings in /etc/postgresql/9.1/main/postgresql.conf
shared_buffers = 128MB # 16384 for 8.1 and earlier
checkpoint_segments = 20
maintenance_work_mem = 256MB # 256000 for 8.1 and earlier
autovacuum = off
Restart postgres: sudo /etc/init.d/postgresql restart

Setting up the database

Replace USERNAME with your username in the following:
sudo -u postgres -i
createuser USERNAME # answer yes for superuser
createdb -E UTF8 -O USERNAME gis
exit
And now set up postgis on the new database:
psql -f /usr/share/postgresql/9.1/contrib/postgis-1.5/postgis.sql -d gis
This will generate lots of output, ending with
....
....
CREATE FUNCTION
COMMIT
....
....
....
DROP FUNCTION
Change the permisions to save lots of hassle later!
echo "ALTER TABLE geometry_columns OWNER TO username; ALTER TABLE spatial_ref_sys OWNER TO username;" | psql -d gis
Finally set the Spatial Reference Identifier:
psql -f ~/bin/osm2pgsql/900913.sql -d gis
which should respond with
INSERT 0 1

Loading the database

Assuming your download has finished, now its time to stuff all that luverly data into postgres.... Something like this should do the trick:
./osm2pgsql -S default.style --slim -d gis -C 2048 --number-processes=2 --cache-strategy=dense ~/planet/british_isles.osm.bz2
Put in the right filename and let it go. On my baby VM it takes about 45 minutes to load the british isles......
Once that's done we just need to vacuum things (since we turned autvacuum off earlier....)

  • first fire up psql with psql -d gis
  • then do this vacuum analyze

that's all for now.