An apparatus comprising: a radar system configured to detect radar-based gestures on behalf of application subscribers, the application subscribers being applications, services, or components that receive an output from a gesture-recognition model, wherein the gesture-recognition model is a part of the apparatus; an inertial measurement unit configured to receive inertial sensor data; a processor; and a state machine configured to transition between multiple states for controlling the radar system based on the inertial sensor data and context-sensitive transition functions, the state machine is performed on the processor and including: a no-gating state in which the state machine is configured to enable the radar system to output indications of the radar-based gestures to the application subscribers; a soft-gating state in which the state machine is configured to prevent the radar system from outputting the indications of the radar-based gestures to the application subscribers by shielding the gesture-recognition model from radar data collected by the radar system; and a hard-gating state in which the state machine is configured to prevent the radar system from detecting the radar-based gestures by disabling the gesture-recognition model; wherein a first function from the context-sensitive transition functions is configured to output a contextual score based on whether the radar system is occluded by an object; wherein the state machine is configured to transition from the no-gating state to the soft-gating state in response to the contextual score indicating that the radar system is not occluded by the object; and wherein the state machine is configured to transition from the no-gating state to the hard-gating state in response to the contextual score indicating that the radar system is occluded by the object. a radar system configured to detect radar-based gestures on behalf of application subscribers, the application subscribers being applications, services, or components that receive an output from a gesture-recognition model, wherein the gesture-recognition model is a part of the apparatus; an inertial measurement unit configured to receive inertial sensor data; a processor; and a state machine configured to transition between multiple states for controlling the radar system based on the inertial sensor data and context-sensitive transition functions, the state machine is performed on the processor and including: a no-gating state in which the state machine is configured to enable the radar system to output indications of the radar-based gestures to the application subscribers; a soft-gating state in which the state machine is configured to prevent the radar system from outputting the indications of the radar-based gestures to the application subscribers by shielding the gesture-recognition model from radar data collected by the radar system; and a hard-gating state in which the state machine is configured to prevent the radar system from detecting the radar-based gestures by disabling the gesture-recognition model; wherein a first function from the context-sensitive transition functions is configured to output a contextual score based on whether the radar system is occluded by an object; wherein the state machine is configured to transition from the no-gating state to the soft-gating state in response to the contextual score indicating that the radar system is not occluded by the object; and wherein the state machine is configured to transition from the no-gating state to the hard-gating state in response to the contextual score indicating that the radar system is occluded by the object. a no-gating state in which the state machine is configured to enable the radar system to output indications of the radar-based gestures to the application subscribers; a soft-gating state in which the state machine is configured to prevent the radar system from outputting the indications of the radar-based gestures to the application subscribers by shielding the gesture-recognition model from radar data collected by the radar system; and a hard-gating state in which the state machine is configured to prevent the radar system from detecting the radar-based gestures by disabling the gesture-recognition model; wherein a first function from the context-sensitive transition functions is configured to output a contextual score based on whether the radar system is occluded by an object; wherein the state machine is configured to transition from the no-gating state to the soft-gating state in response to the contextual score indicating that the radar system is not occluded by the object; and wherein the state machine is configured to transition from the no-gating state to the hard-gating state in response to the contextual score indicating that the radar system is occluded by the object.