A smartphone-based fall detection system