Relativistic Motion and Space Voyage Calculators in PHP Free Source Code

Language

PHP - Relativistic Motion Calculators

There are three relativistic motion calculators in the archive.

The graphics show the math used by the programs.

Relativistic Motion Type 1

An extremely advanced space probe is about to accelerate to a target distance of (D) light-years from Earth at a constant acceleration G-Factor (G).

The space probe or spacecraft is not expected to ever return and will coast through space forever at a final constant terminal speed when it reaches the target distance D and all acceleration terminates.

This program computes the relative times as measured on Earth and by the space probe taking into account acceleration and relativistic time dilation.

The clock aboard the space probe runs slower than an identical clock on Earth due to the relative motion of the accelerating spacecraft.

Relativistic Motion Type 2

This is the simplest type of motion, simply coasting through space at a constant

relativistic speed v/c = β

This program computes the relative times as experienced on Earth and by the spacecraft taking into account the relativistic time dilation. Even a trip to the nearest star would require taking into account the effects of relativity, regardless of how we do it, for the time differential between the Earth and spacecraft clocks to make physical sense.

The clock aboard the spacecraft runs slower than an identical clock on Earth due to the relative motion of the spacecraft.

If the space probe sent back a signal when it reached distance D telling us the time of arrival according to its clock, the ship's clock would indicate that the trip took less time to reach D than it did according to the Earth clock.

Relativistic Motion Type 3

This program computes the general statistics for a complete relativistic voyage to another star (or galaxy).

It takes into account acceleration and the space-time dilation predicted by the general theory.

 

Here are working copies of the programs in action:

http://neoprogrammics.com/!abc/math-science-tools/relativity/relativistic-linear-motion-calculators/

I have also provided a source code in this article. You can download it by clicking the download button below this article.

How to run the project?

Locally

  • Download and Install any local web server such as XAMPP/WAMP to run the PHP Script.
  • Download the provided source code zip file. (download button is located below)

Setup & Installation

  1. Open your XAMPP/WAMP's Control Panel and start the Apache webserver.
  2. Extract the downloaded zip file.
  3. Copy the extracted source code folder.
  4. If you using XAMPP, paste the source code folder inside the 'htdocs' directory ie. C:\xampp\htdocs. And if using WAMPP, paste it inside the 'www' directory.
  5. Open a new tab in your browser and browse http://localhost/relativity/relativistic-linear-motion-calculators/.

DEMO VIDEO

That's it! You can now test the Relativistic Motion Calculators on your end.

I hope this will help you with what you are looking for.

Enjoy :)

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Add new comment

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
2 + 8 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.