Rewrote discretisation code in preparation for import into ROS.