Changes to additional graphs added in CameraTest and correction factor for the height added to find3

This commit is contained in:
jcd8858 2024-04-17 17:56:06 -04:00
parent b847e76e97
commit 26c465a926
2 changed files with 26 additions and 1 deletions

View file

@ -54,7 +54,7 @@ filename = 'serve4.dat';
M = readmatrix(filename);
%Enter Loop
for i = 1:10:(length(M)) % [m]
for i = 1:1:(length(M)) % [m]
%Pull position from serve data
heightZ = M(i,2);
@ -116,6 +116,26 @@ scatter3([15 15 -15 -15 15 15 -15 -15],[15 -15 15 -15 15 -15 15 -15],[-1 -1 -1 -
hold off
figure
title("X postion vs sample number")
hold on
plot(Data(:,1))
plot(Data(:,4))
hold off
figure
title("Z postion vs sample number")
hold on
plot(Data(:,2))
plot(Data(:,5))
hold off
figure
title("Y(height) postion vs sample number")
hold on
plot(Data(:,3))
plot(Data(:,6))
hold off
%--------------------------------------------------------------------------------------

View file

@ -30,6 +30,11 @@ function [y_comp,x_comp,h_ball] = find3DOrthogonal(top_ball_x_px, top_ball_y_px,
% x & y positions compensated based on height
x_comp = x_ball * (1 - (h_ball / TOP_CAM_H));
y_comp = y_ball * (1 - (h_ball / TOP_CAM_H));
h_error = .38*h_ball;
h_ball = h_ball + h_error;
h_error = .15*h_ball;
h_ball = h_ball + h_error;
end