Lab 34 Reflection Journal
For this lab we created basically a compass which can not only track what direction you may be heading but also how fast you're heading there. We completed this lab by first creating individual constants which each would hold the respective vector speed and direction. After creating the constants then the navigator.geolocation.watchPosition was added into the JavaScript in order to be able to keep track of the speed of the user as well as the directions in which the user was faced was tracked by arrow.style.transform=rotate($data.coords.heading)deg).
The code we used for this lab can be seen used in many things today such as fit-bits which tracks how many steps the user takes the speed in which they are going and other things. Learning this code is cool as it gives insight on how somethings use this code in order to function which is pretty interesting like you essentially have the code to make your own fit-bit which can track the direction you are going in and how fast you are going.
Comments
Post a Comment