ori-drs / allan_variance_ros

ROS compatible tool to generate Allan Deviation plots

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

analysis.py code question, unused variable

PabloRauhCorro opened this issue · comments

In analysis.py, from lines 97-107, you calculate white_noise_break_point and use it as an index to limit the interval where the white noise fit is calculated on. You also calculate random_rate_breakpoint (shouldn't this be at a period of 10^3 = 300 instead of 10^1=10?), but it remains an unused variable, you do not use it for the random rate fit. Is that intended, and if so, why?

Code:

white_noise_break_point = np.where(period == 10)[0][0]
random_rate_break_point = np.where(period == 10)[0][0]

accel_wn_intercept_x, xfit_wn = get_intercept(period[0:white_noise_break_point], acceleration[0:white_noise_break_point,0], -0.5, 1.0)
accel_wn_intercept_y, yfit_wn = get_intercept(period[0:white_noise_break_point], acceleration[0:white_noise_break_point,1], -0.5, 1.0)
accel_wn_intercept_z, zfit_wn = get_intercept(period[0:white_noise_break_point], acceleration[0:white_noise_break_point,2], -0.5, 1.0)

accel_rr_intercept_x, xfit_rr = get_intercept(period, acceleration[:,0], 0.5, 3.0)
accel_rr_intercept_y, yfit_rr = get_intercept(period, acceleration[:,1], 0.5, 3.0)
accel_rr_intercept_z, zfit_rr = get_intercept(period, acceleration[:,2], 0.5, 3.0)