This paper describes a prototype device to estimate the trajectory of the piston in a free-piston driver. The device, which screws to the front face of the piston, has an internal data acquisition system which triggers upon piston launch and records the acceleration history across the complete piston stroke. A key feature is the incorporation of an optical waypoint detector. This comprises a laser which is directed onto the compression tube wall, and a photodiode which measures the reflected intensity. A series of evenly spaced high-contrast lines are marked on the tube surface, which appear as a pattern of intensity changes in the photodiode signal and define a set of exact position–time coordinates along the trajectory. Optical pattern recognition has previously been shown to be effective to identify piston traversal past a fixed detector; in this application, the order is reversed so that the detector is on the piston, and the pattern is at the fixed location. Waypoint detection permits computation of a precise in situ calibration of the accelerometer and correction of the acceleration integration along the piston stroke. The key benefits of this concept are that it provides a complete, fully time-resolved, accurate estimate of piston position, is self-contained and portable, and can be readily utilised on any free-piston driver without significant modification to the facility.