We calculate the factional grade in a similar fashion to how we calculate distance. The Location class method getAltitude() returns the altitude if available, in meters above the WGS 84 reference ellipsoid[4]. Whenever we receive a location update, we get the difference between the current and last known altitude, and use a simple rise/run calculation to get our fractional gradient, which we use for estimating the users VO2. Note that we do not take into account negative gradients, and if the gradient is negative we set the gradient to zero for use in our calculation.
After calculating the gradient, we make the necessary unit conversion and estimate the users current netVO2 using the appropriate …show more content…
You can see an example of the Toast message in figure??????
CapstoneLap saves relevant data calculated during a user’s workout so that they can view it later on, and get an idea on how they are progressing in their training or weight loss. The SharedPreferences[13] interface class provides a general framework that allows one to save and retrieve persistent key-value pairs of primitive data types, and is how all of the data is saved in the application. Data from prior workouts can be viewed, including the average duration, distance traveled, average speed, max speed and calories burned of all recorded workouts in the History activity, which can be seen in figure?????.
5.4 Additional Comments on Design and …show more content…
In this section we discuss some of the more interesting problems encountered in the development of CapstoneLap, and the solutions to them if they were found.
6.1 Landscape Reset
This is a bug that was also in the prototype, where whenever the layout view switches between portrait and landscape view, all of the text outputs get reset to their original states. It was first discovered to have this effect on the Chronometer in the CapstoneLap prototype, and there was the same effect in the final version of CapstoneLap. I haven’t discovered the reason for this bug, or exactly how to solve it. However as an easy work-around all the activities in the final version of CapstoneLap are locked in portrait mode.
6.2 Limitations of the ACSM’S Metabolic