Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discrepancy - ChartManager and RecordingManager #51

Open
Thomas-mp4 opened this issue Oct 5, 2024 · 0 comments
Open

Discrepancy - ChartManager and RecordingManager #51

Thomas-mp4 opened this issue Oct 5, 2024 · 0 comments

Comments

@Thomas-mp4
Copy link

RecordingManager.js:

        switch (sensorData.sensorId) {
            case 0: // IMU data (Accelerometer, Gyroscope, Magnetometer)
                dataCache[sensorData.timestamp].acc = [-sensorData.ACC.X, sensorData.ACC.Z, sensorData.ACC.Y];
                dataCache[sensorData.timestamp].gyro = [-sensorData.GYRO.X, sensorData.GYRO.Z, sensorData.GYRO.Y];
                dataCache[sensorData.timestamp].mag = [-sensorData.MAG.X, sensorData.MAG.Z, sensorData.MAG.Y];
                break;

ChartManager.js:

openEarable.sensorManager.subscribeOnSensorDataReceived((sensorData) => {
    switch (sensorData.sensorId) {
        case 0: // Assuming sensorId 0 is the accelerometer, gyroscope, and magnetometer combined data
            var acc_x = sensorData.ACC.X;
            var acc_y = sensorData.ACC.Y;
            var acc_z = sensorData.ACC.Z;
            var gyr_x = -sensorData.GYRO.X;
            var gyr_y = sensorData.GYRO.Z;
            var gyr_z = sensorData.GYRO.Y;
            var mag_x = -sensorData.MAG.X;
            var mag_y = sensorData.MAG.Z;
            var mag_z = sensorData.MAG.Y;
            var acc = [acc_x, acc_y, acc_z];
            var gyro = [gyr_x, gyr_y, gyr_z];
            var mag = [mag_x, mag_y, mag_z];
            updateChart('accelerometerChart', acc);
            updateChart('gyroscopeChart', gyro);
            updateChart('magnetometerChart', mag);

...

Negation of X-axes when data is exported (RecordingManager)
Negation of gyr_x, mag_x when updating charts (ChartManager)

Are these negations intentional?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant