1"use strict";(self.webpackChunkmy_gatsby_site=self.webpackChunkmy_gatsby_site||[]).push([[8790],{53342:function(e,t,l){l.d(t,{A:function(){return s}});var a=l(96540),n=l(27581),i=l(85790);const r=n.default.div.withConfig({displayName:"AsideArticlestyled__ArticleWrapper",componentId:"sc-pwyu03-0"})(["border-radius:4px;display:flex;flex-direction:column;gap:8px;height:100%;"]),o=n.default.div.withConfig({displayName:"AsideArticlestyled__Top",componentId:"sc-pwyu03-1"})(["align-items:flex-start;align-self:stretch;background:",";display:flex;flex-direction:column;flex:1;padding:16px;h4{margin:8px 0 0 0;}p{margin:0;}"],i.re);var c=l(32299),u=l(48617),m=l(73129);var s=function(e){let{title:t,imgLink:l,link:n}=e;return a.createElement(r,null,a.createElement(o,null,a.createElement(c.A,{imgSrc:l,altTag:t,hasFrame:"No Frame",aspectRatio:"4/3"}),a.createElement(u.A,{type:"H4",copy:t,weight:"Bold"})),a.createElement(m.A,{linkType:"Aside Article Link",linkDestination:`https://www.heliguy.com/blogs/posts/${n}`,target:"_blank",linkText:"Keep Reading"}))}},57236:function(e,t,l){var a=l(96540);t.A=function(e){let{title:t,mainImage:l,pageUrl:n,pageDescription:i}=e;return a.createElement(a.Fragment,null,a.createElement("meta",{name:"twitter:card",content:"summer_large_image"}),a.createElement("meta",{name:"twitter:title",content:t}),a.createElement("meta",{name:"twitter:image",content:l}),a.createElement("meta",{name:"twitter:url",content:n}),a.createElement("meta",{name:"twitter:description",content:i}))}},51844:function(e,t,l){var a=l(96540);t.A=function(e){let{title:t="Page title",description:l="Page description",pageObjectUrl:n="https://images.ctfassets.net/et769tc4wc1v/7ENL4KK47eXMyyzeBj28eW/a567560fa83b043e1dae7dfdaffd740a/Untitled.png?w=1920&h=889&q=50&fm=webp&bg=transparent",pageObjectUrlWidth:i="1920",pageObjectUrlHeight:r="889",pageUrl:o="https://www.heliguy.com/"}=e;return a.createElement(a.Fragment,null,a.createElement("meta",{property:"og:locale",content:"en"}),a.createElement("meta",{property:"og:site_name",content:"Heliguyâ¢"}),a.createElement("meta",{property:"og:type",content:"website"}),a.createElement("meta",{property:"og:title",content:t}),a.createElement("meta",{property:"og:description",content:l}),a.createElement("meta",{property:"og:image",content:n}),a.createElement("meta",{property:"og:image:width",content:i}),a.createElement("meta",{property:"og:image:height",content:r}),a.createElement("meta",{property:"og:url",content:o}))}},80938:function(e,t,l){function a(e){return e?e.replace(/\\/gm,"").replace(/(?<!\\)"/gm,"").replace(/[<>]/gm,"").replace(/&/gm,"").replace(/[\{\}\[\]]/gm,"").replace(/`/gm,"").replace(/("|")/gm,"").replace(/\n/g," ").replace(/\t/g," ").replace(/\s+/g," ").trim():""}l.d(t,{A:function(){return a}})},63544:function(e,t,l){l.d(t,{b:function(){return n}});var a=l(80938);const n=e=>{let{pageTitle:t,pageDescription:l,pageUrl:n,breadcrumbs:i}=e;if(!t||!n)return null;let r="";return i&&Array.isArray(i)&&i.length>0&&(r=`{\n "@type": "BreadcrumbList",\n "itemListElement": [${i.map(((e,l)=>`{\n "@type": "ListItem",\n "position": ${l+1},\n "item": {\n "@id" : "https://www.heliguy.com${e.pathname}",\n "name": "${"?"===(0,a.A)(e.crumbLabel)?(0,a.A)(t):(0,a.A)(e.crumbLabel)}"\n }\n }`))}]\n }`),`{\n "@context": "https://schema.org",\n "@type": "WebPage",\n "name": "${(0,a.A)(t)}",\n "description": "${l?(0,a.A)(l):"No Description"}",\n ${r&&r.length?`"breadcrumb":${r},`:""}\n "url": "${n}"\n}`}},17086:function(e,t,l){l.r(t),l.d(t,{Head:function(){return x},default:function(){return A}});var a=l(96540),n=l(62775),i=l(54506),r=l(27581),o=l(6111);const c=r.default.div.withConfig({displayName:"GsdCalculatorstyled__Container",componentId:"sc-fzn05p-0"})(["padding-top:80px;@media only screen and (min-width:64em){padding-top:160px;}& h2{margin:0;}@media only screen and (min-width:64em){display:flex;align-items:start;gap:24px;}"]),u=r.default.div.withConfig({displayName:"GsdCalculatorstyled__CalcSection",componentId:"sc-fzn05p-1"})(["display:grid;gap:16px;flex:1;& button{width:fit-content;}& p{font-family:",";}& span{padding:16px 0;font-family:",";line-height:normal;&:first-of-type{flex-grow:1;}&:last-of-type{margin-left:8px;}}"],o.U,o.U),m=r.default.div.withConfig({displayName:"GsdCalculatorstyled__FlightHeightWrapper",componentId:"sc-fzn05p-2"})(["display:flex;justify-content:space-between;gap:16px;& > div:not(:last-of-type){flex-grow:1;}& input{line-height:132%;}"]);
1var s=l(48617),d=l(46446),p=l(90310),g=l(81103);const h=[{value:"m",label:"m"},{value:"ft",label:"ft"}];var f=function(e){let{droneList:t=[],onCalcGsdh:l,onCalcGsdw:n,onCalcGsd:r,onChangeUnits:o,onShowResults:f}=e;const{0:v,1:y}=(0,a.useState)(!1),{0:E,1:b}=(0,a.useState)("placeholder"),{0:w,1:x}=(0,a.useState)(100),{0:A,1:C}=(0,a.useState)("m"),{0:T,1:S}=(0,a.useState)(""),{0:k,1:G}=(0,a.useState)(""),{0:H,1:P}=(0,a.useState)(""),{0:N,1:I}=(0,a.useState)(""),{0:$,1:F}=(0,a.useState)(""),U=[{value:"placeholder",label:"Select drone / sensor"}].concat((0,i.A)(t.map((e=>{let{name:t}=e;return{value:t,label:t}})))),D=[{label:"Width",value:k,handler:e=>{let{target:t}=e;t.value<0||G(t.value)}},{label:"Height",value:T,handler:e=>{let{target:t}=e;t.value<0||S(t.value)}}],_=[{label:"Width",value:N,handler:e=>{let{target:t}=e;t.value<0||I(t.value)}},{label:"Height",value:H,handler:e=>{let{target:t}=e;t.value<0||P(t.value)}},{label:"Focal Lenght",value:$,handler:e=>{let{target:t}=e;t.value<0||F(t.value)}}];return(0,a.useEffect)((()=>{(()=>{if(!(+w&&+T&&+k&&+H&&+N&&+$))return;let e;switch(A){case"m":o(" cm/px"),e=100*w;break;case"ft":o(" in/px"),e=12*w}const t=(e*H/($*T)).toFixed(2),a=(e*N/($*k)).toFixed(2),c=Math.max.apply(Math,(0,i.A)([t,a].filter((e=>e>0)))).toFixed(2);l(t),n(a),r(c),f(!0)})()}),[A,w,T,k,H,N,$]),a.createElement(c,null,a.createElement(u,null,a.createElement(s.A,{type:"H2",weight:"Thin",copy:"#1"}),a.createElement(s.A,{type:"H3",weight:"Thin",copy:"Pick a Drone / Sensor"}),a.createElement(d.A,{labelText:"Pick a Drone / Sensor",labelFor:"drone",placeholderText:"",fieldId:"drone",fieldName:"drone",value:E,options:U,onChange:e=>{let{target:a}=e;if("placeholder"===a.value)return b(a.value),y(!1),S(""),G(""),P(""),I(""),F(""),b(""),l(""),n(""),r(""),void f(!1);const i=t.find((e=>{let{name:t}=e;return t===a.value}));S(i.imageHeight),G(i.imageWidth),P(i.sensorHeight),I(i.sensorWidth),F(i.focalLength),b(a.value)}}),a.createElement(s.A,{type:"P",weight:"Regular",copy:"Choose a drone/sensor, or enter specific parameters in the customiser."})),a.createElement(u,null,a.createElement(s.A,{type:"H2",weight:"Thin",copy:"#2"}),a.createElement(s.A,{type:"H3",weight:"Thin",copy:"Flight Height"}),a.createElement(m,null,a.createElement(p.A,{labelText:"Flight Height",labelFor:"flightHeight",fieldId:"flightHeight",fieldName:"flightHeight",fieldType:"number",placeholderText:"",value:w,onChange:e=>{let{target:t}=e;t.value<0||x(t.value)}}),a.createElement(d.A,{labelText:"Units",labelFor:"units",placeholderText:"",fieldId:"units",fieldName:"units",value:A,options:h,onChange:e=>{let{target:t}=e;return C(t.value)}})),a.createElement(s.A,{type:"P",weight:"Regular",copy:"Mission flight height, in metres or feet."})),a.createElement(u,null,a.createElement(s.A,{type:"H2",weight:"Thin",copy:"#3"}),!v&&a.createElement(s.A,{type:"H3",weight:"Thin",copy:"Customise Sensor"}),v?a.createElement(a.Fragment,null,a.createElement(s.A,{type:"H3",weight:"Thin",copy:"Image dimensions"}),D.map((e=>{let{label:t,value:l,handler:n}=e;return a.createElement("div",{key:t,className:"flex middle-xs"},a.createElement("span",null,t),a.createElement(p.A,{labelText:t,labelFor:t,fieldId:t,fieldName:t,fieldType:"number",placeholderText:"",value:l,step:"10",onChange:n}),a.createElement("span",null,"px"))})),a.createElement(s.A,{type:"H3",weight:"Thin",copy:"Sensor dimensions"}),_.map((e=>{let{label:t,value:l,handler:n}=e;return a.createElement("div",{key:t,className:"flex middle-xs"},a.createElement("span",null,t),a.createElement(p.A,{labelText:t,labelFor:t,fieldId:t,fieldName:t,fieldType:"number",placeholderText:"",value:l,step:"0.1",onChange:n}),a.createElement("span",null,"mm"))}))):a.createElement(a.Fragment,null,a.createElement(g.A,{buttonType:"Primary Button",buttonCopy:"Update Parameters",onClick:()=>y(!0)}),a.createElement(s.A,{type:"P",weight:"Regular",copy:"Click the button to customise your sensor parameters."}))))},v=l(98078),y=l(53342),E=l(63544),b=l(57236),w=l(51844);function x(e){var t,l,n,i,r,o,c,u,m,s,d;let{data:p,pageContext:g,location:h}=e;const f=(null==p||null===(t=p.contentfulPageGsdCalculator)||void 0===t?void 0:t.pageMetaTitle)||"Heliguy - GSD Calculator",v=(null==p||null===(l=p.contentfulPageGsdCalculator)||void 0===l?void 0:l.pageMetaDescription)||"Heliguy - GSD Calculator",y=(null==p||null===(n=p.contentfulPageGsdCalculator)||void 0===n?void 0:n.mastheadTitle)||f,x=(0,E.b)({pageTitle:f,pageDescription:v,pageUrl:`https://www.heliguy.com${null==h?void 0:h.pathname}`,breadcrumbs:null==g?void 0:g.breadCrumbs}),A=(null==p||null===(i=p.contentfulPageGsdCalculator)||void 0===i||null===(r=i.mastheadBackgroun
1dImage)||void 0===r?void 0:r.url)||"https://placehold.co/400x400",C=(null==p||null===(o=p.contentfulPageGsdCalculator)||void 0===o||null===(c=o.mastheadBackgroundImage)||void 0===c||null===(u=c.gatsbyImageData)||void 0===u?void 0:u.width)||"400",T=(null==p||null===(m=p.contentfulPageGsdCalculator)||void 0===m||null===(s=m.mastheadBackgroundImage)||void 0===s||null===(d=s.gatsbyImageData)||void 0===d?void 0:d.height)||"400";return a.createElement(a.Fragment,null,a.createElement("html",{lang:"en"}),a.createElement("title",null,f),a.createElement("meta",{name:"description",content:v}),a.createElement("meta",{name:"keywords",content:""}),a.createElement("meta",{name:"robots",content:"index, follow"}),a.createElement("meta",{name:"author",content:"Heliguy"}),a.createElement(w.A,{title:y,description:v,pageObjectUrl:A,pageObjectUrlWidth:C,pageObjectUrlHeight:T,pageUrl:`https://www.heliguy.com${h.pathname}`}),a.createElement(b.A,{title:y,mainImage:A,pageUrl:`https://www.heliguy.com${h.pathname}`,pageDescription:v}),a.createElement("link",{rel:"preconnect",href:"https://images.ctfassets.net",crossOrigin:!0}),a.createElement("link",{rel:"canonical",href:`https://www.heliguy.com${g.breadcrumb.location}`}),x&&a.createElement("script",{type:"application/ld+json"},x))}function A(e){var t,l,i,r,o,c,u,m,d,p,g,h,E,b,w,x,A;let{data:C}=e;const T=(0,a.useRef)(null),{0:S,1:k}=(0,a.useState)(0),{0:G,1:H}=(0,a.useState)(0),{0:P,1:N}=(0,a.useState)(0),{0:I,1:$}=(0,a.useState)(!1),{0:F,1:U}=(0,a.useState)(""),D=null==C||null===(t=C.contentfulPageGsdCalculator)||void 0===t||null===(l=t.mastheadBackgroundImage)||void 0===l?void 0:l.gatsbyImageData,_=(null==C||null===(i=C.contentfulPageGsdCalculator)||void 0===i?void 0:i.mastheadTitle)||"",L=(null==C||null===(r=C.contentfulPageGsdCalculator)||void 0===r?void 0:r.mastheadSubtitle)||"",B=(null==C||null===(o=C.contentfulPageGsdCalculator)||void 0===o?void 0:o.resultsSectionTitle)||"",W=(null==C||null===(c=C.contentfulPageGsdCalculator)||void 0===c?void 0:c.resultsSectionSubtitle)||"",j=(null==C||null===(u=C.contentfulPageGsdCalculator)||void 0===u?void 0:u.descriptionSectionTitle)||"",R=(null==C||null===(m=C.contentfulPageGsdCalculator)||void 0===m?void 0:m.descriptionSectionSubtitle)||"",O=(null==C||null===(d=C.contentfulPageGsdCalculator)||void 0===d?void 0:d.descriptionSectionContent)||{},M=(null==C||null===(p=C.contentfulPageGsdCalculator)||void 0===p?void 0:p.drones)||[],z=(null==C||null===(g=C.contentfulPageGsdCalculator)||void 0===g||null===(h=g.relatedArticle)||void 0===h?void 0:h.articleTitle)||"",K=(null==C||null===(E=C.contentfulPageGsdCalculator)||void 0===E||null===(b=E.relatedArticle)||void 0===b?void 0:b.pageSlug)||"",q=(null==C||null===(w=C.contentfulPageGsdCalculator)||void 0===w||null===(x=w.relatedArticle)||void 0===x||null===(A=x.posterImage)||void 0===A?void 0:A.gatsbyImageData)||"";return(0,a.useEffect)((()=>{T.current&&T.current.scrollIntoView({behavior:"smooth",block:"center"})}),[I]),a.createElement("div",{className:"templateWrapper"},a.createElement(n.A,{type:"Primary",imgSrc:D,title:_,subtitle:L}),a.createElement("section",{className:"outer margin-160"},a.createElement("div",{className:"inner"},a.createElement(f,{droneList:M,onCalcGsdh:k,onCalcGsdw:H,onCalcGsd:N,onChangeUnits:U,onShowResults:$}))),I&&a.createElement("section",{className:"outer margin-160"},a.createElement("div",{className:"inner"},a.createElement(v.A,{title:B,subtitle:W}),a.createElement("div",{ref:T,className:"flex column gap-md"},a.createElement(s.A,{type:"H3",weight:"Thin",copy:`GSD: ${P} ${F}`}),a.createElement(s.A,{type:"H4",weight:"Thin",copy:`GSDw: ${G} ${F}`}),a.createElement(s.A,{type:"H4",weight:"Thin",copy:`GSDh: ${S} ${F}`})))),a.createElement("section",{className:"outer margin-160"},a.createElement("div",{className:"inner"},a.createElement(v.A,{title:j,subtitle:R}),a.createElement("div",{className:"row between-md top-xs"},a.createElement("div",{className:"col-xs-12 col-md-7"},a.createElement(s.A,{type:"BlockText",copyBlock:O,weight:"BlockText"})),a.createElement("aside",{className:"col-xs-12 col-md-4"},z&&a.createElement(y.A,{title:z,imgLink:q,link:K}))))))}}}]); 2//# sourceMappingURL=component---src-pages-gsd-calculator-jsx-2b78ee3a7beb63f6f358.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.