UNPKG

dirtybomb

Version:
1,828 lines (1,827 loc) 863 kB
{ "type": "Program", "body": [ { "type": "ImportDeclaration", "specifiers": [ { "type": "ImportDefaultSpecifier", "local": { "type": "Identifier", "name": "Vector", "range": [ 71, 77 ], "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 13 } } }, "range": [ 71, 77 ], "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 13 } } } ], "source": { "type": "Literal", "value": "./Vector", "raw": "'./Vector'", "range": [ 83, 93 ], "loc": { "start": { "line": 6, "column": 19 }, "end": { "line": 6, "column": 29 } } }, "range": [ 64, 94 ], "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 30 } }, "leadingComments": [ { "type": "Block", "value": "*\n * Created by austin on 6/2/16.\n * @file Atmosphere.js\n ", "range": [ 0, 62 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 4, "column": 3 } } } ], "trailingComments": [ { "type": "Block", "value": "*\n * On a scale of 0 - 6\n * Extremely unstable A ... DD, DN ... F Moderately Stable\n * @type {string[]}\n ", "range": [ 96, 205 ], "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 12, "column": 3 } } } ] }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "LETTER_GRADES", "range": [ 212, 225 ], "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 19 } } }, "init": { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": "A", "raw": "'A'", "range": [ 229, 232 ], "loc": { "start": { "line": 13, "column": 23 }, "end": { "line": 13, "column": 26 } } }, { "type": "Literal", "value": "B", "raw": "'B'", "range": [ 234, 237 ], "loc": { "start": { "line": 13, "column": 28 }, "end": { "line": 13, "column": 31 } } }, { "type": "Literal", "value": "C", "raw": "'C'", "range": [ 239, 242 ], "loc": { "start": { "line": 13, "column": 33 }, "end": { "line": 13, "column": 36 } } }, { "type": "Literal", "value": "DD", "raw": "'DD'", "range": [ 244, 248 ], "loc": { "start": { "line": 13, "column": 38 }, "end": { "line": 13, "column": 42 } } }, { "type": "Literal", "value": "DN", "raw": "'DN'", "range": [ 250, 254 ], "loc": { "start": { "line": 13, "column": 44 }, "end": { "line": 13, "column": 48 } } }, { "type": "Literal", "value": "E", "raw": "'E'", "range": [ 256, 259 ], "loc": { "start": { "line": 13, "column": 50 }, "end": { "line": 13, "column": 53 } } }, { "type": "Literal", "value": "F", "raw": "'F'", "range": [ 261, 264 ], "loc": { "start": { "line": 13, "column": 55 }, "end": { "line": 13, "column": 58 } } } ], "range": [ 228, 265 ], "loc": { "start": { "line": 13, "column": 22 }, "end": { "line": 13, "column": 59 } } }, "range": [ 212, 265 ], "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 59 } } } ], "kind": "const", "range": [ 206, 266 ], "loc": { "start": { "line": 13, "column": 0 }, "end": { "line": 13, "column": 60 } }, "leadingComments": [ { "type": "Block", "value": "*\n * On a scale of 0 - 6\n * Extremely unstable A ... DD, DN ... F Moderately Stable\n * @type {string[]}\n ", "range": [ 96, 205 ], "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 12, "column": 3 } } } ], "trailingComments": [ { "type": "Block", "value": "*\n * Overcast should always receive a 3 (D)\n * From Table. 2 on Page 9, all mid grades are rounded up.\n * Maps _windSpeedVec and _skyCover to a grade\n * [<2, 2-3, 3-5, 5-6, >6] then\n * [strong, moderate, slight]\n * @type {number[][]}\n ", "range": [ 268, 507 ], "loc": { "start": { "line": 15, "column": 0 }, "end": { "line": 22, "column": 3 } } } ] }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "DAY_GRADES", "range": [ 514, 524 ], "loc": { "start": { "line": 23, "column": 6 }, "end": { "line": 23, "column": 16 } } }, "init": { "type": "ArrayExpression", "elements": [ { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": 0, "raw": "0", "range": [ 534, 535 ], "loc": { "start": { "line": 24, "column": 5 }, "end": { "line": 24, "column": 6 } } }, { "type": "Literal", "value": 0, "raw": "0", "range": [ 537, 538 ], "loc": { "start": { "line": 24, "column": 8 }, "end": { "line": 24, "column": 9 } } }, { "type": "Literal", "value": 1, "raw": "1", "range": [ 540, 541 ], "loc": { "start": { "line": 24, "column": 11 }, "end": { "line": 24, "column": 12 } } } ], "range": [ 533, 542 ], "loc": { "start": { "line": 24, "column": 4 }, "end": { "line": 24, "column": 13 } } }, { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": 0, "raw": "0", "range": [ 549, 550 ], "loc": { "start": { "line": 25, "column": 5 }, "end": { "line": 25, "column": 6 } } }, { "type": "Literal", "value": 1, "raw": "1", "range": [ 552, 553 ], "loc": { "start": { "line": 25, "column": 8 }, "end": { "line": 25, "column": 9 } } }, { "type": "Literal", "value": 2, "raw": "2", "range": [ 555, 556 ], "loc": { "start": { "line": 25, "column": 11 }, "end": { "line": 25, "column": 12 } } } ], "range": [ 548, 557 ], "loc": { "start": { "line": 25, "column": 4 }, "end": { "line": 25, "column": 13 } } }, { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": 1, "raw": "1", "range": [ 564, 565 ], "loc": { "start": { "line": 26, "column": 5 }, "end": { "line": 26, "column": 6 } } }, { "type": "Literal", "value": 1, "raw": "1", "range": [ 567, 568 ], "loc": { "start": { "line": 26, "column": 8 }, "end": { "line": 26, "column": 9 } } }, { "type": "Literal", "value": 2, "raw": "2", "range": [ 570, 571 ], "loc": { "start": { "line": 26, "column": 11 }, "end": { "line": 26, "column": 12 } } } ], "range": [ 563, 572 ], "loc": { "start": { "line": 26, "column": 4 }, "end": { "line": 26, "column": 13 } } }, { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": 2, "raw": "2", "range": [ 579, 580 ], "loc": { "start": { "line": 27, "column": 5 }, "end": { "line": 27, "column": 6 } } }, { "type": "Literal", "value": 2, "raw": "2", "range": [ 582, 583 ], "loc": { "start": { "line": 27, "column": 8 }, "end": { "line": 27, "column": 9 } } }, { "type": "Literal", "value": 3, "raw": "3", "range": [ 585, 586 ], "loc": { "start": { "line": 27, "column": 11 }, "end": { "line": 27, "column": 12 } } } ], "range": [ 578, 587 ], "loc": { "start": { "line": 27, "column": 4 }, "end": { "line": 27, "column": 13 } } }, { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": 2, "raw": "2", "range": [ 594, 595 ], "loc": { "start": { "line": 28, "column": 5 }, "end": { "line": 28, "column": 6 } } }, { "type": "Literal", "value": 3, "raw": "3", "range": [ 597, 598 ], "loc": { "start": { "line": 28, "column": 8 }, "end": { "line": 28, "column": 9 } } }, { "type": "Literal", "value": 3, "raw": "3", "range": [ 600, 601 ], "loc": { "start": { "line": 28, "column": 11 }, "end": { "line": 28, "column": 12 } } } ], "range": [ 593, 602 ], "loc": { "start": { "line": 28, "column": 4 }, "end": { "line": 28, "column": 13 } } } ], "range": [ 527, 604 ], "loc": { "start": { "line": 23, "column": 19 }, "end": { "line": 29, "column": 1 } } }, "range": [ 514, 604 ], "loc": { "start": { "line": 23, "column": 6 }, "end": { "line": 29, "column": 1 } } } ], "kind": "const", "range": [ 508, 605 ], "loc": { "start": { "line": 23, "column": 0 }, "end": { "line": 29, "column": 2 } }, "leadingComments": [ { "type": "Block", "value": "*\n * Overcast should always receive a 3 (D)\n * From Table. 2 on Page 9, all mid grades are rounded up.\n * Maps _windSpeedVec and _skyCover to a grade\n * [<2, 2-3, 3-5, 5-6, >6] then\n * [strong, moderate, slight]\n * @type {number[][]}\n ", "range": [ 268, 507 ], "loc": { "start": { "line": 15, "column": 0 }, "end": { "line": 22, "column": 3 } } } ], "trailingComments": [ { "type": "Block", "value": "*\n * Defined as one hour before sunset to one hour after sunrise\n * NOTE: Night Grade D is DN, 4\n * [_skyCover > .5, _skyCover < .5]\n * @type {number[][]}\n ", "range": [ 607, 767 ], "loc": { "start": { "line": 31, "column": 0 }, "end": { "line": 36, "column": 3 } } } ] }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "NIGHT_GRADES", "range": [ 774, 786 ], "loc": { "start": { "line": 37, "column": 6 }, "end": { "line": 37, "column": 18 } } }, "init": { "type": "ArrayExpression", "elements": [ { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": 4, "raw": "4", "range": [ 798, 799 ], "loc": { "start": { "line": 38, "column": 5 }, "end": { "line": 38, "column": 6 } } }, { "type": "Literal", "value": 4, "raw": "4", "range": [ 801, 802 ], "loc": { "start": { "line": 38, "column": 8 }, "end": { "line": 38, "column": 9 } } } ], "range": [ 797, 803 ], "loc": { "start": { "line": 38, "column": 4 }, "end": { "line": 38, "column": 10 } } }, { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": 5, "raw": "5", "range": [ 866, 867 ], "loc": { "start": { "line": 39, "column": 5 }, "end": { "line": 39, "column": 6 } } }, { "type": "Literal", "value": 6, "raw": "6", "range": [ 869, 870 ], "loc": { "start": { "line": 39, "column": 8 }, "end": { "line": 39, "column": 9 } } } ], "range": [ 865, 871 ], "loc": { "start": { "line": 39, "column": 4 }, "end": { "line": 39, "column": 10 } }, "leadingComments": [ { "type": "Line", "value": " No given, assumed Class D / not practically possible", "range": [ 805, 860 ], "loc": { "start": { "line": 38, "column": 12 }, "end": { "line": 38, "column": 67 } } } ] }, { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": 4, "raw": "4", "range": [ 878, 879 ], "loc": { "start": { "line": 40, "column": 5 }, "end": { "line": 40, "column": 6 } } }, { "type": "Literal", "value": 5, "raw": "5", "range": [ 881, 882 ], "loc": { "start": { "line": 40, "column": 8 }, "end": { "line": 40, "column": 9 } } } ], "range": [ 877, 883 ], "loc": { "start": { "line": 40, "column": 4 }, "end": { "line": 40, "column": 10 } } }, { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": 4, "raw": "4", "range": [ 890, 891 ], "loc": { "start": { "line": 41, "column": 5 }, "end": { "line": 41, "column": 6 } } }, { "type": "Literal", "value": 4, "raw": "4", "range": [ 893, 894 ], "loc": { "start": { "line": 41, "column": 8 }, "end": { "line": 41, "column": 9 } } } ], "range": [ 889, 895 ], "loc": { "start": { "line": 41, "column": 4 }, "end": { "line": 41, "column": 10 } } }, { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": 4, "raw": "4", "range": [ 902, 903 ], "loc": { "start": { "line": 42, "column": 5 }, "end": { "line": 42, "column": 6 } } }, { "type": "Literal", "value": 4, "raw": "4", "range": [ 905, 906 ], "loc": { "start": { "line": 42, "column": 8 }, "end": { "line": 42, "column": 9 } } } ], "range": [ 901, 907 ], "loc": { "start": { "line": 42, "column": 4 }, "end": { "line": 42, "column": 10 } } } ], "range": [ 789, 909 ], "loc": { "start": { "line": 37, "column": 21 }, "end": { "line": 43, "column": 1 } } }, "range": [ 774, 909 ], "loc": { "start": { "line": 37, "column": 6 }, "end": { "line": 43, "column": 1 } } } ], "kind": "const", "range": [ 768, 910 ], "loc": { "start": { "line": 37, "column": 0 }, "end": { "line": 43, "column": 2 } }, "leadingComments": [ { "type": "Block", "value": "*\n * Defined as one hour before sunset to one hour after sunrise\n * NOTE: Night Grade D is DN, 4\n * [_skyCover > .5, _skyCover < .5]\n * @type {number[][]}\n ", "range": [ 607, 767 ], "loc": { "start": { "line": 31, "column": 0 }, "end": { "line": 36, "column": 3 } } } ], "trailingComments": [ { "type": "Block", "value": "*\n * Contains constants for wind in rural / urban settings\n * @type {Object[]}\n * @property {number} rural\n * @property {number} urban\n ", "range": [ 912, 1052 ], "loc": { "start": { "line": 45, "column": 0 }, "end": { "line": 50, "column": 3 } } } ] }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "WIND_PROFILES", "range": [ 1059, 1072 ], "loc": { "start": { "line": 51, "column": 6 }, "end": { "line": 51, "column": 19 } } }, "init": { "type": "ArrayExpression", "elements": [ { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "rural", "range": [ 1082, 1087 ], "loc": { "start": { "line": 52, "column": 5 }, "end": { "line": 52, "column": 10 } } }, "value": { "type": "Literal", "value": 0.07, "raw": "0.07", "range": [ 1089, 1093 ], "loc": { "start": { "line": 52, "column": 12 }, "end": { "line": 52, "column": 16 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 1082, 1093 ], "loc": { "start": { "line": 52, "column": 5 }, "end": { "line": 52, "column": 16 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "urban", "range": [ 1095, 1100 ], "loc": { "start": { "line": 52, "column": 18 }, "end": { "line": 52, "column": 23 } } }, "value": { "type": "Literal", "value": 0.15, "raw": "0.15", "range": [ 1102, 1106 ], "loc": { "start": { "line": 52, "column": 25 }, "end": { "line": 52, "column": 29 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 1095, 1106 ], "loc": { "start": { "line": 52, "column": 18 }, "end": { "line": 52, "column": 29 } } } ], "range": [ 1081, 1107 ], "loc": { "start": { "line": 52, "column": 4 }, "end": { "line": 52, "column": 30 } } }, { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "rural", "range": [ 1114, 1119 ], "loc": { "start": { "line": 53, "column": 5 }, "end": { "line": 53, "column": 10 } } }, "value": { "type": "Literal", "value": 0.07, "raw": "0.07", "range": [ 1121, 1125 ], "loc": { "start": { "line": 53, "column": 12 }, "end": { "line": 53, "column": 16 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 1114, 1125 ], "loc": { "start": { "line": 53, "column": 5 }, "end": { "line": 53, "column": 16 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "urban", "range": [ 1127, 1132 ], "loc": { "start": { "line": 53, "column": 18 }, "end": { "line": 53, "column": 23 } } }, "value": { "type": "Literal", "value": 0.15, "raw": "0.15", "range": [ 1134, 1138 ], "loc": { "start": { "line": 53, "column": 25 }, "end": { "line": 53, "column": 29 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 1127, 1138 ], "loc": { "start": { "line": 53, "column": 18 }, "end": { "line": 53, "column": 29 } } } ], "range": [ 1113, 1139 ], "loc": { "start": { "line": 53, "column": 4 }, "end": { "line": 53, "column": 30 } } }, { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "rural", "range": [ 1146, 1151 ], "loc": { "start": { "line": 54, "column": 5 }, "end": { "line": 54, "column": 10 } } }, "value": { "type": "Literal", "value": 0.1, "raw": "0.1", "range": [ 1153, 1156 ], "loc": { "start": { "line": 54, "column": 12 }, "end": { "line": 54, "column": 15 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 1146, 1156 ], "loc": { "start": { "line": 54, "column": 5 }, "end": { "line": 54, "column": 15 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "urban", "range": [ 1158, 1163 ], "loc": { "start": { "line": 54, "column": 17 }, "end": { "line": 54, "column": 22 } } }, "value": { "type": "Literal", "value": 0.2, "raw": "0.2", "range": [ 1165, 1168 ], "loc": { "start": { "line": 54, "column": 24 }, "end": { "line": 54, "column": 27 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 1158, 1168 ], "loc": { "start": { "line": 54, "column": 17 }, "end": { "line": 54, "column": 27 } } } ], "range": [ 1145, 1169 ], "loc": { "start": { "line": 54, "column": 4 }, "end": { "line": 54, "column": 28 } } }, { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "rural", "range": [ 1176, 1181 ], "loc": { "start": { "line": 55, "column": 5 }, "end": { "line": 55, "column": 10 } } }, "value": { "type": "Literal", "value": 0.15, "raw": "0.15", "range": [ 1183, 1187 ], "loc": { "start": { "line": 55, "column": 12 }, "end": { "line": 55, "column": 16 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 1176, 1187 ], "loc": { "start": { "line": 55, "column": 5 }, "end": { "line": 55, "column": 16 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "urban", "range": [ 1189, 1194 ], "loc": { "start": { "line": 55, "column": 18 }, "end": { "line": 55, "column": 23 } } }, "value": { "type": "Literal", "value": 0.3, "raw": "0.3", "range": [ 1196, 1199 ], "loc": { "start": { "line": 55, "column": 25 }, "end": { "line": 55, "column": 28 } } }, "kind": "init", "method": false, "shorthand": false, "computed": false, "range": [ 1189, 1199 ], "loc": { "start": { "line": 55, "column": 18 }, "end": { "line": 55, "column": 28 } } } ],