A wearable sensor for measuring sweat rate