Satellite tracker and pass predictor for Android, inspired by Gpredict
Kotlin amsatcelestrakgpsham-radiohamlibhamradiokotlinnasaradiosatellitesatellite-datasatellite-positionsatellite-predictionsatellitessatnogssdrspacespacexstarlink
Added SatItem and SatTrans relation to retrieve trans modes
Arty Bishope8208b793451
diff --git a/app/src/main/java/com/rtbishop/look4sat/data/database/SatelliteDao.kt b/app/src/main/java/com/rtbishop/look4sat/data/database/SatelliteDao.ktindex 82eec9b2..e8b90027 100644--- a/app/src/main/java/com/rtbishop/look4sat/data/database/SatelliteDao.kt+++ b/app/src/main/java/com/rtbishop/look4sat/data/database/SatelliteDao.kt@@ -29,6 +29,7 @@ interface SatelliteDao {// Query+ @Transaction@Query("SELECT catNum, name, isSelected FROM entries ORDER BY name ASC")fun getAllSatItems(): Flow<List<SatItem>>diff --git a/app/src/main/java/com/rtbishop/look4sat/data/model/SatItem.kt b/app/src/main/java/com/rtbishop/look4sat/data/model/SatItem.ktindex 687652e6..b5902a1f 100644--- a/app/src/main/java/com/rtbishop/look4sat/data/model/SatItem.kt+++ b/app/src/main/java/com/rtbishop/look4sat/data/model/SatItem.kt@@ -17,4 +17,17 @@*/package com.rtbishop.look4sat.data.model-class SatItem(val catNum: Int, val name: String, var isSelected: Boolean)+import androidx.room.Relation++data class SatItem(+ val catNum: Int,+ val name: String,+ var isSelected: Boolean,+ @Relation(+ parentColumn = "catNum",+ entity = SatTrans::class,+ entityColumn = "catNum",+ projection = ["mode"]+ )+ val modes: List<String>+)diff --git a/app/src/main/java/com/rtbishop/look4sat/data/repository/PrefsRepo.kt b/app/src/main/java/com/rtbishop/look4sat/data/repository/PrefsRepo.ktindex 9e5be0aa..f6497fb0 100644--- a/app/src/main/java/com/rtbishop/look4sat/data/repository/PrefsRepo.kt+++ b/app/src/main/java/com/rtbishop/look4sat/data/repository/PrefsRepo.kt@@ -1,20 +1,3 @@-/*- * Look4Sat. Amateur radio satellite tracker and pass predictor.- * Copyright (C) 2019-2021 Arty Bishop ([email protected])- *- * 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 3 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, see <https://www.gnu.org/licenses/>.- *//** Look4Sat. Amateur radio satellite tracker and pass predictor.* Copyright (C) 2019-2021 Arty Bishop ([email protected])