• Uber Travel Time and Velocity Histograms

    At the end of this problem you should submit to Laulima (please zip these files to work around the 5 file limit):

    • a file named UHusername_uber_travel_time_velocity_histograms.c
    • a file named UHusername_uber_travel_time_velocity_histograms.h
    • a file named UHusername_uber_travel_time_velocity_histograms_constants.h
    • a file named UHusername_uber_travel_time_velocity_histograms_helpers.c
    • a file named UHusername_uber_travel_time_velocity_histograms_helpers.h

      example:

      • zhaol_uber_travel_time_velocity_histograms.c
      • zhaol_uber_travel_time_velocity_histograms.h
      • zhaol_uber_travel_time_velocity_histograms_constants.h
      • zhaol_uber_travel_time_velocity_histograms_helpers.c
      • zhaol_uber_travel_time_velocity_histograms_helpers.h
    • It will be beneficial for you to leave your previous lab work untouched by copying them to a new folder for this lab and modify only the files in the new folder

      If you were not able to complete Uber Velocity and Fastest List from the Lab 11, you can create a brand new program. The feature set between both lab assignments are independent, however, if you could not calculate velocity then calculate a histogram of starting x-positions (3rd column). Just follow the download instructions from Lab 10 and coordinate with your lab instructor.

      Update your Uber Velocity and Fastest List program from Lab 11 to add the following features (or write a new program that does the following):

      1. Generate a histogram of ride start times for the different hours of the day:

        • you can just output the histogram as a 2 column list like this:
          0000 3
          0100 6
          ...
          2200 10
          2300 3
          
        • the above histogram is stating that:
          • there are 3 rides starting from 0000 to 0099
          • there are 6 rides starting from 0100 to 0199
          • there are 10 rides starting from 2200 to 2299
          • there are 3 rides starting from 2300 to 2399
        • if you are feeling up to it, you can generate a plot similiar to the one found here: http://www-ee.eng.hawaii.edu/~tep/EE160/S13/midterm1.html
      2. Generate a histogram of velocities:

        • calculate the max and min avereage velocties of all the rides to determine the upper and lower limits of the histogram
        • calculate the bin limits so there are ten equally spaced (or as close as possible to equally spaced) bins for the histogram
        • you can just output the histogram as a 2 column list like this:
          50 2
          60 6
          70 8
          80 11
          90 20
          100 15
          110 0
          120 0
          130 0
          140 1
          
        • the above histogram is stating that:
          • there are 2 rides with velocities ranging from 50 to 59
          • there are 6 rides with velocities ranging from 60 to 69
          • there are 8 rides with velocities ranging from 70 to 79
          • there are 11 rides with velocities ranging from 80 to 89
          • there are 20 rides with velocities ranging from 90 to 99
          • there are 15 rides with velocities ranging from 100 to 109
          • there are 0 rides with velocities ranging from 110 to 119
          • there are 0 rides with velocities ranging from 120 to 129
          • there are 0 rides with velocities ranging from 130 to 139
          • there are 1 rides with velocities ranging from 140 to 149
        • please note that the example output is meant to convey the file format, not the actual ranges of velocities and histogram values
        • if you are feeling up to it, you can generate a plot similiar to the one found here: http://www-ee.eng.hawaii.edu/~tep/EE160/S13/midterm1.html