Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q1: Write a Python code to solve the following problem. In an embedded system, two streams of sensor readings come from two temperature sensors installed

Q1: Write a Python code to solve the following problem.

In an embedded system, two streams of sensor readings come from two temperature sensors installed in two different locations (backyard and front yard). Use random numbers to simulate the readings.

Print a report on the screen that shows the two readings from the two locations and an alert when the readings are different by more than 5 degrees. This could be a sign one of the sensors is faulty. What percentage of time does this fault event get detected must also be shown.

The report must also show the average of the two locations.

To reduce the error from each location, use a 5-tap averaging window on each location. We did 3-tap in the videos for a single location. Extend it to 5-tap on two different locations.

---

Q2: Modify the first question to make the filter size variable by using lists. Instead of a 3-tap or 5-tap, the user can choose any odd number tap (e.g., 7 or 9). You must use arrays. Also, instead of averaging only, provide variable length median filtering. For example, if chosen by the function caller, then we can show the median of the last 7 values instead of the average of the last 7 values (assuming 7 is the chosen filter size).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Murach's SQL Server 2012 For Developers

Authors: Bryan Syverson, Joel Murach, Mike Murach

1st Edition

1890774693, 9781890774691

More Books

Students also viewed these Databases questions