Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gravity program
#1
Yea.... I made this hangtime calculator a while ago. I thought that someone might want to use my formulas, so I'm gonna release the source. All I did was use formulas, so you can edit it as you see fit easily. Here ya go.

Code:
DIM T AS INTEGER
CLS
PRINT "Hangtime Calculator"
PRINT "By: Dan Kogge"
INPUT "Velocity?(M/S) ", V
INPUT "Angle?(Degrees) ", A
A = A * (3.141592653589793# / 180)
T = 1
DO UNTIL V * (T / 100) * SIN(A) - 4.9 * (T / 100) ^ 2 < 0
X = V * (T / 100) * COS(A)
Y = V * (T / 100) * SIN(A) - 4.9 * (T / 100) ^ 2
IF Y > GY THEN GY = Y: GT = (T / 100)
T = T + 1
'PRINT X, Y, T
LOOP
TotT = T / 100 - .01
PRINT "Distance(M):", X
PRINT "Hangtime(Sec):", TotT
PRINT "Highest Point(M):", GY
PRINT "Time at Highest Point(Sec):", GT
Reply
#2
Hehe, nice =P
Reply
#3
Niceness...would be useful for like a pinball game or something Smile
I'd knock on wood, but my desk is particle board.
Reply
#4
Those formulas were very strange. They are adapted from some parametric formulas I found. They were designed for tracking vertical and horizontal distance in a zero-wind enviroment. I'm going to try to adapt them into a luner landing program, but I'm kinda swamped with work right now. My english teacher is a horrible excuse for life.
Reply
#5
I've saved it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)