Skip to content

Commit

Permalink
Extended the comet visibility for a few more days and added an extra
Browse files Browse the repository at this point in the history
search term for it.
  • Loading branch information
jaydeetay committed Dec 21, 2021
1 parent 1cb7550 commit 4b6b961
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
applicationId "com.google.android.stardroid"
minSdkVersion 26
targetSdkVersion 31
versionCode 1531
versionName "1.10.0 - RC2"
versionCode 1532
versionName "1.10.0 - RC3"
buildConfigField 'String', 'GOOGLE_ANALYTICS_CODE', '""'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class CometsLayer(private val model: AstronomerModel, resources: Resources) :
}

private class Comet(
val nameId: Int, private val positions: List<TimeEntry>
val nameId: Int, val searchAltNameId: Int, private val positions: List<TimeEntry>
) {
val start: Date
val end: Date
Expand Down Expand Up @@ -137,6 +137,7 @@ class CometsLayer(private val model: AstronomerModel, resources: Resources) :
comets.add(
Comet(
R.string.comet_leonard,
R.string.comet_leonard_alt,
listOf(
TimeEntry(
LocalDate.of(2021, 12, 11),
Expand Down Expand Up @@ -222,6 +223,24 @@ class CometsLayer(private val model: AstronomerModel, resources: Resources) :
decDegreesFromDMS(-32f, 51f, 30f),
9.36f
),
TimeEntry(
LocalDate.of(2021, 12, 25),
raDegreesFromHMS(21f, 05f, 18f),
decDegreesFromDMS(-33f, 23f, 44f),
9.48f
),
TimeEntry(
LocalDate.of(2021, 12, 26),
raDegreesFromHMS(21f, 11f, 32f),
decDegreesFromDMS(-33f, 50f, 39f),
9.60f
),
TimeEntry(
LocalDate.of(2021, 12, 27),
raDegreesFromHMS(21f, 16f, 53f),
decDegreesFromDMS(-34f, 13f, 17f),
9.71f
),
)
)
)
Expand Down Expand Up @@ -252,6 +271,7 @@ class CometsLayer(private val model: AstronomerModel, resources: Resources) :
private val theImage: ImagePrimitive
private val label: TextPrimitive
private val name = resources.getString(comet.nameId)
private val searchAltName = resources.getString(comet.searchAltNameId)
override val names = ArrayList<String>()
private var coords: Vector3
override var searchLocation = Vector3.zero()
Expand Down Expand Up @@ -304,6 +324,9 @@ class CometsLayer(private val model: AstronomerModel, resources: Resources) :

init {
names.add(name)
// Our search just does prefix matching right now, so provide alternative names
// to compensate.
names.add(searchAltName)
// blank is a 1pxX1px image that should be invisible.
// We'd prefer not to show any image except on the shower dates, but there
// appears to be a bug in the renderer/layer interface in that Update values are not
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values/celestial_objects.xml
Original file line number Diff line number Diff line change
Expand Up @@ -343,5 +343,8 @@

<!-- Comets -->
<string name="comet_leonard">Comet Leonard</string>
<!-- TODO: no need for these alt names once our search is less lousy -->
<string name="comet_leonard_alt">Leonard (Comet)</string>
<string name="comet_neowise">Comet Neowise</string>
<string name="comet_neowise_alt">Neowise (Comet)</string>
</resources>

0 comments on commit 4b6b961

Please sign in to comment.