Commit 51ef4d21 authored by pandersson's avatar pandersson
Browse files

Small changes to output

parent 45ed826a
......@@ -14,8 +14,8 @@ from get_data import get_data
def main():
freq = 100 # Assume data was collected at 100 Hz
still = 3
walk = 15
still = 2
walk = 20
# Get mean of accelerometer x,y,z data
acc, ground_truth = get_data(sys.argv[1], 'ACC')
......@@ -28,11 +28,11 @@ def main():
xMax = max(acc_one_sec)
if xMax - xMin < still: # Some limit for still
print("At time: {}-{}, the person is - Still ({})".format(i, i + time_interval, ground_truth[int((2 * i + time_interval) * freq / 2.0)]))
print("At time: {}-{}, the person is - Still ({}, Diff: {:0.2f})".format(i, i + time_interval, ground_truth[int((2 * i + time_interval) * freq / 2.0)], xMax - xMin))
elif xMax - xMin < walk: # Some limit for walk
print("At time: {}-{}, the person is - Walking ({})".format(i, i + time_interval, ground_truth[int((2 * i + time_interval) * freq / 2.0)]))
print("At time: {}-{}, the person is - Walking ({}, Diff: {:0.2f})".format(i, i + time_interval, ground_truth[int((2 * i + time_interval) * freq / 2.0)], xMax - xMin))
else:
print("At time: {}-{}, the person is - Running ({})".format(i, i + time_interval, ground_truth[int((2 * i + time_interval) * freq / 2.0)]))
print("At time: {}-{}, the person is - Running ({}, Diff: {:0.2f})".format(i, i + time_interval, ground_truth[int((2 * i + time_interval) * freq / 2.0)], xMax - xMin))
if __name__ == "__main__":
main()
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment