personal/q3k/shipstuck: fix detection
Change-Id: I888eaa95c0012830219bd06fd4d16e66204e2e1d
diff --git a/personal/q3k/shipstuck/main.go b/personal/q3k/shipstuck/main.go
index 0224c3d..f35b9f4 100644
--- a/personal/q3k/shipstuck/main.go
+++ b/personal/q3k/shipstuck/main.go
@@ -17,10 +17,7 @@
)
type vessel struct {
- // No idea what these fields are, but they seem to be related to
- // latitude/longitude. Use these to detect the stuckness of the ship.
- GT int64 `json:"gt"`
- DW int64 `json:"dw"`
+ Speed float64 `json:"ss"`
}
// get retrieves the current status of the ship - returns true if stack, false
@@ -48,7 +45,7 @@
return false, fmt.Errorf("Decode: %w", err)
}
- if v.GT == 219079 && v.DW == 199489 {
+ if v.Speed == 0.0 {
return true, nil
} else {
glog.Infof("Freed! %+v", v)