NOVELTY - The method involves determining current relative alignment of a first component i.e. gear box (110), and a second component i.e. generator (120), to each other in an automatic manner. Deviation of the current relative alignment and desired relative alignment of the respective components are automatically changed to obtain the current relative alignment on the desired relative alignment. The current relative alignment is measured by using a photometry. The relative alignment of each component is changed by using an alignment changing device (150).    USE - Method for correcting relative orientation of a first component i.e. gear box, and a second component i.e. generator, of a powertrain of a machine i.e. wind energy plant. Can also be used for various combustion engines or electric power generation plant e.g. hydroelectric power plant.    ADVANTAGE - The method enables changing deviation of the current relative alignment and desired relative alignment of the respective components to obtain the current relative alignment on the desired relative alignment so as to simultaneously detect force and/or energy of the gear box and the generator.    DETAILED DESCRIPTION - INDEPENDENT CLAIMS are also included for the following:    (1) a computing unit for performing a method for correcting relative orientation of two components of a powertrain of a machine    (2) a device for correcting relative orientation of two components of a powertrain of a machine    (3) a computer program comprising set of instructions for performing method for correcting relative orientation of two components of a powertrain of a machine    (4) a machine-readable memory medium comprising of instructions for performing method for correcting relative orientation of two components of a powertrain of a machine.    DESCRIPTION OF DRAWING(S) - The drawing shows a schematic sectional view of a wind energy plant with a positioning device.    Powertrain (100)    Gear box (110)    Counter shaft (115)    Generator (120)    Alignment changing device (150)