Derivation of Formula
So your formula does not work in all cases.  You can change your formula to a conditional formula like this:

\$  y = \left\{ \begin{matrix} \text{(your formula)} &amp; , &amp; \text{if } cranking=0 \\
\text{unknown} &amp; , &amp;  \text{otherwise}\end{matrix} \right. \$

The range (set of possible outputs) of this formula is no longer just real numbers, but real numbers plus "unknown". Whatever you use this formula for will need to account for this.  For example, if you will be averaging the values, you could just ignore "unknown" values unless a certain number of them accumulate.  Assuming the "cranking" case is short lived, the resulting averaged/filtered output may be acceptable. 

Another option would be to make the formula explicitly time-dependent. For example, if you know that cranking always lasts less than 5 seconds and reduces the state of charge by 2%:

\$  y(t) = \left\{ \begin{matrix} \text{(your formula)} &amp; , &amp; \text{if } cranking=0 \\
y(t-5\text{ seconds}) - 0.02 &amp; , &amp;  \text{otherwise}\end{matrix} \right. \$

You can keep adding more conditions. Perhaps the above 2% reduction only applies above 50% and below that it is a 1% reduction. You'll have to measure and refine until your model matches reality well enough for your purposes.