succes
Embed:
(wiki syntax)
Show/hide line numbers
sample.cpp
00001 #include "sample.h" 00002 #include "MicroBit.h" 00003 00004 Sample::Sample(float gx, float ay, float az) 00005 : _gx(gx) 00006 , _ay(ay) 00007 , _az(az) 00008 {} 00009 00010 double Sample::GyroRate() 00011 { 00012 return -_gx; 00013 } 00014 double Sample::AccelerometerAngle() 00015 { 00016 return (atan2(_ay, _az)+pi)*360/pi; // Noise-O-rama 00017 } 00018
Generated on Wed Jul 13 2022 09:29:34 by 1.7.2