Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The data_4 dataset contains data which cannot be drifted #2

Open
keszegrobert opened this issue Mar 14, 2022 · 0 comments
Open

The data_4 dataset contains data which cannot be drifted #2

keszegrobert opened this issue Mar 14, 2022 · 0 comments

Comments

@keszegrobert
Copy link

`---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
/var/folders/5d/jppcsct91857cvxdp34vyw780000gp/T/ipykernel_31642/2518927757.py in
1 fig, ax = plt.subplots(figsize=(16, 8))
----> 2 plot_vel(time,acc,ax,'drift')

/var/folders/5d/jppcsct91857cvxdp34vyw780000gp/T/ipykernel_31642/4091315804.py in plot_vel(time, acc, ax, v_type)
1 def plot_vel(time,acc,ax,v_type):
2 if v_type == 'drift':
----> 3 vel = get_vel_drift(time,acc)
4 ax.set(title="Velocity correct")
5 elif v_type == 'pure':

~/Projects/MPU6050-MotionTracking/Processing data/functions.py in get_vel_drift(time, acc)
265 vel = integral_vel(acc,time,stationary)
266 # Calculate integral drift
--> 267 drift = get_drift(vel,stationary,time)
268 # Remove integral drift
269 vel_drift=vel-drift

~/Projects/MPU6050-MotionTracking/Processing data/functions.py in get_drift(data, stationary, time)
203 xyz=[[0,0,0]]
204 drift_data=pd.DataFrame(np.repeat(xyz,len(data),axis=0),columns=['velx','vely','velz'])
--> 205 if drift_start[0]>drift_end[0]:
206 drift_start = np.append([0],drift_start)
207 for i in range(len(drift_end)):

IndexError: index 0 is out of bounds for axis 0 with size 0`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant