Wow!Will this work on the droid 2? How do I download it? What is your suggested donation value?
Wow!Will this work on the droid 2? How do I download it? What is your suggested donation value?
If you have an internet connection on your phone, just navigate to it. Otherwise, use your browser to save the page to a place on your computer and transfer to your phone through USB cable or what not. I haven't tried it, but I think the browser on the phone will load a web page from the phone's memory card just as a normal computer's browser will from a hard drive.
~Dan
Agreed, the suspension length x 2 + ridgeline length is coming out to exactly the distance between the trees. That would only work if the hang angle is 0* from horizontal.
cos 30* = ((distance between trees - ridgeline length) / 2) / suspension length
or
suspension length = ((distance between trees - ridgeline length) / 2) / cos 30*
For the defaults:
suspension length = ((15 - 9) / 2) / cos 30* = 3.4641'
~Dan
Thanks DannyBoy! That was just the math I was looking for -- Javascript had its own methods so it took some digging, but your post got me in the right direction.
The calculator is now working with better math!
Hammock Hang Calculator
This should work on all mobile devices and since there is no database or back-end scripts (all the Javascript and CSS is local) it should cache fine on Android, Blackberry, and iPhone/iPod Touch devices.
Author and illustrator: The Ultimate Hang: An Illustrated Guide To Hammock Camping
Knotty
"Don't speak unless it improves the silence." -proverb
DIY Gathered End Hammock
DIY Stretch-Side Hammock
Stretch-Side "Knotty Mod"
DIY Bugnet
OOoooh, you are so cruel
Well, I had all the math down, but Javascript is not my programming language of choice. My background is mostly Perl, but it has been a while since I've done much with programming. At first, I was trying different trigonometry functions to solve the problem, but no matter how I sliced it, the ridgeline kept coming up short.
Danny's solution helped me look at the problem a different way, and it worked.
But, given the choice, I'd rather draw than derive
Author and illustrator: The Ultimate Hang: An Illustrated Guide To Hammock Camping
Glad I was able to help! Thank YOU for the great calculator! I can do the backend work; that's my job in real life. I've unfortunately remained ignorant about GUIs, but I hope to change that this year.
Didn't look at the Javascript source to see if you did this, but I would just hard code the cos(30*) as a constant and not do the trig functions in code at all. Unless you allow the user to set the angle of hang as well, there's no need to use them.
cos 30* = 0.866025404
Cheers,
Dan
Thanks Dan. I'm usually on the front-end of things, but I've done enough web development projects to know my way around, albeit clumsily at times. I worked for a few .com's years ago and found a love for regex and Perl, but over time my career has moved into administration and marketing, so I don't often get to play with the back-end. I'm more than happy to let the pros do it, but some simple stuff like this is just fun and whimsical enough that I'll try it.
The next project will be to create a companion web app that uses accelerometer functions to make a virtual level and protractor for checking hammock suspension angle and elevation. Anyone up for the challenge?
Author and illustrator: The Ultimate Hang: An Illustrated Guide To Hammock Camping
You ROCK Dejoha!
Bookmarks