How Far Have You Traveled In Space (In MILES & KILOMETERS)
Posted: Sun Nov 22, 2020 6:43 pm
The program below was something I worked on for fun, using the various ways we move though space, you can see how far in light days you have traveled based on your age.
I haven't include all forms of motion we experience, but I've used the following:
EDIT: Changed spelling of TRAVELLED and added a second program that uses KILOMETERS (4:04pm, 11/22)
I hope you enjoy this program, and find is educational as well
George
This code calculates distances in MILES:
The following code calculates all distances in KILOMETERS instead of MILES:
I haven't include all forms of motion we experience, but I've used the following:
- Earth's Rotation (minus the COSINE of your coordinates on Earth). For example, on the Equator, you travel at 1,000mph. In New York, your rotational speed is about 820mph.
- Earth's Orbit around the Sun
- The Distance (speed) the Sun orbits the Milky Way Galaxy
- Our motion towards the star Vega
- Motion (speed) the Milky Way Galaxy is moving through the Universe
- Speed that the Milky Way Galaxy is moving towards the Andromeda Galaxy
- The speed the Local Group of Galaxies is moving away from the Cosmic Microwave Background (CMB)
- Our speed moving towards an area called "The Great Attractor"
EDIT: Changed spelling of TRAVELLED and added a second program that uses KILOMETERS (4:04pm, 11/22)
I hope you enjoy this program, and find is educational as well
George
This code calculates distances in MILES:
Code: Select all
REM MY LATITUDE IS 27.11042, IF I DECIDE TO INCLUDE THE ADVANCED SPEED OF EARTH’S
REM ROTATION BASED ON COSINE OF MY LATITUDE AND SPEED AT EQUATOR (WHAT EVER THE
REM FORMULA IS)
REM ADD ORIENTATION(3) AND CLEARCONSOLE COMMANDS HERE
PRINT!PRINT "Distance In Miles That You Travel In Space On Earth"
PRINT "———————————————————————————————————————————————————"
REM INPUT YEARS OLD (FRACTIONS ALLOWED LIKE 50.5 FOR 50 YEARS, 6 MONTHS, 50.33 FOR 50 YEARS, 4 MONTHS (4/12))
PRINT!PRINT
INPUT "ENTER YOUR AGE IN YEARS (MONTHS MUST BE A DECIMAL, DIVIDE MONTHS BY 12 ex: 61+10/12 for 61yrs 10mo)":yearsOld
PRINT "*** All of the values are distance traveled in miles unless otherwise noted ***"
PRINT!PRINT
REM THE SPEED OF LIGHT IS 186282.3970512mps (1983 measurement) MILES
PRINT "THE SPEED LIGHT TRAVELS EACH YEAR.......................... ";
speedofLight=((186282.3970512*60^2)*24)*365.25
PRINT "##,###,###,###,###.####":speedofLight
REM THE SPEED OF LIGHT TRAVELS IN A DAY IN MILES
speedofLight=speedofLight/365.25
PRINT "LENGTH LIGHT TRAVELS EACH DAY IN MILES..................... ";
PRINT "###,###,###,###.####":speedofLight
PRINT
REM THE DISTANCE EARTH ROTATES PER YEAR IS 25000*365.25 MILES
earthRotates=25000*365.25
PRINT "NUMBER OF MILES THE EARTH ROTATES PER YEAR................. ";
PRINT "##,###,###.####":earthRotates
REM THE DISTANCE EARTH ORBITS THE SUN PER YEAR IS 584088920.703 MILES
earthSun=67000*24*365.25
PRINT "DISTANCE TRAVELED ORBITING THE SUN PER YEAR................ ";
PRINT "###,###,###.####":earthSun
REM DISTANCE SUN ORBITS CENTER OF MILKY WAY IS ((155.343*60^2)*24)*365.25
sunMilkyWay=((155.343*60^2)*24)*365.25
PRINT "DISTANCE TRAVELED EACH YEAR ORBITING THE CENTER OF MILKY WAY... ";
PRINT "##,###,###,###.####":sunMilkyWay
REM SAN AND EARTH MOVING ROUGHLY IN DIRECTION OF BRIGHT STAR VEGA AT 43,000 MPH
starVega=(43000*24)*365.25
PRINT "DISTANCE TRAVELED IN SPACE MOVING TOWARDS STAR VEGA............ ";
PRINT "###,###,###.####":starVega
REM THE MILKY WAY GALAXY IS MOVING AT 1.3 MILLION MPH THROUGH THE UNIVERSE
milkyWay=(1300000*24)*365.25
PRINT "DISTANCE MILKY WAY TRAVELED THROUGH UNIVERSE................... ";
PRINT "##,###,###,###.####":milkyWay
REM THE MILKY WAY IS MOVING TOWARDS ANDROMEDA AT 70mps
milkywayAndromeda=((70*60^2)*24)*365.25
PRINT "DISTANCE MILKY WAY TRAVELED TOWARDS ANDROMEDA..................";
PRINT "###,###,###,###.####":milkywayAndromeda
REM LOCAL GROUP MOVES AT 372.823mps FROM THE CMB
localgroupCMB=((372.823*60^2)*24)*365.25
PRINT "DISTANCE LOCAL GROUP TRAVELED TOWARDS CMB......................";
PRINT "###,###,###,###.####":localgroupCMB
REM LOCAL GROUP MOVING TO THE GREAT ATRACTOR AT 621.371192mps
greatAttractor=((621.371192*60^2)*24)*365.25
PRINT "DISTANCE LOCAL GROUP TRAVELED TO THE GREAT ATRACTOR............";
PRINT "###,###,###,###.####":greatAttractor
REM TOTAL DISTANCE YOU TRAVEL THROUGH SPACE IN A YEAR
totalDistance=(earthRotates+earthSun+sunMilkyWay+statVega+milkyWay+milkywayAndromeda+localgroupCMB+greatAttractor)
PRINT "TOTAL DISTANCE YOU TRAVELED IN SPACE EACH YEAR.................";
PRINT "###,###,###,###.####":totalDistance
PRINT
PRINT!PRINT
PRINT "The following is based on someone ###.##":yearsOld;"years old (decimal=months)"
PRINT
REM TOTAL DISTANCE YOU TRAVELED THROUGH SPACE IN YEARS (TO TRAVEL A LIGHT YEAR, YOU NEED TO BE 116 YEARS, 4 TO 6 MONTHS OLD!
PRINT "TOTAL MILES YOU TRAVELED THROUGH SPACE (BY TOTAL YEARS)... ";
PRINT "###,###,###,###,###.####":(totalDistance*yearsOld)
REM TOTAL DISTANCE IN LIGHT DAYS YOU TRAVEL THROUGH SPACE BASED ON AGE
PRINT "TOTAL DISTANCE IN LIGHT DAYS YOU TRAVEL THROUGH SPACE IN YEARS....... ";
PRINT "###.########":(totalDistance*yearsOld)/speedofLight
PRINT
PRINT "NOTE: TO TRAVEL 1 LIGHT YEAR, YOU WILL NEED TO LIVE TO 116YRS, 6MONTHS."
The following code calculates all distances in KILOMETERS instead of MILES:
Code: Select all
REM MY LATITUDE IS 27.11042, IF I DECIDE TO INCLUDE THE ADVANCED SPEED OF EARTH’S
REM ROTATION BASED ON COSINE OF MY LATITUDE AND SPEED AT EQUATOR (WHAT EVER THE
REM FORMULA IS)
REM ADD ORIENTATION(3) AND CLEARCONSOLE COMMANDS HERE
PRINT!PRINT "Distance In Kilometers That You Travel In Space On Earth"
PRINT "————————————————————————————————————————————————————————"
REM INPUT YEARS OLD (FRACTIONS ALLOWED LIKE 50.5 FOR 50 YEARS, 6 MONTHS, 50.33 FOR 50 YEARS, 4 MONTHS (4/12))
PRINT!PRINT
INPUT "ENTER YOUR AGE IN YEARS (MONTHS MUST BE A DECIMAL, DIVIDE MONTHS BY 12 ex: 61+10/12 for 61yrs 10mo)":yearsOld
PRINT "*** All of the values are distance traveled in kilometers unless otherwise noted ***"
PRINT!PRINT
REM THE SPEED OF LIGHT IS 186282.3970512mps (1983 measurement) MILES
PRINT "THE SPEED LIGHT TRAVELS EACH YEAR (IN KM)................... ";
speedofLight=(((186282.3970512*1.61)*60^2)*24)*365.25
PRINT "##,###,###,###,###.####":speedofLight
REM THE SPEED OF LIGHT TRAVELS IN A DAY IN KILOMETERS
speedofLight=(speedofLight/365.25)
PRINT "LENGTH LIGHT TRAVELS EACH DAY (IN KILOMETERS)............... ";
PRINT "###,###,###,###.####":speedofLight
PRINT
REM THE DISTANCE EARTH ROTATES PER YEAR IS 25000*365.25 MILES
earthRotates=(25000*1.61)*365.25
PRINT "NUMBER OF KILOMETERS THE EARTH ROTATES PER YEAR................. ";
PRINT "##,###,###.####":earthRotates
REM THE DISTANCE EARTH ORBITS THE SUN PER YEAR IS 584088920.703 MILES
earthSun=(67000*1.61)*24*365.25
PRINT "KILOMETERS TRAVELED ORBITING THE SUN PER YEAR................... ";
PRINT "###,###,###.####":earthSun
REM DISTANCE SUN ORBITS CENTER OF MILKY WAY IS ((155.343*60^2)*24)*365.25
sunMilkyWay=(((155.343*1.61)*60^2)*24)*365.25
PRINT "KILOMETERS TRAVELED EACH YEAR ORBITING THE CENTER OF MILKY WAY.. ";
PRINT "##,###,###,###.####":sunMilkyWay
REM SUN AND EARTH MOVING ROUGHLY IN DIRECTION OF BRIGHT STAR VEGA AT 43,000 MPH
starVega=((43000*1.61)*24)*365.25
PRINT "KILOMETERS TRAVELED IN SPACE MOVING TOWARDS STAR VEGA........... ";
PRINT "###,###,###.####":starVega
REM THE MILKY WAY GALAXY IS MOVING AT 1.3 MILLION MPH THROUGH THE UNIVERSE
milkyWay=((1300000*1.61)*24)*365.25
PRINT "KILOMETERS MILKY WAY TRAVELED THROUGH UNIVERSE.................. ";
PRINT "##,###,###,###.####":milkyWay
REM THE MILKY WAY IS MOVING TOWARDS ANDROMEDA AT 70mps
milkywayAndromeda=(((70*1.61)*60^2)*24)*365.25
PRINT "KILOMETERS MILKY WAY TRAVELED TOWARDS ANDROMEDA.................";
PRINT "###,###,###,###.####":milkywayAndromeda
REM LOCAL GROUP MOVES AT 372.823mps FROM THE CMB
localgroupCMB=(((372.823*1.61)*60^2)*24)*365.25
PRINT "KILOMETERS LOCAL GROUP TRAVELED TOWARDS CMB.....................";
PRINT "###,###,###,###.####":localgroupCMB
REM LOCAL GROUP MOVING TO THE GREAT ATRACTOR AT 621.371192mps
greatAttractor=(((621.371192*1.61)*60^2)*24)*365.25
PRINT "KILOMETERS LOCAL GROUP TRAVELED TO THE GREAT ATRACTOR...........";
PRINT "###,###,###,###.####":greatAttractor
REM TOTAL DISTANCE YOU TRAVEL THROUGH SPACE IN A YEAR
totalDistance=(earthRotates+earthSun+sunMilkyWay+statVega+milkyWay+milkywayAndromeda+localgroupCMB+greatAttractor)
PRINT "TOTAL KILOMETERS YOU TRAVELED THRU SPACE EACH YEAR..............";
PRINT "###,###,###,###.####":totalDistance
PRINT
PRINT!PRINT
PRINT "The following is based on someone ###.##":yearsOld;"years old (decimal=months)"
PRINT
REM TOTAL DISTANCE YOU TRAVELED THROUGH SPACE IN YEARS (TO TRAVEL A LIGHT YEAR, YOU NEED TO BE 116 YEARS, 4 TO 6 MONTHS OLD!
PRINT "TOTAL KILOMETERS YOU TRAVELED THROUGH SPACE (BY YEARS)..... ";
PRINT "###,###,###,###,###.####":(totalDistance*yearsOld)
REM TOTAL DISTANCE IN LIGHT DAYS YOU TRAVEL THROUGH SPACE BASED ON AGE
PRINT "TOTAL DISTANCE IN LIGHT DAYS YOU TRAVEL THROUGH SPACE IN YEARS........ ";
PRINT "###.########":(totalDistance*yearsOld)/speedofLight
PRINT
PRINT "NOTE: TO TRAVEL 1 LIGHT YEAR, YOU WILL NEED TO LIVE TO 116YRS, 6MONTHS."