A system and method use magnetic field sensing to detect underground objects for strike avoidance. The system detects magnetic field components for both passive distortions in the magnetic field indicative of a ferromagnetic object and active magnetic fields that are impressed on an object by a signal generator. A detection module has a magnetic sensor assembly that detects the magnetic field components. The magnetic field component data is transferred through a multiplexer to an analog/digital converter to a processor. Pitch angle data from a pitch sensor and roll angle data from a roll sensor also may be transferred to the processor. The data is processed by the processor to determine the orientation of the detection module with respect to the object. The detection module may be installed in an underground boring tool or a trenching assembly.