Getting G Shock Data from a MBLAccelerometerBMI160.lowOrHighGEvent
In the code below, I would like to know, when there is a HighGEvent, how "many g's" the event was. I understand that I have set a highGThreshold to 4.0 so the HighGEvent is at least 4.0 g's but what I would like to know is the max gForce near the HighGEvent, doesn't have to be exact.
What I am trying to do is add a fun circular gauge to an app that fills relative to how hard on athlete has swung aka how man G's the athlete created with their swing. I see that the MBLDataSample.csvRepresentation has what looks like a timestamp,05 every time I cause a HighGEvent: 1490326125.221333,05
Does the lowOrHighGEvent return any data that I might be missing, perhaps in a later version of MetaWear C firmware and/or hardware?
If I can't find any information about the G forces involved in the HighGEvent, does the MetaWear C log this information about the most recent HighGEvent?
MBLAccelerometerBMI160 *accelerometer = (MBLAccelerometerBMI160 *)device.accelerometer;
accelerometer.fullScaleRange = MBLAccelerometerBoschRange16G;
accelerometer.lowOrHighGEvent.lowGEnabled = NO;
accelerometer.lowOrHighGEvent.highGThreshold = 4.0;
accelerometer.lowOrHighGEvent.highGEnabledAxis = MBLAccelerometerAxisX;
[accelerometer.lowOrHighGEvent startNotificationsWithHandlerAsync:^(MBLDataSample *result, NSError *error) {
NSLog(@G Shock Data: %@", [result data]);
}];
This discussion has been closed.
Comments