Data Format Calculations - snowpuppy/augreality GitHub Wiki
Sensor Device
- Input
- Range/Granularity/Units (device dependent)
- Output (for internal processing on uC; distinct from output to CCU, RasPi)
- Range/Granularity/Units Output (standardized to internal format, device independent)
- Input
- +/- 250/500/2000 dps (degrees per second)
- 250 dps = 8.75mdps/LSB, 500 = 17.5mdps/LSB
- 16-bit two's complement in X/Y/Z axes
- Output
- Format: floating point with 1=1 radian per second, for each axis
- Range: +/-500dps, therefore floating point output should be in [-8.727,+8.727]
- Input
- +/- 2-16g (m/s^2)
- 2g = 1 mg/LSB
- 16-bit two's complement in X/Y/Z axes
- Output
- Format: floating point with 1=1g, for each axis
- Range: +/-2g, therefore floating point output should be in [-2,+2]
- Input
- +/- 1.3-8.1 gauss
- 1.3 = 1100 LSB/gauss X/Y, 980 LSB/gauss Z
- 12-bit two's complement in X/Y/Z axes (16 bit data type with 12-bit range)
- Output
- Format: floating point with 1=1 gauss, for each axis
- Range: +/-1.9gauss, therefore floating point output should be in [-1.9,+1.9]
- Input
- 1-20 Hz update
- Format is Dec Mins: Latitude in ddmm.mmmm and longitude in dddmm.mmmm
- Conversion to Dec Degs: Latitude = dd + mm.mmmm / 60, Longitude = ddd + mm.mmmm / 60
- Dec Degs Accuracy: Accuracy
- Output
The best accuracy for the gps is about 2 decimeters for lattitude. See wikipedia page above to see approximate accuracy per degree of lattitude/longitude. 1 degree of of lattitude is approximately 111320 meters of accuaracy. Converting this to minutes: (111320 meters / 1 deg ) * (1 deg / 60 minutes) = 1855.33 meters / 1 minute The GPS gives us 4 decimal places for the minutes which gives us: 1855.33 meters * 10^-4 = .185533 meters // Thus 2 decimeters is the max resolution. Because of how small our area of coverage is, it will work to simply subtract the Dec Degs longitude and latitude coordinates from each other and multiply by the approximate distance per degree. Distances from the gps will be passed around in meters in floating point x/y coordinates relative to the CCU.
(Previously: Distances from the gps will be passed around in decimeters in x/y coordinates from the CCU. This can be stored in a 16bit integer since we may want to work with a distance more than +-128 decimeters.)
Processed Sensor Data
- Dependencies
- Required sensor devices
- Output
- Format
- Math
- Equations
- (0,0) defined by location of first GPS-equipped headset to be accepted by CCU
- (+1,+1) for 1 meter north of origin and 1 meter east of origin respectively
- Yaw (Compass Heading)
- 0 east
- pi/2 north
- pi west
- 3pi/2 south
- Tilt
- 0 when head in resting position (when eyes are parallel to ground)
- pi/2 when user tilts head to his/her right (eyes perpendicular to ground)
- -pi/2 when user tilts head to his/her left (eyes perpendicular to ground)
- Roll
- 0 when head in resting position (when face perpendicular to ground)
- pi/2 when user tilts head forward to face ground (face parallel to ground)
- -pi/2 when user tilts head backward to face sky (face parallel to ground)
Game Feature
- Dependencies
- Required processed sensor data
- Dependencies
- Latitude/Longitude, Compass Heading (Yaw), Tilt, Roll
- Dependencies
- Latitude/Longitude, Compass Heading (Yaw), Tilt, Roll