Fullscreen
   

Search Wiki PageName

Exact match

Quick Edit a Wiki Page

Menu

Forum: Catapult Message Board

Forums > Catapult Message Board > A program I wrote

A program I wrote


CarlofET 3 stars
Hi everybody. I thought you might be interested in a program I wrote. We were working on the Freedom Launcher, and we were wondering how much force we are going to need to pull down and cock the throwing arm. Being the Mechanical Engineering student that I am, I got to thinking about how to figure that out. It's a somewhat complicated problem, because our pully will be stationary, so the angle at which we're pulling on the arm will be constantly changing - just as the angle at which the counter-weight is acting on the arm will be. It's doubly a function of the angle. So anyway, after some thinking, I derived this equation:

T=s*w*sin(x)*sqrt(2*h*l*cos(x)-2*d*l*sin(x)+d
2+h
2+l
2)/(l*(d*cos(x)+h*sin(x)))

Here's what all the letters mean:

T: The tension in the cable
x: The angle between the throwing arm and an imaginary vertical line. For example, when the arm is at rest, the angle is 0. When it's cocked, it should be somewhere around 140 or so.
s: The length of the short end of the arm - from the axle to where the weight is attached
l: The length of the long end of the arm - from the axle to wherever the cable attaches to the arm
w: The weight of the counterweight
h: The difference in height between the axle and the pully. For example, the Freedom Launcher's axle is 18 ft off the ground. The cable will be entering the pully at about 1 foot off the ground. So this value for us is 17.
d: The distance from the pully to the upright support. Easily computed using the Pythagoren Theorem: d = sqrt(l
2-h^2)

Now, this is a rather messy equation, so I made a program in MatLab where you input the s, l, w, and h values, and it tells you where and what the maximum tension in the cable is, as well as how much force will be required to hold the arm in the cocked position. This is very helpful for figuring out the load on a trigger - and not to mention figuring what type of cable is needed to winch the arm down. I've attached a screenshot of the program. However, this .exe only works on computers that have some MatLab software installed. So if anybody is interested, I can supply you with the MatLab code or the .exe, but the extra (free) MatLab software required for the .exe has a 75 MB or so install file. Just thought I'd spread the word.

Oh, and visit http://www.freedomlauncher.com (external link) - we've done some updates.



bboy 3 stars
whoa



Kaiser 3 stars United States
CarlofET,

Interesting stuff. I did my own calculations calcuations and came up with the attached excel spreadsheet. My equation is shown in the spreadsheet. It looks different but I calculates the same max load at 70.7569 degrees. But our equations get slightly different results at the "cocked" position. I hand verified that my equation works at a couple different angles, but I don't have time to track down the discrepency right now. Give it a look.



CarlofET 3 stars
Kaiser -

I think I've figured it out. Our equations are, effectively, exactly the same. However, the difference is that my equation takes into account what happens when the arm reaches the position of the pully. In a real situation, of course, this can never happen. If it did, the length of the rope on the pully would be zero, and so there could be no tension. Furthermore, if the arm could somehow pass this point, the tension would become a compression. So the way I calculate the tension in the cocked position is by taking the exact angle in which it's cocked and then subtracing .000001, or however small a number I can in order to still get a result. Again, realistically, you wouldn't even be able to get to this point, so the best bet is to subtract a full degree or so to take into account the distance between the pully and the arm when it's cocked. Know what I mean? I've made and attached a graph in excel to show the results of the two equations. It should clarify everything. The reason the vertical line on my graph isn't exactly straight is because I only took values at even 1-degree values. If you graph the actual function, that line will be totally vertical.


Show posts:
Jump to forum:
Wiki Syntax
Bold text     __text__
Italic text     2 single quotes (').     ''text''
Underlined text     ===text===
Colored text
~~#FFEE33:text~~ or ~~yellow:text~~. Will display using the indicated HTML color or color name. Color name can contain two colors separated by a comma. In this case, the first color would be the foreground and the second one the background.
Deleted text     2 dashes "-".     --text--
Headings
!heading1, !!heading2, !!!heading3
Show/Hide
!+, !!- show/hide heading section. + (shown) or - (hidden) by default.
Autonumbered Headings
!#, !!#, !+#, !-# ...
Table of contents
{toc}, {maketoc} prints out a table of contents for the current page based on structures (toc) or ! headings (maketoc)
Horizontal rule     ----
Text box     ^Box content^
Centered text     ::text::
Dynamic variables
%Name% Inserts an editable variable
External links
use square brackets for an external link: [URL], [URL|link_description],[URL|link_description|relation] or [URL|description|relation|nocache] (that last prevents the local Wiki from caching the linked page; relation can be used to insert rel attribute for the link - useful e.g. for shadowbox).
For an external Wiki, use ExternalWikiName:PageName or ((External Wiki Name: Page Name))
Square Brackets
Use [[foo] to show [foo].
Wiki References
((page)) or ((page|description)) for wiki references
Lists
* for bullet lists, # for numbered lists, ;Word:definition for definiton lists
Indentation
+, ++ Creates an indentation for each plus (useful in list to continue at the same level)
Tables
||row1-col1|row1-col2|row1-col3||row2-col1|row2-col2|row2-col3||
Title bar     -=Title=-
Monospace font     -+Code sample+-
Line break
%%% (very useful especially in tables)
Multi-page pages
Use ...page... to separate pages
Non parsed sections
~np~ data ~/np~ Prevents wiki parsing of the enclosed data.
Preformated sections
~pp~ data ~/pp~ Displays preformated text/code; no Wiki processing is done inside these sections (as with np), and the spacing is fixed (no word wrapping is done). ~pre~ data ~/pre~ also displayes preformatted text with fixed spacing, but wiki processing still occurs on the text.
Comments
~tc~ Tiki Comment ~/tc~ makes a Tiki comment. It will be completely removed from the display, but saved in the file for future reference. ~hc~ HTML Comment ~/hc~ makes an HTML comment. It will be inserted as a comment in the output HTML; these are not normally displayed in browsers, but can be seen using "View Source" or similar.
Block Preformatting
Indent text with any number of spaces to turn it into a monospaced block that still follows other Wiki formatting instructions. It will be indended with the same number of spaces that you used. Note that this mode does not preserve exact spacing and line breaks; use ~pp~...~/pp~ for that.
Direction
{r2l}, {l2r}, {rm}, {lm}Insert resp. right-to-left and left-to-right text direction DIV (up to end of text) and markers for langages as arabic or hebrew.
Special characters
~hs~ hard space, ~c~ ©, ~amp~ &, ~lt~ <, ~gt~ >, ~ldq~ “, ~rdq~ ”, ~lsq~ ‘, ~rsq~ ’, ~--~ —, ~bs~ \, numeric between ~ for html numeric characters entity

Because the Wiki paragraph formatting feature is off, each line will be presented as you write it. This means that if you want paragraphs to be wrapped properly, a paragraph should be all together on one line.

Plugins

Note that plugin arguments can be enclosed with double quotes ("); this allows them to contain , or = or >.


Description
Article
Includes an article's content within the page.
{article
[ Field="The article field to display. Default field is Heading." ]
[ Id="The article to display. If no value is provided, most recent article will be used." ]
}
Article List
Includes a list of articles within the page.
{articles
[ max="The amount of articles to display in the list." ]
[ topic="[!]topic+topic+topic" ]
[ topicId="[!]topicId+topicId+topicId" ]
[ type="[!]type+type+type" ]
[ categId="The ID of the category to list from." ]
[ lang="The article language to list." ]
[ sort="The column and order of the sort in columnName_asc or columnName_desc format." ]
[ quiet="Whether to not report when there are no articles." ]
[ titleonly="Whether to only show the title of the articles." ]
}
Attachment
Displays an attachment or a list of them
{ATTACH(
[ name="Gives the name of the attached file to link to" ]
[ file="Same as name" ]
[ page="Gives the name of another page the attached file is on. The file on that page is linked to instead. Only works with wiki pages" ]
[ showdesc="Shows the description as the link text instead of the file name" ]
[ bullets="Makes the list of attachments a bulleted list" ]
[ image="Says that this file is an image, and should be displayed inline using the img tag" ]
[ inline="Puts the stuff between {ATTACH} tags as the link text instead of the file name or description" ]
[ all="Shows all attachments from the whole wiki" ]
[ num="Gives the number, in the list of attachments, of the attachment to link to" ]
[ id="Gives the actual id of the attachment to link in. You probably should never use this" ]
[ dls="Puts the number of downloads in the alt comment" ]
[ icon="Shows a file icon" ]
)}
Comment
{ATTACH}
Box
Insert theme styled box on wiki page
{BOX(
[ title="Displayed above the content" ]
[ bg="As defined by CSS, name or Hex code." ]
[ width="In pixels or percentage. Default value is 100%." ]
[ align="left|right|center" ]
[ float="left|right, for box with width lesser than 100%, make text wrap around the box." ]
[ class="Apply custom CSS class to the box." ]
)}
text
{BOX}
Center
Centers the plugin content in the wiki page
{CENTER( )}
text
{CENTER}
Code
Displays a snippet of code
{CODE(
[ caption="Code snippet label." ]
[ wrap="0|1, Enable word wrapping on the code to avoid breaking the layout." ]
[ colors="Syntax highlighting to use. May not be used with line numbers. Available: php, html, sql, javascript, css, java, c, doxygen, delphi, ..." ]
[ ln="0|1, may not be used with colors." ]
[ wiki="0|1, parse wiki syntax within the code snippet." ]
[ rtl="0|1, switch the text display from left to right to right to left" ]
[ ishtml="0|1, display the content as is instead of escaping HTML special chars" ]
)}
code
{CODE}
Definition List
Creates a definition list
{DL( )}
One entry per line. Each line is in "Term: Definition" format.
{DL}
Events
Includes the list of events from a calendar in the page.
{events
calendarid="Numeric"
[ maxdays="Numeric" ]
[ max="Numeric" ]
[ datetime="0|1" ]
[ desc="0|1" ]
}
Fade
Displays a label. On click, the block of content will fade in and fade out.
{FADE(
label="Label to display on first display"
)}
Wiki syntax containing the text to display.
{FADE}
Fancy List
Creates a fancy looking list
{FANCYLIST(
[ div="Use div instead of ol" ]
[ class="CSS class of the fancylist" ]
)}
One item per line starting with anything followed by ")".
{FANCYLIST}
Fancy Table
Displays the data using the Tikiwiki odd/even table style
{FANCYTABLE(
[ head="Heading row of the table, same format as the body section." ]
[ headclass="CSS Class to apply on the heading row." ]
)}
One row per line, cells separated by ~|~.
{FANCYTABLE}
File
Displays a link to an attachment to a wiki page and can display an image attachment.
{file
name="Gives the name of the attached file to link to"
[ desc="Comment" ]
[ page="Gives the name of another page the attached file is on. The file on that page is linked to instead. Only works with wiki pages" ]
[ showdesc="Shows the description as the link text instead of the file name" ]
[ image="Says that this file is an image, and should be displayed inline using the img tag" ]
}
Files
Displays a list of files from the File Gallery
{FILES(
[ galleryId="Gallery ID" ]
[ categId="Category ID:Category ID" ]
[ sort="name_asc" ]
[ showaction="y|n" ]
[ showfind="y|n" ]
[ showid="y|n" ]
[ showicon="y|n" ]
[ showname="y|n" ]
[ showfilename="y|n" ]
[ showsize="y|n" ]
[ showdescription="y|n" ]
[ showcreated="y|n" ]
[ showhits="y|n" ]
[ showlockedby="y|n" ]
[ showlmodified="y|n" ]
[ showauthor="y|n" ]
[ showcreator="y|n" ]
[ showgallery="y|n" ]
[ showfiles="y|n" ]
[ slideshow="y|n" ]
)}
Title
{FILES}
Flash video
Displays a SWF on the wiki page
{flash
movie="Complete URL to the movie to include."
[ width="Default width: 425" ]
[ height="Default height: 350" ]
[ quality="Flash video quality. Default value: high" ]
}
Group
Display wiki text if user is in one of listed groups
{GROUP(
[ groups="Pipe separated list of groups allowed to view the block. ex: Admins|Developers" ]
[ notgroups="Pipe separated list of groups denied from viewing the block. ex: Anonymous|Managers" ]
)}
Wiki text to display if conditions are met. The body may contain {ELSE}. Text after the marker will be displayed to users not matching the condition.
{GROUP}
Img
Displays an image.
{img
[ src="Full URL to the image to display." ]
[ alt="Alternate text to display if impossible to load the image." ]
[ height="Height of the image to display." ]
[ width="Width of the image to display." ]
[ link="Alias: lnk. Location the image should point to." ]
[ rel=""rel" attribute to add to the link." ]
[ title="Description." ]
[ align="Image alignment in the page. (left, right, center) Uses HTML IMG tag." ]
[ imalign="Image alignment in the flow of the document. (left, right, none) Uses CSS float property." ]
[ desc="Image description to display on the page." ]
[ usemap="Name of the image map to use for the image." ]
[ class="Style to apply to the image." ]
}
Include
Include a page's content.
{include
page="Wiki page name to include."
[ start="When only a portion of the page should be included, specify the marker from which inclusion should start." ]
[ stop="When only a portion of the page should be included, specify the marker at which inclusion should end." ]
}
Mediaplayer
Simple mp3 or flv Player
{mediaplayer
[ mp3="Complete URL to the mp3 to include." ]
[ flv="Complete URL to the flv to include." ]
[ style="One of:mini|normal|maxi|multi" ]
}
Insert Module
Displays a module inlined in page. More parameters can be added, not supported by UI.
{module
module="Module name as known in Tikiwiki."
[ float="left|right|none" ]
[ decoration="y|n" ]
[ flip="y|n" ]
[ max="y|n" ]
[ np="0|1" ]
[ notitle="y|n" ]
}
Mouse Over
Create a mouseover feature on some text
{MOUSEOVER(
label="Text displayed on the page. The body is the mouseover content"
[ url="Destination link when moused-over text is clicked. Use http:// for external links" ]
[ text="DEPRECATED Text displayed on the mouseover. The body contains the text of the page." ]
[ width="Mouse over box width. Default: 400px" ]
[ height="Mouse over box height. Default: 200px" ]
[ offsetx="Shifts the overlay to the right by the specified amount of pixels in relation to the cursor. Default: 5px" ]
[ offsety="Shifts the overlay to the bottom by the specified amount of pixels in relation to the cursor. Default: 0px" ]
[ parse="y|n, parse the body of the plugin as wiki content. (Default to y)" ]
[ bgcolor="Default: #F5F5F5" ]
[ textcolor="#FFFFFF" ]
[ sticky="y|n, when enabled, popup stays visible until an other one is displayed or it is clicked." ]
[ padding="Default: 5px" ]
)}
Mouseover text if param label exists. Page text if text param exists
{MOUSEOVER}
Quote
Quote text by surrounding the text with a box, like the [QUOTE] BBCode
{QUOTE(
[ replyto="Name of the quoted person." ]
)}
Quoted text
{QUOTE}
Remarks Box
Displays a comment, tip, note or warning box
{REMARKSBOX(
type="tip|comment|note|warning"
title="Label displayed above the remark."
[ highlight="y|n" ]
[ icon="Icon ID." ]
)}
remarks text
{REMARKSBOX}
RSS Feed
Inserts an RSS feed output.
{rss
id="List of feed IDs separated by colons. ex: feedId:feedId2"
[ max="Amount of results displayed." ]
[ date="0|1" ]
[ desc="0|1|max length" ]
[ author="0|1" ]
}
Sort
Sorts the plugin content in the wiki page
{SORT(
[ sort="asc|desc|shuffle" ]
)}
Data to sort, one entry per line.
{SORT}
Split
Split a page into rows and columns
{split
[ joincols="y|n Generate the colspan attribute if columns are missing" ]
[ fixedsize="y|n Generate the width attribute on the columns" ]
[ colsize="?" ]
[ first="col|line" ]
[ edit="y|n Display edit icon for each section" ]
[ customclass="add a class to customize the design" ]
}
Subscript
Displays text in subscript.
{SUB( )}
text
{SUB}
Superscript
Displays text in superscript (exponent).
{SUP( )}
text
{SUP}
Thumbnail
Displays the thumbnail for an image
{THUMB(
[ file="File ID from the file gallery." ]
[ id="Image ID from the image gallery." ]
[ image="URL to the image." ]
[ max="Maximum width or height for the image." ]
[ float="left|right|none" ]
[ url="Link target of the image." ]
[ original="y|n" ]
[ sticky="y|n" ]
)}
description
{THUMB}
Youtube
Display youtube video in a wiki page
{youtube
movie="URL to the Youtube video"
[ width="Width in pixels" ]
[ height="Height in pixels" ]
[ quality="quality" ]
}

Search

in:

Theme: Faulkner

Shoutbox

Thomas, 10:56 pm, 07/27/2010: Murray, I read something about it on your blog, but didn't get details. Something about pirates. Glad you're up and around.
SpringTreb, 08:05 pm, 07/27/2010: What happened to you? Expiring minds want to know. Did the ale supply reach critical levels?
Murray, 05:56 pm, 07/27/2010: Ok who missed me? I was actaully in hopsital and being treated at home for the last six weeks. So nothing that happened counts.
RIPCORD, 11:47 am, 07/27/2010: Many links are now broken (tempus fugit) and I'm really behind on updating the whole site. Eventually...
Melvang, 02:56 am, 07/27/2010: Hey Rip you need to make an update to the pouch page on your Treb stuff site. Boander's page is not up anymore