% PontoonCalc.m - Calculate pontoon length for B.O.A.T. in cm, based on
%                 parameters configurable below.
%
% This script is compatible with GNU Octave
%
% 05/21/2017, Mitchell Overdick

% Characteristics of boat parts:
Mboat = 1216-200;             % Mass of boat without pontoons or end caps (g)
Mcap  = 18;               % Mass of end caps (g)
Mpon  = 3.5667;           % Mass of pontoon per length (g/cm)
Rpon  = 2.54;             % Radius of pontoon (cm)
Npon  = 2;                % Total number of pontoons on boat
NponS = 2;                % Number of pontoons submerged
Pw    = 1;                % Density of water (g/cm^3)

    % Solve for length of pontoons based on above:
Len = (Mboat + Npon*2*Mcap)/(Pw*(NponS*(Rpon^2)*pi)-(Mpon*Npon));

    % Display result
display('The length of each pontoon should be at least:');
display([num2str(Len) 'cm']);
