An implantable medical device is provided, comprising a hermetically scaled, biocompatible housing and at least three subcutaneous electrodes connected to the device for detecting electrical cardiac signals. The amplitude ratios of electrical cardiac activity for at least three combinations of two electrodes, forming at least three sensing vectors are compared with a reference to determine an orientation of the device.