In general, the disclosure is directed to techniques for determining the position of a piston within a linear actuator, such as a hydraulic cylinder, in a more cost effective and less labor-intensive fashion compared to current techniques for determining the position of a piston within a linear actuator. One or more magnets may be operably coupled to the piston, and a linear array of sensors may be disposed along an exterior length of the linear actuator. The sensors may measure the magnetic field generated by the magnet and, based on the measured magnetic field, may determine the location of the piston within the linear actuator.