text: (function(e){function t(t){for(var i,s,o=t[0],l=t[1],d=t[2],c=0,p=[];c<o.length;c++)s=o[c],n[s]&&p.push(n[s][0]),n[s]=0;for(i in l)Object.prototype.hasOwnProperty.call(l,i)&&(e[i]=l[i]);u&&u(t);while(p.length)p.shift()();return r.push.apply(r,d||[]),a()}function a(){for(var e,t=0;t<r.length;t++){for(var a=r[t],i=!0,o=1;o<a.length;o++){var l=a[o];0!==n[l]&&(i=!1)}i&&(r.splice(t--,1),e=s(s.s=a[0]))}return e}var i={},n={app:0},r=[];function s(t){if(i[t])return i[t].exports;var a=i[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,s),a.l=!0,a.exports}s.m=e,s.c=i,s.d=function(e,t,a){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},s.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(s.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)s.d(a,i,function(t){return e[t]}.bind(null,i));return a},s.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="/";var o=window["webpackJsonp"]=window["webpackJsonp"]||[],l=o.push.bind(o);o.push=t,o=o.slice();for(var d=0;d<o.length;d++)t(o[d]);var u=l;r.push([0,"chunk-vendors"]),a()})({0:function(e,t,a){e.exports=a("cd49")},"034f":function(e,t,a){"use strict";var i=a("64a9"),n=a.n(i);n.a},1:function(e,t){},2:function(e,t){},"47b5":function(e,t,a){"use strict";var i=a("acd9"),n=a.n(i);n.a},"64a9":function(e,t,a){},"745f":function(e,t,a){"use strict";var i=a("7e66"),n=a.n(i);n.a},"7e66":function(e,t,a){},acd9:function(e,t,a){},cd49:function(e,t,a){"use strict";a.r(t);a("cadf"),a("551c"),a("f751"),a("097d");var i=a("2b0e"),n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"app"}},[a("div",{staticClass:"holder"},[a("SideBar",{staticClass:"side-bar"}),a("Main",{staticClass:"main"})],1)])},r=[],s=a("d225"),o=a("308d"),l=a("6bb5"),d=a("4e2b"),u=a("9ab4"),c=a("60a3"),p=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"mainWindow"},[a("Plot",{staticClass:"plot"}),a("div",{staticClass:"tab-holder"},[a("div",{staticClass:"tabs"},[a("ul",[a("li",{class:{"is-active":"docs"===e.currentTab}},[a("a",{on:{click:function(t){e.currentTab="docs"}}},[e._v("Documentation/Help")])]),a("li",{class:{"is-active":"drone"===e.currentTab}},[a("a",{on:{click:function(t){e.currentTab="drone"}}},[e._v("Drone Details")])])])])]),a("div",{staticClass:"scrollBox"},["docs"===e.currentTab?a("div",[a("HelpDocs")],1):e._e(),"drone"===e.currentTab?a("div",[a("DroneDetails")],1):e._e()])],1)},m=[],v=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{attrs:{id:"plot"}}),e.dataLoaded?a("div",[a("select",{directives:[{name:"model",rawName:"v-model",value:e.xAxisLabel,expression:"xAxisLabel"}],on:{change:[function(t){var a=Array.prototype.filter.call(t.target.options,function(e){return e.selected}).map(function(e){var t="_value"in e?e._value:e.value;return t});e.xAxisLabel=t.target.multiple?a:a[0]},function(t){return e.updatePlot()}]}},e._l(e.xAxisOptions,function(t){return a("option",{key:t.id,domProps:{value:t.id}},[e._v(e._s(t.displayName))])}),0)]):e._e()])},h=[],f=(a("7f7f"),a("ac6a"),a("7514"),a("b0b4")),b=a("030a"),y=(a("c5f6"),a("7e25")),g=function(){function e(){Object(s["a"])(this,e),this.eventEmitter=new y["EventEmitter"],this.selectedXLabel="",this.baseUrl="https://drones-and-weather.herokuapp.com/",this.drones=[],this.errMsg="Error running simulation. A parameter may be invalid or the solver may not have converged, so try adjusting the simulation parameters. If this problem persists, please report it as an issue on the github repository (https://github.com/dhill2522/DroneModelingSite).",this.selectedDrone={"Drone Name":""}}return Object(f["a"])(e,[{key:"simulate",value:function(e){var t=this,a={validation:e.validation,validationcase:e.validationCase,dronename:e.droneName,batterytechnology:e.batteryTechnology,stateofhealth:Number(e.stateOfHealth),startstateofcharge:Number(e.startStateOfCharge),altitude:Number(e.altitude),dropsize:Number(e.dropSize),liquidwatercontent:Number(e.liquidWaterContent),temperature:Number(e.temperature),windspeed:Number(e.windSpeed),winddirection:Number(e.windDirection),relativehumidity:Number(e.relativeHumidity),timestep:Number(e.timestep),xlabel:e.xLabel,ylabel:e.yLabel,title:e.title,xvals:e.xVals,weathereffect:e.weatherEffect,zParam:e.zParam};console.log("Request body",a),fetch(this.baseUrl+"simulate",{method:"POST",body:JSON.stringify(a),headers:{"Content-Type":"appplication/json"}}).then(function(e){console.log("Response metadata",e),e.json().then(function(e){e.error?(console.log("Error running simulation:",e.log),alert(t.errMsg+" "+e.log)):(console.log("Response body",JSON.parse(JSON.stringify(e))),t.simulationResults=null,t.simulationResults=e,t.eventEmitter.emit("simulateComplete"))})}).catch(function(e){console.log("Error fetching simulation results",e),console.log(e.message),alert(t.errMsg)})}},{key:"getValidationCases",value:function(){var e=this;return new Promise(function(t,a){fetch(e.baseUrl+"getValidationCases").then(function(e){e.json().then(function(e){console.log("Validation Cases",e),e.push({id:"None",xvalid:[],yvalid:[],drone:{},settings:{stateofhealth:100,startstateofcharge:100,altitude:0,dropsize:0,liquidwatercontent:0,temperature:25,windspeed:0,winddirection:0,relativehumidity:0,xlabel:"temperature",batterytechnology:"current"}}),t(e)})})})}},{key:"getDrones",value:function(){var e=this;return new Promise(function(t,a){fetch(e.baseUrl+"getDrones").then(function(a){a.json().then(function(a){console.log("Drones",a),e.drones=a,t(a)})})})}},{key:"getSelectedDrone",value:function(){return this.selectedDrone}},{key:"setSelectedDrone",value:function(e){var t=this.drones.find(function(t){return t["Drone Name"]===e});this.selectedDrone=t||{"Drone Name":"Either no drone is selected or a validation case is currently being simulated."},this.eventEmitter.emit("drone",this.selectedDrone)}}]),e}(),_=new g,x=(a("55dd"),[{name:"altitude",display:"Altitude"},{name:"batterycapacity",display:"Battery Capacity"},{name:"chord",display:"Chord"},{name:"dropsize",display:"Drop Size"},{name:"endurancemaxhover",display:"Max Hover Endurance"},{name:"gustamplitude",display:"Gust Amplitude"},{name:"gustfrequency",display:"Gust Frequency"},{name:"height",display:"Height"},{name:"length",display:"Length"},{name:"liquidwatercontent",display:"Liquid Water Content"},{name:"lifttodrag",display:"Lift to Drag"},{name:"missionspeed",display:"Mission Speed"},{name:"payload",display:"Payload"},{name:"rainfallrate",display:"Rainfall Rate"},{name:"relativehumidity",display:"Relative Humidity"},{name:"rotordiameter",display:"Rotor Diameter"},{name:"span",display:"Span"},{name:"spanwiseefficiency",display:"Spanwise Efficiency"},{name:"startstateofcharge",display:"Start State of Charge"},{name:"temperature",display:"Temperature"},{name:"width",display:"Width"},{name:"windheading",display:"Wind Heading"},{name:"windspeed",display:"Wind Speed"},{name:"windspeeddown",display:"Downdraft"},{name:"wingarea",display:"Wing Area"}].sort(function(e,t){return e.display>t.display?1:0})),w=["range","power"],C=[{id:1,name:"current",displayName:"Current"},{id:2,name:"near-future",displayName:"Near-future"},{id:3,name:"far-future",displayName:"Far-future"}],D=function(e){function t(){var e;return Object(s["a"])(this,t),e=Object(o["a"])(this,Object(l["a"])(t).apply(this,arguments)),e.emptyPlottable={id:"",values:[],displayName:""},e.dataLoaded=!1,e.plotId="plot",e.plotData=[],e.layout={},e.xAxisOptions=[],e.xAxisLabel="",e.xAxis=e.emptyPlottable,e.yAxisOptions=[],e}return Object(d["a"])(t,e),Object(f["a"])(t,[{key:"mounted",value:function(){var e=this;b["newPlot"](this.plotId,this.plotData).then(function(t){window.addEventListener("resize",function(){b["Plots"].resize(e.plotId)})}),_.eventEmitter.on("simulateComplete",function(){e.processSimulationResults()})}},{key:"updatePlot",value:function(){var e=this,t=this.xAxisOptions.find(function(t){return t.displayName===e.xAxisLabel});this.xAxis=t||this.emptyPlottable,console.log(this.xAxis),this.plotData=[],this.yAxisOptions.forEach(function(t){e.plotData.push({x:e.xAxis.values[0],y:t.values[0],mode:"lines",type:"scatter",name:t.displayName,visible:"legendonly"})}),b["newPlot"](this.plotId,this.plotData,this.layout)}},{key:"processSimulationResults",value:function(){var e=this;this.dataLoaded=!0;var t=_.simulationResults;this.yAxisOptions=[],this.xAxisOptions=[],t.plottables.forEach(function(t){null!==t.values[0][0]?(e.yAxisOptions.push(t),x.find(function(e){return e.name===t.id})&&e.xAxisOptions.push(t)):console.log("Null values:",t)}),console.log("backendService.selectedXLabel",_.selectedXLabel),_.selectedXLabel&&(this.xAxisLabel=_.selectedXLabel),this.layout={title:"Simulation Results"},this.updatePlot()}}]),t}(c["b"]);D=u["a"]([c["a"]],D);var O=D,N=O,S=a("2877"),j=Object(S["a"])(N,v,h,!1,null,null,null),E=j.exports,P=function(){var e=this,t=e.$createElement;e._self._c;return e._m(0)},T=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("h1",{staticClass:"subtitle"},[e._v("\n        drone_awe - Drones Applications in Weather Environments\n    ")]),a("div",{staticStyle:{"text-align":"left"}},[a("p",[e._v("\n            The purpose of the Drone Applications in Weather Environments (Drone-AWE) project is to predict drone performance under a wide range of weather conditions with mission planning and battery behavior in mind. Drone-AWE is powered by an interactive python library located at "),a("a",{attrs:{href:"https://github.com/rymanderson/drone_awe"}},[e._v("GitHub")]),e._v(". For an explanation of the theory to develop Drone-AWE, or if you would like to use the Drone-AWE library natively, visit "),a("a",{attrs:{href:"https://rymanderson.github.io/site/"}},[e._v("the documentation pages")]),e._v(". \n        ")]),a("p",{staticStyle:{"margin-top":"10px","margin-bottom":"10px"}},[e._v("\n            Below is a list of input parameters for drone simulations accompanied by a brief description.\n        ")]),a("p",{staticClass:"paramDesc"},[a("b",[e._v("Validation Case:")]),e._v(" These are published experimental cases for validating the developed models. Each of these cases already has specific system parameters defined, so settings are disabled when a validation case is selected.\n        ")]),a("p",{staticClass:"paramDesc"},[a("b",[e._v("Drone Name:")]),e._v(" The name of the drone to to be simulated. Details about the selected drone can be found in the Drone Details tab. Validation cases often use drones not included in this package or are modified versions, so the information in Drone Details does not necessarily reflect the details of the same drone used in a validation case.\n        ")]),a("p",{staticClass:"paramDesc"},[a("b",[e._v("Battery Technology:")]),e._v(" The type of battery technology in use. Battery technology is rapidly changing, so near-future and future technologies are predicted assuming a 3.5% increase in battery capacity per year for 5 years for near-future and 10 times the capacity for far-future technology.\n        ")]),a("p",{staticClass:"paramDesc"},[a("b",[e._v("State Of Health:")]),e._v(" The state of health for the drone battery expressed as a percent of the batteries original capacity.\n        ")]),a("p",{staticClass:"paramDesc"},[a("b",[e._v("Initial Charge:")]),e._v(" The initial percent charge of the drone battery.\n        ")]),a("p",{staticClass:"paramDesc"},[a("b",[e._v("Altitude:")]),e._v(" The altitude at which the simulation should be run.\n        ")]),a("p",{staticClass:"paramDesc"},[a("b",[e._v("Droplet Size:")]),e._v(" Average rain droplet diameter.\n        ")]),a("p",{staticClass:"paramDesc"},[a("b",[e._v("Liquid Water Content:")]),e._v(" The mass of liquid water per unit volume of air of the rainfall.\n        ")]),a("p",{staticClass:"paramDesc"},[a("b",[e._v("Temperature:")]),e._v(" The temperature at which to simulate the system.\n        ")]),a("p",{staticClass:"paramDesc"},[a("b",[e._v("Wind Speed:")]),e._v(" The wind speed used in the simulation.\n        ")]),a("p",{staticClass:"paramDesc"},[a("b",[e._v("Wind Direction:")]),e._v(" The wind direction to be used for the simulation as degrees East of North.\n        ")]),a("p",{staticClass:"paramDesc"},[a("b",[e._v("Relative Humidity:")]),e._v(" The relative humidity to be used for the simulation.\n        ")]),a("p",{staticClass:"paramDesc"},[a("b",[e._v("Manipulated Variable:")]),e._v(" The variable to be manipulated in the simulation. The other variables are then calculated based on the manipulated variable.\n        ")]),a("p",{staticClass:"paramDesc"},[a("b",[e._v("MV Initial Value:")]),e._v(" The initial value of the manipulated variable.\n        ")]),a("p",{staticClass:"paramDesc"},[a("b",[e._v("MV Final Value:")]),e._v(" The final value of the manipulated variable. \n        ")]),a("p",{staticClass:"paramDesc"},[a("b",[e._v("MV Number of Points:")]),e._v(" The number of values to use in the array of manipulated variable values.\n        ")])])])}],A=function(e){function t(){return Object(s["a"])(this,t),Object(o["a"])(this,Object(l["a"])(t).apply(this,arguments))}return Object(d["a"])(t,e),t}(c["b"]);A=u["a"]([Object(c["a"])({components:{}})],A);var L=A,k=L,V=Object(S["a"])(k,P,T,!1,null,"314c9d8d",null),H=V.exports,W=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e._v("\n    "+e._s(e.drone.id)+"\n    "),a("table",{staticClass:"table is-striped is-narrow is-hoverable is-fullwidth"},[e._m(0),a("tbody",e._l(e.droneProps,function(t){return a("tr",{key:t.prop},[a("td",[e._v(e._s(t.prop))]),a("td",[e._v(e._s(t.value))])])}),0)])])},M=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("thead",[a("tr",[a("th",[e._v("Property")]),a("th",[e._v("Value")])])])}],$=(a("456d"),function(e){function t(){var e;return Object(s["a"])(this,t),e=Object(o["a"])(this,Object(l["a"])(t).apply(this,arguments)),e.drone={"Drone Name":"Please select a drone"},e.droneProps=[],e}return Object(d["a"])(t,e),Object(f["a"])(t,[{key:"mounted",value:function(){var e=this;_.eventEmitter.on("drone",function(t){e.drone=t,e.parseDroneData()}),this.drone=_.getSelectedDrone(),this.parseDroneData()}},{key:"parseDroneData",value:function(){var e=this;this.droneProps=[];var t=0;Object.keys(this.drone).forEach(function(a){var i={id:t,prop:a,value:e.drone[a]};e.droneProps.push(i),t++})}}]),t}(c["b"]));$=u["a"]([Object(c["a"])({components:{}})],$);var z=$,q=z,B=Object(S["a"])(q,W,M,!1,null,"89b8fd3c",null),R=B.exports,X=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e._v("\n    Simulation Log\n")])},I=[],F=function(e){function t(){return Object(s["a"])(this,t),Object(o["a"])(this,Object(l["a"])(t).apply(this,arguments))}return Object(d["a"])(t,e),t}(c["b"]);F=u["a"]([Object(c["a"])({components:{}})],F);var J=F,U=J,G=Object(S["a"])(U,X,I,!1,null,"3b9298d0",null),K=G.exports,Q=function(e){function t(){var e;return Object(s["a"])(this,t),e=Object(o["a"])(this,Object(l["a"])(t).apply(this,arguments)),e.currentTab="docs",e}return Object(d["a"])(t,e),t}(c["b"]);Q=u["a"]([Object(c["a"])({components:{Plot:E,HelpDocs:H,DroneDetails:R,SimLog:K}})],Q);var Y=Q,Z=Y,ee=(a("47b5"),Object(S["a"])(Z,p,m,!1,null,"5d32b2fc",null)),te=ee.exports,ae=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"sideToolBar"},[e._m(0),a("div",{staticClass:"form-holder dynamic"},[a("div",{staticClass:"form-row"},[a("label",[e._v("Validation Case")]),a("select",{directives:[{name:"model",rawName:"v-model",value:e.params.validationCase,expression:"params.validationCase"}],on:{change:[function(t){var a=Array.prototype.filter.call(t.target.options,function(e){return e.selected}).map(function(e){var t="_value"in e?e._value:e.value;return t});e.$set(e.params,"validationCase",t.target.multiple?a:a[0])},function(t){return e.setValidation(t.target.value)}]}},e._l(e.validationCases,function(t){return a("option",{key:t.id},[e._v(e._s(t.id))])}),0)]),a("div",{staticClass:"form-row"},[a("label",[e._v("Drone Name")]),a("select",{directives:[{name:"model",rawName:"v-model",value:e.params.droneName,expression:"params.droneName"}],attrs:{disabled:e.params.validation},on:{change:[function(t){var a=Array.prototype.filter.call(t.target.options,function(e){return e.selected}).map(function(e){var t="_value"in e?e._value:e.value;return t});e.$set(e.params,"droneName",t.target.multiple?a:a[0])},function(t){return e.updateDrone(t.target.value)}]}},[e.params.validation?a("option",[e._v("From Validation Data")]):e._e(),e._l(e.drones,function(t){return a("option",{key:t["Drone Name"]},[e._v(e._s(t["Drone Name"]))])})],2)]),a("div",{staticClass:"form-row"},[a("label",[e._v("Battery Technology")]),a("select",{directives:[{name:"model",rawName:"v-model",value:e.params.batteryTechnology,expression:"params.batteryTechnology"}],attrs:{disabled:e.params.validation},on:{change:function(t){var a=Array.prototype.filter.call(t.target.options,function(e){return e.selected}).map(function(e){var t="_value"in e?e._value:e.value;return t});e.$set(e.params,"batteryTechnology",t.target.multiple?a:a[0])}}},e._l(e.batteryTechnologies,function(t){return a("option",{key:t.id},[e._v(e._s(t.name))])}),0)]),a("div",{staticClass:"form-row"},[a("label",[e._v("State Of Health: "+e._s(e.params.stateOfHealth)+"%")]),a("input",{directives:[{name:"model",rawName:"v-model",value:e.params.stateOfHealth,expression:"params.stateOfHealth"}],attrs:{type:"range",min:"50",max:"100",step:"1",disabled:e.params.validation},domProps:{value:e.params.stateOfHealth},on:{__r:function(t){return e.$set(e.params,"stateOfHealth",t.target.value)}}})]),a("div",{staticClass:"form-row"},[a("label",[e._v("Initial Charge: "+e._s(e.params.startStateOfCharge)+"%")]),a("input",{directives:[{name:"model",rawName:"v-model",value:e.params.startStateOfCharge,expression:"params.startStateOfCharge"}],attrs:{type:"range",min:"0",max:"100",step:"1",disabled:e.params.validation},domProps:{value:e.params.startStateOfCharge},on:{__r:function(t){return e.$set(e.params,"startStateOfCharge",t.target.value)}}})]),a("div",{staticClass:"form-row"},[a("label",[e._v("ASL Altitude (m)")]),a("input",{directives:[{name:"model",rawName:"v-model",value:e.params.altitude,expression:"params.altitude"}],attrs:{type:"number",min:"0",max:"10000",disabled:e.params.validation},domProps:{value:e.params.altitude},on:{input:function(t){t.target.composing||e.$set(e.params,"altitude",t.target.value)}}})]),a("div",{staticClass:"form-row"},[a("label",[e._v("Droplet Size: "+e._s(e.params.dropSize)+" mm")]),a("input",{directives:[{name:"model",rawName:"v-model",value:e.params.dropSize,expression:"params.dropSize"}],attrs:{type:"range",min:"0",max:"10",step:"0.1"},domProps:{value:e.params.dropSize},on:{__r:function(t){return e.$set(e.params,"dropSize",t.target.value)}}})]),a("div",{staticClass:"form-row"},[a("label",[e._v("Liquid Water Content: "+e._s(e.params.liquidWaterContent)+" g/m³")]),a("input",{directives:[{name:"model",rawName:"v-model",value:e.params.liquidWaterContent,expression:"params.liquidWaterContent"}],attrs:{type:"range",min:"0",max:"20",step:"1",disabled:e.params.validation},domProps:{value:e.params.liquidWaterContent},on:{__r:function(t){return e.$set(e.params,"liquidWaterContent",t.target.value)}}})]),a("div",{staticClass:"form-row"},[a("label",[e._v("Temperature (C)")]),a("input",{directives:[{name:"model",rawName:"v-model",value:e.params.temperature,expression:"params.temperature"}],attrs:{type:"number",min:"-10",max:"45",step:"1",disabled:e.params.validation},domProps:{value:e.params.temperature},on:{input:function(t){t.target.composing||e.$set(e.params,"temperature",t.target.value)}}})]),a("div",{staticClass:"form-row"},[a("label",[e._v("Wind Speed: "+e._s(e.params.windSpeed)+" m/s")]),a("input",{directives:[{name:"model",rawName:"v-model",value:e.params.windSpeed,expression:"params.windSpeed"}],attrs:{type:"range",min:"0",max:"20",step:"1",disabled:e.params.validation},domProps:{value:e.params.windSpeed},on:{__r:function(t){return e.$set(e.params,"windSpeed",t.target.value)}}})]),a("div",{staticClass:"form-row"},[a("label",[e._v("Wind Direction: "+e._s(e.params.windDirection)+" degrees")]),a("input",{directives:[{name:"model",rawName:"v-model",value:e.params.windDirection,expression:"params.windDirection"}],attrs:{type:"range",max:"360",min:"0",step:"1",disabled:e.params.validation},domProps:{value:e.params.windDirection},on:{__r:function(t){return e.$set(e.params,"windDirection",t.target.value)}}})]),a("div",{staticClass:"form-row"},[a("label",[e._v("Relative Humidity: "+e._s(e.params.relativeHumidity)+"%")]),a("input",{directives:[{name:"model",rawName:"v-model",value:e.params.relativeHumidity,expression:"params.relativeHumidity"}],attrs:{type:"range",min:"0",max:"100",step:"1",disabled:e.params.validation},domProps:{value:e.params.relativeHumidity},on:{__r:function(t){return e.$set(e.params,"relativeHumidity",t.target.value)}}})]),a("div",{staticClass:"form-row"},[a("label",[e._v("Manipulated Variable (MV)")]),a("select",{directives:[{name:"model",rawName:"v-model",value:e.params.xLabel,expression:"params.xLabel"}],attrs:{disabled:e.params.validation},on:{change:[function(t){var a=Array.prototype.filter.call(t.target.options,function(e){return e.selected}).map(function(e){var t="_value"in e?e._value:e.value;return t});e.$set(e.params,"xLabel",t.target.multiple?a:a[0])},function(t){return e.updateXLabel(t)}]}},e._l(e.independentVariables,function(t){return a("option",{key:t.name,domProps:{value:t.name}},[e._v(e._s(t.display))])}),0)]),a("div",{staticClass:"form-row",on:{change:function(t){return e.generateXArray()}}},[a("label",[e._v("MV Initial Value")]),a("input",{directives:[{name:"model",rawName:"v-model",value:e.xBegin,expression:"xBegin"}],attrs:{type:"number",max:this.xEnd,disabled:e.params.validation},domProps:{value:e.xBegin},on:{input:function(t){t.target.composing||(e.xBegin=t.target.value)}}})]),a("div",{staticClass:"form-row",on:{change:function(t){return e.generateXArray()}}},[a("label",[e._v("MV Final Value")]),a("input",{directives:[{name:"model",rawName:"v-model",value:e.xEnd,expression:"xEnd"}],attrs:{type:"number",min:this.xBegin,disabled:e.params.validation},domProps:{value:e.xEnd},on:{input:function(t){t.target.composing||(e.xEnd=t.target.value)}}})]),a("div",{staticClass:"form-row",on:{change:function(t){return e.generateXArray()}}},[a("label",[e._v("MV Number of Values")]),a("input",{directives:[{name:"model",rawName:"v-model",value:e.xCount,expression:"xCount"}],attrs:{type:"number",min:"1",max:"100",disabled:e.params.validation},domProps:{value:e.xCount},on:{input:function(t){t.target.composing||(e.xCount=t.target.value)}}})])]),a("div",{staticClass:"static"},[a("hr",{staticStyle:{margin:"unset","padding-bottom":"1 rem"}}),a("button",{on:{click:function(t){return e.simulate()}}},[e._v("Simulate")])])])},ie=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"static"},[a("h2",[e._v("Drone Modeling")]),a("hr",{staticStyle:{margin:"unset","padding-top":"1 rem"}})])}],ne=function(e){function t(){var e;return Object(s["a"])(this,t),e=Object(o["a"])(this,Object(l["a"])(t).apply(this,arguments)),e.params={droneName:"dji-Mavic2",batteryTechnology:"current",stateOfHealth:100,altitude:0,dropSize:0,liquidWaterContent:50,temperature:25,windSpeed:0,windDirection:0,relativeHumidity:0,timestep:.1,xLabel:x[0].name,yLabel:w[0],title:"",xVals:[0,1,2,3,4,5],weatherEffect:"temperature",validation:!1,validationCase:"None",startStateOfCharge:100,zParam:""},e.batteryTechnologies=C,e.drones=[],e.independentVariables=x,e.selectedDrone=e.drones[0],e.xBegin=0,e.xEnd=5,e.xCount=6,e.validationCases=[],e}return Object(d["a"])(t,e),Object(f["a"])(t,[{key:"simulate",value:function(){_.selectedXLabel=this.params.xLabel,_.simulate(this.params)}},{key:"mounted",value:function(){var e=this;_.getDrones().then(function(t){e.drones=t,e.updateDrone(e.params.droneName)}),_.getValidationCases().then(function(t){e.validationCases=t})}},{key:"generateXArray",value:function(){for(var e=[],t=(Number(this.xEnd)-Number(this.xBegin))/(Number(this.xCount)-1),a=0;a<Number(this.xCount);a++)e.push(Number(this.xBegin)+t*a);this.params.xVals=e,console.log(this.xBegin,this.xEnd,this.xCount,this.params.xVals)}},{key:"updateDrone",value:function(e){_.setSelectedDrone(e);var t=this.drones.find(function(t){return t["Drone Name"]===e});t&&(this.selectedDrone=t)}},{key:"updateXLabel",value:function(e){console.log("updated xLabel",e),this.params.xLabel=e.target.value}},{key:"setValidation",value:function(e){var t=this.validationCases.find(function(t){return t.id===e});"None"===e?(this.params.validation=!1,this.params.droneName="dji-Mavic2",_.setSelectedDrone(this.params.droneName)):t?(this.params.validation=!0,this.params.droneName="From Validation Data",this.params.batteryTechnology=t.settings.batterytechnology,this.params.stateOfHealth=t.settings.stateofhealth,this.params.startStateOfCharge=t.settings.startstateofcharge,this.params.altitude=t.settings.altitude,this.params.dropSize=t.settings.dropsize,this.params.liquidWaterContent=t.settings.liquidwatercontent,this.params.temperature=t.settings.temperature,this.params.windSpeed=t.settings.windspeed,this.params.windDirection=t.settings.winddirection,this.params.relativeHumidity=t.settings.relativehumidity,this.params.xLabel=t.settings.xlabel,_.setSelectedDrone("none")):this.params.validation=!1}}]),t}(c["b"]);ne=u["a"]([c["a"]],ne);var re=ne,se=re,oe=(a("745f"),Object(S["a"])(se,ae,ie,!1,null,"6524b6c6",null)),le=oe.exports,de=function(e){function t(){return Object(s["a"])(this,t),Object(o["a"])(this,Object(l["a"])(t).apply(this,arguments))}return Object(d["a"])(t,e),t}(c["b"]);de=u["a"]([Object(c["a"])({components:{Main:te,SideBar:le}})],de);var ue=de,ce=ue,pe=(a("034f"),Object(S["a"])(ce,n,r,!1,null,null,null)),me=pe.exports;a("92c6");i["a"].config.productionTip=!1,new i["a"]({render:function(e){return e(me)}}).$mount("#app")}});
  //# sourceMappingURL=app.fdda2401.js.map