COSC 071
Project 3

Caution: This project is significantly more challenging than the prior assignments. It is also worth almost as much as the first two projects together. Be sure to get an early start! The design document is due Oct. 29, and the final code is due Nov. 5.

Project Description

In many cases of observation of animals in the wild, it is useful to outfit the animal with a tag that can be used to remotely determine the animal's location at different times. This way, patterns of foraging or migration can be determined by tracking the animal over time. Examples of this, in the marine world, include GPS tracking of elephant seals, fur seals and loggerhead turtles.

You task is to write a program that can be used to measure how far and how fast animals move based on the data collected from their satellie tracking information. This information is given in data files that have lines of the following format:

< Observation Time > < Latitude > < Longitude >

where

< Observation Time > is in military time (24 hour clock, from 0:00:00 to 23:59:59) and has the format:

< hour > : < minute > : < second >

and

< Latitude > and < Longitude > are in decimal degrees.

For example, a file will look like this:

05:37:23 38.895 -77.037
17:01:32 39.290 -76.613
02:19:47 39.745 -75.547
10:26:51 40.217 -74.543
19:55:02 40.714 -74.006
23:45:00 41.053 -73.539

Output of a possible program that performs these requirements is:

This program takes a filename that contains a series of
times and positions, in latitude and longitude, and specifies
the distance between the positions, and the average speed of
an animal that moved between those two points. It also computes
the total distance, and average speed over that distance.

Please enter the name of the file to process: p3.txt

  Leg             Distance(km)             Time (hours)    Average Speed (km/hr)
    1                    57.13                    11.40                     5.01
    2                   104.51                     9.30                    11.23
    3                   100.35                     8.12                    12.36
    4                    71.57                     9.47                     7.56
    5                    54.43                     3.83                    14.20
-----             ------------             ------------    ---------------------
Total                   388.00                    42.13                     9.21

What to turn in

Like the other projects, this one will have two parts:

Useful Hints: