Agricultural machine for spraying a phytosanitary liquid on cultivated land, comprising - means (10, 11) for moving the machine over the surface of the land, - a spray boom for spraying the phytosanitary liquid, comprising at least one arm (2a, 2b, 2c), - for the arm or for at least one of the arms (2a, 2b, 2c) of the boom, a mechanism for inclining (3, 3a, 3b, 3c) the arm (2a, 2b, 2c) in relation to a frame of the agricultural machine, - a mechanism for raising/lowering the boom according to a first axis fixed in relation to the frame of the machine and vertical, and even substantially vertical when the machine is on a planar horizontal surface or in relation to a second axis (Zg) of the same direction as the earth's gravity field, - a manual control system (38, 38a, 38b, 38c) for controlling each mechanism for inclining (3, 3a, 3b, 3c) and for controlling the mechanism for raising/lowering, - a receiver able to communicate with a global positioning system and - a control unit, the arm or at least one of the arms (2a, 2b, 2c) of the boom being provided with at least one sensor (6, 6a, 6b, 6c), each sensor (6, 6a, 6b, 6c) measuring a distance (d) between the surface of the land and this sensor (6, 6a, 6b, 6c) or, where applicable, between vegetation planted in the land and this sensor (6, 6a, 6b, 6c), the cabin of the machine is configured in such a way that a user can simultaneously control the means (10, 11) for moving the machine and the manual control system (38, 38a, 38b, 38c), the arm or at least one of the arms (2a, 2b, 2c) of the boom is provided - with a measuring element (7, 7a, 7b, 7c, 70, 103) for measuring a data (α, αa, αb, αc, α8, L103) relative to the inclination, in a plane (X1-Z1; X2a-Z1) perpendicular to the forward direction, of a longitudinal axis (X2, X2a, X2b, X2c) of the arm (2a, 2b, 2c) and the control unit is - connected to each sensor (6, 6a, 6b, 6c), to the receiver and to the measuring element (7, 7a, 7b, 7c, 70, 103), - provided with a memory for storing information provided, while the user controls the manual control system (38, 38a, 38b, 38c), by each sensor (6, 6a, 6b, 6c), by the receiver and by each measuring element (7, 7a, 7b, 7c, 70, 103) and - able to control each mechanism for inclining (3, 3a, 3b, 3c) and the mechanism for raising/lowering depending on the information (d, α, α8, αa, αb, αc, L103) stored in the memory. - means (10, 11) for moving the machine over the surface of the land, - a spray boom for spraying the phytosanitary liquid, comprising at least one arm (2a, 2b, 2c), - for the arm or for at least one of the arms (2a, 2b, 2c) of the boom, a mechanism for inclining (3, 3a, 3b, 3c) the arm (2a, 2b, 2c) in relation to a frame of the agricultural machine, - a mechanism for raising/lowering the boom according to a first axis fixed in relation to the frame of the machine and vertical, and even substantially vertical when the machine is on a planar horizontal surface or in relation to a second axis (Zg) of the same direction as the earth's gravity field, - a manual control system (38, 38a, 38b, 38c) for controlling each mechanism for inclining (3, 3a, 3b, 3c) and for controlling the mechanism for raising/lowering, - a receiver able to communicate with a global positioning system and - a control unit, - with a measuring element (7, 7a, 7b, 7c, 70, 103) for measuring a data (α, αa, αb, αc, α8, L103) relative to the inclination, in a plane (X1-Z1; X2a-Z1) perpendicular to the forward direction, of a longitudinal axis (X2, X2a, X2b, X2c) of the arm (2a, 2b, 2c) and - connected to each sensor (6, 6a, 6b, 6c), to the receiver and to the measuring element (7, 7a, 7b, 7c, 70, 103), - provided with a memory for storing information provided, while the user controls the manual control system (38, 38a, 38b, 38c), by each sensor (6, 6a, 6b, 6c), by the receiver and by each measuring element (7, 7a, 7b, 7c, 70, 103) and - able to control each mechanism for inclining (3, 3a, 3b, 3c) and the mechanism for raising/lowering depending on the information (d, α, α8, αa, αb, αc, L103) stored in the memory.