Moving horizon estimation for hybrid systems