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

Tighten up close-to-midnight check #27

Open
noah10 opened this issue Oct 27, 2023 · 4 comments
Open

Tighten up close-to-midnight check #27

noah10 opened this issue Oct 27, 2023 · 4 comments
Assignees

Comments

@noah10
Copy link
Contributor

noah10 commented Oct 27, 2023

In #26 we have an example of a case where someone had just enough time to do a final session before midnight, but emWave took long enough getting the pulse sensor going that it pushed her over the limit and caused the session to finish after midnight.

There are two things we should do to tighten this up:

  1. Add a minute or so of slop factor to the calculation to allow for this scenario.
  2. Move the time check to RestComponent (or perhaps just add it to RestComponent but also have it in TrainingComponent?) so that if someone tries to start a session, runs into problems with emWave, and then tries to start again, we catch them if there's not enough time to complete the session on their second attempt.
@choipaul92
Copy link

I'm okay with both options.

I think Option 1 is good for user experience (participants get a little bit of grace where if they start before midnight, their session still counts for that day if it's completed close to after midnight) and Option 2 is good for consistency in research (2 image rating + 2 practices must be all completed before midnight = strict cut-offs).

It's also important to note that we will be recruiting from USC SONA students who are enrolled in classes. I'm willing to bet some will be completing/starting them near midnight. We also need to factor in time for participants who have faulty ear sensors where they will have to do more than 2 meditation practices a day for our app to register receiving all 40 minutes of emWave data (until they receive a new one).

@noah10
Copy link
Contributor Author

noah10 commented Nov 6, 2023

Note that they aren't options - they're two things that we have to do to fix the problem.

@noah10
Copy link
Contributor Author

noah10 commented Nov 6, 2023

Also, there's no way to factor in time for faulty ear sensors - if someone starts their 40 minutes of training at 11:18PM and loses 3 minutes due to an ear sensor problem they will not get through all of their training for the day.

@noah10
Copy link
Contributor Author

noah10 commented Nov 17, 2023

This is ready for testing. There are some edge cases to be aware of:

  • Someone could start their session with just enough time, but then be really slow rating emotional pictures and be told they don't have enough time to do the breathing.
  • Someone could start their 20 minute session, get through 10 minutes, lose the sensor signal, futz with it for a couple of minutes, then get told that they don't have enough time left to finish their session. In this case the first 10 minutes wouldn't get uploaded until the next time they do a whole 20 minute session.

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

No branches or pull requests

2 participants