You don't, as I'm sure you guessed
Forward acceleration is set by a duty cycle that raises the voltage above the present, instantaneous value of the motor's back EMF, and deceleration (via regenerative braking) is set by lowering the duty cycle below the present back EMF value. For instance, you could determine the EMF pretty well by comparing the duty cycle % vs. current flow from the battery. You can also correlate with the present RPM and acceleration vector.
You build "inertia" into the code in how it executes a delta in duty cycle. The delta increase in V_avg to behave as current limiting, and the delta decrease to behave as limiting on deceleration.
I wonder if there's a way to make the software always drive the low side first without too much logic complications.
If I was going to buy off the shelf, it would probably something like this Roboteq 30V - 40A unit:
SDC1130 - Single Ch. 40A, Brushed DC Motor Controller | Brushed DC Motor Controllers
No apologies, you're way ahead on all the useful, necessary outside electronics surrounding the half-bridge. I greatly appreciate the help and questions.