Abstract-Traffic monitoring using low-cost 2-axis magnetometers is considered. Though detection of metallic vehicles is rather easy, detecting the driving direction is more challenging. We propose a simple algorithm based on a nonlinear transformation of the measurements, which is simple to implement in embedded hardware. A theoretical justification is provided, and the statistical properties of the test statistic are presented in closed form. The method is compared to the standard likelihood ratio test on both simulated data and real data from field tests, where very high detection rates are reported, despite the presence of sensor saturation, measurement noise and near-field effects of the magnetic field.