->Homepage
->Schedule
->Courses
-->CS182
-->Tentative Schedule
-->Objectives
-->Quiz 1
-->Lab 1
-->Lab 2
-->Lab 3
-->Lab 4
-->Lab 5
-->Lab 6
-->Lab 7
-->Project
-->CS183
-->CS285
->Course Policies
->Electronic Submission
->Documentation Standards
->Old Exams
->C++ Examples
->MSVC++ Info
->Software
->Support Forum
->Unix Info
->Nature Photos

[Home]
[Rich][Home][Rich]
[Author]
CS182 -- Lab 3: Wind Chill

Winter 2003-2004

I used to live life with the wind at my back... until the doctor told me to reduce my lactose intake. -- J. Hutter
Overview

In this lab, you should develop skills using loops and conditional statements.

Procedure

Recently the United States and Canada's meteorological services revised their wind chill calculations.

Two versions of the new calculation are listed below:

Twind_chill = 13.12 + 0.6215*T - 11.37*(v0.16) + 0.3965*T*(v0.16)

where

  • Twind_chill is the perceived temperature in degrees Celsius
  • T is the actual temperature in degrees Celsius, and
  • v is the wind speed in km/h

and

Twind_chill = 35.74 + 0.6215*T - 35.75*(v0.16) + 0.4275*T*(v0.16)

where

  • Twind_chill is the perceived temperature in degrees Fahrenheit
  • T is the actual temperature in degrees Fahrenheit, and
  • v is the wind speed in mph

Write a program that will indicate the temperature and wind speed at which the two methods produce the most different results. You should display the windspeed, temperature, and temperature difference in both units.

Note:

  • The equations are not valid for windspeeds below 5 mph.
  • Your program should vary the wind speed at intervals of 5 mph and the temperature at intervals of 3 degrees Fahrenheit.
  • Your program should handle temperatures and wind speeds that are consistent with Milwaukee area winters.

Just for fun (optional)

The old wind chill calculation was:

Twind_chill = 33 - ((18.97*sqrt(v) - v + 37.62)/(18.97*sqrt(vr) - vr + 37.62)*(33 - T)

where

  • Twind_chill is the perceived temperature in degrees Celsius
  • T is the actual temperature in degrees Celsius
  • v is the wind speed in km/h, and
  • vr is the reference speed in km/h (typically 6-8)

Modify your program so that it will also find the temperature and wind speed at which the old and the new methods for modelling wind chill produce the most different results.

If you are looking for an additional challenge, feel free to add functionality to the program, e.g., generate a wind chill table that is formatted nicely, allow the user to enter a temperature and wind speed and display the perceived temperature, etc. Another idea would be to modify your program so that it produced a comma delimited data file (with the .csv extention) that could be loaded into Microsoft Excel to produce one or more graphs describing the relationship between temperature, wind speed, and perceived temperature.

Lab report (due 11:00pm, the day prior to week 4 lab)

Here is a template file to use as a starting point for this report.

The lab report should be in your own words and self-contained. By self-contained I mean that it should be possible for someone to understand what you did and why without seeing anything other than your report. Your report should include:

  • Purpose (educational objectives)
  • Problem Statement (in your own words)
  • Procedure (the steps you used to design your program, reasons for your design decisions, etc.)
  • Discussion (sample program output, problems you encountered (and how they were overcome), etc.)
  • An activity log indicating how much time you spent on each phase of the assignment. You should use the format found in the template XML file and report the time in the following categories:
    • Design
    • Coding
    • Debug (before you think it's working)
    • Test (after you think it's working)
    • Writing Report
    • Other
  • Conclusions (what you learned, suggestions of how the assignment could be improved, things you would have done differently, etc.)
  • Documented source code for your program.

As with any report you submit, correct spelling and grammar are required. In addition, your report should be submitted electronically following the Electronic submission guidelines. (You may wish to consult the XML help video and/or sample report before submitting your report.) Be sure to keep copies of all your files, in case something gets lost. It may be wise to keep a diskette backup as well.

Your grade will depend on quality of design, clarity of code and documentation, as well as whether your program produces the correct results. If you have any questions, consult your instructor.

Acknowledgment

This laboratory assignment was developed by Dr. Chris Taylor.

Last Updated: Thursday, 01-Jan-2015 13:33:11 CST