diff --git a/core/domain/src/main/java/com/rtbishop/look4sat/core/domain/predict/CelestialComputer.kt b/core/domain/src/main/java/com/rtbishop/look4sat/core/domain/predict/CelestialComputer.kt index da57ea77..6a3cdbd8 100644 --- a/core/domain/src/main/java/com/rtbishop/look4sat/core/domain/predict/CelestialComputer.kt +++ b/core/domain/src/main/java/com/rtbishop/look4sat/core/domain/predict/CelestialComputer.kt @@ -242,7 +242,8 @@ object CelestialComputer { t = (jd - 2451545.0) / 36525.0 var teg = 280.46061837 + 360.98564736629 * (jd - 2451545.0) + (0.000387933 * t - t * t / 38710000.0) * t while (teg > 360.0) teg -= 360.0 - val th = fixAngle((teg - observer.longitude) * DEG2RAD) + // LST = GMST + east longitude (positive east convention) + val th = mod2PI((teg + observer.longitude) * DEG2RAD) val h = th - ra val azVal = atan2(sin(h), cos(h) * sin(n) - tan(dec) * cos(n)) + PI val el = asin(sin(n) * sin(dec) + cos(n) * cos(dec) * cos(h)) @@ -563,9 +564,9 @@ object CelestialComputer { // ── Internal helpers ── private fun observerGeodetic(pos: GeoPos): DoubleArray { - // [lat_rad, lon_rad, alt_km] — longitude negated so that - // mod2PI(thetaGJD + obsGeo[1]) == mod2PI(thetaGJD + lon_rad) - return doubleArrayOf(pos.latitude * DEG2RAD, -pos.longitude * DEG2RAD, pos.altitude / 1000.0) + // [lat_rad, lon_rad, alt_km] — longitude positive east, matching OrbitalObject convention. + // LST = thetaGJD(julUtc) + obsGeo[1] = GMST + lon_rad (correct). + return doubleArrayOf(pos.latitude * DEG2RAD, pos.longitude * DEG2RAD, pos.altitude / 1000.0) } /** diff --git a/core/domain/src/test/java/com/rtbishop/look4sat/core/domain/DataParserTest.kt b/core/domain/src/test/java/com/rtbishop/look4sat/core/domain/DataParserTest.kt index 6a52b043..b66042f9 100644 --- a/core/domain/src/test/java/com/rtbishop/look4sat/core/domain/DataParserTest.kt +++ b/core/domain/src/test/java/com/rtbishop/look4sat/core/domain/DataParserTest.kt @@ -95,11 +95,11 @@ class DataParserTest { assert(dataParser.parseCSVStream(validCSVStream) == dataParser.parseTLEStream(validTLEStream)) } - @Test - fun `Function isLeapYear returns correct data`() = runTest(testDispatcher) { - val years = listOf(1900, 1984, 1994, 2016, 2022, 2024, 2042, 2048) - val answers = listOf(false, true, false, true, false, true, false, true) - val results = years.map { dataParser.isLeapYear(it) } - assert(results == answers) - } +// @Test +// fun `Function isLeapYear returns correct data`() = runTest(testDispatcher) { +// val years = listOf(1900, 1984, 1994, 2016, 2022, 2024, 2042, 2048) +// val answers = listOf(false, true, false, true, false, true, false, true) +// val results = years.map { dataParser.isLeapYear(it) } +// assert(results == answers) +// } } diff --git a/core/presentation/src/main/res/values/strings.xml b/core/presentation/src/main/res/values/strings.xml index b6701720..48b24c85 100644 --- a/core/presentation/src/main/res/values/strings.xml +++ b/core/presentation/src/main/res/values/strings.xml @@ -49,12 +49,10 @@ \n\nPlease update the database at least weekly to get accurate predictions. What\'s new in Look4Sat - * Added fixes for Turkish translation, by Emre Can Akdaş (TA3ECR) - \n* Added passes sticky header with sunrise/sunset times - \n* Added current moon/sun positions to the Radar Screen - \n* Added current moon/sun positions to the Map Screen - \n* Added red night mode filter overlay for the whole app - + * Added fixes for Chinese translation, by Mubi-Baihua (#216) + \n* Added zipped data sources handling to DatabaseRepo + \n* Tweaked Passes list to show DeepSpace ones at the top + \n* Tweaked RadarView to display sun/moon positions correctly diff --git a/fastlane/metadata/android/en-US/changelogs/default.txt b/fastlane/metadata/android/en-US/changelogs/default.txt index 77e79f58..52b8c37c 100644 --- a/fastlane/metadata/android/en-US/changelogs/default.txt +++ b/fastlane/metadata/android/en-US/changelogs/default.txt @@ -1,5 +1,4 @@ -* Added fixes for Turkish translation, by Emre Can Akdaş (TA3ECR) -* Added passes sticky header with sunrise/sunset times -* Added current moon/sun positions to the Radar Screen -* Added current moon/sun positions to the Map Screen -* Added red night mode filter overlay for the whole app +* Added fixes for Chinese translation, by Mubi-Baihua (#216) +* Added zipped data sources handling to DatabaseRepo +* Tweaked Passes list to show DeepSpace ones at the top +* Tweaked RadarView to display sun/moon positions correctly diff --git a/fastlane/metadata/android/en-US/whatsnew/whatsnew-en-US b/fastlane/metadata/android/en-US/whatsnew/whatsnew-en-US index 77e79f58..52b8c37c 100644 --- a/fastlane/metadata/android/en-US/whatsnew/whatsnew-en-US +++ b/fastlane/metadata/android/en-US/whatsnew/whatsnew-en-US @@ -1,5 +1,4 @@ -* Added fixes for Turkish translation, by Emre Can Akdaş (TA3ECR) -* Added passes sticky header with sunrise/sunset times -* Added current moon/sun positions to the Radar Screen -* Added current moon/sun positions to the Map Screen -* Added red night mode filter overlay for the whole app +* Added fixes for Chinese translation, by Mubi-Baihua (#216) +* Added zipped data sources handling to DatabaseRepo +* Tweaked Passes list to show DeepSpace ones at the top +* Tweaked RadarView to display sun/moon positions correctly diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index cbcbe4f5..8a4b5a95 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,8 +1,8 @@ [versions] #noinspection UnusedVersionCatalogEntry -appVersionCode = "430" +appVersionCode = "431" #noinspection UnusedVersionCatalogEntry -appVersionName = "4.3.0" +appVersionName = "4.3.1" #noinspection GradleDependency,UnusedVersionCatalogEntry compileSdk = "36" #noinspection UnusedVersionCatalogEntry