package nomadgui;

import nomadgui.state.*;

class gpsTestThread extends Thread {
  RSPFrame rframe;

  gpsTestThread(RSPFrame r) {
    rframe = r;
  }

  public void run() {
    float x=0, y=0, z=0;
    
    for(x=0; x<=1500; x+=15) {  // x from 0 -> 1500
      rframe.setGPS(x,y,z);
      try { Thread.sleep(10); } catch(InterruptedException ie) {}
    }
    x=1500;

    for(y=0; y<=1500; y+=15) {  // y from 0 -> 1500
      rframe.setGPS(x,y,z);
      try { Thread.sleep(10); } catch(InterruptedException ie) {}
    }
    y=1500;

    for(x=1500; x>=-1500; x-=15) {  // x from 1500 -> -1500
      rframe.setGPS(x,y,z);
      try { Thread.sleep(10); } catch(InterruptedException ie) {}
    }
    x=-1500;

    for(y=1500; y>=-1500; y-=15) {  // y from 1500 -> -1500
      rframe.setGPS(x,y,z);
      try { Thread.sleep(10); } catch(InterruptedException ie) {}
    }
    y=-1500;
  }
}
