Servo problems...

hi:

I'm running the servos off of the 5V power supply on the Arduino. I've made the changes to code:

#include <SoftwareSerial.h>
#include "TinyGPS.h"
#include <Servo.h>

/* This sample code demonstrates the normal use of a TinyGPS object.
 It requires the use of SoftwareSerial, and assumes that you have a
 4800-baud serial GPS device hooked up on pins 3(rx) and 4(tx).
 */

Servo panservo;
Servo tiltservo;

TinyGPS gps;
SoftwareSerial ss(3, 4);

float dest_latitude =42.24707;
float dest_longitude =-83.00085;
float distance;
float distanceangle;

void setup()
{
  Serial.begin(115200);
  ss.begin(9600);

  panservo.attach(9);
  tiltservo.attach(10);
  Serial.print("Simple TinyGPS library v. "); 
  Serial.println(TinyGPS::library_version());
  Serial.println("by Mikal Hart");
  Serial.println();
}

void loop()
{
  bool newData = false;
  unsigned long chars;
  unsigned short sentences, failed;

  // For one second we parse GPS data and report some key values
  for (unsigned long start = millis(); millis() - start < 1000;)
  {
    while (ss.available())
    {
      char c = ss.read();
      // Serial.write(c); // uncomment this line if you want to see the GPS data flowing
      if (gps.encode(c)) // Did a new valid sentence come in?
        newData = true;
 Serial.print("Millis() is ");
 Serial.print(millis());  
  }
    
  }

  
  if (newData)
  {
    float flat, flon;
    unsigned long age;
    gps.f_get_position(&flat, &flon, &age);
 


    float distance = (TinyGPS::distance_between(flat, flon, dest_latitude, dest_longitude ));
    float distanceangle;
    if (distance <= 100){
      distanceangle =int(-0.6*distance + 120);
      Serial.print(" distance is less");
      Serial.print( distanceangle);
      tiltservo.write(distanceangle);
    }

    else {
      distanceangle = 60;
      Serial.print(" distance is greater ");
      Serial.print( distanceangle);
      tiltservo.write(distanceangle);
    }

    float course =  (TinyGPS::course_to(flat, flon, dest_latitude, dest_longitude ));
    float courseangle;
    if (270 <= course && course <= 360){
      courseangle = int(-course + 450);
      Serial.print (" course is case 1 ");
      Serial.print ( courseangle);
      panservo.write(courseangle);

    }
    else if (0 <= course && course <= 90){
      courseangle = int(-course + 90);
      Serial.print (" course is case 2 ");
      Serial.print ( courseangle);
      panservo.write(courseangle);

    }
    else if (90 < course && course < 180){
      courseangle = 0;
      Serial.print (" course is case 3 ");
      Serial.print ( courseangle);
      panservo.write(courseangle);


    }

    else if (180 <= course && course < 270){
      courseangle = 180;
      Serial.print (" course is case 4 ");
      Serial.print ( courseangle);
      panservo.write(courseangle);

    }

  }


}

This is what I'm getting in the Serial monitor:
Millis() is 150
Millis() is 159
Millis() is 166
Millis() is 174
Millis() is 182
Millis() is 190
Millis() is 198
Millis() is 206
etc...

The distanceangle and courseangle values have not changed.

Thanks

rdeans