MEMS-based inclinometer