|
@@ -9,7 +9,7 @@ namespace Logging
|
|
|
{
|
|
|
public readonly struct ViveSensorDataLog
|
|
|
{
|
|
|
- private readonly float timestamp;
|
|
|
+ private readonly int timestamp;
|
|
|
private readonly float steerAngle;
|
|
|
private readonly float frontWheelTrackerPositionX;
|
|
|
private readonly float frontWheelTrackerPositionY;
|
|
@@ -30,7 +30,7 @@ namespace Logging
|
|
|
private readonly float hmdRotationY;
|
|
|
private readonly float hmdRotationZ;
|
|
|
|
|
|
- public ViveSensorDataLog(float timestamp, float steerAngle, float frontWheelTrackerPositionX,
|
|
|
+ public ViveSensorDataLog(int timestamp, float steerAngle, float frontWheelTrackerPositionX,
|
|
|
float frontWheelTrackerPositionY, float frontWheelTrackerPositionZ, float frontWheelTrackerRotationX,
|
|
|
float frontWheelTrackerRotationY, float frontWheelTrackerRotationZ, float kineticTrackerPositionX,
|
|
|
float kineticTrackerPositionY, float kineticTrackerPositionZ, float kineticTrackerRotationX,
|
|
@@ -62,7 +62,7 @@ namespace Logging
|
|
|
|
|
|
public string[] Serialize() => new[]
|
|
|
{
|
|
|
- timestamp.ToString("F6", CultureInfo.InvariantCulture),
|
|
|
+ timestamp.ToString("D", CultureInfo.InvariantCulture),
|
|
|
steerAngle.ToString("F6", CultureInfo.InvariantCulture),
|
|
|
frontWheelTrackerPositionX.ToString("F6", CultureInfo.InvariantCulture),
|
|
|
frontWheelTrackerPositionY.ToString("F6", CultureInfo.InvariantCulture),
|
|
@@ -103,7 +103,7 @@ namespace Logging
|
|
|
var hmdPosition = hmd.position;
|
|
|
var hmdRotation = hmd.rotation.eulerAngles;
|
|
|
//TODO: data always there?
|
|
|
- Log(new ViveSensorDataLog(Time.time, steerAngle,
|
|
|
+ Log(new ViveSensorDataLog(Mathf.RoundToInt(Time.time * 1000), steerAngle,
|
|
|
fwtPosition.x, fwtPosition.y, fwtPosition.z,
|
|
|
fwtRotation.x, fwtRotation.y, fwtRotation.z,
|
|
|
kltPosition.x, kltPosition.y, kltPosition.z,
|