The Location module implements a hierarchical state machine with the following states and transitions: