1. A Method for drilling while automatically detecting the state of a drilling rig during the drilling process of a wellbore comprising the steps of: receiving two or more independent input data channels, each input data channel representing a series of measurements made over time during the drilling process; and automatically detecting the most likely state of the drilling rig from at least three possible rig states, the detection based on the two or more input channels.