Skip to content

Commit

Permalink
use strict + a bug was fixed thanks to it
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyapoz committed Mar 24, 2014
1 parent 8e1f983 commit e8a4575
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions scripts/article.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(function() {
"use strict";
var what = [
sim.location.custom.coordsJS,
sim.location.custom.name,
Expand Down
1 change: 1 addition & 0 deletions scripts/bindings.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/// Different custom bindings
"use strict";

(function() {
var rotateDiv = function(div, angle) {
Expand Down
7 changes: 3 additions & 4 deletions scripts/blueskies.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(function() {
"use strict";
////// Parameters
// Canopy modes
var horizontalSpeeds = [0, 2.5, 5, 7.5, 10],
Expand Down Expand Up @@ -145,9 +146,8 @@ function computeLandingPattern(location, wind, pattern) {

result = [location];
for (var i = 0; i < controlPointAltitudes.length; i++) {
time = (controlPointAltitudes[i] - prevAltitude) / speedV;

var point = moveInWind(prevPoint, windSpeed, windDirection, speedH, heading[i], -time); // Note that we specify the wind speed and canopy heading as though we're flying the pattern. But we give negative time, so we get the point where we need to start to arrive where we need.
var time = (controlPointAltitudes[i] - prevAltitude) / speedV,
point = moveInWind(prevPoint, windSpeed, windDirection, speedH, heading[i], -time); // Note that we specify the wind speed and canopy heading as though we're flying the pattern. But we give negative time, so we get the point where we need to start to arrive where we need.

prevPoint = point;
prevAltitude = controlPointAltitudes[i];
Expand All @@ -164,5 +164,4 @@ window.getCanopyVerticalSpeed = getCanopyVerticalSpeed;
window.computeLandingPattern = computeLandingPattern;
window.computeReachSet = computeReachSet;
window.lastReachSetSteps = lastReachSetSteps;

})();
1 change: 1 addition & 0 deletions scripts/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(function () {
"use strict";
sim.persistence.init();
parseParameters(sim);
ko.applyBindings(sim);
Expand Down
1 change: 1 addition & 0 deletions scripts/loc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(function() {
"use strict";
var enResources = {
"ms": "m/s",
"paused": "(paused)",
Expand Down
1 change: 1 addition & 0 deletions scripts/tutor.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"use strict";
function startTutor(id) {
var allDialogs, // List of all dialog objects, populated from html automagically
nextDialogIndex;
Expand Down
1 change: 1 addition & 0 deletions scripts/ui.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"use strict";
// Time
var updateInterval = 20.0,
headingUpdateSpeed = Math.PI / 4, // Radians __per second__
Expand Down
1 change: 1 addition & 0 deletions scripts/util.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"use strict";
function degToRad(deg) {
return deg * Math.PI / 180;
}
Expand Down
1 change: 1 addition & 0 deletions scripts/viewmodel.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
(function() {
"use strict";
function SimulatorViewModel() {
var self = this;
var dropzones = {
Expand Down

0 comments on commit e8a4575

Please sign in to comment.