gyronaut
Jun 24, 2014 - 13:57
I'm programming a prototyp for a flight navigational software and I would like to use Pythonista. Although you added functions for reading sensor data by introducing the motion module, this functions are not usable if the iphone is in a vertical position, which is the normal case. Hence it makes sense, just to provide the raw data of acceleration and gyroscope.
As an example of the accelerator:
- (void)startAccelerometer {
if ([self.motionManager isAccelerometerAvailable] == YES) {
[self.motionManager startAccelerometerUpdatesToQueue:queue
withHandler:^(CMAccelerometerData *accelerometerData, NSError
*error) {
self.ac_x = accelerometerData.acceleration.x;
self.ac_y = accelerometerData.acceleration.y;
self.ac_z = accelerometerData.acceleration.z;
}];
}
}