--- title: "Wind Chill" id: 57626 type: "computer_media" slug: "wind-chill" url: "http://localhost/computer_media/wind-chill/" markdown_url: "http://localhost/computer_media/wind-chill.md" published_at: "2024-10-06T00:54:40+00:00" modified_at: "2026-04-03T07:58:12+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2024/10/wind-chill.png" excerpt: "Enter a temperature and wind speed to get the classic Siple-Passel wind chill index, with automatic restart after displaying the result." category: - name: "Archived Media" slug: "archived-media" taxonomy: "category" url: "http://localhost/category/archived-media/" post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" model: - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" genre: - name: "Education" slug: "education" taxonomy: "genre" url: "http://localhost/type/education/" media_contents: - id: 56726 title: "Synchro-Sette November 1983" type: "computer_media" url: "http://localhost/computer_media/synchro-sette-november-1983/" media_type: "Program" mediadate: "November 1983" images: - url: "http://localhost/wp-content/uploads/2024/10/wind-chill.png" media_type_tags: "Education" --- # Wind Chill This program calculates the wind chill temperature in degrees Fahrenheit using the traditional Siple-Passel formula. It prompts the user for an ambient temperature in Fahrenheit and a wind speed in miles per hour, then applies the formula WC = 0.0817 × (3.71 × √S + 5.81 − 0.25 × S) × (T − 91.4) + 91.4. A guard clause at line 80 handles the meteorological convention that wind chill is undefined below 4 mph, simply returning the ambient temperature in that case. After displaying the result with a long PAUSE of approximately 40 seconds, the screen clears and the program restarts automatically. *** ## Program Analysis ### Program Structure The program follows a simple linear input–calculate–output loop across three phases: 1. **Input** (lines 10–60): Prompts for temperature `T` and wind speed `S`, echoing each value back after entry. 2. **Calculation** (lines 70–80): Applies the wind chill formula and handles the low-wind edge case. 3. **Output and restart** (lines 90–120): Displays the result, pauses, clears the screen, and loops via `RUN`. Lines 9998–9999 are utility lines outside normal execution: `SAVE "WINDCHIL%L"` saves the program (the `%L` represents an inverse-video ‘L’ in the filename), and the trailing `RUN` restarts immediately after loading. ### Wind Chill Formula Line 70 implements the Siple-Passel empirical wind chill formula: `WC = 0.0817 × (3.71 × S^0.5 + 5.81 − 0.25 × S) × (T − 91.4) + 91.4` This is the classic pre-2001 formula expressing wind chill in degrees Fahrenheit, where `S` is wind speed in mph and `T` is air temperature in Fahrenheit. The constant 91.4°F represents normal skin temperature. The `**.5` exponentiation is used to compute the square root of wind speed rather than a dedicated `SQR` function, which is mathematically equivalent. ### Notable Techniques - **Tab-comma formatting**: The double commas (`,,`) in `PRINT` statements at lines 10, 40, and 90 advance the print position to the third print zone, centering the prompts on the display. - **Input echo**: Lines 30 and 60 print back `T` and `S` respectively. On this platform, `INPUT` accepts values without leaving them visibly confirmed on screen in all modes, so this serves as user feedback. - **Long PAUSE for display**: `PAUSE 40000` at line 100 holds the result on screen for roughly 40 seconds (at 50 Hz) before auto-clearing, avoiding the need for a keypress to continue. - **RUN as loop**: Using `RUN` at line 120 rather than `GO TO 10` restarts from scratch, clearing all variables — a clean but slightly heavier-weight approach to looping. ### Edge Case Handling Line 80 checks whether wind speed is below 4 mph: `80 IF S<4 THEN LET WC=T` This correctly replaces the formula result with the ambient temperature, as the Siple-Passel model is not valid at very low wind speeds (the formula can produce values higher than the ambient temperature at near-zero wind, which is physically nonsensical). ### Variable Summary | Variable | Purpose | | --- | --- | | `T` | Ambient temperature in degrees Fahrenheit | | `S` | Wind speed in miles per hour | | `WC` | Calculated wind chill temperature in degrees Fahrenheit | ## Source Code ``` 10 PRINT ,,"TEMPERATURE (F)? "; 20 INPUT T 30 PRINT T 40 PRINT ,,"WIND SPEED (M/HR)? "; 50 INPUT S 60 PRINT S 70 LET WC=.0817*(3.71*S**.5+5.81-.25*S)*(T-91.4)+91.4 80 IF S<4 THEN LET WC=T 90 PRINT ,,"WIND CHILL = ";WC;" DEGREES." 100 PAUSE 40000 110 CLS 120 RUN 9998 SAVE "WINDCHIL%L" 9999 RUN ```