From d8ef1c9f400096ad6a3dcade6737ee8e32115f03 Mon Sep 17 00:00:00 2001 From: Peter Javorsky Date: Thu, 17 Sep 2020 19:20:59 +0200 Subject: [PATCH] First attempt to add Doppler shift frequency calculations --- .../ui/adapters/TransmitterAdapter.kt | 29 ++++++++++ .../ui/fragments/PolarViewFragment.kt | 1 + app/src/main/res/layout/item_transmitter.xml | 57 ++++++++++++++++++- app/src/main/res/values-ru/strings.xml | 4 ++ app/src/main/res/values/strings.xml | 6 ++ build.gradle | 3 +- gradle/wrapper/gradle-wrapper.properties | 24 +------- 7 files changed, 100 insertions(+), 24 deletions(-) diff --git a/app/src/main/java/com/rtbishop/look4sat/ui/adapters/TransmitterAdapter.kt b/app/src/main/java/com/rtbishop/look4sat/ui/adapters/TransmitterAdapter.kt index b9091688..a1b4d65b 100644 --- a/app/src/main/java/com/rtbishop/look4sat/ui/adapters/TransmitterAdapter.kt +++ b/app/src/main/java/com/rtbishop/look4sat/ui/adapters/TransmitterAdapter.kt @@ -27,10 +27,17 @@ import androidx.recyclerview.widget.RecyclerView import com.rtbishop.look4sat.R import com.rtbishop.look4sat.data.Transmitter import com.rtbishop.look4sat.databinding.ItemTransmitterBinding +import com.rtbishop.look4sat.utility.PassPredictor +import java.util.* class TransmitterAdapter : RecyclerView.Adapter() { private var transmittersList = emptyList() + private lateinit var predictor: PassPredictor + + fun setPredictor(predict: PassPredictor) { + predictor = predict + } fun setList(list: List) { transmittersList = list @@ -65,6 +72,11 @@ class TransmitterAdapter : RecyclerView.Adapter + + + + + + + app:layout_constraintTop_toBottomOf="@+id/trans_uplink_doppler" /> + + + + diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 2ba2204a..7f04e73e 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -92,6 +92,10 @@ Восход.: %.4f - %.4f MHz Нисход.: %.4f MHz Нисход.: %.4f - %.4f MHz + Восход.: %.4f MHz + Восход.: %.4f - %.4f MHz + Нисход.: %.4f MHz + Нисход.: %.4f - %.4f MHz Проведите по экрану вниз, чтобы обновить список пролетов для выбранных спутников diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 3d8afbe9..c124bd81 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -78,6 +78,8 @@ Mode: null Uplink: null Downlink: null + Current uplink: null + Current downlink: null No transceivers found for this satellite Missing permissions @@ -108,6 +110,10 @@ Uplink: %.4f - %.4f MHz Downlink: %.4f MHz Downlink: %.4f - %.4f MHz + Current uplink: %.4f MHz + Current uplink: %.4f - %.4f MHz + Current downlink: %.4f MHz + Current downlink: %.4f - %.4f MHz Swipe the screen to refresh the list of passes for selected satellites diff --git a/build.gradle b/build.gradle index ff0f5156..057169d3 100644 --- a/build.gradle +++ b/build.gradle @@ -26,9 +26,10 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:3.6.3' + classpath 'com.android.tools.build:gradle:4.0.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72" classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.2.2" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10" } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b02380e4..a769df24 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,26 +1,6 @@ -# -# Look4Sat. Amateur radio and weather satellite tracker and passes predictor for Android. -# Copyright (C) 2019, 2020 Arty Bishop (bishop.arty@gmail.com) -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# - -#Mon Feb 24 22:26:03 GMT 2020 +#Thu Sep 17 13:43:53 CEST 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip -distributionSha256Sum=abc10bcedb58806e8654210f96031db541bcd2d6fc3161e81cb0572d6a15e821 +distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip