sunrise = 720 + 4(longitude – ha) – eqtime – 60 · timezone sunset is the time in UTC minutes of sunset. sunset = 720 + 4(longitude + ha) – eqtime – 60 · timezone To convert a time in local minutes to...


Please use python code...not c++


sunrise = 720 + 4(longitude – ha) – eqtime – 60 · timezone<br>sunset is the time in UTC minutes of sunset.<br>sunset = 720 + 4(longitude + ha) – eqtime – 60 · timezone<br>To convert a time in local minutes to local time you can use the following equations<br>(the sunset equations look the same).<br>sunrise<br>sunrise hour<br>60<br>sunrise_minute<br>sunrise – (sunrise_hour · 60)<br>Note: The strange brackets around sunrise_hour are the floor function, which rounds<br>the expression inside them down. You can easily achieve this in python by simply<br>assigning the value to an integer variable, or you can use the floor function defined in<br>math module.<br>(Case Study Credit/Source: Machine Projects Series, Dr. Don Roberts, Evansville<br>University, USA)<br>Write a single function to implement the algorithm in the case study above. Give the<br>following properties to your function.<br>i.<br>ii.<br>а.<br>Use parameters<br>Call the function using arguments supplied by the user

Extracted text: sunrise = 720 + 4(longitude – ha) – eqtime – 60 · timezone sunset is the time in UTC minutes of sunset. sunset = 720 + 4(longitude + ha) – eqtime – 60 · timezone To convert a time in local minutes to local time you can use the following equations (the sunset equations look the same). sunrise sunrise hour 60 sunrise_minute sunrise – (sunrise_hour · 60) Note: The strange brackets around sunrise_hour are the floor function, which rounds the expression inside them down. You can easily achieve this in python by simply assigning the value to an integer variable, or you can use the floor function defined in math module. (Case Study Credit/Source: Machine Projects Series, Dr. Don Roberts, Evansville University, USA) Write a single function to implement the algorithm in the case study above. Give the following properties to your function. i. ii. а. Use parameters Call the function using arguments supplied by the user " Sample Runs (to see if your code is working correctly) Daylight-Sensitive Zombie Protection System This program will calculate sunrise and sunset time for any date and location Enter latitude, longitude:40.75 -74 Enter Timezone:-5 Enter day of year:180 Sunrise: 4:34 Sunset: 19:39 Daylight-Sensitive Zombie Protection System This program will calculate sunrise and sunset time for any date and location Enter latitude, longitude:37.5 -88.0 Enter Timezone:-6 Enter day of the year:11 Sunrise: 7:22 Sunset: 17:07
MACHINE PROJECT 1<br>As the documentary,

Extracted text: MACHINE PROJECT 1 As the documentary, "I Am Legend," reveals, there is a particular subspecies of zombies that will only come out at night. (there is a debate as to whether that particular species of undead are zombies or vampires, but at this critical point in history, such debate is pedantic and counterproductive). Therefore, it is of the utmost importance that we be able to calculate the time of the local sunrise and sunset. Fortunately, astronomers have left us the equations that allow us to calculate this. Unfortunately, these astronomers were eaten by zombies before they could turn the math into a useful program. The following is the algorithm that is their legacy. To calculate the local time of sunrise and sunset, we need the following input data: Latitude: Latitude of the current location in degrees (+ = North, - = South) Longitude: Longitude of the current location in degrees (+ = East, - = West) Time zone: The local timezone as offset from UTC (e.g. CST=-6) day of year: The numerical day of the year for which we are performing the calculation %3D %3D %3D The following are the equations required to calculate sunrise and sunset times. is the day of the year converted into an angle in radians. (day.of_year – 1) 365 eqtime is the equation of time in minutes (the number of minutes that the position of the sun differs from the actual time). eqtime = 229.18(0.000075 + 0.001868cos(y) – 0.032077sin(y) – 0.014615cos(2y) 0.040849sin(2y)) %3D decl is the declination of the sun in radians. decl = 0.006918 – 0.399912cos(v) + 0.070257sin(y) 0.006758cos(2) + 0.000907sin(2y) – 0.002697cos(3y) + 0.00148sin(3y) - ha is the hour angle of the sun in degrees. cos(1.5853) cos(latitude · 50) cos(decl) 180 - tan(latitude · ) tan(decl) 180 ha = arccOS sunrise is the time in local minutes of sunrise.
Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here