Bug #272
dX and dY are currently based on fps. They need to be based on seconds (time)
| Status: | Assigned | Start: | 05/15/2009 | |
| Priority: | Normal | Due date: | ||
| Assigned to: | Artem Titoulenko | % Done: | 100% |
|
| Category: | - | Spent time: | 2.00 hours | |
| Target version: | - | |||
Description
dX, dY and maccel should be based on time in seconds to make it independent of fps.
instead of:
X = (sensor_dx / sensor_width)
Y = (sensor_dy / sensor_height)
m = (speed - last_speed)
should be:
X = (sensor_dx / sensor_width) / dt
Y = (sensor_dy / sensor_height) / dt
m = (speed - last_speed) / dt
History
Updated by Artem Titoulenko over 4 years ago
- Status changed from New to Resolved
- Assigned to set to Artem Titoulenko
Updated by Ian Stewart over 3 years ago
The recent changes in rev 177 and 179 caused unexpected acceleration spikes. This large jumps of acceleration prevents the blob from being registered as sitting long enough to trigger a hold event. As a result users are unable to complete the calibration stage.
I refactored the time dependent calculations and cleaned up the code a bit.
The few notable changes I'd like to have cleared before commit:
- Blob class no longer has a member lastCentroid as it is not needed.
- Blob class now has member updateTime to register when the position was last updated.
- The sitting timer for blobs now requires no movement with acceleration beyond the user set value MIN_MOVEMENT_THRESHOLD. This allows the user to adjust the sensitivity of breaking a hold event.
- BlobTracker class now has a new member HOLD_DELAY to determine the duration required for a held event to fire.
Updated by Artem Titoulenko over 3 years ago
great find! however some of the changes you made were already in the classes, if i am reading your update right.
for instance:- lastCentroid is necessary as it is part of calculations, and it is just generally nice and unexpectedly useful to have as much information as possible, even if it can be calculated using current position and D.
- updateTime is irrelevant since there is lastTimeTimeWasChecked whose purpose is "to register when the position was last updated."
Everything else sounds like a good idea. You can update to the WIP ccv svn and we'll check it out. Check the docs.
Updated by Artem Titoulenko over 3 years ago
- Status changed from Resolved to Assigned
- % Done changed from 0 to 50
Updated by Seth Sandler over 3 years ago
- % Done changed from 50 to 100
