Write a c program to simulate a falling object

Assignment Help Computer Engineering
Reference no: EM132196838

Question :

Write a C program to simulate a falling object. The program should ask for the initial height of the object, in feet. The output of the program should be the time for the object to fall to the ground, and the impact velocity, in ft/s and miles/hour.

Your program should use Euler's method to numerically solve the differential equations describing the motion of a falling object.

In Euler's method, the state of the object at some small future time is calculated using the values at the present time.

This small future timestep is typically called delta time, or dt. Thus the position (p) and speed (v) of the object in the next timestep t + dt is written as a simple function of the position and speed at the current timestep t (g is the acceleration due to gravity):

v(t+dt) = v(t) + g * dt

p(t+dt) = p(t) + v(t+dt) * dt

You should actually start out with the velocity as zero, and the position at the initial height of the object. Then your position (above the ground) would be:

p(t+dt) = p(t) - v(t+dt) * dt

And you would integrate until the position becomes less than or equal to zero.

The input/output formats for your program should look like this:

Program to calculate fall time and impact speed of a falling object dropped from a specific height.

Enter initial height in feet: 100

Falling time = 2.492224

seconds Impact speed = 80.249613 feet/sec

Impact speed = 54.715645 mph

Reference no: EM132196838

Questions Cloud

Associate sounds and meanings to create understanding : Through hearing we associate sounds and meanings to create understanding. A company’s "personality" comes across through its Organizational Culture?
How much interest and principal will be paid : A friend of yours has borrowed $20,000 to buy a car, with an interest rate 10% compounded monthly. Monthly payments were calculated to be $645.34.
Write a c program to solve the hanoi tower problem : Write a c program to solve the Hanoi tower problem using problem decomposition
How does sandel define the term market triumphalism : How does Sandel define the term "market triumphalism"? What does Sandel suggest a viewer of the evening news might understand is the greatest health crisis.
Write a c program to simulate a falling object : Write a C program to simulate a falling object. The program should ask for the initial height of the object, in feet.
Define each of the given types of variation : Consider an individual with Cobb-Douglas preferences over some good and all other goods. Without doing any math, or drawing a graph, which is bigger.
Development of prototype of B2C E-commerce website : ISY10058 - Electronic Commerce Systems - While programs for the back-end processing are not required, the site should explain the back-end processes
Write a program to simulate the ford f-series forward system : Write a c program, using the Arduino's integrated development environment (IDE), use a distance sensor, a buzzer, a red LED.
Prompt the user to enter a string and display the shuffled : The main function should call this shuffling function and should prompt the user to enter a string and display the shuffled string.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Explain the following statements as logic expressions

Please state the following statements as logic expressions.

  Define a database and an information system

What is the relationship between a database and an information system, and how does this relationship have a bearing on database design

  Find out the dramatic increase on number of pixels

Find out the dramatic increase on number of pixels on these devices and its effects on human vision.

  Write a report on memory management with emphasis on memory

Write a 500+ Word technical report on "Memory management" with emphasis on virtual and cache memory. Include extensive diagrams and examples. Address the following points in your report: Introduction.

  Where should you declare the variable

If you use a variable in a function definition, where should you declare the variable? In the function definition? In the main function?

  Define html was the original web page protocol

define HTML was the original Web page protocol, developed for hypertext documents on the emerging Web. Many different protocols and technologies have since been developed. Do you think that HTML still has a part to play? Or do you believe that HTM..

  Write a program that accepts a filename

Write a program that accepts a filename and the delimiter string as arguments, and then displays each line with its fields reversed.

  Pros and cons of chen and crow''s feet notations

What are the pros and cons of Chen and Crow's feet notations.

  Perform basis path testing to the average function

White-box software testing techniques. Perform basis path testing to the average function.

  Identify the specifications you would need to gather

Assignment: Power Supply Replacement Process- Identify the specifications you would need to gather to select an appropriate power supply for a system.

  Define how do cloud threats differ from traditional threats

How do cloud threats differ from traditional threats. Against which threats are cloud services typically more effective compared to local ones

  Discuss what is the method

Write a method called drawCircle that draws a circle based on the method's parameters: a Graphics object through which to draw the circle, two integer values.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd