-
Notifications
You must be signed in to change notification settings - Fork 0
/
massClassification.js
108 lines (88 loc) · 3.01 KB
/
massClassification.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
let class_ranges = [5, 10, 15, 20, 30, 50, 100]
const class_names = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X', 'XI', 'XII', 'XIII', 'XIV', 'XV', 'XVI', 'XVII', 'XVIII', 'XIX', 'XX']
// console.log(class_names[3])
let x =0
if (x >= 0 && x < 5000) {
console.log(` ship class is ${class_names[0]} and range is ${class_ranges[0]}`)
}
else if (x >= 5e3 && x < 15e3) {
console.log(` ship class is ${class_names[1]} and range is ${class_ranges[1]}`)
}
else if (x >= 15e3 && x < 25e3) {
console.log(` ship class is ${class_names[2]} and range is ${class_ranges[1]}`)
}
else if (x >= 25e3 && x < 40e3) {
console.log(` ship class is ${class_names[3]} and range is ${class_ranges[2]}`)
}
else if (x >= 40e3 && x < 60e3) {
console.log(` ship class is ${class_names[4]} and range is ${class_ranges[3]}`)
}
else if (x >= 60e3 && x < 80e3) {
console.log(` ship class is ${class_names[5]} and range is ${class_ranges[3]}`)
}
else if (x >= 80e3 && x < 100e3) {
console.log(` ship class is ${class_names[6]} and range is ${class_ranges[3]}`)
}
else if (x >= 100e3 && x < 120e3) {
console.log(` ship class is ${class_names[7]} and range is ${class_ranges[3]}`)
}
else if (x >= 120e3 && x < 140e3) {
console.log(` ship class is ${class_names[8]} and range is ${class_ranges[3]}`)
}
else if (x >= 140e3 && x < 160e3) {
console.log(` ship class is ${class_names[9]} and range is ${class_ranges[3]}`)
}
else if (x >= 160e3 && x < 190e3) {
console.log(` ship class is ${class_names[10]} and range is ${class_ranges[4]}`)
}
else if (x >= 190e3 && x < 220e3) {
console.log(` ship class is ${class_names[11]} and range is ${class_ranges[4]}`)
}
else if (x >= 220e3 && x < 250e3) {
console.log(` ship class is ${class_names[12]} and range is ${class_ranges[4]}`)
}
else if (x >= 250e3 && x < 300e3) {
console.log(` ship class is ${class_names[13]} and range is ${class_ranges[5]}`)
}
else if (x >= 300e3 && x < 350e3) {
console.log(` ship class is ${class_names[14]} and range is ${class_ranges[5]}`)
}
else if (x >= 350e3 && x < 400e3) {
console.log(` ship class is ${class_names[15]} and range is ${class_ranges[5]}`)
}
else if (x >= 400e3 && x < 450e3) {
console.log(` ship class is ${class_names[16]} and range is ${class_ranges[5]}`)
}
else if (x >= 450e3 && x < 500e3) {
console.log(` ship class is ${class_names[17]} and range is ${class_ranges[5]}`)
}
else if (x >= 500e3 && x < 600e3) {
console.log(` ship class is ${class_names[18]} and range is ${class_ranges[6]}`)
}
else if (x >= 600e3 && x < 700e3) {
console.log(` ship class is ${class_names[19]} and range is ${class_ranges[6]}`)
}
else {
console.log('invalid ship mass, try again.')
}
/* more notes
SS = 3.1 (4650 MT)
CONTROL COMPUTER [DUOTRONIC]
SS = 2 [3000 MT]
SS 22 = 33000
DETERMINING SUPERSTRUCTURE
1 POINT SS = 1500 T
WARP ENGINES
FWF-1
WEIGHT 31,000 MT
SS = 5 [15000 MT PAIRED
IMPULSE ENGINES
DIE-2
SS = .1 [150 MT]
WEIGHT 2800 MT
SS = 1.2 PER BANK
PHOTON TORPEDOES
[FP-5] [5400 MT]
SS = 1.8 PER LAUNCHER
]
*/