Rocket projection using Quadratics

2 0
  • 0 Collaborators

Use Quadratics to simulate a rocket launch with a known equation from previous test launch , and determine maximum rocket altitude, the time it will take to reach max height ,The time it will take the rocket splash down into the ocean . so you can take the perfect pictures timed to perfection. ...learn more

Project status: Published/In Market

oneAPI

Intel Technologies
DPC++, oneAPI

Code Samples [1]Links [3]

Overview / Usage

Lets say cern & spacex does a rocket launch and from test runs previously have provided a quadratic equation that measurers height in meters above sea level as a function of time.

but since the last flight the engineering team has made some improvements and provided you with a adjusted equation h(t)=-4.9^2+310t+332

Now its time for the live launch of the second test run so your job is to run a simulation with the new equation on:

a) How high will the rocket reach maximum rocket altitude?

b) What is the time it will take to reach max height ?

c) What time will the rocket splash down into the ocean ?

Use Quadratics to simulate a rocket launch with a known equation from previous test launch , and determine maximum rocket altitude, the time it will take to reach max height,,The time it will take the rocket splash down into the ocean .

Possible problems it may solve If you are a photographer knowing and predicting a rocket launch can help you synchronize your camera and equipment so that you can take the perfect pictures timed to perfection right down to the second of the launch , peak and splash down events.

If you are a avid follower of rocket launches it would allow you to plan and time your commentary and time transitions, cut scenes in your live streams in advanced. and offer better pre & post flight commentary to your audience .

Methodology / Approach

We learned about Quadratic equations and how to apply them from opensource you tube videos. We than thought of useful scenarios in which we can use Quadratic equations and apply it's usage in real life.

You can refer to our github link for the remarked code but below is a brief example of the process we used.

Programming Stage

  1. We include required header files
  2. Declare relevant namespaces
  3. Define variables and determine datatypes
  4. Select a device for processing CPU ,GPU or FPGA .in our case you can use GPU or CPU across all projects.
  5. Load data for processing into an memory.
  6. developed custom pow() and sqrt() functions to get code on both cpu and gpu working.
  7. Initiate parallel processing through parallel_for()
  8. We output our results.

**Experience using DPC**++

It was a good experience learning how to accessors , buffers , command groups and than tackeling a few interesting problems such as when using gpu device pow() and sqrt() were not recognized .this involved some research but we finally managed to create our own sqrt and pow functions and get the code working on both cpu and gpu .

Usage instructions :

You can find the code at our github repository mentioned below in the article.

Copy the entire structure including all files to Intel dev cloud .

Ensure that the Python 3.7 (Intel OneApi) kernal is running

Ensure that you are using the q file ,run_audit.sh and Makefile that is provided with this sourcecode.

Ensure that file exist in lab/simulate_rocket_launch.cpp

Run the following jupyter notebook simulate_rocket_launch.ipynb

! chmod 755 q; chmod 755 simulate_rocket_launch.sh;if [ -x "$(command -v qsub)" ]; then ./q simulate_rocket_launch.sh; else ./simulate_rocket_launch.sh; fi

Technologies Used

DPC++
Intel Devcloud
Jupyter notebook

GPU device than Device: Intel(R) Graphics Gen9 [0x3e96]

Device: Intel(R) Xeon(R) E-2176G CPU @ 3.70GHz

Repository

https://github.com/prilcool/Intel-devmesh-codeproject-four

Comments (0)