The Classic Two Trains Meeting Problem

Introduction

This is a version of the classic two trains meeting problem. The mathematics is well define and documented (search the web). Project #1 is fixed but Project #2 turns it into a game.

Project #1

When do two trains get to CHI (Chicago)? One from LA (Los Angles) and one from NY (New York).

image missing

Calculate and display

Train #1 LA to CHI
2016.4(miles)distance from Los Angles to Chicago
2024-03-09T02:10:00
ISO 8601 Format (YYYY-MM-DDThh:mm:ss)
(UTC)Departure time from LA
55(mph)average speed
Train #2 NY to CHI
789.8(miles)distance from New York to Chicago
2024-03-09T14:30:10
ISO 8601 Format (YYYY-MM-DDThh:mm:ss)
(UTC)Departure time from NY
35(mph)average speed

Definition: ISO 8601 - International Time/Date Format

For more information about Python and UTC

Question: Why use UTC (Coordinated Universal Time) and not local time?

Project #2

Create an interactive program that lets the user adjust values so the trains arrive in Chicago within 5 minutes of each other.

Use a simple menu.

Google "train speeds in America" for information on actual train speeds. Display this information to the user?

Project #3

Change project #2

Project #4

Convert project #2 to a GUI.

Project #5

Create an interactive program that lets the user:

How about adding individual legs to each train's path (e.g. LA to Denver to Kansas City to Chicago). Different speeds on each leg?

Project #6

Add metric distances and speeds to the program(s). Let the user select the units to be used/displayed. (Perhaps both?)

Project #7

Animate the trip.

Project #8

Assume the trains start at the same time and the train goes thru CHI and does not stop. What is the distance from LA, CHI, and NY will the trains meet?