A swinging arm type of frame height sensor was designed to measure the distance variation between the soil surface and the frame of a sensor system developed for the online measurement (tractor-based continuous measurement) of the spatial variation in soil compaction. A linear variable displacement transducer (LVDT) with a 0.2 m stroke length was used to connect the frame to a metal wheel of the frame height sensor at the axle of the wheel. An analytical-statistical hybrid model was developed for the direct calculation of the frame height variation. Tests were performed on four surfaces: asphalt road; rough dirt track; and agricultural silty clay loam soil (bare soil and soil with stubble present). The results were compared with ultrasonic measurements to validate the sensor. An excellent correspondence of distance measurement was found between the two sensors with a standard error (SE) of 0.0033 m and with a high determination coefficient R-2 of 0.93. However, the measurement of the frame height was found to be exaggerated when using the wheel-LVDT sensor on the dirt track, which was attributed to the wheel sinkage in the loose soil. Although the standard error between the wheel-LVDT measurements and ultrasonic distance measurements was still low (0.0049 m) for the dirt track, this was higher than that found on the asphalt road. Similarly, the trajectories of the frame height measurement performed on the field showed a good correspondence between the wheel-LVDT sensor and the ultrasonic sensor. The wheel-LVDT sensor measured a slightly larger height than the ultrasonic sensor, with mean deviations ranging between 0.018 and 0.021 m. In comparison with the standard error (0.035 m) of the measurement line with maize stubble, lower standard errors of 0.0064 and 0.0088 m with high R-2 were found for the bare soil surface without and with subsoiler, respectively. Pressing of the stubble by the relatively large mass of the wheel of 175 N made the measurement of frame height variation with the wheel-LVDT sensor apparently less affected by stubble compared to the measurement with the ultrasonic sensor. Therefore, the wheel-LVDT sensor can be used more accurately than the ultrasonic sensor, in fields covered with plant residues and stubble, providing the input for the position control of the tractor three-point linkage aiming at online measurement of soil compaction at constant depths. Based on a certain soil type, moisture content and dry bulk density, correction factors need to be selected and subtracted from the wheel-LVDT sensor output to compensate for the extra distance measured due to the wheel sinkage on a bare soil surface. (C) 2004 Silsoe Research Institute. All rights reserved Published by Elsevier Ltd.