Construction of the algorithm to estimate bathing posture