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 latitudelongitude in degrees elevation data in meters above sea level and a unique datetime stamp in the proper ISO format in a CSV formatted data file. In each file the first line is the headermetadata 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
T::
T::
T::
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 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 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.
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: m
Lowest Elevation: m
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 m to m would be m and would count as a gain. An elevation change from m to m would be m 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
Distance Report
The next report will report the total distance of the run. The distance can be computed between two points using the latitudelongitude 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: km
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: ::s
Wait time: ::s
Total time: ::s
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
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
