feat(tgu-ops-ui): display real ground track and swath from ballistics service
Replace synthetic orbit calculation (Kepler + spacecraft ID hash) with real
data from pcp-ballistics-service via a new proxy endpoint in pcp-ui-service.
Backend:
- TguPlanningController: add GET /api/tgu-planning/spacecraft/{noradId}/flight-line
that proxies FlightLineDTO[] from BallisticsService for a given time interval
Frontend:
- Fetch FlightLineDTO[] (revolution, time, lat/long, swath boundaries) using
the spacecraft's noradId for the current 24h map window
- Group points by real revolution number to build OrbitPassInfo[] with actual
orbit numbers and UTC times instead of synthetic Kepler-based estimates
- Build ground track MapLines and swath MapPolygons from real coordinates;
swath polygon = outer-left edge forward + outer-right edge reversed
- Enable swath layer in the editor map; draw with teal fill/stroke matching
the track colour
- MapPassSelector now shows real revolution numbers in header and handle labels
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+11
-1
@@ -8,7 +8,9 @@ import org.springframework.web.bind.annotation.RequestMapping
|
||||
import org.springframework.web.bind.annotation.RequestParam
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
import space.nstart.pcp.slots_service.dto.tgu.TguPlanDecision
|
||||
import space.nstart.pcp.slots_service.service.BallisticsService
|
||||
import space.nstart.pcp.slots_service.service.TguPlanningService
|
||||
import java.time.LocalDateTime
|
||||
import java.util.UUID
|
||||
|
||||
@Controller
|
||||
@@ -21,7 +23,8 @@ class TguPlanningPageController {
|
||||
@RestController
|
||||
@RequestMapping("/api/tgu-planning")
|
||||
class TguPlanningRestController(
|
||||
private val tguPlanningService: TguPlanningService
|
||||
private val tguPlanningService: TguPlanningService,
|
||||
private val ballisticsService: BallisticsService
|
||||
) {
|
||||
|
||||
@GetMapping("/platforms")
|
||||
@@ -43,4 +46,11 @@ class TguPlanningRestController(
|
||||
@RequestParam decision: TguPlanDecision,
|
||||
@RequestParam(required = false) reason: String?
|
||||
) = tguPlanningService.sendDecision(planId, decision, reason)
|
||||
|
||||
@GetMapping("/spacecraft/{noradId}/flight-line")
|
||||
fun spacecraftFlightLine(
|
||||
@PathVariable noradId: Long,
|
||||
@RequestParam("time_start", required = false) timeStart: LocalDateTime?,
|
||||
@RequestParam("time_stop", required = false) timeStop: LocalDateTime?
|
||||
) = ballisticsService.flightLine(noradId, timeStart, timeStop).collectList().block() ?: emptyList<Any>()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user