Script ART vs IndLoc plotting + Tested Ferrite Recordings

I wrote a script that can plot and compare the IndLoc system with the ART system quite quickly.

But I think the old Recorded data is corrupted from the calibration mistake.
This commit is contained in:
seyffejn 2021-02-01 17:21:55 +01:00
parent 0bd07c630a
commit 036ec76155
251 changed files with 48646 additions and 82 deletions

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
</component>
</project>

View File

@ -2,9 +2,20 @@ import matplotlib.pyplot as plt
import numpy as np
import re
"""--------------- Open, format and save ART positions from text files---------------------------------------------"""
class ART_plotting:
def __init__(self):
self.bla = 0
def plot_art(self, recording_number):
"""
:param recording_name: int, Choose which recording to print e.g. Recording_!1! , Recording_!2!, etc.
:return: void it just plots
"""
"""--------------- Open, format and save ART positions from text files---------------------------------------"""
# Opening a recording
art_recording = open('ART_IndLoc precision tests/Recording_1.txt', 'r')
art_recording = open('ART_IndLoc precision tests/Recording_'+str(recording_number)+'.txt', 'r')
art_recording = art_recording.read()
# Formatting a recording
@ -35,51 +46,12 @@ for i in range(len(art_recording)):
pos_counter += 1
"""------------------- Plotting (First ART, then IndLoc)------------------------------------------------------"""
"""------------------- Plotting ART ----------------------------------------------------"""
font = {"family":"serif",
"color":"black",
"size":15}
plt.plot(art_info[:, 1], art_info[:, 2], color="g", label="ART System")
plt.plot(art_info[:, 1], art_info[:, 2], color="lightgreen", label="ART System", linewidth=5, marker="x")
print("x=", art_info[:, 1])
print("y=", art_info[:, 2])
plt.grid()
positions = np.load("calculated_positions/current_positions.npy")
positions = positions*1000 # from metre to millimetre
plt.plot(positions[:, 0], positions[:, 1], label="Ind Loc")
#
# positions = np.load("calculated_positions/Positions_1.9.npy")
# positions = positions*1000 # from metre to millimetre
# plt.plot(positions[:, 0], positions[:, 1], label="1.9")
#
# positions = np.load("calculated_positions/Positions_1.10.npy")
# positions = positions*1000 # from metre to millimetre
# plt.plot(positions[:, 0], positions[:, 1], label="1.10")
#
# positions = np.load("calculated_positions/Positions_1.11.npy")
# positions = positions*1000 # from metre to millimetre
# plt.plot(positions[:, 0], positions[:, 1], label="1.11")
plt.legend()
plt.show()
""" ------------------------ Analyzing one Recording ---------------------------------------------------------------"""
data = np.load("recorded_data\ART Recordings\Recording_17.npy")
print(np.shape(data))
print("sample 1000:", data[1000]) # x,y,z, f1,f2,f3,...,m1,m2,m3,...,m8
for i in range(16):
ant_averaged = np.average(data[:, 3+i])
if i <= 7:
print("Frame", i+1, " averaged [V] =", ant_averaged)
else:
print("Main", i+1-8, " averaged [V] =", ant_averaged)
print("avg_main8 * Faktor =", ant_averaged*88.74017567)

Some files were not shown because too many files have changed in this diff Show More