1
0

Merge branch 'master' of https://code.jcktrue.dk/jct/jcktrue.dk
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Jens True 2022-08-29 15:57:45 +02:00
commit b83e5b6027
5 changed files with 92 additions and 6 deletions

@ -25,4 +25,11 @@ All measurements are in Centimeters.
{{< splice/calc_loop >}}
# Instruction video
{{< youtube uzK0gApBrCg >}}
{{< youtube uzK0gApBrCg >}}
# Soft Shackle Calculator
All measurements are in Centimeters.
{{< splice/calc_softshackle >}}

4
go.mod

@ -4,6 +4,6 @@ go 1.15
require (
github.com/wowchemy/wowchemy-hugo-modules/v5 v5.3.0
github.com/wowchemy/wowchemy-hugo-modules/wowchemy-cms/v5 v5.0.0-20220516185340-aa03201adbf0 // indirect
github.com/wowchemy/wowchemy-hugo-modules/wowchemy/v5 v5.0.0-20220516185340-aa03201adbf0 // indirect
github.com/wowchemy/wowchemy-hugo-modules/wowchemy-cms/v5 v5.0.0-20220615172938-f347d63546f4 // indirect
github.com/wowchemy/wowchemy-hugo-modules/wowchemy/v5 v5.0.0-20220615172938-f347d63546f4 // indirect
)

4
go.sum

@ -43,6 +43,8 @@ github.com/wowchemy/wowchemy-hugo-modules/wowchemy-cms/v5 v5.0.0-20220423181119-
github.com/wowchemy/wowchemy-hugo-modules/wowchemy-cms/v5 v5.0.0-20220423181119-d13358e38fee/go.mod h1:Sp/AKo+2HAPi/IPHp1MEdKPmee+mzO5+efUBUPLPqPE=
github.com/wowchemy/wowchemy-hugo-modules/wowchemy-cms/v5 v5.0.0-20220516185340-aa03201adbf0 h1:Yo7CGMEujDsPhdxYIdkUGmTpohgAXt6SENW6hp+qOe0=
github.com/wowchemy/wowchemy-hugo-modules/wowchemy-cms/v5 v5.0.0-20220516185340-aa03201adbf0/go.mod h1:Sp/AKo+2HAPi/IPHp1MEdKPmee+mzO5+efUBUPLPqPE=
github.com/wowchemy/wowchemy-hugo-modules/wowchemy-cms/v5 v5.0.0-20220615172938-f347d63546f4 h1:LW8jSOSRI9B93RC59h+MZhlN68FGyxILhSQz7ZX7KUs=
github.com/wowchemy/wowchemy-hugo-modules/wowchemy-cms/v5 v5.0.0-20220615172938-f347d63546f4/go.mod h1:Sp/AKo+2HAPi/IPHp1MEdKPmee+mzO5+efUBUPLPqPE=
github.com/wowchemy/wowchemy-hugo-modules/wowchemy/v5 v5.0.0-20210629192904-559885af86b7/go.mod h1:2iL9rdrUYyJXX2BeHKfK+QbqZlubCsaR60nQ87NRQTY=
github.com/wowchemy/wowchemy-hugo-modules/wowchemy/v5 v5.0.0-20210807125257-88ec9270d03e h1:J6H85UfeOzUouIenMxv/+FT1F5XlfzjuZYfMFdRux8Y=
github.com/wowchemy/wowchemy-hugo-modules/wowchemy/v5 v5.0.0-20210807125257-88ec9270d03e/go.mod h1:2iL9rdrUYyJXX2BeHKfK+QbqZlubCsaR60nQ87NRQTY=
@ -86,3 +88,5 @@ github.com/wowchemy/wowchemy-hugo-modules/wowchemy/v5 v5.0.0-20220423181119-d133
github.com/wowchemy/wowchemy-hugo-modules/wowchemy/v5 v5.0.0-20220423181119-d13358e38fee/go.mod h1:2iL9rdrUYyJXX2BeHKfK+QbqZlubCsaR60nQ87NRQTY=
github.com/wowchemy/wowchemy-hugo-modules/wowchemy/v5 v5.0.0-20220516185340-aa03201adbf0 h1:vviH4rJbjvCK8xqvEDAseq+JmT2flWKpDvzL2Ub+6Z0=
github.com/wowchemy/wowchemy-hugo-modules/wowchemy/v5 v5.0.0-20220516185340-aa03201adbf0/go.mod h1:2iL9rdrUYyJXX2BeHKfK+QbqZlubCsaR60nQ87NRQTY=
github.com/wowchemy/wowchemy-hugo-modules/wowchemy/v5 v5.0.0-20220615172938-f347d63546f4 h1:BpC4/2LYae9PoWZ5HCQx0lZCFeLOOx3wNOmUJ5VYz5U=
github.com/wowchemy/wowchemy-hugo-modules/wowchemy/v5 v5.0.0-20220615172938-f347d63546f4/go.mod h1:2iL9rdrUYyJXX2BeHKfK+QbqZlubCsaR60nQ87NRQTY=

@ -1,5 +1,5 @@
<script>
function Calculate(obj)
function Calculate_Loop(obj)
{
//All calculations in CM
loop_dia = obj.loop_dia.value;
@ -22,7 +22,7 @@ function Calculate(obj)
obj.length_extended.value = length_extended.toFixed(1) +"cm";
}
</script>
<form onsubmit="return false;">
<form onsubmit="false;">
<div class="form-group">
<label for="line_diameter">Line diameter</label>
<select class="form-control form-control-lg" name="line_diameter" onChange="Calculate(this.form)">
@ -40,7 +40,7 @@ function Calculate(obj)
<label for="loop_dia">Loop diameter (in centimeter)</label>
<input type="number" min="0" step=".1" class="form-control form-control-lg" id="loop_dia" placeholder="Enter loop diameter" onChange="Calculate(this.form)">
<button type="button" class="btn btn-primary" onClick="Calculate(this.form)">Calculate</button>
<button type="button" class="btn btn-primary" onClick="Calculate_Loop(this.form)">Calculate</button>
</div>
<hr>
<div class="form-group">

@ -0,0 +1,75 @@
<script>
function Calculate_Softshackle(obj)
{
//All calculations in centimeters
tail = 53.33 * obj.line_diameter.value;
length1 = obj.shackle_length.value;
size = obj.line_diameter.value;
body = length1 - 5.56 * size;
//Strech factor
stretch = 1.2;
if (size == .2) stretch = 1.1875;
if (size == .3) stretch = 1.23;
if (size == .4) stretch = 1.23;
if (size == .5) stretch = 1.21538;
if (size == .6) stretch = 1.2;
//Calculate
var inner_diameter = body / Math.PI - 1.5 * size;
var inner_diameter_streched = inner_diameter * Math.PI / 2;
var load_diameter = (body - 6 * size) / Math.PI - 1.5 * size;
var length = 2 * tail+ (1 + stretch) * body + 5.33* size;
var mark1 = tail;
var mark2 = stretch * body;
//Assign, round and format
obj.inner_diameter.value = inner_diameter .toFixed(1) +"cm";
obj.inner_diameter_streched.value = inner_diameter_streched.toFixed(1) +"cm";
obj.load_diameter.value = load_diameter .toFixed(1) +"cm";
obj.length.value = length .toFixed(1) +"cm";
obj.mark1.value = mark1 .toFixed(1) +"cm";
obj.mark2.value = mark2 .toFixed(1) +"cm";
}
</script>
<form onsubmit="false;">
<div class="form-group">
<label for="shackle_length">Shackle length (Tip of eye to inside of knot)</label>
<input type="number" min="0" step=".1" class="form-control form-control-lg" id="shackle_length" placeholder="Enter shackle length" onChange="Calculate(this.form)">
<label for="line_diameter">Line diameter</label>
<select class="form-control form-control-lg" name="line_diameter" onChange="Calculate(this.form)">
<option value=".2">2mm</option>
<option value=".3">3mm</option>
<option value=".4" selected>4mm</option>
<option value=".5">5mm</option>
<option value=".6">6mm</option>
<option value=".8">8mm</option>
<option value="1.0">10mm</option>
<option value="1.2">12mm</option>
</select>
<button type="button" class="btn btn-primary" onClick="Calculate_Softshackle(this.form)">Calculate</button>
</div>
<hr>
<div class="form-group">
<label for="inner_diameter">Inside diameter closed</label>
<input type="text" readonly class="form-control-plaintext" id="inner_diameter">
<label for="inner_diameter_streched">Inside diameter closed and streched</label>
<input type="text" readonly class="form-control-plaintext" id="inner_diameter_streched">
<label for="load_diameter">Max diameter of load</label>
<input type="text" readonly class="form-control-plaintext" id="load_diameter">
<label for="length">Total line needed</label>
<input type="text" readonly class="form-control-plaintext" id="length">
<label for="mark1">Mark1 - From end</label>
<input type="text" readonly class="form-control-plaintext" id="mark1">
<label for="mark2">Mark2 - From first mark</label>
<input type="text" readonly class="form-control-plaintext" id="mark2">
</div>
</form>