Skip to content

Equations to calculate the effects of relativity on a ship travelling near the speed of light, implemented in Java.

Notifications You must be signed in to change notification settings

john-h-moore/Relativistic-Java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

-------------------------------------------------------------------------------
/* AtomicRocket-Java README */
/* Author: John H Moore */
/* Last Updated: 20 September 2012 */
/* Version 1.0 */
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
/* DESCRIPTION */
The purpose of this project is to implement equations dealing with the effects
of relativity on ships travelling near the speed of light.  The equations can 
be found on the Atomic Rocket page (www.projectrho.com/rocket/), under the 
"Slower Than Light" section.
(http://www.projectrho.com/rocket/slowerlight.php#id--Relativity)
I make no claims to the correctness of these equations - the author of the site
himself makes a similar disclaimer.
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
/* COMPILE AND RUN */
Linux:
    ~/Relativistic-Java/ $> javac relativistic/*.java
    ~/Relativistic-Java/ $> java relativistic/Main

Alternatively just use your favorite IDE.
-------------------------------------------------------------------------------

-------------------------------------------------------------------------------
/* INCLUDED FILES */
All Java files can be found in the package "relativistic".

Main.java
    - User input menus

Ship.java
    - Methods for data pertaining to ship (acceleration, exhaust velocity, mass 
        ratio, and travel time (proper))

Terra.java
    - Methods for data pertaining to Terra (travel time and distance)

Formulae.java
    - All formulae needed to make calculations and conversions, as well as some
        cosntants
    - Constants
        - C: speed of light
        - SECS: seconds in a year
        - LY: meters in a lightyear
    - Hyperbolic arc-trig functions (atanh, acosh, and asinh)
    - Unit Conversions
        - years: seconds to years
        - seconds: years to seconds
        - meters: lightyears to meters
        - lightyears: meters to light years
    - PSL: percent light speed
    - Travel time from Terra's frame of reference
        - using acceleration and proper time
        - using exhaust velocity, mass ratio, and acceleration
        - using acceleration and distance
    - Distance
        - using acceleration and proper time (ship's frame of reference)
        - using exhaust velocity, mass ratio, and acceleration
        - using acceleration and Terra time
    - Final velocity
        - using acceleration and proper time (ship's frame of reference)
        - using exhaust velocity, mass ratio, and acceleration
        - using acceleration and Terra time
    - Proper Time (ship's frame of reference)
        - using acceleration and Terra time
        - using acceleration and distance
    - Gamma (time dilation factor)
        - using acceleration and proper time (ship's frame of reference)
        - using exhaust velocity, and mass ratio
        - using acceleration and Terra time
        - using acceleration and distance

About

Equations to calculate the effects of relativity on a ship travelling near the speed of light, implemented in Java.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages