diff --git a/robots/mtp/mtp_dump.c b/robots/mtp/mtp_dump.c
index bf6cc1ac600bac01c667c3f75641b08f7e14c01b..27d6c7c850cf91e90e9dff676c7c590bf38532ee 100644
--- a/robots/mtp/mtp_dump.c
+++ b/robots/mtp/mtp_dump.c
@@ -18,6 +18,8 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <assert.h>
+#include <signal.h>
+#include <float.h>
 
 #include <sys/types.h>
 #include <netdb.h>
@@ -29,6 +31,23 @@
 
 #include "mtp.h"
 
+static int looping = 1;
+
+#define min(x, y) ((x) < (y)) ? (x) : (y)
+#define max(x, y) ((x) > (y)) ? (x) : (y)
+
+/**
+ * Signal handler for SIGINT, SIGQUIT, and SIGTERM that sets looping to zero.
+ *
+ * @param signal The actual signal received.
+ */
+static void sigquit(int signal)
+{
+    assert((signal == SIGINT) || (signal == SIGQUIT) || (signal == SIGTERM));
+
+    looping = 0;
+}
+
 static int mygethostbyname(struct sockaddr_in *host_addr, char *host)
 {
     struct hostent *host_ent;
@@ -60,6 +79,10 @@ int main(int argc, char *argv[])
     int port = 0, max_packets = 0, retval = EXIT_FAILURE;
     struct sockaddr_in sin;
     
+    signal(SIGQUIT, sigquit);
+    signal(SIGTERM, sigquit);
+    signal(SIGINT, sigquit);
+    
     memset(&sin, 0, sizeof(sin));
     
     if (argc < 3) {
@@ -97,13 +120,25 @@ int main(int argc, char *argv[])
 	    fprintf(stderr, "error: mtp_init_handle\n");
 	}
 	else {
+	    float minx = FLT_MAX, miny = FLT_MAX;
+	    float maxx = FLT_MIN, maxy = FLT_MIN;
 	    struct mtp_packet mp;
 	    int lpc = 0;
 	    
-	    while (((max_packets == 0) || (lpc < max_packets)) &&
+	    while (looping && ((max_packets == 0) || (lpc < max_packets)) &&
 		   (mtp_receive_packet(mh, &mp) == MTP_PP_SUCCESS)) {
-		mtp_print_packet(stdout, &mp);
+		if (mp.data.opcode == MTP_UPDATE_POSITION) {
+		    struct mtp_update_position *mup;
+
+		    mup = &mp.data.mtp_payload_u.update_position;
+		    minx = min(minx, mup->position.x);
+		    maxx = max(maxx, mup->position.x);
+		    miny = min(miny, mup->position.y);
+		    maxy = max(maxy, mup->position.y);
+		}
 		
+		mtp_print_packet(stdout, &mp);
+
 		mtp_free_packet(&mp);
 
 		lpc += 1;
@@ -114,6 +149,12 @@ int main(int argc, char *argv[])
 
 	    mtp_delete_handle(mh);
 	    mh = NULL;
+
+	    printf(" minx = %.2f; miny = %.2f\n"
+		   " maxx = %.2f; maxy = %.2f (width = %.2f, height = %.2f\n",
+		   minx, miny,
+		   maxx, maxy,
+		   maxx - minx, maxy - miny);
 	}
 
 	retval = EXIT_SUCCESS;