Examples of ParsedData


Examples of sk.fiit.jim.agent.parsing.ParsedData

  private ParsedData newData;

  @Before
  public void setup(){
    kalman = new KalmanAdjuster();
    data = new ParsedData();
    data.SIMULATION_TIME = 100.0;
    newData = new ParsedData();
    newData.SIMULATION_TIME = 100.0;
  }
View Full Code Here

Examples of sk.fiit.jim.agent.parsing.ParsedData

    assertCorrectRotations(PI / 2.0, 0.0, 3.0*PI/2.0);
    assertCorrectRotations(PI / 2.0, PI, 3.0*PI/2.0);
  }

  private void assertCorrectRotations(double rotationX, double rotationY, double rotationZ){
    ParsedData data = new ParsedData();
    data.fixedObjects.put(THEIR_UPPER_CORNER,
      THEIR_UPPER_CORNER.getAbsolutePosition().rotateOverZ(-rotationZ).rotateOverY(-rotationY).rotateOverX(-rotationX));
    data.fixedObjects.put(THEIR_LOWER_CORNER,
      THEIR_LOWER_CORNER.getAbsolutePosition().rotateOverZ(-rotationZ).rotateOverY(-rotationY).rotateOverX(-rotationX));
    data.fixedObjects.put(THEIR_UPPER_POST,
View Full Code Here

Examples of sk.fiit.jim.agent.parsing.ParsedData

  }

  @Test
  public void gyroscope(){
    model.setRotationZ(0.0);
    ParsedData gyro = new ParsedData();
    assertRotationChanged(gyro, 180.0 / 20.0, 0, 180.0 / 20.0);
  }
View Full Code Here

Examples of sk.fiit.jim.agent.parsing.ParsedData

    assertPosition(Vector3D.cartesian(-1.0, 0.0, 0.0), 3.0*PI / 2.0);
    assertPosition(Vector3D.cartesian(1.0, 0.0, 0.0), 3.0*PI / 2.0);
  }

  private void assertPosition(Vector3D ourPosition, double rotationZ){
    ParsedData data = new ParsedData();
    data.fixedObjects.put(THEIR_UPPER_CORNER, THEIR_UPPER_CORNER.getAbsolutePosition().subtract(ourPosition).rotateOverZ(-rotationZ));
    data.fixedObjects.put(THEIR_LOWER_CORNER, THEIR_LOWER_CORNER.getAbsolutePosition().subtract(ourPosition).rotateOverZ(-rotationZ));
    data.fixedObjects.put(THEIR_LOWER_POST, THEIR_LOWER_POST.getAbsolutePosition().subtract(ourPosition).rotateOverZ(-rotationZ));
    model.processNewServerMessage(data);
    Vector3D diff = model.getPosition().subtract(ourPosition);
View Full Code Here

Examples of sk.fiit.jim.agent.parsing.ParsedData

    seeBallIn(1.0, 1.0, 0.0);
  }


  private void seeBallIn(double x, double y, double z){
    ParsedData data = new ParsedData();
    data.fixedObjects.put(FixedObject.OUR_LOWER_CORNER, FixedObject.OUR_LOWER_CORNER.getAbsolutePosition().rotateOverZ(-PI / 2.0));
    data.fixedObjects.put(FixedObject.OUR_UPPER_POST, FixedObject.OUR_UPPER_POST.getAbsolutePosition().rotateOverZ(-PI / 2.0));
    data.fixedObjects.put(FixedObject.OUR_LOWER_POST, FixedObject.OUR_LOWER_POST.getAbsolutePosition().rotateOverZ(-PI / 2.0));

    data.ballRelativePosition = Vector3D.cartesian(x, y, z);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.