Metrological characterization and signal processing of a wearable sensor for the measurement of heart rate variability