1. A downhole tool for determination of the position and orientation of a bed boundary in a formation surrounding a wellbore during drilling of the wellbore, the downhole tool comprising: (a) a transmitter for transmitting acoustic signals at at least one position in the wellbore during drilling of the wellbore, said acoustic signals traveling having an acoustic velocity; (b) a plurality of spaced apart receivers for detecting signals transmitted by the transmitter, the detected signals including reflections of transmitted signals reflected by the bed boundary (reflected signals); and (c) a processor for prefiltering the detected signals using a prefilter for selectively attenuating a portion of the transmitted signals traveling directly between the transmitter and the plurality of receivers (body waves) and providing prefiltered signals, the processor further using said acoustic velocity and the prefiltered signals for determining a distance and orientation of the bed boundary relative to the tool.