winwhe.blogg.se

Projectile motion calculator
Projectile motion calculator









Plaunch p1 = new Plaunch(userVelocity, userGravity, userAngle) Ĭonsole. HorizontalDistance = Math.Round(((velocity * velocity) / gravity) * (Math.Sin(2 * angle * Math.PI / 180)), 2) įlight_Time = Math.Round(((2 * velocity) / gravity) * (Math.Sin(angle * Math.PI / 180)), 2) Ĭonsole.WriteLine("Projectile Motion Calculator") Ĭonsole.WriteLine("Setting the launch parameters") Ĭonsole.WriteLine(" Launch angle is an integer value ranging from 0 degrees to 180 degrees.") Ĭonsole.Write(" Enter the launch angle: ") Ĭonsole.WriteLine("Angle has been defaulted to 180 degrees") Ĭonsole.WriteLine(" Launch velocity is a real value ranging from 0 m/s to 1000 m/s.") Ĭonsole.Write(" Enter the launch velocity: ") Ĭonsole.WriteLine("Velocity has been defaulted to 10 m/s") Ĭonsole.WriteLine(" Launch gravity is a real value ranging from 0 m/s^2 to 100 m/s^2.") Ĭonsole.Write(" Enter the launch gravity: ") Ĭonsole.WriteLine("Gravity has been defaulted to 9.8 m/s^2") Ĭonsole.WriteLine("Verifying the launch Parameters") The range of the projectile depends on the object’s initial velocity. VerticalDistance = Math.Round(((velocity * velocity) / (2 * gravity)) * ((Math.Sin(angle * Math.PI / 180)) * (Math.Sin(angle * Math.PI / 180))), 2) Public Plaunch(double v, double g, int a)ĭouble angleRad = angle * (Math.PI / 180) Also, the exact time when the ball is launched is not showing properly. When compiling this program, I am not able the projectile results are displaying as zero. Type in any two values, and the rest will be calculated in a blink of an eye Furthermore, the trajectory will be displayed below the results. I took paramters of ball angle, gravity and velocity. This horizontal projectile motion calculator is a tool to solve a special case of projectile motion - the one where an object is launched horizontally from an elevated plane. I created this problem where i am calculating the projectile motion of a ball.











Projectile motion calculator