There is provided a method of determining an estimate of the velocity of a device in a horizontal or vertical direction, the method comprising obtaining measurements of the acceleration acting on the device in three dimensions using a first filter and the obtained measurements to estimate acceleration due to gravity estimating the acceleration acting in a horizontal or vertical direction due to motion of the device using the estimated acceleration due to gravity integrating the estimate of the acceleration acting in said direction due to motion of the device to give an estimate of velocity in said direction and using a second filter to remove offset and/or drift from the velocity to give a filtered velocity wherein at least one of the first filter and second filter is a non-linear filter. An apparatus configured to operate according to the above method is also provided.