balise detect 预测实现

This commit is contained in:
xzb 2023-12-05 10:57:29 +08:00
parent c2b38c9aa2
commit 82367536da

View File

@ -25,16 +25,21 @@ func (s *BaliseSystem) Update(w ecs.World) {
func (s *BaliseSystem) findValidTelegram(w ecs.World, entry *ecs.Entry) []byte { func (s *BaliseSystem) findValidTelegram(w ecs.World, entry *ecs.Entry) []byte {
wd := entity.GetWorldData(w) wd := entity.GetWorldData(w)
id := component.UidType.Get(entry).Id id := component.UidType.Get(entry).Id
if entry.HasComponent(component.BaliseFB) { if entry.HasComponent(component.BaliseFB) { //固定应答器
baliseModel := wd.Repo.FindTransponder(id) baliseModel := wd.Repo.FindTransponder(id)
return baliseModel.FixedTelegram() telegram := baliseModel.FixedTelegram()
} else if entry.HasComponent(component.BaliseDB) { if telegram != nil {
return telegram
} else { //测试用
return []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}
}
} else if entry.HasComponent(component.BaliseDB) { //休眠唤醒应答器
} else if entry.HasComponent(component.BaliseIB) { } else if entry.HasComponent(component.BaliseIB) { //预告应答器
} else if entry.HasComponent(component.BaliseVB) { } else if entry.HasComponent(component.BaliseVB) { //主信号应答器
} else if entry.HasComponent(component.BaliseWB) { } else if entry.HasComponent(component.BaliseWB) { //轮径校正应答器
} }
return nil return nil