A system and method establishes an acceleration of a vehicle which may be
used to control a brake system of a towed vehicle towed by a towing
vehicle. The system and method establish a gravity vector representing
acceleration due to gravity, measure acceleration of the vehicle in a
first direction and responsively establish a first acceleration value,
measure acceleration of the vehicle in a second direction and
responsively establish a second acceleration value, and establish a
magnitude of the acceleration of the vehicle in a plane orthogonal to the
gravity vector as a function of the gravity vector and the first and
second acceleration values.