Skip to content
Open
346 changes: 223 additions & 123 deletions js/configurator_main.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions js/globalSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ var globalSettings = {
configuratorTreeLocation: 'master',
cliAutocomplete: true,
assistnowApiKey: null,
googleApiKey: null,
assistnowOfflineData: [],
assistnowOfflineDate: 0,
store: null,
Expand Down
108 changes: 108 additions & 0 deletions locale/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -6225,6 +6225,114 @@
"gpsOptionsAssistnowToken": {
"message": "AssitNow Token"
},
"gpsOptionsGoogleApiKey": {
"message": "Google Geolocation API Key"
},
"googleLocationServices": {
"message": "Google Location & Weather Services"
},
"googleLocationApiKey": {
"message": "API Key"
},
"googleLocationTestButton": {
"message": "Test"
},
"googleLocationTestSuccess": {
"message": "Success! Location: $1, $2 (accuracy: $3 m)"
},
"googleLocationTestNoKey": {
"message": "Please enter an API key first."
},
"googleLocationTestError": {
"message": "Error: $1"
},
"googleLocationTestWeather": {
"message": "Weather API OK \u2014 Wind: $1 $2"
},
"googleLocationTestWeatherFail": {
"message": "Weather API failed: $1 \u2014 Enable the Weather API in Google Cloud Console."
},
"googleLocationHelpTitle": {
"message": "Google Location Services"
},
"googleLocationHelpBenefit": {
"message": "When a Google API key is configured, the Mission Control tab can determine your approximate location using Google's IP-based geolocation. This lets you center the map on your area before your drone has a GPS fix, or when planning missions offline. If the Weather API is also enabled, real-time weather conditions (wind, temperature, UV, etc.) are shown in the Conditions panel."
},
"googleLocationHelpHowTitle": {
"message": "How to get an API key:"
},
"googleLocationHelpStep1": {
"message": "Go to the <a href='https://console.cloud.google.com/' target='_blank' style='color:#5880a0;'>Google Cloud Console</a>"
},
"googleLocationHelpStep2": {
"message": "Create a new project (or select an existing one)"
},
"googleLocationHelpStep3": {
"message": "Go to <strong>APIs &amp; Services → Library</strong> and enable the <strong>Geolocation API</strong>, <strong>Geocoding API</strong>, and the <strong>Weather API</strong>"
},
"googleLocationHelpStep4": {
"message": "Go to <strong>APIs &amp; Services → Credentials</strong> and click <strong>Create Credentials → API Key</strong>"
},
"googleLocationHelpStep5": {
"message": "Copy the key and paste it here. For security, restrict the key to the Geolocation, Geocoding, and Weather APIs only."
},
"googleLocationHelpNote": {
"message": "Google offers a free tier that includes up to 40,000 geolocation requests and 500 weather lookups per month. Your key is stored locally on your computer and is never shared."
},
"googleLocationHelpClose": {
"message": "Close"
},
"apiLocationBannerPrefix": {
"message": "API Location (IP-based)"
},
"apiLocationBannerWarning": {
"message": "accuracy may be low"
},
"conditionsInfoHead": {
"message": "Conditions Information"
},
"conditionsWaiting": {
"message": "Waiting for location…"
},
"conditionsNoKey": {
"message": "Configure Google API key in Options"
},
"conditionsWind": {
"message": "Wind: "
},
"conditionsGusts": {
"message": "Gusts: "
},
"conditionsWindDir": {
"message": "Direction: "
},
"conditionsTemp": {
"message": "Temperature: "
},
"conditionsFeelsLike": {
"message": "Feels Like: "
},
"conditionsHumidity": {
"message": "Humidity: "
},
"conditionsUV": {
"message": "UV Index: "
},
"conditionsPrecip": {
"message": "Precipitation: "
},
"conditionsThunder": {
"message": "Thunderstorm: "
},
"conditionsVisibility": {
"message": "Visibility: "
},
"conditionsCloud": {
"message": "Cloud Cover: "
},
"conditionsUnavailable": {
"message": "Weather data unavailable"
},
"gpsLoadAssistnowOfflineButton": {
"message": "Load AssistNow Offline"
},
Expand Down
1 change: 1 addition & 0 deletions src/css/tabs/mission_planer.css
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@
top: 165px;
}


.tab-mission-control .geozoneVerticesTable {
width: 100%;
text-align: center;
Expand Down
65 changes: 65 additions & 0 deletions tabs/mission_control.html
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,71 @@
</div> -->
</div>
</div>

<!-- Conditions Information panel — weather from Google Weather API -->
<!-- Uses coordinates from drone GPS or Google Geolocation API -->
<div id="missionPlannerConditions" class="gui_box grey" style="display: none;">
<div class="gui_box_titlebar">
<div class="spacer_box_title" data-i18n="conditionsInfoHead"></div>
<div class="btnMenu btnMenuIcon show_btn" id="showHideConditionsButton">
<a class="ic_hide" href="#" i18n_title="missionTitleHide" aria-label="Hide conditions information"><span class="sr-only">Hide conditions information</span></a>
</div>
</div>
<div class="spacer" id="ConditionsContent">
<div id="conditionsLoading" style="color: #999; font-style: italic; padding: 4px 0;" data-i18n="conditionsWaiting"></div>
<div id="conditionsData" style="display: none;">
<div style="padding-bottom: 2px; font-weight: bold;">
<span id="condWeather" style="color: #3394b5"></span>
</div>
<div style="padding-bottom: 2px;">
<span data-i18n="conditionsWind"></span>
<span id="condWind" style="color: #3394b5"></span>
</div>
<div style="padding-bottom: 2px;">
<span data-i18n="conditionsGusts"></span>
<span id="condGusts" style="color: #3394b5"></span>
</div>
<div style="padding-bottom: 2px;">
<span data-i18n="conditionsWindDir"></span>
<span id="condWindDir" style="color: #3394b5"></span>
</div>
<div style="padding-bottom: 2px;">
<span data-i18n="conditionsTemp"></span>
<span id="condTemp" style="color: #3394b5"></span>
</div>
<div style="padding-bottom: 2px;">
<span data-i18n="conditionsFeelsLike"></span>
<span id="condFeelsLike" style="color: #3394b5"></span>
</div>
<div style="padding-bottom: 2px;">
<span data-i18n="conditionsHumidity"></span>
<span id="condHumidity" style="color: #3394b5"></span>
</div>
<div style="padding-bottom: 2px;">
<span data-i18n="conditionsUV"></span>
<span id="condUV" style="color: #3394b5"></span>
</div>
<div style="padding-bottom: 2px;">
<span data-i18n="conditionsPrecip"></span>
<span id="condPrecip" style="color: #3394b5"></span>
</div>
<div style="padding-bottom: 2px;">
<span data-i18n="conditionsThunder"></span>
<span id="condThunder" style="color: #3394b5"></span>
</div>
<div style="padding-bottom: 2px;">
<span data-i18n="conditionsVisibility"></span>
<span id="condVisibility" style="color: #3394b5"></span>
</div>
<div style="padding-bottom: 2px;">
<span data-i18n="conditionsCloud"></span>
<span id="condCloud" style="color: #3394b5"></span>
</div>
</div>
<div id="conditionsError" style="display: none; color: #c00; font-size: 0.9em;"></div>
</div>
</div>

</div>
</div>
<div class="cf_column threefourth_left" style="height: 100%;">
Expand Down
Loading