A method is provided which relates to the identification of the electrical activity in the heart in terms of a single dipole, which may be considered moving or non-moving, based on measurements from a body surface electrocardiogram (ECG), concurrently estimating subject and measurement related conditions. The invention further relates to computer program for performing said method, a data carrier containing said program as well a computer device for performing said program. A device for performing said method is also disclosed.