Last active
August 29, 2015 14:08
-
-
Save karawoo/5b7b52c76b9739d7a8d6 to your computer and use it in GitHub Desktop.
Convert warp speed to meters/second
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
warp_equivalent <- function(warpfactor, originalseries = FALSE) { | |
if (originalseries == TRUE) { | |
v <- (warpfactor^3) * 299792458 # speed of light -- 299792458 m/s | |
} else if (originalseries == FALSE) { | |
if (warpfactor > 9.0 & warpfactor <= 10.0) { | |
x <- -0.5 * log10(10 - warpfactor) | |
} else { | |
x <- 0 | |
} | |
v <- (warpfactor^((10/3) + x)) * 299792458 | |
} | |
v | |
} | |
# see http://www.anycalculator.com/warpcalculator.htm for formula |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment