Join Steven Lipton for an in-depth discussion in this video Rotation rate with the gyro, part of Advanced iOS App Development: Core Motion.
- [Narrator] In fencing, all motion should be…that linear Y motion in a thrust attack.…You are not allowed to slash.…However, in saber, slashing is allowed.…Let's look at adding slash movements…by reading the rotation rate of another sensor,…the gyroscope.…The slash motion we'll make is a high rotation rate,…either positive or negative, along the Z-axis.…At the same time, we have a thrust acceleration in Y.…I'll measure rotation rates through the gyroscope.…Unlike the accelerometer, the gyroscope needs time…to start up, as much as three seconds.…
Before using that sensor, check to make sure it's available.…So let's go into the code again.…Close the console…and put under our thrust and parry,…if self.motionManager.isGyroAvailable.…Make a block.…And afterwards, make it else.…If it's not, we'll print a message,…"Gyro not available yet."…In the code for the gyro,…I'm going to make another constant,…let gyro = deviceMotion.rotationRate.…
We'll have an X, Y, and Z in gyro…that we can then use whichever axis we need.…We'll be looking at the Z rotation rate for this,…
- Reading Core Motion data
- Understanding Core Motion methods
- Creating a pedometer app
- Using pace and distance data from Core Motion
- Pushing and pulling device motion data
- Accessing the altitude sensors
- Working with the motion activity manager (CMMotionActivityManager)
Skill Level Advanced
iOS App Development: Accessibilitywith Kevin Favro2h 34m Intermediate
Advanced iOS Development: Working with APIswith Saul Mora1h 59m Intermediate
1. Core Motion Introduction
3. Device Motion
5. Recorded Data
Next steps1m 43s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.