My understanding is that the Kalman gain for a regular multivariate filter is computed as
$$ K = \bar P H^T S^{-1} \\ S = H \bar P H^T + R $$
$K$ being the Kalman gain, $\bar P$ being the prior state covariance, $H$ being the measurement function, $S$ being the innovation covariance, and $R$ being the sensor noise.
The state is updated with this equation:
$$ x = \bar x + Ky $$
with $x$ being the posterior state, $\bar x$ being the prior state, and $y$ being the residual.
In the text I am reading, the $H^T$ term in $K$ is explained as being responsible for transforming the value of y into state space, which leaves the $\bar P S^{-1}$ term responsible for scaling the residual as it is added to $\bar x$.
The part that confuses me is that $\bar P$ is obviously in state space, as it is the state covariance. However, $S$ is in measurement space, as it is clearly the sum of $\bar P$ projected into measurement space plus $R$, which is also in measurement space. If state space and measurement space happen to be in different units that have completely different scales (maybe a voltage measurement is being used to estimate a state variable of temperature), I feel like the ratio would not make sense, or unfairly weight the units with a smaller scale.
Is my thinking here correct, or do the current set of equations I have not account for a possible difference in units between state and measurement space?