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

  What does the law say about using someones webcam

What does the Law say about using someone's Webcam or Computer Microphone to spy on them?

  What difference between external and internal documentation

What is the difference between external and internal documentation? What are pre- and postconditions?

  Identify the systems in the organization

Identify the systems in the organization (i.e., the type and number of computer systems and operating systems use, along with top-level view of infrastructure).

  Describe the structure and pseudo-code

Describe the structure and pseudo-code for an array-based implementation of the array list ADT that achieves O(1) time for insertions and removals at index 0.

  Explain the concept of starvation

Explain the concept of starvation. The concept of file permeates computing. Would computer be useful if there were no secondary memory on which to store files?

  Identify the key differences between the two methods

List one primary and one secondary method of data collection and identify the key differences between the two methods.

  How many times is the multiply routine executed

How many times is the multiply routine executed in the set of programs? How much faster (or slower) is M2 than M1?

  Make a class executive inherit from manager

Make a class Executive inherit from Manager. Supply appropriate to String methods for all classes. Supply a test program that tests these classes and methods.

  Digital image processing refers to the processing

Digital image processing refers to the processing

  Who approves and reject resources

What kind of system should be in place to manage change request and why you are choosing this technique.

  Explain what the topic means to you

Be sure to explain what the topic means to you and how you feel when you think about the topic. Lastly, describe any challenges you have overcome to arrive.

  Describe backtracking as a problem-solving method

Is the removal of tail recursion more important for saving time or for saving space? Describe backtracking as a problem-solving method.

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