v1.4.4 - Added custom TLE file import from file/url and PolarView rotation using sensors data

This commit is contained in:
Arty Bishop committed 2020-05-27 15:37:17 +01:00
1 parent d8e4bd7eb7
commit e38ad2fe8b
14 files changed
+37 -14

No files matched your search

+2
View File
@@ -7,6 +7,8 @@ The [Libre Space Foundation](https://libre.space/) team is also behind the epic
For TLE data calculation and passes prediction Look4Sat uses the mavenized version of [predict4java](https://github.com/davidmoten/predict4java) library, created by [David A. B. Johnson, G4DPZ](https://github.com/g4dpz) and [Dave Moten](https://github.com/davidmoten). Thank you guys for your hard work making this lib efficient and easy to use! For TLE data calculation and passes prediction Look4Sat uses the mavenized version of [predict4java](https://github.com/davidmoten/predict4java) library, created by [David A. B. Johnson, G4DPZ](https://github.com/g4dpz) and [Dave Moten](https://github.com/davidmoten). Thank you guys for your hard work making this lib efficient and easy to use!
Also, I'd like to mention Dr T.S. Kelso for his invaluable contribution to the industry and for his [Celestrak](https://celestrak.com) website, that stores, updates and provides access to TLE data.
The app is built using Dagger2, Retrofit2, Kotlin and Kotlin coroutines, Architecture Components and Jetpack Navigation. The app is built using Dagger2, Retrofit2, Kotlin and Kotlin coroutines, Architecture Components and Jetpack Navigation.
<p float="left"> <p float="left">
+6
View File
@@ -43,6 +43,11 @@ android {
} }
} }
} }
configurations {
all {
exclude module: 'commons-logging'
}
}
compileOptions { compileOptions {
sourceCompatibility = 1.8 sourceCompatibility = 1.8
targetCompatibility = 1.8 targetCompatibility = 1.8
@@ -82,6 +87,7 @@ dependencies {
// retrofit // retrofit
implementation "com.squareup.retrofit2:retrofit:$retrofit" implementation "com.squareup.retrofit2:retrofit:$retrofit"
implementation "com.squareup.retrofit2:converter-gson:$retrofit" implementation "com.squareup.retrofit2:converter-gson:$retrofit"
implementation "com.squareup.okhttp3:okhttp:$okhttp"
//dagger //dagger
implementation "com.google.dagger:dagger:$dagger" implementation "com.google.dagger:dagger:$dagger"
@@ -40,7 +40,7 @@ class RemoteDataSource @Inject constructor(
withContext(Dispatchers.IO) { withContext(Dispatchers.IO) {
urlList.forEach { urlList.forEach {
val request = Request.Builder().url(it.url).build() val request = Request.Builder().url(it.url).build()
val stream = client.newCall(request).execute().body()?.byteStream() val stream = client.newCall(request).execute().body?.byteStream()
streamTable[it.url] = stream streamTable[it.url] = stream
} }
} }
@@ -100,12 +100,12 @@ class TransmitterAdapter : RecyclerView.Adapter<TransmitterAdapter.TransmitterHo
if (transmitter.isInverted) { if (transmitter.isInverted) {
binding.transInverted.text = String.format( binding.transInverted.text = String.format(
context.getString(R.string.trans_inverted), context.getString(R.string.trans_inverted),
context.getString(android.R.string.yes) context.getString(R.string.btn_yes)
) )
} else { } else {
binding.transInverted.text = String.format( binding.transInverted.text = String.format(
context.getString(R.string.trans_inverted), context.getString(R.string.trans_inverted),
context.getString(android.R.string.no) context.getString(R.string.btn_no)
) )
} }
} }
+2 -2
View File
@@ -69,7 +69,7 @@
android:id="@+id/dialog_btn_negative" android:id="@+id/dialog_btn_negative"
style="@style/DialogText" style="@style/DialogText"
android:layout_marginEnd="24dp" android:layout_marginEnd="24dp"
android:text="@android:string/cancel" android:text="@string/btn_cancel"
app:layout_constraintBaseline_toBaselineOf="@+id/dialog_btn_positive" app:layout_constraintBaseline_toBaselineOf="@+id/dialog_btn_positive"
app:layout_constraintEnd_toStartOf="@+id/dialog_btn_positive" /> app:layout_constraintEnd_toStartOf="@+id/dialog_btn_positive" />
@@ -80,7 +80,7 @@
android:layout_marginEnd="8dp" android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:gravity="end" android:gravity="end"
android:text="@android:string/ok" android:text="@string/btn_ok"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/dialog_recycler" /> app:layout_constraintEnd_toEndOf="@+id/dialog_recycler" />
@@ -61,8 +61,8 @@
<TextView <TextView
android:id="@+id/tleSourcesBtnNeg" android:id="@+id/tleSourcesBtnNeg"
style="@style/DialogText" style="@style/DialogText"
android:layout_marginEnd="32dp" android:layout_marginEnd="24dp"
android:text="@android:string/cancel" android:text="@string/btn_cancel"
app:layout_constraintBaseline_toBaselineOf="@+id/tleSourcesBtnPos" app:layout_constraintBaseline_toBaselineOf="@+id/tleSourcesBtnPos"
app:layout_constraintEnd_toStartOf="@+id/tleSourcesBtnPos" app:layout_constraintEnd_toStartOf="@+id/tleSourcesBtnPos"
app:layout_constraintHorizontal_chainStyle="spread_inside" /> app:layout_constraintHorizontal_chainStyle="spread_inside" />
@@ -71,7 +71,7 @@
android:id="@+id/tleSourcesBtnPos" android:id="@+id/tleSourcesBtnPos"
style="@style/DialogText" style="@style/DialogText"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:text="@android:string/ok" android:text="@string/btn_ok"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/tleSourceBtnAdd" /> app:layout_constraintEnd_toEndOf="@+id/tleSourceBtnAdd" />
+10 -5
View File
@@ -61,7 +61,7 @@
<string name="pref_other_title">Другие настройки</string> <string name="pref_other_title">Другие настройки</string>
<string name="pref_refresh_rate_title">Частота обновления, мс</string> <string name="pref_refresh_rate_title">Частота обновления, мс</string>
<string name="pref_refresh_rate_input_error">Введите значение между 250мс и 10000мс</string> <string name="pref_refresh_rate_input_error">Введите значение между 250мс и 10000мс</string>
<string name="pref_compass_title">Используйте компас при отображении полярных координат</string> <string name="pref_compass_title">Использовать компас при отображении полярных координат</string>
<string name="no_mode">Модуляция: нет</string> <string name="no_mode">Модуляция: нет</string>
<string name="no_uplink">Восход.: нет</string> <string name="no_uplink">Восход.: нет</string>
@@ -80,8 +80,8 @@
<string name="pat_elevation">Элев.: %.1f°</string> <string name="pat_elevation">Элев.: %.1f°</string>
<string name="pat_latitude">Шир.: %.1f°</string> <string name="pat_latitude">Шир.: %.1f°</string>
<string name="pat_longitude">Дол.: %.1f°</string> <string name="pat_longitude">Дол.: %.1f°</string>
<string name="pat_distance">Дист.: %.0f км</string> <string name="pat_distance">Дист.: %.0fкм</string>
<string name="pat_altitude">Выс.: %.0f км</string> <string name="pat_altitude">Выс.: %.0fкм</string>
<string name="trans_mode">Модуляция: %s</string> <string name="trans_mode">Модуляция: %s</string>
<string name="trans_inverted">Инверсия: %s</string> <string name="trans_inverted">Инверсия: %s</string>
@@ -132,8 +132,13 @@
в лицензии <a href="https://gnu.org/licenses/old-licenses/gpl-2.0.en.html">GNU GPLv2</a>. в лицензии <a href="https://gnu.org/licenses/old-licenses/gpl-2.0.en.html">GNU GPLv2</a>.
</string> </string>
<string name="map_gsp">СТЦ</string> <string name="btn_yes">Да</string>
<string name="btn_no">Нет</string>
<string name="btn_ok">OK</string>
<string name="btn_cancel">Отмена</string>
<string name="btn_all_none">Все/Нет</string> <string name="btn_all_none">Все/Нет</string>
<string name="map_gsp">СТЦ</string>
<string name="tle_source">Источник TLE</string> <string name="tle_source">Источник TLE</string>
<string name="https_only">Пожалуйста, используйте протокол HTTPS</string> <string name="https_only">Используйте протокол HTTPS</string>
</resources> </resources>
+6 -1
View File
@@ -152,8 +152,13 @@
<a href="https://gnu.org/licenses/old-licenses/gpl-2.0.en.html">GNU GPLv2</a> for details. <a href="https://gnu.org/licenses/old-licenses/gpl-2.0.en.html">GNU GPLv2</a> for details.
</string> </string>
<string name="map_gsp">GSP</string> <string name="btn_yes">Yes</string>
<string name="btn_no">No</string>
<string name="btn_ok">OK</string>
<string name="btn_cancel">Cancel</string>
<string name="btn_all_none">All/None</string> <string name="btn_all_none">All/None</string>
<string name="map_gsp">GSP</string>
<string name="tle_source">TLE source</string> <string name="tle_source">TLE source</string>
<string name="https_only">Please use HTTPS URLs only</string> <string name="https_only">Please use HTTPS URLs only</string>
<string name="placeholder" translatable="false">Placeholder</string> <string name="placeholder" translatable="false">Placeholder</string>
+1
View File
@@ -58,6 +58,7 @@ ext {
room = '2.2.5' room = '2.2.5'
retrofit = '2.9.0' retrofit = '2.9.0'
okhttp = '4.7.2'
dagger = '2.27' dagger = '2.27'
@@ -0,0 +1,4 @@
Added PolarView rotation using sensors data
Added custom TLE import (file/url)
Fixed "All/None" selection button behaviour
Minor fixes and code cleanup
Binary file not shown.

Before

Width:  |  Height:  |  Size: 667 KiB

After

Width:  |  Height:  |  Size: 273 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 KiB

After

Width:  |  Height:  |  Size: 667 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 227 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 802 KiB

After

Width:  |  Height:  |  Size: 879 KiB