calc_average_rr ver 1.0