Question: Assignment 1 0 0 1 : PlanetAnalysis In this assignment, you will do a simplified modeling of solar system in Python. First, create a Planet

Assignment 1001: PlanetAnalysis
In this assignment, you will do a simplified modeling of solar system in Python.
First, create a Planet class that should take a radius and a year length. For example, running mercury =Planet(3.5,88) means that the radius of this planet object is million miles) and its year length is 88 days. For simplicity, we will assume that orbits are perfect circles, are all on the same plane and are whole days. The orbital radius and year length for the planets are given below:
\table[[Planet,Radiu (CM) Year Length (Days),],[Mercury 3.5,88,],[Venus,6.7,225],[Earth,9.3,365],[Mars,14.2,687],[Jupiter,48.4,4333],[Saturn,88.9,10759],[Uranus,179,30687],[Neptune 288,60190,]]
The planet class should have a method, position(day), that returns the position of the planets on a specific day. For example:>>> mercury.position(22)>>0,3.5>>> mercury.position(33)>>>-2.47,2.47>>> mercury.position(440)>>3.5,0
Given a specific day and length of a year for a planet, you can compute angle "a" and then use simple trigonometry equations to calculate x and Y coordinates as shown below.
In the first part of the assignment, create a function that takes two planet objects and a day. It should return the Euclidean distance between the planets on that day. For instance:In the second part, create a simulation that runs for 1000 days and compute the distance between Earth to Mercury, Venus and Mars each day in two cases: (1) distances are stored exactly, (2) a noisy version of distances are stored. For simplicity, we assume that the noise is identically distributed for all distance measurements disregarding the planets involved according to a zero-mean normal distribution with a STD "s". Compute day-wise distances and store them as time-series. Then, separately for the noise-less and noisy cases, plot time-series for the three planets and their averages as horizontal lines in a single plot with distinct colors and clear legends. Make sure the averages are visible enough (say, by making the time-series transparent). Which planet is closest to Earth based on the average distances? Repeat the noisy case with different values of " s " in range [0.5,10] and check whether the results change.Repeat the noise-less simulation for 1000 years and compute the average daily distances for all pairs of planets. Create a 8xx8 array showing average distance between all pairs of planets. Verify the array is symmetric and print it in form of a table. Which planet is closest to Earth on average in this simulation?Record a four minute video in which you run the code. Then, present your code. Specifically, answer the following questions:
What is the distance between Earth and Mars on day 732?
-How do your position and distance functions work? What trigonometry functions did you need to use?
Briefly explain how you generated the 1000-day time-series and their averages. Is there any periodic pattern visible? In the noisy cases, does the average ranking change when "s" increases? Try to provide a reasoning for this observation.
How did you form the 88 matrix and fill it out with the averages of 1000-year simulation? Check whether the closest planet to Earth is a different planet in this simulation.
Submission: Submit a single .py file containing all the code to the D2L. Do not zip or archive the file. Your code must include comments at the top including your name, date, video link, and the honor statement, "I have not given or received any unauthorized assistance on this assignment." Each function must include a docstring and be commented appropriately.
 Assignment 1001: PlanetAnalysis In this assignment, you will do a simplified

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!