1. A method for determining a crab angle of a portable electronic device carried by a user, wherein the crab angle is an angle by which the device direction of travel differs from the device orientation, and wherein the device is provided with a vector accelerometer, the method comprising: detecting a step of the user at a fixed phase of the user's step cycle using the vector accelerometer and acquiring a plurality of acceleration vectors; projecting each acceleration vector into a horizontal plane that is perpendicular to a vertical direction; determining an energy vector for each projected acceleration vector over one step cycle; and computing the device crab angle by finding a direction in the horizontal plane having maximal energy associated therewith.