feat(orbitviewer): add satellite orbit viewer with 2D track, 10-day pass prediction, and AR sky view
Build and Push Docker Image / build (push) Successful in 2m31s
Build and Push Docker Image / build (push) Successful in 2m31s
This commit is contained in:
@@ -119,15 +119,15 @@ func drawProblemV4(pdf *gopdf.GoPdf, req CountingRequest, startY, pW, pH float64
|
||||
randX := xBase + r + 5 + rand.Float64()*(boxW-2*r-10)
|
||||
randY := yBase + r + 5 + rand.Float64()*(boxH-2*r-10)
|
||||
collision := false
|
||||
for _, p := range placed {
|
||||
dx := randX - p.X
|
||||
dy := randY - p.Y
|
||||
if math.Sqrt(dx*dx+dy*dy) < (r + p.Radius + 10.0) {
|
||||
collision = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
for _, p := range placed {
|
||||
dx := randX - p.X
|
||||
dy := randY - p.Y
|
||||
if math.Sqrt(dx*dx+dy*dy) < (r + p.Radius + 10.0) {
|
||||
collision = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if !collision {
|
||||
drawSimpleIcon(pdf, selectedIcons[iconTypeIdx], randX, randY, r*2)
|
||||
placed = append(placed, PlacedIcon{X: randX, Y: randY, Radius: r})
|
||||
@@ -293,13 +293,13 @@ func parseMultiPath(icon data.Icon, scale, ox, oy float64) []PathResult {
|
||||
x += lx
|
||||
y += ly
|
||||
}
|
||||
for t := 0.2; t <= 1.0; t += 0.2 {
|
||||
invT := 1 - t
|
||||
tx := invT*invT*invT*lx + 3*invT*invT*t*x1 + 3*invT*t*t*x2 + t*t*t*x
|
||||
ty := invT*invT*invT*ly + 3*invT*invT*t*y1 + 3*invT*t*t*y2 + t*t*t*y
|
||||
pts = append(pts, gopdf.Point{X: ox + tx*scale, Y: oy + ty*scale})
|
||||
}
|
||||
|
||||
for t := 0.2; t <= 1.0; t += 0.2 {
|
||||
invT := 1 - t
|
||||
tx := invT*invT*invT*lx + 3*invT*invT*t*x1 + 3*invT*t*t*x2 + t*t*t*x
|
||||
ty := invT*invT*invT*ly + 3*invT*invT*t*y1 + 3*invT*t*t*y2 + t*t*t*y
|
||||
pts = append(pts, gopdf.Point{X: ox + tx*scale, Y: oy + ty*scale})
|
||||
}
|
||||
|
||||
lx, ly = x, y
|
||||
i += 6
|
||||
case "Q":
|
||||
@@ -317,13 +317,13 @@ func parseMultiPath(icon data.Icon, scale, ox, oy float64) []PathResult {
|
||||
x += lx
|
||||
y += ly
|
||||
}
|
||||
for t := 0.25; t <= 1.0; t += 0.25 {
|
||||
invT := 1 - t
|
||||
tx := invT*invT*lx + 2*invT*t*x1 + t*t*x
|
||||
ty := invT*invT*ly + 2*invT*t*y1 + t*t*y
|
||||
pts = append(pts, gopdf.Point{X: ox + tx*scale, Y: oy + ty*scale})
|
||||
}
|
||||
|
||||
for t := 0.25; t <= 1.0; t += 0.25 {
|
||||
invT := 1 - t
|
||||
tx := invT*invT*lx + 2*invT*t*x1 + t*t*x
|
||||
ty := invT*invT*ly + 2*invT*t*y1 + t*t*y
|
||||
pts = append(pts, gopdf.Point{X: ox + tx*scale, Y: oy + ty*scale})
|
||||
}
|
||||
|
||||
lx, ly = x, y
|
||||
i += 4
|
||||
case "A":
|
||||
|
||||
Reference in New Issue
Block a user