예제 #1
0
 public SensorRangeImpl(SensorRange r, UInt16 commandId = 0)
 {
     SetSensorRange(r, commandId);
 }
예제 #2
0
 public void GetSensorRange(out SensorRange r)
 {
     r = new SensorRange();
     r.MaxAcceleration = AccelScale * 9.81f;
     r.MaxRotationRate = (float)(GyroScale * System.Math.PI / 180.0);
     r.MaxMagneticField= MagScale * 0.001f;
 }
예제 #3
0
 public void SetSensorRange(SensorRange r, UInt16 commandId = 0)
 {
     CommandId  = commandId;
     AccelScale = SelectSensorRampValue(AccelRangeRamp, r.MaxAcceleration, (1.0f / 9.81f), "MaxAcceleration");
     GyroScale = SelectSensorRampValue(GyroRangeRamp, r.MaxRotationRate, (float)(180.0 / System.Math.PI), "MaxRotationRate");
     MagScale   = SelectSensorRampValue(MagRangeRamp, r.MaxMagneticField, 1000.0f, "MaxMagneticField");
     Pack();
 }