scaled trip.c