Question: 3. (40 Points) Structures Program Suppose you have a portable weather station that can measure the following: Temperature (degrees Celsius)Wind Speed (miles per hour)Barometric Pressure
3. (40 Points) Structures Program
Suppose you have a portable weather station that can measure the following:
Temperature (degrees Celsius)Wind Speed (miles per hour)Barometric Pressure (mm of mercury e.g. 30.5)Precipitation (hundredths of an inch e.g. 0.05)
The weather station has a GPS unit that can be used to provide location data in the form of latitude, longitude and altitude (meters). It also records the date (MM DD YYYY) and time (HH MM SS) of each measurement.
Measurements are recorded hourly and combined into a daily file (24 measurements per day)
Design a hierarchical structure to record measurements from the weather station. Store the data into an array of 24 measurements (One day of data) using thisData File.
Using the data write functions that will compute and print to the screen the following information:
Location of the weather station (latitude, longitude and altitude)High Temperature for the day with date and timeLow temperature for the day with date and timeMaximum wind speed for the 24-hour period with date and timeTotal precipitation for the 24-hour period with data
You may pass the entire array of records to the functions or pass just one record at a time.
Here is the data file.Download it from here.
http://uahcs.org/CS121/data/Weather_Station_Data_Problem_Six.txt
PORTABLE WEATHER STATION DAILY RECORD DATE: 11 21 2017 LOCATION: LAT 34.7191438 LON -86.6463600 ALT 650 FT TIME TEMP WIND_SPEED PRESSURE PRECIP 00:00:20 65.9 4.9 30.05 0.11 01:00:20 65.2 4.0 30.07 0.02 02:00:05 64.3 3.5 30.05 0.00 03:00:10 63.9 4.1 30.06 0.00 04:00:15 63.2 2.0 29.99 0.15 05:00:03 62.1 2.5 29.98 0.22 06:00:11 60.7 1.5 29.97 0.00 07:00:21 62.2 3.3 29.96 0.07 08:00:08 64.8 4.3 29.96 0.09 09:00:51 66.0 6.2 29.96 0.15 10:00:12 68.0 7.1 29.95 0.10 11:00:21 71.0 8.2 29.96 0.00 12:00:09 75.0 7.5 29.99 0.00 13:00:11 77.0 9.2 29.97 0.21 14:00:12 78.6 9.3 29.98 0.03 15:00:07 81.4 8.7 30.00 0.00 16:00:03 83.6 6.0 30.01 0.00 17:00:10 85.8 5.9 30.01 0.00 18:00:22 82.7 4.6 30.01 0.00 19:00:16 80.2 5.9 30.01 0.00 20:00:22 77.2 3.8 30.02 0.00 21:00:08 72.1 5.2 30.02 0.00 22:00:22 70.8 3.1 30.04 0.00 23:00:22 67.2 2.2 30.03 0.13
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
