Question: Problem Statement ( IN C LANGUAGE ) : Your work on the NighKey running app has helped them bring the app to the testing and

Problem Statement (IN C LANGUAGE):
Your work on the NighKey running app has helped them bring the app to the testing and prototype phase. They have successfully tested the app on several runs and now need your help to validate the data. The data for each run includes GPS data (latitude/longitude in degrees), elevation data (in meters above sea level), and a unique date/time stamp in (the proper) ISO 8601 format in a CSV formatted data file. In each file the first line is the header/metadata and each subsequent line is a data point. However, the data points are not necessarily in any
particular order. For example:
latitude,longitude,elevation,time
41.30359,-96.168361,378.8,2024-11-16T16:12:52
41.303385,-96.167966,378.4,2024-11-16T16:13:03
41.303608,-96.16839,378.9,2024-11-16T16:12:51
...
A full sample run will have thousands of data points, approximately one per second.
However the app data itself not necessarily have data for every second.
For any data gap of less than 10 seconds it is assumed that the app simply did not
record data or the runner may have paused to (say) tie their shoe; in any case we will
assume that the runner was moving during this gap. For any data gap of 10 seconds or more, it is assumed that the runner paused the app for a longer water or bathroom break. In this case we will assume the runner was waiting (not moving) during this gap. You will write a program that produces several reports based on these assumptions.
1. Elevation Report
As a simple first start, the first report you will output will be the highest and lowest elevations recorded during the run. Your first report should look something like the following.
=====================
Elevation Report
=====================
Highest Elevation: 385.60m
Lowest Elevation: 334.70m
2. Elevation Gain Report
Recall that the elevation gain only includes the elevation increase from one data point to the next (regardless of time gaps). For example an elevation change from 383.2m to 383.5m would be +.3m and would count as a gain. An elevation change from 383.2m to 383.0m would be -.2m and would not count toward the total gain.
Your second report will compute the total elevation gain during the run and should look something like the following.
=====================
Elevation Gain Report
=====================
3. Distance Report
The next report will report the total distance of the run. The distance can be computed between two points using the latitude/longitude and (an adaptation) of your previously developed air distance function using the spherical law of cosines. Your report should look something like the following.
=====================
Distance Report
=====================
Total distance: 16.89km
4. Time Reports
This report will compute the total moving time and total wait time during the run (as defined above) as well as the total time of the run (the sum of the moving and wait time). Your report will need to be formatted as follows.
=====================
Time Report
=====================
Moving time: 01:34:16(5656s)
Wait time: 00:10:22(622s)
Total time: 01:44:38(6278s)
We have provided some starter code (attached) along with some functions that will help you including functions to load the data, format time, find the time (number of seconds) between two data points, etc. You may add any functions you like, but the file names should not be altered nor should you create more files. Attached is the expected output and starter code for runningUtils.c, runningUtils.h, and the main runningReports.c.
runningUtils.c (part 2)
Problem Statement ( IN C LANGUAGE ) : Your work

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 Programming Questions!