Low-altitude anti air defense weapons use Identification Friend or Foe equipment to determine whether aerial targets are friend or not to prevent friendly fire. Due to the characteristics of radio signals, Identification Friend or Foe equipment may generate false targets or may not be accurately identified as friendly forces depending on the operating environment such as surrounding mountains or buildings, which limits smooth operation. To eliminate abnormal targets generated from low-altitude air defense weapons, track-while-scan(TWS) algorithm is proposed in this paper. It could provide the stability enemy identification information to operators.