SetDirectory["/home/alex/Programming/esp/uas-ugv"]

data=Import["ugv3_rest.csv",HeaderLines->1];
magdata=data[[All,7;;9]];

plotdata[data_]:=ListLinePlot[{data[[All,1;;2]],data[[All,2;;3]],Transpose[{data[[All,3]],data[[All,1]]}]},AspectRatio->1]

plotdata[magdata]

Ordering[magdata[[All,3]],-1]
ListPlot[magdata[[All,3]]]

Graphics3D[Point/@magdata]

magavgs=Mean[magdata]

magmeds=Median[magdata]

maghalfs=((Max[#]+Min[#])/2)&/@Transpose[magdata]

magmeh=maghalfs
magdata2=#-magmeh&/@magdata;
plotdata[magdata2]

Norm/@magdata2;
Histogram[%]

Histogram[Transpose[magdata2]]

magranges=((Max[#]-Min[#])/2)&/@Transpose[magdata2]
1/magranges

magmeh2=magranges
1/magmeh2//N
magdata3=#/magmeh2&/@magdata2;
plotdata[magdata3]

Norm/@magdata3;
Histogram[%]

Graphics3D[Point/@magdata3]