diff --git a/app/src/main/java/com/physphil/android/unitconverterultimate/models/Unit.java b/app/src/main/java/com/physphil/android/unitconverterultimate/models/Unit.java
index b39580b4..7d52adbd 100644
--- a/app/src/main/java/com/physphil/android/unitconverterultimate/models/Unit.java
+++ b/app/src/main/java/com/physphil/android/unitconverterultimate/models/Unit.java
@@ -108,6 +108,7 @@ public class Unit {
public static final int NAUTICAL_MILE = 410;
public static final int FURLONG = 411;
public static final int LIGHT_YEAR = 412;
+ public static final int ASTRONOMICAL_UNIT = 413;
public static final int KILOGRAM = 500;
public static final int POUND = 501;
@@ -195,7 +196,7 @@ public class Unit {
BIT, BYTE, KILOBIT, KILOBYTE, MEGABIT, MEGABYTE, GIGABIT, GIGABYTE, TERABIT, TERABYTE,
JOULE, KILOJOULE, CALORIE, KILOCALORIE, BTU, FT_LBF, IN_LBF, KILOWATT_HOUR, ELECTRON_VOLT,
MPG_US, MPG_UK, L_100K, KM_L, MILES_L,
- KILOMETRE, MILE, METRE, CENTIMETRE, MILLIMETRE, MICROMETRE, NANOMETRE, YARD, FEET, INCH, NAUTICAL_MILE, FURLONG, LIGHT_YEAR,
+ KILOMETRE, MILE, METRE, CENTIMETRE, MILLIMETRE, MICROMETRE, NANOMETRE, YARD, FEET, INCH, NAUTICAL_MILE, FURLONG, ASTRONOMICAL_UNIT, LIGHT_YEAR,
KILOGRAM, POUND, GRAM, MILLIGRAM, OUNCE, GRAIN, STONE, METRIC_TON, SHORT_TON, LONG_TON,
WATT, KILOWATT, MEGAWATT, HP, HP_UK, FT_LBF_S, CALORIE_S, BTU_S, KVA,
MEGAPASCAL, KILOPASCAL, PASCAL, BAR, PSI, PSF, ATMOSPHERE, TECHNICAL_ATMOSPHERE, MMHG, TORR,
diff --git a/app/src/main/java/com/physphil/android/unitconverterultimate/util/Conversions.java b/app/src/main/java/com/physphil/android/unitconverterultimate/util/Conversions.java
index ef70b16a..4a2262d5 100644
--- a/app/src/main/java/com/physphil/android/unitconverterultimate/util/Conversions.java
+++ b/app/src/main/java/com/physphil/android/unitconverterultimate/util/Conversions.java
@@ -232,6 +232,7 @@ private void getLengthConversions() {
units.add(new Unit(INCH, R.string.inch, 0.0254, 39.3700787401574803));
units.add(new Unit(NAUTICAL_MILE, R.string.nautical_mile, 1852.0, 0.000539956803455723542));
units.add(new Unit(FURLONG, R.string.furlong, 201.168, 0.0049709695379));
+ units.add(new Unit(ASTRONOMICAL_UNIT, R.string.astronomical_unit, 149597870700.0, 0.0000000000066845871222684454959959533));
units.add(new Unit(LIGHT_YEAR, R.string.light_year, 9460730472580800.0, 0.0000000000000001057000834024615463709));
addConversion(Conversion.LENGTH, new Conversion(Conversion.LENGTH, R.string.length, units));
}
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 28d33d58..58525ca4 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -144,6 +144,7 @@
Zoll (in)
Seemeile
Furlong
+ Astronomische Einheit
Lichtjahr
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index 98f4c136..f72aaa9b 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -144,6 +144,7 @@
Pulgada
Milla Náutica
Furlong
+ Unidad astronómica
Año Luz
diff --git a/app/src/main/res/values-fa/strings.xml b/app/src/main/res/values-fa/strings.xml
index c3a2715a..63181434 100644
--- a/app/src/main/res/values-fa/strings.xml
+++ b/app/src/main/res/values-fa/strings.xml
@@ -144,6 +144,7 @@
اینچ
مایل دریایی
فرلانگ
+ وحدة فلكية
سال نوری
@@ -269,4 +270,4 @@
دلار آمریکا
رند آفریقای جنوبی
-
\ No newline at end of file
+
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index 93b7af8d..3f244321 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -145,6 +145,7 @@
Pouce
Mille marin
Stade
+ Unité astronomique
Année lumière
diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml
index 9dfcc56a..a6b01c08 100644
--- a/app/src/main/res/values-hr/strings.xml
+++ b/app/src/main/res/values-hr/strings.xml
@@ -144,6 +144,7 @@
Inč
Nautička Milja
Osmina milje
+ Astronomska jedinica
Svijetlosna Godina
diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml
index 7d3683cb..b719409f 100644
--- a/app/src/main/res/values-hu/strings.xml
+++ b/app/src/main/res/values-hu/strings.xml
@@ -147,6 +147,7 @@
Hüvelyk
Tengeri Mérföld
Furlong
+ Csillagászati egység
Fényév
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index 1ef30aff..2f1f51ff 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -144,6 +144,7 @@
Pollice
Miglio Nautico
Furlong
+ Unità astronomica
Anno Luce
@@ -269,4 +270,4 @@
Dollaro Americano
Rand Sudafricano
-
\ No newline at end of file
+
diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml
index 137c91b0..7e97f4c0 100644
--- a/app/src/main/res/values-ja/strings.xml
+++ b/app/src/main/res/values-ja/strings.xml
@@ -144,6 +144,7 @@
インチ
海里
ハロン
+ 天文単位
光年
@@ -269,4 +270,4 @@
米ドル
南アフリカ・ランド
-
\ No newline at end of file
+
diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml
index cd7b823e..4cfa5848 100644
--- a/app/src/main/res/values-pt-rBR/strings.xml
+++ b/app/src/main/res/values-pt-rBR/strings.xml
@@ -143,6 +143,7 @@
Polegada
Milha náutica
Furlong
+ Unidade astronômica
Ano-Luz
@@ -271,4 +272,4 @@
Escolha o idioma a ser usado em todo o aplicativo
Idioma
-
\ No newline at end of file
+
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index a75d2a84..992b5706 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -144,6 +144,7 @@
Дюйм
Морская миля
Фурлонг
+ Астрономическая единица
Световой год
@@ -269,4 +270,4 @@
Доллар США
Южноафриканский рэнд
-
\ No newline at end of file
+
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index 5af53007..1c538e7a 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -144,6 +144,7 @@
İnç
Deniz Mili
Furlong
+ Astronomik birim
Işık Yılı
@@ -269,4 +270,4 @@
Amerikan Doları
Güney Afrika Randı
-
\ No newline at end of file
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 0f6c8358..2cb50d15 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -160,6 +160,7 @@
Inch
Nautical Mile
Furlong
+ Astronimical Unit
Light Year
@@ -293,4 +294,4 @@
Icelandic Krona
Norwegian
-
\ No newline at end of file
+
diff --git a/app/src/test/java/com/physphil/android/unitconverterultimate/test/ConversionTests.java b/app/src/test/java/com/physphil/android/unitconverterultimate/test/ConversionTests.java
index 748a91b7..ab5e07e2 100644
--- a/app/src/test/java/com/physphil/android/unitconverterultimate/test/ConversionTests.java
+++ b/app/src/test/java/com/physphil/android/unitconverterultimate/test/ConversionTests.java
@@ -189,6 +189,10 @@ public void testLength()
verify(view).showResult(AdditionalMatchers.eq(0.0000026251, DELTA_10));
mPresenter.convert(5.5, length.getUnitById(LIGHT_YEAR), length.getUnitById(KILOMETRE));
verify(view).showResult(eq(52034017599194.4));
+ mPresenter.convert(5.5, length.getUnitById(MILE), length.getUnitById(ASTRONOMICAL_UNIT));
+ verify(view).showResult(eq(5.91679009773499403156946130719936E-8));
+ mPresenter.convert(5.5, length.getUnitById(ASTRONOMICAL_UNIT), length.getUnitById(FURLONG));
+ verify(view).showResult(eq(4090055520.014216222415));
}
@Test
@@ -396,4 +400,4 @@ public void testVolume()
mPresenter.convert(5.5, volume.getUnitById(CUBIC_YARD), volume.getUnitById(TEASPOON));
verify(view, atLeastOnce()).showResult(AdditionalMatchers.eq(853138.298312504, DELTA_9));
}
-}
\ No newline at end of file
+}