Hi All,
I have been looking into the code of guidance_v_adapt.c and came across the following lines.
if (g_m_zdd > 0) {
gv_adapt_Xmeas = (g_m_zdd + (thrust_applied >> 1)) / thrust_applied;
} else {
gv_adapt_Xmeas = (g_m_zdd - (thrust_applied >> 1)) / thrust_applied;
}
I understand that g_m_zdd represents the acceleration measured by the (IMU-9.81). It would be very helpful if someone could explain from where does the formula of gv_adapt_Xmeas come. Also g_m_zdd is left shifted by 24 while thrust is shifted by 0 (on scale of 0 to 9600) Hence, why are we adding variables with different shifts?
Thanks,
Srinath
ᐧ