Last active
June 3, 2019 11:44
-
-
Save scspaeth/d376b3fb1b9626300fb3a132514cb06b to your computer and use it in GitHub Desktop.
Fork of TI SensorTag Gyro; using CC2541 GyroUUIDs and Phyphox Accel params,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<phyphox version="1.7"> | |
<title>Gyroscope</title> | |
<category>PocketLab One</category> | |
<description>Read the gyroscope of the PocketLab One and convert raw sensor readings to Angular Velocity in rad/s.</description> | |
<data-containers> | |
<container size="0">gyrXRaw</container> | |
<container size="0">gyrYRaw</container> | |
<container size="0">gyrZRaw</container> | |
<container size="0">gyrXCal</container> | |
<container size="0">gyrYCal</container> | |
<container size="0">gyrZCal</container> | |
<container size="0">t</container> | |
<container size="1">count</container> | |
<container size="1">tmax</container> | |
</data-containers> | |
<input> | |
<bluetooth name="MS-PL" mode="notification"> | |
<config char="F000AA53-0451-4000-B000-000000000000" conversion="hexadecimal">0A</config> <!-- Measurement period n*10msec --> | |
<config char="F000AA52-0451-4000-B000-000000000000" conversion="hexadecimal">07</config> <!-- Axis select bit1:x bit2:y bit3:z --> | |
<output char="F000AA51-0451-4000-B000-000000000000" conversion="int16LittleEndian" offset="0">gyrXRaw</output> | |
<output char="F000AA51-0451-4000-B000-000000000000" conversion="int16LittleEndian" offset="2">gyrYRaw</output> | |
<output char="F000AA51-0451-4000-B000-000000000000" conversion="int16LittleEndian" offset="4">gyrZRaw</output> | |
</bluetooth> | |
</input> | |
<views> | |
<view label="Angular Velocity Data"> | |
<graph label="Angular velocity X" labelX="t: time" unitX="s" labelY="gyrXCal: ω" unitY="rad/s" partialUpdate="true"> | |
<input axis="x">t</input> | |
<input axis="y">gyrXCal</input> | |
</graph> | |
<graph label="Angular velocity Y" labelX="t: time" unitX="s" labelY="gyrYCal: ω" unitY="rad/s" partialUpdate="true"> | |
<input axis="x">t</input> | |
<input axis="y">gyrYCal</input> | |
</graph> | |
<graph label="Angular velocity Z" labelX="t: time" unitX="s" labelY="gryZCal: ω" unitY="rad/s" partialUpdate="true"> | |
<input axis="x">t</input> | |
<input axis="y">gyrZCal</input> | |
</graph> | |
</view> | |
</views> | |
<analysis optimization="true"> | |
<multiply> | |
<input clear="false">gyrXRaw</input> | |
<input type="value">0.001065264</input> <!-- 2000 * 2*pi / 360 / 32768 --> | |
<output clear="true">gyrXCal</output> | |
</multiply> | |
<multiply> | |
<input clear="false">gyrYRaw</input> | |
<input type="value">0.001065264</input> | |
<output clear="true">gyrYCal</output> | |
</multiply> | |
<multiply> | |
<input clear="false">gyrZRaw</input> | |
<input type="value">0.001065264</input> | |
<output clear="true">gyrZCal</output> | |
</multiply> | |
<count> | |
<input clear="false">gyrXRaw</input> | |
<output>count</output> | |
</count> | |
<formula formula="([1]-1)*0.1"> | |
<input clear="false">count</input> | |
<output>tmax</output> | |
</formula> | |
<ramp> | |
<input as="start" type="value">0</input> | |
<input as="stop">tmax</input> | |
<input as="length">count</input> | |
<output>t</output> | |
</ramp> | |
</analysis> | |
<export> | |
<set name="Gyroscope"> | |
<data name="Time (s)">t</data> | |
<data name="Angular velocity x (rad/s)">gyrXCal</data> | |
<data name="Angular velocity y (rad/s)">gyrYCal</data> | |
<data name="Angular velocity z (rad/s)">gyrZCal</data> | |
</set> | |
</export> | |
</phyphox> |
When I forked this file, a some stage, I lost the 'ω' (omega) in the y-labels of the charts. So, I substituted the variable name for the formal physics representation. This has some utility because it helps users to know the variable names that are required to extract subsets of data using the Phyphox /get?xxx=full API requests. The API requires exact variable names including case matching and provides no results if the reference is not identical.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, the switch from Big to LittleEndian solved the weirdness in the Gyroscope output. gyrX and gyrY are now much smaller and the gyrZ axis shows a smooth damped harmonic oscillation when mounted on the unbalanced unicycle wheel.