This paper deals with predictive maintenance of infrastructure objects, focusing on the inspection of bridges. To achieve this goal, unmanned aerial vehicles place measuring units for data collection at different points of the bridge. This work deals with the question of how these measuring units can be found and removed by them later. For this purpose, a magnetic localization method based on the STAR method is presented. In contrast to the STAR method, which only detects the center of a magnetic target, a modified version called SRIOD is implemented here, where the orientation of the magnetic target can also be detected. This is essential information if the unmanned aerial vehicle is to grab the measuring unit with a robotic arm. In this regard, two identical permanent magnets are integrated into the measuring unit, whose gradient tensor contraction of the magnetic flux density distribution has a directed asymmetric surface when considering the contours of constant values. This creates a magnetic invisible reference plane that can be detected with a magnetic gradiometer. The method is verified both in simulation and experimentally in a laboratory setup.