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

  Complete the timing diagram for the input sequence

Analyze the fundamental-mode circuit shown in Figure 8.37 to determine the excitation and output tables. Complete the timing diagram for the input sequence.

  Determine the surface temperature of the stove

A room is to be heated by a coal-burning stove, which is a cylindrical cavity with an outer diameter of 32 cm and a height of 70 cm.

  Give an algorithm that randomly permutes an input array a

Give an algorithm that randomly permutes an input array A. What is the run-time of your algorithm?

  Questionafter front-office network at xyz corp is set up an

questionafter front-office network at xyz corp. is set up an accountant realizes that if loading dock connected to the

  Write the code to dynamically allocate memory

Given the variable ip, already declared as a pointer to an integer, write the code to dynamically allocate memory for a single integer value, assign the resulting pointer to ip, and initialize the integer value to 27.

  Define the organization and access of a tree

Write a Map use the STL map for student id associated with student name and student.

  Evaluate a 2d game for pc

There are thousand of games on the web. Use Google to search for games for all platforms and come up with an idea and a title that fully reflects the main theme of your game

  Difference between von neumann and harvard cpu architectures

What is the difference between von Neumann and Harvard CPU architectures? Provide an example of a commercially available microcontroller using each type of CPU.

  Write about Business Websites and Tourism Industry Websites

Write about Business Websites and Tourism Industry Websites. What are the different parts in Server Name? Explain them with example

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  System analysis and design

In the System Analysis and Design: Design Patterns – How widely used are design patterns in today’s development environments.

  Questionhome wireless network and securitymethodology-

questionhome wireless network and securitymethodology- review topics covered in lecture hours from textbook reference

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