The Museum of HP Calculators

# WARP for the HP 42s

This program was written by Richard Garner.

This program is supplied without representation or warranty of any kind. The author and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.

## Overview

This program calculates the Warp Factors, Distance of Travel and Time of Travel for 3 Eras of Star Trek and 4 versions of Warp Drive technology. The 3 eras are Enterprise/ Trek Original Series, Trek Movies, and Trek Next Generation/Deep Space 9/Voyage. The 4 versions of Warp Drive technologies are Standard Warp (Enterprise/ Trek Original Series), TransWarp (Trek Movies), UltraWarp (Trek Next Generation/Deep Space 9/Voyage), and SlipStream (Voyage).

Excerpt from the 1980 Bantam Books, Star Trek Maps by Jeff Maynard:

The classic WF^3*c = V formula (where WF^3 is the warp factor cubed and c is the speed of light, or about 300,000 kilometers per second) has often been used to determine faster-than-light velocities; but it is obvious that this formula is insufficient if we consider that starships have visited the galactic center, approximately 30,000 light years distant (a trip which would take thirty years, even at warp factor ten, using this formula).

As Zefram Cochrane pointed out in 2053, actual warp speeds relative to the speed of light may be calculated by multiplying the warp factor cubed by a variable that accounts for the curvature of space in a fourth dimension by the presence of mass; subspace, a continuum in which a vessel under warp drive travels, is not curved in a fourth spatial dimension, and therefore offers a linear "short cut" between points in our galaxy. This variable, called Cochrane's factor and sometimes indicated by the Greek letter chi (X), can be as high as 1,500 in dense dust and gas clouds and as little as 1 in the intergalactic void. It is larger near massive objects such as stars and black holes, as space is curved around such objects to an even greater extent. For practical reasons, warp drive is not used in the vicinity of massive objects, as the disproportionately high warp speeds tend to produce a "slingshot effect," catapulting a starship out of this space-time continuum altogether. Between galaxies, where negligible matter exists, space is not perceptibly curved, and the short cut afforded by Cochrane's factor disappears. Warp speeds attain their "ideal" (WF^3*c = V) values, and the transit time to the Andromeda galaxy becomes thousands rather than hundreds of years.

The correct warp factor formula is therefore expressed as X*WF^3*c = V, where the value of X varies with the local density of matter. This variable, somewhat analogous to the winds or ocean currents in sailing, explains why great interstellar distances may sometimes be traversed at greater speeds and in less time than shorter distances. Accordingly, a navigator must take into account any variations in the density of matter along a given route before he is able to estimate the arrival time at his destination.

The following table shows the corrected values for warp speeds, given an average value for X of 1292.7238 within Federation space.

```                                      Time per parsec
WF     WF^3           X*WF^3       hr  mm  ss
1       1          1,292.7238     22  07  00
2       8         10,341.7904     02  45  52
3      27         34,903.5426     00  49  08
4      64         82,734.3232     00  20  44
5     125        161,590.4750     00  10  36
6     216        279,228.3407     00  06  08
7     343        443,404.2634     00  03  52
8     512        661,874.5856     00  02  35
9     729        942,395.6502     00  01  49
10    1000      1,292,723.8000     00  01  19
```

Standard Warp Drive:

The excerpt above describes the basis behind Standard Warp Drive as well as all the others. In Standard Warp the Warp Factors are to the 3rd power. V = WF^3*X*c. This form of calculating warp factors is used for calculating speeds in Enterprise, Star Trek Original Series, Star Trek the Motion Picture, Wrath of Khan and Search for Spock.

TransWarp Drive:

In TransWarp the Warp Factors are to the 4th power. V = WF^4*X*c. Dubbed the "Great Experiment" in Search for Spock, the first test bed, Excelsior, did not prove too space worthy. But the second test bed, Enterprise-A, proved itself to be the preferred design. This form of calculating warp factors is used for calculating speeds in Search for Spock, Voyage Home, Final Frontier, and Undiscovered Country.

UltraWarp Drive:

In UltraWarp the Warp Factors are to the 5th power. V = WF^5*X*c. UltraWarp is a much more refined version of TransWarp. In UltraWarp there is a finer control of the matter/anti-matter injectors and better materials used in constructing paired Warp Coils with a greater magnitude of field strength. This form of calculating warp factors is used for calculating speeds in Next Generation, Deep Space 9, and Voyage.

SlipStream Warp Drive:

In SlipStream Warp the Warp Factors are to the 6th power. V = WF^6*X*c. SlipStream was introduced late in Voyage and I am assuming that it would follow the same progression.

## Using the program

Once the program is executed you will see the main menu for the program. This program assumes UltraWarp as the default setting and will stay in this setting until changed. The 3 following examples will show you how the 3 main routines work.

## Example 1

You are Captain Picard leaving Earth aboard Enterprise D and traveling to the planet Padjua. The distance to Padjua is 200 Parsecs and you will be traveling at Warp 5 the entire time. You want to know how long it is going to take to get to Padjua.
```If you have not done so, execute Warp.
Press the "TIME" key on the menu
5
Press R/S
200
Press R/S

It will take you 1 hour 24 minutes and 55 seconds to travel from Earth to Padjua.
```

## Example 2

You are Captain Kirk in the original Enterprise leaving Starbase 7 with medical supplies to stop a plague on Trevers World. Trevers World is 1,200 parsecs away and at standard cruising speed it is going to take 5 days to get there. The plague will start its final stages in 4 days. McCoy has told you that even with the extra staff from Starbase 7, it is going to take a full day to inoculate everyone in the colony. So you have to know what Warp Factor to order the helmsman to set.
```If you have not done so, execute Warp.
Press the "ERA" key on the menu
Press the "STAND" key on the menu
Press the "VELC" key on the menu
1200
Press R/S
3
Press the "DAY" key on the menu
Press the "SEC" key on the menu
(VERY IMPORTANT) Even if you are not entering in any seconds, you must press the
"SEC" key to allow the program to continue proper execution.

It will take a Warp Factor of 7.17 to reach Trevers World in 3 days.
```

## Example 3

This is a continuation of the last example. After stopping the plague on Trevers World, Starfleet orders you to leave on a heading of 215 Mark 36 at Warp 6 for 3 days 13 hours 15 minutes and 22 seconds. At which point you will receive new instructions. You now need to know how far you will be from Trevers World should something happen, because it is the last outpost in this region of space.
```IPress the "DIST" key on the menu
6
Press R/S
3
Press the "DAY" key on the menu
13
Press the "HRS" key on the menu
15
Press the "MIN" key on the menu
22
Press the "SEC" key on the menu
(VERY IMPORTANT) Even if you are not entering in any seconds, you must press the
"SEC" key to allow the program to continue proper execution.

You will have traveled 832.64 Parsecs.
```

## The Program

```LINE    KEYS
000  { 730-Byte Prgm }
001    LBL "WARP"
002     24
003     STO 01
004     60
005     STO 02
006     1292.7238
007     STO 04
008     299792.458
009     STO 05
010     3600
011     STO 06
012     3.08567818585E13
013     STO 07
014     8765.81277074
015     STO 08
016     12
017     STO 09
018     30.4368498984
019     STO 10
020     GTO "ULTRA"
021    LBL 01
022     CLS
023     CLKEYS
024     ASSIGN "TIME" TO 01
025     ASSIGN "VELC" TO 02
026     ASSIGN "DIST" TO 03
027     ASSIGN "ERA" TO 05
028     SF 27
029     PROMPT
030    LBL "TIME"
031     "Warp Factor?"
032     PROMPT
033     RCL 03
034     Y^X
035     RCL* 04
036     RCL* 05
037     RCL* 06
038     1/X
039     RCL* 07
040     "Distance in Par"
041    "secs?"
042     PROMPT
043     *
044     RCL/ 08
045     FIX 00
046     CF 28
047     CF 29
048     CLA
049     AIP
050    "Y:"
051     FP
052     RCL* 09
053     AIP
054    "M:"
055     FP
056     RCL* 10
057     AIP
058    "D:"
059     FP
060     RCL* 01
061     AIP
062    "h:"
063     FP
064     RCL* 02
065     AIP
066    "m:"
067     FP
068     RCL* 02
069     AIP
070    "s"
071     SF 28
072     SF 29
073     FIX 04
074     PROMPT
075    LBL "VELC"
076     "Distance in Par"
077    "secs?"
078     PROMPT
079     RCL* 07
080     RCL/ 05
081     STO 11
082     2
083     STO 13
084     GTO 04
085    LBL 02
086     RCL/ 12
087     RCL/ 06
088     RCL/ 04
089     RCL 03
090     1/X
091     Y^X
092     FIX 02
093     "Warp Factor "
094     ARCL ST X
095     FIX 04
096     GTO 01
097    LBL "DIST"
098     "Warp Factor?"
099     PROMPT
100     RCL 03
101     Y^X
102     RCL* 04
103     RCL* 06
104     STO 11
105     3
106     STO 13
107     GTO 04
108    LBL 03
109     RCL* 12
110     RCL* 05
111     RCL/ 07
112     FIX 02
113     CLA
114     ARCL ST X
115    " Parsecs"
116     PROMPT
117    LBL 04
118     0
119     STO 12
120     CLKEYS
121     ASSIGN "YRS" TO 01
122     ASSIGN "MNTH" TO 02
123     ASSIGN "DAYS" TO 03
124     ASSIGN "HRS" TO 04
125     ASSIGN "MIN" TO 05
126     ASSIGN "SEC" TO 06
178     SF 27
128     "Enter Time"
129     PROMPT
130    LBL "YRS"
131     RCL* 08
132     STO+ 12
133     CLST
134     STOP
135    LBL "MNTH"
136     RCL* 10
137     RCL* 01
138     STO+ 12
139     CLST
140     STOP
141    LBL "DAYS"
142     RCL* 01
143     STO+ 12
144     CLST
145     STOP
146    LBL "HRS"
147     STO+ 12
148     CLST
149     STOP
150    LBL "MIN"
151     RCL/ 02
152     STO+ 12
153     CLST
154     STOP
155    LBL "SEC"
156     RCL/ 06
157     STO+ 12
158     RCL 11
159     GTO IND 13
160    LBL "ERA"
161     CLST
162     CLKEYS
163     ASSIGN "STAND" TO 01
164     ASSIGN "TRANS" TO 02
165     ASSIGN "ULTRA" TO 03
166     ASSIGN "SLIP" TO 04
167     SF 27
168     STOP
169    LBL "STAND"
170     3
171     STO 03
172     "Standard Warp D"
173    "rive"
174     GTO 01
175    LBL "TRANS"
176     4
177     STO 03
178     "TransWarp Drive"
179     GTO 01
180    LBL "ULTRA"
181     5
182     STO 03
183     "UltraWarp Drive"
184     GTO 01
185    LBL "SLIP"
186      6
187     STO 03
188     "SlipStream Driv"
189    "e"
190     GTO 01
191     END
```

## Registers Used

```R01:       24 - Hours in a Day
R02:       60 - Minutes in an Hour
R03:       Varies - Exponent for Warp Factor
R04:       1292.7238 - Average Cochrane Factor for Federation space
R05:       299792.458  - Speed of Light in Kilometers per second
R06:       3600 - Seconds in an Hour
R07:       3.08567818585E13 - Kilometers in a Parsec
R08:       8765.81277074 - Average Hours in a Year
R09:       12 - Months in a Year
R10:       30.4368498984 - Average Days in a Month
R11:       Temporary calculation storage
R12:       Temporary calculation storage
R13:       Indirect Label Return (Varies)
```