Got measurement simulation working
Merge branch 'master' into leigh-working