# How to calculate stopping distance with grade?

$$d = \dfrac{V_1^2-V_2^2}{2g\left(\dfrac{a}{g}\pm G\right)}$$

I am wondering if the car travel on the road of a sag curve or crest curve, there is two gradients of the curve. (G1, G2). Which gradient value should be used in the formula ? The one with larger gradient?