Self-calibrating mass flow sensor