import nddsJava.*;
import Telemetry.*;

public class bodDerivedStateCallback extends nddsCallback {
  // This constructor is required for any class that extends nddsCallback
  public bodDerivedStateCallback(bodDerivedState msg) {
    super(msg);
  }

  public void exec(Object o) {
    bodDerivedState m = (bodDerivedState) msg;
 
    //System.out.print(m.actWheelVelocity[0] + " ");
    //System.out.println(m.actWheelVelocity[1]);

    NomadFrame nframe = (NomadFrame)o;
    
    nframe.setWheelSpeed(m.actWheelVelocity[0], m.actWheelVelocity[1],
    			 m.actWheelVelocity[2], m.actWheelVelocity[3]); // cm/s
    nframe.setLinks(m.actRightSteerDist, m.actLeftSteerDist);  // mm
    // 100ths of a radian, pass as radians
    //nframe.setBogie(((double)m.bogieAngle)/100.0);
  }
}
