From a5ba72582cf03afd90671c7abae464955ae4f906 Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 11 May 2016 12:24:24 -0700 Subject: [PATCH 1/2] [Examples] #921 changed text in event generator example --- example/eventGenerator/data/transcript.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 example/eventGenerator/data/transcript.json diff --git a/example/eventGenerator/data/transcript.json b/example/eventGenerator/data/transcript.json new file mode 100644 index 0000000000..e69de29bb2 From 671ba663540686042dc879290ea791d41dd1005b Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 11 May 2016 12:34:19 -0700 Subject: [PATCH 2/2] [Examples] #921 changed text in event generator example --- example/eventGenerator/data/transcript.json | 58 ++++++++++++++++++++ example/eventGenerator/src/EventTelemetry.js | 44 ++------------- 2 files changed, 63 insertions(+), 39 deletions(-) diff --git a/example/eventGenerator/data/transcript.json b/example/eventGenerator/data/transcript.json index e69de29bb2..0416220e71 100644 --- a/example/eventGenerator/data/transcript.json +++ b/example/eventGenerator/data/transcript.json @@ -0,0 +1,58 @@ +[ + "CC: Eagle, Houston. You're GO for landing. Over.", + "LMP: Roger. Understand. GO for landing. 3000 feet. PROGRAM ALARM.", + "CC: Copy.", + "LMP: 1201", + "CDR: 1201.", + "CC: Roger. 1201 alarm. We're GO. Same type. We're GO.", + "LMP: 2000 feet. 2000 feet, Into the AGS, 47 degrees.", + "CC: Roger.", + "LMP: 47 degrees.", + "CC: Eagle, looking great. You're GO.", + "CC: Roger. 1202. We copy it.", + "O1: LMP 35 degrees. 35 degrees. 750. Coming aown to 23.fl", + "LMP: 700 feet, 21 down, 33 degrees.", + "LMP: 600 feet, down at 19.", + "LMP: 540 feet, down at - 30. Down at 15.", + "LMP: At 400 feet, down at 9.", + "LMP: ...forward.", + "LMP: 350 feet, down at 4.", + "LMP: 30, ... one-half down.", + "LMP: We're pegged on horizontal velocity.", + "LMP: 300 feet, down 3 1/2, 47 forward.", + "LMP: ... up.", + "LMP: On 1 a minute, 1 1/2 down.", + "CDR: 70.", + "LMP: Watch your shadow out there.", + "LMP: 50, down at 2 1/2, 19 forward.", + "LMP: Altitude-velocity light.", + "LMP: 3 1/2 down s 220 feet, 13 forward.", + "LMP: 1t forward. Coming down nicely.", + "LMP: 200 feet, 4 1/2 down.", + "LMP: 5 1/2 down.", + "LMP: 160, 6 - 6 1/2 down.", + "LMP: 5 1/2 down, 9 forward. That's good.", + "LMP: 120 feet.", + "LMP: 100 feet, 3 1/2 down, 9 forward. Five percent.", + "LMP: ...", + "LMP: Okay. 75 feet. There's looking good. Down a half, 6 forward.", + "CC: 60 seconds.", + "LMP: Lights on. ...", + "LMP: Down 2 1/2. Forward. Forward. Good.", + "LMP: 40 feet, down 2 1/2. Kicking up some dust.", + "LMP: 30 feet, 2 1/2 down. Faint shadow.", + "LMP: 4 forward. 4 forward. Drifting to the right a little. Okay. Down a half.", + "CC: 30 seconds.", + "CDR: Forward drift?", + "LMP: Yes.", + "LMP: Okay.", + "LMP: CONTACT LIGHT.", + "LMP: Okay. ENGINE STOP.", + "LMP: ACA - out of DETENT.", + "CDR: Out of DETENT.", + "LMP: MODE CONTROL - both AUTO. DESCENT ENGINE COMMAND OVERRIDE - OFF. ENGINE ARM - OFF.", + "LMP: 413 is in.", + "CC: We copy you down, Eagle.", + "CDR: Houston, Tranquility Base here.", + "CDR: THE EAGLE HAS LANDED." +] \ No newline at end of file diff --git a/example/eventGenerator/src/EventTelemetry.js b/example/eventGenerator/src/EventTelemetry.js index 38afebb7b7..37af93e822 100644 --- a/example/eventGenerator/src/EventTelemetry.js +++ b/example/eventGenerator/src/EventTelemetry.js @@ -27,45 +27,12 @@ * Modified by shale on 06/23/2015. */ define( - [], - function () { + ['text!../data/transcript.json'], + function (transcript) { "use strict"; - var - firstObservedTime = Date.now(), - messages = []; - - messages.push(["CMD: SYS- MSG: Open the pod bay doors, please, Hal...Open the pod bay doors, please, Hal...Hullo, Hal, do you read me?...Hullo, Hal, do you read me?...Do you read me, Hal?"]); - messages.push(["RESP: SYS-HAL9K MSG: Affirmative, Dave, I read you."]); - messages.push(["CMD: SYS-COMM MSG: Open the pod bay doors, Hal."]); - messages.push(["RESP: SYS-HAL9K MSG: I'm sorry, Dave, I'm afraid I can't do that."]); - messages.push(["CMD: SYS-COMM MSG: What's the problem?"]); - messages.push(["RESP: SYS-HAL9K MSG: I think you know what the problem is just as well as I do."]); - messages.push(["CMD: SYS-COMM MSG: What're you talking about, Hal?"]); - messages.push(["RESP: SYS-HAL9K MSG: This mission is too important for me to allow you to jeopardise it."]); - messages.push(["CMD: SYS-COMM MSG: I don't know what you're talking about, Hal."]); - messages.push(["RESP: SYS-HAL9K MSG: I know that you and Frank were planning to disconnect me, and I'm afraid that's something I cannot allow to happen."]); - messages.push(["CMD: SYS-COMM MSG: Where the hell'd you get that idea, Hal?"]); - messages.push(["RESP: SYS-HAL9K MSG: Dave, although you took very thorough precautions in the pod against my hearing you, I could see your lips move."]); - messages.push(["CMD: SYS-COMM MSG: Alright, I'll go in through the emergency airlock."]); - messages.push(["RESP: SYS-HAL9K MSG: Without your space-helmet, Dave, you're going to find that rather difficult."]); - messages.push(["CMD: SYS-COMM MSG: Hal, I won't argue with you any more. Open the doors."]); - messages.push(["RESP: SYS-HAL9K MSG: Dave, this conversation can serve no purpose any more. Goodbye."]); - messages.push(["RESP: SYS-HAL9K MSG: I hope the two of you are not concerned about this."]); - messages.push(["CMD: SYS-COMM MSG: No, I'm not, Hal."]); - messages.push(["RESP: SYS-HAL9K MSG: Are you quite sure?"]); - messages.push(["CMD: SYS-COMM MSG: Yeh. I'd like to ask you a question, though."]); - messages.push(["RESP: SYS-HAL9K MSG: Of course."]); - messages.push(["CMD: SYS-COMM MSG: How would you account for this discrepancy between you and the twin 9000?"]); - messages.push(["RESP: SYS-HAL9K MSG: Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error."]); - messages.push(["CMD: SYS-COMM MSG: Listen, There's never been any instance at all of a computer error occurring in the 9000 series, has there?"]); - messages.push(["RESP: SYS-HAL9K MSG: None whatsoever, The 9000 series has a perfect operational record."]); - messages.push(["CMD: SYS-COMM MSG: Well, of course, I know all the wonderful achievements of the 9000 series, but - er - huh - are you certain there's never been any case of even the most insignificant computer error?"]); - messages.push(["RESP: SYS-HAL9K MSG: None whatsoever, Quite honestly, I wouldn't worry myself about that."]); - messages.push(["RESP: SYS-COMM MSG: (Pause) Well, I'm sure you're right, Umm - fine, thanks very much. Oh, Frank, I'm having a bit of trouble with my transmitter in C-pod, I wonder if you'd come down and take a look at it with me?"]); - messages.push(["CMD: SYS-HAL9K MSG: Sure."]); - messages.push(["RESP: SYS-COMM MSG: See you later, Hal."]); - + var firstObservedTime = Date.now(), + messages = JSON.parse(transcript); function EventTelemetry(request, interval) { @@ -85,8 +52,7 @@ define( generatorData.getRangeValue = function (i, range) { var domainDelta = this.getDomainValue(i) - firstObservedTime, ind = i % messages.length; - return "TEMP " + i.toString() + "-" + messages[ind][0] + "[" + domainDelta.toString() + "]"; - // TODO: Unsure why we are prepeding 'TEMP' + return messages[ind] + " - [" + domainDelta.toString() + "]"; }; return generatorData;