Conversation
- Return armor_id from input armor_pattern
…nterface implements to be read-only and immutable.
Note: The implement of ITargetPredictor interface is not fully implemented yet.
- fire_judge → fire_decision - gimble_angle_solver → aim_solver - Improve fire validation and decision process
- State Machine: add convergence detection logic - LiveTargetManager: implement add/remove operations for LiveTarget - IdentifiedArmor: add GetDetectedIDs() method for ID retrieval - Tracker: complete state update logic implementation - FireControl: add reset function for SnapshotManager
…me unimportant cleanup
…interfaces declaration
Replace runtime type checks with templates for better performance.
|
但是你写的时候按照左边图中来组织,导致更新的函数是FireController类特有的,因此外部对于你的类需要特化实现 void UpdateIdentifiedArmors(std::shared_ptr<interfaces::IArmorInImage> armors);
void UpdateGimbalPosition(const Eigen::Vector3d& gimbal_pos);可以直接在FireControl继承这三个接口来解决问题
3.Time Stamped 不应该通过设置的,而是直接从IUpdatePackage中拿到,之前的版本如果写了个Set的话那就大概是神志不清胡言乱语了 低三点一定要改,第一第二不想改也行,我后面Merge的时候顺手加上那三个接口也不会很其他部分以及测试 |
| void UpdateIdentifiedArmors(std::shared_ptr<interfaces::IArmorInImage> armors); | ||
| void UpdateGimbalPosition(const Eigen::Vector3d& gimbal_pos); | ||
|
|
||
| void SetTimeStamp(const std::time_t& time_stamp); |
There was a problem hiding this comment.
TimeStamp 从IUpdatePackge直接获取,要与传感器同时
|
关于FireController耦合: FireController中依赖了ITargetPredictor的具体实现类LiveTargetManager,而LiveTargetManager又依赖了ICarState的具体实现,这才造成了耦合。然后在实现中,本希望模仿观察者模式,及时地通知ICarState的具体实现类,但好像成了东施效颦邯郸学步了。 对此,我目前的想法是: 而FireController呢,依赖ICarState,就像这样: 现在需要解决的问题是获得IPredictor来迭代飞行时间,解决了这个问题就能得到最终火控的指令了 来获得 这样姿,感觉就更解耦一些吧(吗?),缺点是,好像IFireControl依赖了ITargetPredictor和ICarState,但是ICarState也依赖了ITargetPredictor,有点重复的感觉,有点怪就是了 目前我是这个想法 |
我没表述清就是了,我说的就是这个意思 |
- Reimplement predictor module with clear dependency boundaries - Rewrite fire_control module to follow proper dependency injection



完成了火控的主要逻辑,其余再瞅瞅
需要注意的:
2.不清楚是否足够解耦?模块提供了类似于Update的函数。一些其他的逻辑,稍后会重理一理,毕竟至少现在比之前更理解一些。先看看,怼个进度
3.有问题直接和我说哈(≧ω≦)