Created
August 17, 2019 22:54
-
-
Save iemcd/57fa78cce4581071438ace925e36a115 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Estimating the length & beam of boats from their tonnage. | |
% Ian McDougall | |
% 25 July 2019 | |
clear all, close all, nfig=0; | |
% The Thames Measurement (TM) estimates the tonnage of a ship given its length (LOA) and beam in feet. It is intended for yachts. | |
function tons = TM(LOA,beam) | |
tons = ((LOA - beam).*beam.^2)/188; | |
endfunction | |
% The Builder's Old Measurement (BOM) estamtes the tonnage of a ship given its LOA and beam in feet. It is older than the Thames measurement. | |
function tons = BOM(LOA,beam) | |
tons = ((LOA - 0.6*beam).*beam.^2)/188; | |
endfunction | |
% This rule-of-thumb (ROT) estimates the beam in feet, given the LOA. | |
function beam = ROT(LOA) | |
beam = LOA.^(2/3) +1; | |
endfunction | |
% The hull speed is an early boat limitation in knots, given LWL in feet (length at the waterline) | |
function vhull = hull(LWL) | |
vhull = 1.34.*LWL.^0.5; | |
endfunction | |
init_ft = 10; | |
tons = 0; | |
for i = 1:10 | |
tons = i | |
length = fzero(@(LOA) BOM(LOA,ROT(LOA))-i,init_ft) | |
vhull = hull(length) | |
init_ft = length; | |
endfor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment