示例#1
0
  /** Seed the conversion using a last measurement */
  public Measurement convert(Reading r, Measurement last) {
    if (last != null) {
      this.Xt = last.getX();
      this.Yt = last.getY();
      this.Zt = last.getZ();
    }

    // if the last measurement failed, set back to origin
    if (this.Xt > 9.E99) {
      this.Xt = 0;
    }
    if (this.Yt > 9.E99) {
      this.Yt = 0;
    }
    if (this.Zt > 9.E99) {
      this.Zt = 0;
    }

    return convert(r);
  }