The problem of optimal trajectory planning of the moving object is addressed. The task is to minimize the risk of detection of the moving object by a static sensor while moving between two given points in space. The detection is based on the primary acoustic field radiated by the object with a non-uniform radiation pattern. In the first part of the article, the probability of non-detection is derived. Further it is used as an optimization criterion. Non-uniform radiation pattern of the object differs this work from the previous researches in the area. The optimal trajectory and velocity law of the moving object are found, as well as the criterion value.