Design and applications of a fiber-optic liquid-level sensor