radius = 200

x = -radius:10:radius;
y = sqrt(radius^2 - x.^2);

for i = 1:200
    z = i;
    r = sqrt( x(mod(i,length(x)) + 1)^2 + y(mod(i,length(x)) + 1)^2 + z^2);
    
    msg(i,1:46) = sprintf('POS V7,4 R%7.2f,X%7.2f,Y%7.2f,Z%7.2f\r\n', ...
        r, x(mod(i,length(x)) + 1), y(mod(i,length(x)) + 1), z);
end

x = x + 607000;
y = y + 4073000;

    


