Формат времени в UTC

This commit is contained in:
emelianov
2026-06-25 16:21:17 +03:00
parent d0ec0ef754
commit fe54c095ab
164 changed files with 1847 additions and 634 deletions
@@ -22,7 +22,7 @@ class TLEStepper(str1: String, str2: String, earthType: EarthType) : AbstractSte
private val ascendingNodeCache = mutableMapOf<Int, Double>()
init {
baseEpoch = extractUTCMillis(satellite) / 1000.0 + 10800
baseEpoch = extractUTCMillis(satellite) / 1000.0
nextAscendingNodeAfterEpoch = findNextAscendingNodeAfterEpoch()
ascendingNodeCache[0] = nextAscendingNodeAfterEpoch
}
@@ -26,9 +26,9 @@ class AstronomerJ2000(var earthType: EarthType) {
var d = tDtTm / 86400.0
var dat = truncate(d)
var tt = d - dat
if (tt < 0.125) {
dat--
}
// if (tt < 0.125) {
// dat--
// }
var t = (dat - baseDate) / (36525.0)
var t2 = t * t
@@ -69,11 +69,11 @@ class AstronomerJ2000(var earthType: EarthType) {
psi += r
if (tt < 0.125) {
tt += 0.875
} else {
tt -= 0.125
}
// if (tt < 0.125) {
// tt += 0.875
// } else {
// tt -= 0.125
// }
r = 84381.448e0 - 46.84024e0 * t - 0.00059e0 * t2 + 0.001813e0 * t3
r = r * PI / 180.0 / 3600.0
@@ -172,7 +172,7 @@ class AstronomerJ2000(var earthType: EarthType) {
fun moonCoordinates(tm: Double): Vector3D {
var d: Double = tm / 86400.0
d = d - 0.125
// d = d - 0.125
val t: Double = (d - baseDate) / 36525.0 // Юлианский период ot 12h 1.1.2000
val t2 = t * t
val t3 = t2 * t
@@ -241,8 +241,8 @@ class AstronomerJ2000(var earthType: EarthType) {
}
fun sunCoordinates(tm: Double): Vector3D {
var d = tm / 86400.0
var dd = d - 0.125
var dd = tm / 86400.0
// var dd = d - 0.125
var t = (dd - baseDate) / 36525.0
var t2 = t * t
var t3 = t2 * t
+1 -1
View File
@@ -22,7 +22,7 @@ fun main() {
val tt2 = LocalDateTime.of(2028, 12, 11, 1, 24, 24, 257000000)
val tt2 = LocalDateTime.of(2028, 12, 10, 22, 24, 24, 257000000)
val op = OrbitalPoint(
fromDateTime(tt2),