A wearable sensor belt used as a reference frame for determining a location of an in-vivo device in the gastrointestinal (GI) tract, the belt including N magnetic field generating coils and M magnetic field sensors configured for dynamic calibration of the belt's geometry in order to accommodate for dynamic changes in the shape and/or size of the belt from one subject to another, and for dynamic changes in the shape and/or size of the belt as a result of changes in a subject's posture. A method for localizing an in-vivo device swallowed by a subject using a sensor belt is also described.