An open API service indexing awesome lists of open source software.

https://github.com/orc/deckoffset

Calculate the deck offset needed to clear a given stem length
https://github.com/orc/deckoffset

Last synced: 11 months ago
JSON representation

Calculate the deck offset needed to clear a given stem length

Awesome Lists containing this project

README

          

This little program calculates how far forward from the stem the rear
of a rack deck needs to be put so that an infinitely tall rectangular
bag placed on it will not foul your handlebars.

usage: deckoffset [-f] [-d deck-to-bolt drop] [-s stack] HTA ht-length [stem]

It subtracts (ht length + stack) * cos(hta) from the stem length;
if the stem length is not supplied, it assumes 100mm; if the stack
isn't provided, it assumes 35mm. This program does not fudge the
stem length for a handlebar gap, but it assumes a horizontal stem.

If you provide the deck to bolt drop (from the deck2bolt program),
deckoffset will appropriately fudge the offset to accomodate the
stem falling backwards as the deck goes higher.

The calculation this program does is

stem-length - (cos(hta) * (ht length + stack)) [ + (cos(hta) * deck-to-bolt) ]

with some sanity checking against hta (it won't allow < 60 degrees),
ht length (it won't allow < 30mm) or stem length (won't allow < 30mm),
though you can force it to not do sanity checks by passing the -f option.