An aircraft's retractable landing gear system is equipped with a squat switch, also known as a weight-on-wheels switch.What is the primary function of this switch?