[DRAFT - DO NOT MERGE] Add magnetometer #268
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This branch adds the ability to record data using the magnetometer. It is built on top of some proposed model improvements which appear to make the result of model training more consistent.
This branch allows the user to switch between accelerometer and magnetometer data and will warn the user about clearing existing recordings (if present) when this switch is made. The sensor dropdown appears over the live graph in the bottom left.
This branch includes a new filter which seems to help the model differentiate between left and right swiping motions over the top of the micro:bit with a magnetic object. The filter attempts to get the first significant change in gradient and output the signed vector of this gradient.
Accelerometer and magnetometer data cannot be used together. I'm not sure there's a scenario where they would work well together. So far, one dataset has simply occluded another and made training and inference worse.
All data is now scaled to -2..2. This value has been set as a result of dividing accelerometer data by 1000, but it's somewhat abitrary when including the magnetometer data. It has proved difficult to change while maintaining backwards compatibility.