added option for nautical units (#69)

This commit is contained in:
Bernhard R. Fischer 2018-07-09 21:04:28 +02:00 committed by Bartek Fabiszewski
parent 298f52eed3
commit 24a91e8cc4
4 changed files with 10 additions and 0 deletions

View File

@ -177,6 +177,7 @@
<select name="units" onchange="setUnits(this.options[this.selectedIndex].value);"> <select name="units" onchange="setUnits(this.options[this.selectedIndex].value);">
<option value="metric"<?= (uConfig::$units == "metric") ? " selected" : "" ?>><?= $lang["metric"] ?></option> <option value="metric"<?= (uConfig::$units == "metric") ? " selected" : "" ?>><?= $lang["metric"] ?></option>
<option value="imperial"<?= (uConfig::$units == "imperial") ? " selected" : "" ?>><?= $lang["imperial"] ?></option> <option value="imperial"<?= (uConfig::$units == "imperial") ? " selected" : "" ?>><?= $lang["imperial"] ?></option>
<option value="nautical"<?= (uConfig::$units == "nautical") ? " selected" : "" ?>><?= $lang["nautical"] ?></option>
</select> </select>
</form> </form>
</div> </div>

View File

@ -25,6 +25,13 @@ if (units == 'imperial') {
unit_m = 'ft'; unit_m = 'ft';
factor_km = 0.62; // to miles factor_km = 0.62; // to miles
unit_km = 'mi'; unit_km = 'mi';
} else if (units == 'nautical') {
factor_kmh = 0.54; //to knots
unit_kmh = 'kt';
factor_m = 1; //
unit_m = 'm';
factor_km = 0.54; // to nautical miles
unit_km = 'nm';
} else { } else {
factor_kmh = 1; factor_kmh = 1;
unit_kmh = 'km/h'; unit_kmh = 'km/h';

View File

@ -48,6 +48,7 @@ $lang["api"] = "Karten API";
$lang["units"] = "Maßsystem"; $lang["units"] = "Maßsystem";
$lang["metric"] = "Metrisches"; $lang["metric"] = "Metrisches";
$lang["imperial"] = "Angloamerikanisches"; $lang["imperial"] = "Angloamerikanisches";
$lang["nautical"] = "Nautisch";
$lang["adminmenu"] = "Verwaltung"; $lang["adminmenu"] = "Verwaltung";
?> ?>

View File

@ -77,6 +77,7 @@ $lang["api"] = "Map API";
$lang["units"] = "Units"; $lang["units"] = "Units";
$lang["metric"] = "Metric"; $lang["metric"] = "Metric";
$lang["imperial"] = "Imperial/US"; $lang["imperial"] = "Imperial/US";
$lang["nautical"] = "Nautical";
$lang["adminmenu"] = "Administration"; $lang["adminmenu"] = "Administration";
$lang["passwordrepeat"] = "Repeat password"; $lang["passwordrepeat"] = "Repeat password";
$lang["passwordenter"] = "Enter password"; $lang["passwordenter"] = "Enter password";