lorentz (version 1.0-2)

sol: Speed of light and Minkowski metric

Description

Getting and setting the speed of light

Usage

sol(c)
eta(downstairs=TRUE)
ptm(to_natural=TRUE, change_time=TRUE)

Arguments

c

Scalar, speed of light. If missing, return the speed of light

downstairs

Boolean, with default TRUE meaning to return the covariant metric tensor \(g_{ij}{g_ij}\) with two downstairs indices, and FALSE meaning to return the contraviariant version \(g^{ij}\) with two upstairs indices

to_natural,change_time

Boolean, specifying the nature of the passive transform matrix

Details

In the context of an R package, the symbol “c” presents particular problems. In the gyrogroup package, the speed of light is denoted “sol”, for ‘speed of light’.

The speed of light is a global variable, governed by options("c"). If NULL, define c=1.

Function eta() returns the Minkowski flat-space metric

$$\left(\begin{array}{cccc} -c^2& 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1 \end{array} \right) $$

Note that the top-left element of eta() is \(-c^2\), not \(-1\).

Function ptm() returns a passive transformation matrix that converts displacement vectors to (to_natural=TRUE) and from (to_natural=FALSE) natural units. Argument change_time specifies whether to change the unit of time (if TRUE) or the unit of length (if FALSE).

Examples

Run this code
# NOT RUN {
sol()                          # returns current speed of light
sol(299792458)                 # use SI units
sol()                          # speed of light now SI value

eta()                          # note [t,t] term
u <- as.3vel(c(100,200,300))   # fast terrestrial speed, but not relativistic
boost(u)                       # boost matrix practically Galilean
is.consistent.boost(boost(u))  # should be TRUE
sol(1)                         # revert to relativisitic units

# }

Run the code above in your browser using DataLab