A method of tracking a state of a mobile electronic device, the method comprising iteratively performing the steps of (i) representing the state of the mobile electronic device using a grid comprising a plurality of cells, each cell representing a region in state space defined by one or more state variables and having a first probability value that the state of the mobile electronic device is within that region in state space, the grid being bounded to include only cells having a probability value above a predetermined threshold; (ii) obtaining measurement signalling indicating values of one or more state variables; (iii) updating the first probability values of the grid to obtain an updated grid comprising cells having a second probability value, and moving the boundary of the grid to exclude cells having a probability value below the predetermined threshold and/or include cells having a probability value above the predetermined threshold, the second probability value of a cell of the updated grid found by multiplying the first probability value with an integration of a measurement likelihood function over the corresponding cell of the grid, the measurement likelihood function representing an estimated position of the mobile electronic device based on the measurement signalling; and (iv) predicting third probability values of the grid based on the updated grid and a motion model for the mobile electronic device to obtain a predicted grid (12") for use in step (i) of a subsequent iteration, the third probability value of a cell (14") of the predicted grid (12") found by summing all second probability values in the current iteration weighted by the probability of transition to the cell (14") of the predicted grid (12"). (i) representing the state of the mobile electronic device using a grid comprising a plurality of cells, each cell representing a region in state space defined by one or more state variables and having a first probability value that the state of the mobile electronic device is within that region in state space, the grid being bounded to include only cells having a probability value above a predetermined threshold; (ii) obtaining measurement signalling indicating values of one or more state variables; (iii) updating the first probability values of the grid to obtain an updated grid comprising cells having a second probability value, and moving the boundary of the grid to exclude cells having a probability value below the predetermined threshold and/or include cells having a probability value above the predetermined threshold, the second probability value of a cell of the updated grid found by multiplying the first probability value with an integration of a measurement likelihood function over the corresponding cell of the grid, the measurement likelihood function representing an estimated position of the mobile electronic device based on the measurement signalling; and (iv) predicting third probability values of the grid based on the updated grid and a motion model for the mobile electronic device to obtain a predicted grid (12") for use in step (i) of a subsequent iteration, the third probability value of a cell (14") of the predicted grid (12") found by summing all second probability values in the current iteration weighted by the probability of transition to the cell (14") of the predicted grid (12").