A method performed on a device, the method comprising: accessing new location data from a location source of a plurality of location sources, the new location data comprising a new position and an accuracy of the new position; determining a current position and an accuracy of the current position based on the new position, the accuracy of the new position, a previous current position, and an accuracy of the previous current position; determining a change in location based on a difference between the current position and the previous current position; determining whether the new location data comprises a new altitude value: in response to the new location data not comprising the new altitude value: setting a current altitude value to a previous current altitude value if the change in location is less than a first threshold and the previous current altitude value is not a null altitude value; and setting the current altitude value with the null altitude value if the change in location is not less than the first threshold; and in response to the new location data comprising the new altitude value, setting the current altitude value with the new altitude value; wherein the null altitude value indicates an unknown altitude. accessing new location data from a location source of a plurality of location sources, the new location data comprising a new position and an accuracy of the new position; determining a current position and an accuracy of the current position based on the new position, the accuracy of the new position, a previous current position, and an accuracy of the previous current position; determining a change in location based on a difference between the current position and the previous current position; determining whether the new location data comprises a new altitude value: in response to the new location data not comprising the new altitude value: setting a current altitude value to a previous current altitude value if the change in location is less than a first threshold and the previous current altitude value is not a null altitude value; and setting the current altitude value with the null altitude value if the change in location is not less than the first threshold; and in response to the new location data comprising the new altitude value, setting the current altitude value with the new altitude value; wherein the null altitude value indicates an unknown altitude. in response to the new location data not comprising the new altitude value: setting a current altitude value to a previous current altitude value if the change in location is less than a first threshold and the previous current altitude value is not a null altitude value; and setting the current altitude value with the null altitude value if the change in location is not less than the first threshold; and setting a current altitude value to a previous current altitude value if the change in location is less than a first threshold and the previous current altitude value is not a null altitude value; and setting the current altitude value with the null altitude value if the change in location is not less than the first threshold; and in response to the new location data comprising the new altitude value, setting the current altitude value with the new altitude value; wherein the null altitude value indicates an unknown altitude. <EOS>