We discuss the off-line and on-line aspects of trajectory planning in bearings-only localization. Assuming that there are m(ges 1) moveable sensors (e.g. UAVs), which fly in closed trajectories, the aim is to determine the optimal shape of the trajectory. We investigate the properties of closed optimal trajectories in the off-line problem and show that these solutions are invariant under a scaling transformation of the problem parameters. This result is used to numerically derive a set of solutions for the normalized parameters. These solutions are then used in a stochastic search algorithm which randomly explores the trajectories but spends the largest amount of time in the optimal trajectory