A mobile machine comprising: a chassis; a plurality of ground-engaging elements for supporting the chassis on a ground surface and propelling the chassis relative to the ground surface, each of the plurality of ground-engaging elements being at a fixed angle relative to the chassis; a plurality of actuators (22, 24) for driving movement of the ground-engaging elements, each of the actuators being configured to drive movement of one of the ground-engaging elements independently of the other ground-engaging elements; and a controller for controlling each of the actuators (22, 24) to cause the mobile machine to follow a guidance path along a ground surface, wherein the controller is configured to: generate a first set of control values for driving the machine according to a first heading based on a reference heading error ( head err,rh) of the machine, generate a second set of control values for driving the machine according to a second heading based on a distance heading error ( head err,d) of the machine, determine a weight scheme for the first set of control values and the second set of control values, the weight scheme depending on a distance error (d) and giving greater weight to the first set of control values with smaller distance errors and giving less weight to the first set of control values with larger distance errors, the distance error (d) being a distance between the machine's location and the guidance path, generate control signals for driving the machine by combining the first set of control values and the second set of control values according to the weight scheme, and use the control signals to control the actuators (22, 24) to thereby cause the machine to follow the guidance path; and characterised in that the controller is configured to - apply a hyperbolic tangent function to the distance error (d) to generate a tanh value tanh(d), where d is the distance error, and determine the weight scheme using tanh(d). a chassis; a plurality of ground-engaging elements for supporting the chassis on a ground surface and propelling the chassis relative to the ground surface, each of the plurality of ground-engaging elements being at a fixed angle relative to the chassis; a plurality of actuators (22, 24) for driving movement of the ground-engaging elements, each of the actuators being configured to drive movement of one of the ground-engaging elements independently of the other ground-engaging elements; and a controller for controlling each of the actuators (22, 24) to cause the mobile machine to follow a guidance path along a ground surface, wherein the controller is configured to: generate a first set of control values for driving the machine according to a first heading based on a reference heading error ( head err,rh) of the machine, generate a second set of control values for driving the machine according to a second heading based on a distance heading error ( head err,d) of the machine, determine a weight scheme for the first set of control values and the second set of control values, the weight scheme depending on a distance error (d) and giving greater weight to the first set of control values with smaller distance errors and giving less weight to the first set of control values with larger distance errors, the distance error (d) being a distance between the machine's location and the guidance path, generate control signals for driving the machine by combining the first set of control values and the second set of control values according to the weight scheme, and use the control signals to control the actuators (22, 24) to thereby cause the machine to follow the guidance path; and characterised in that the controller is configured to - apply a hyperbolic tangent function to the distance error (d) to generate a tanh value tanh(d), where d is the distance error, and determine the weight scheme using tanh(d). generate a first set of control values for driving the machine according to a first heading based on a reference heading error ( head err,rh) of the machine, generate a second set of control values for driving the machine according to a second heading based on a distance heading error ( head err,d) of the machine, determine a weight scheme for the first set of control values and the second set of control values, the weight scheme depending on a distance error (d) and giving greater weight to the first set of control values with smaller distance errors and giving less weight to the first set of control values with larger distance errors, the distance error (d) being a distance between the machine's location and the guidance path, generate control signals for driving the machine by combining the first set of control values and the second set of control values according to the weight scheme, and use the control signals to control the actuators (22, 24) to thereby cause the machine to follow the guidance path; and characterised in that the controller is configured to - apply a hyperbolic tangent function to the distance error (d) to generate a tanh value tanh(d), where d is the distance error, and determine the weight scheme using tanh(d). apply a hyperbolic tangent function to the distance error (d) to generate a tanh value tanh(d), where d is the distance error, and determine the weight scheme using tanh(d).