Expand data for star collector game#76
Conversation
…m/star-collector-data
thompson318
left a comment
There was a problem hiding this comment.
I've had a look through and checked that I understand the logic for the speed calculation and checking player presence. It took me a while to satisfy myself that the logic will work as it is split between two functions (UpdateHeadYawBuffer and RecordHeadVelocity) and will depend on them being called in the right order. However I can't think of a more straightforward way of doing it and it should work well for short sampling periods.
I wonder if it would make life easier if we added an additional GameTimeStamp to GazeItem and HeadAngleItem in TrackerBuffers.cs then re-implement TobiiBuffer.GetItems to use GameTimeStamp rather than the timestamp from the tracker. Might be one for a separate PR.
My main request for this PR is that I think we should change velocity to speed throughout. Hopefully just a find and replace job. If David publishes this it will be important that the language is technically correct so we should get it right throughout.
|
Thanks for the review @thompson318 - I think I've addressed your main comments now:
I also made a new issue to keep track of the points we discussed in the meeting: #77 |
thompson318
left a comment
There was a problem hiding this comment.
Looks good. I think one minor clarification in the save parameter description on how speed is calculated. Can you check that please? If I've got it wrong we might need to review a bit more.
Co-authored-by: Stephen Thompson <s.thompson@ucl.ac.uk>
|
Thanks @thompson318 - good point! I agree that is a more accurate description of how the speed is calculated - I've commited your edits. |
For #20
Expands star collector saved data with various measures including mean / peak / standard deviation of head yaw velocity. Relevant docs have been updated to match.
I had to add special handling for periods when the player goes out of range of the tracker. For example, if the player plays for 10 seconds, then walks away from the computer for the remaining 50 seconds of the game,
getSpeedonHeadAngleBufferwill keep reporting the speed based on data from the first 10 seconds. The issue is that when the player is out of range, the tracker will not report any new data, so the buffer remains full of old data. When you request the speed based on the last 0.5 seconds (for example), it uses the timestamp of the last item in the buffer and counts back 0.5 seconds - so it keeps using old data collected much longer than 0.5 seconds ago.Ideally, we could update the buffer so that it always counts back from the current timestamp (rather than the last timestamp in the buffer), but I couldn't find a way to get the current timestamp from the tracker when the player is un-detected, or an easy way to interpret the Tobii timestamps (as they aren't in isoformat). We could add our own isoformat timestamps to allow this, but wasn't sure if it was worth the extra code (as we would still need to keep the tobii timestamp too to ensure we aren't adding the same item multiple times). For now, I exclude any time periods where the player has gone out of range at any point. Any other suggestions very welcome!