|
@@ -3,15 +3,16 @@
|
|
|
SimulationControl::SimulationControl(QObject *parent) : QObject(parent)
|
|
|
{
|
|
|
// 添加场景平台
|
|
|
- allyplane.push_back(new Platform(this, 1001, QString::fromLocal8Bit("干扰机_1"),120,27,8000,-200,200,-300));
|
|
|
- allyplane.push_back(new Platform(this, 1002, QString::fromLocal8Bit("干扰机_2"),120.3,27,8000,-200,200,-300));
|
|
|
- allyplane.push_back(new Platform(this, 1003, QString::fromLocal8Bit("干扰机_3"),120,27.3,8000,-200,200,-300));
|
|
|
- allyplane.push_back(new Platform(this, 1004, QString::fromLocal8Bit("干扰机_4"),120.3,27.3,8000,-200,200,-300));
|
|
|
+// allyplane.push_back(new Platform(this, 1001, QString::fromLocal8Bit("弹道导弹1"),120,27,8000,-600,600,-900));
|
|
|
|
|
|
- allymissile.push_back(new Platform(this, 2001, QString::fromLocal8Bit("弹道导弹1"),117,33,0));
|
|
|
- allymissile.push_back(new Platform(this, 2001, QString::fromLocal8Bit("弹道导弹2"),117,33,0));
|
|
|
- allymissile.push_back(new Platform(this, 2001, QString::fromLocal8Bit("弹道导弹3"),117,33,0));
|
|
|
- allymissile.push_back(new Platform(this, 2001, QString::fromLocal8Bit("弹道导弹4"),117,33,0));
|
|
|
+ allymissile.push_back(new Platform(this, 1001, QString::fromLocal8Bit("弹道导弹1"),120,27,8000,-600,600,-900));
|
|
|
+ allymissile.push_back(new Platform(this, 1002, QString::fromLocal8Bit("弹道导弹2"),120.3,27,8000,-600,600,-900));
|
|
|
+ allymissile.push_back(new Platform(this, 1003, QString::fromLocal8Bit("弹道导弹3"),120,27.3,8000,-600,600,-900));
|
|
|
+ allymissile.push_back(new Platform(this, 1004, QString::fromLocal8Bit("弹道导弹4"),120.3,27.3,8000,-600,600,-900));
|
|
|
+
|
|
|
+ allymissile.push_back(new Platform(this, 1005, QString::fromLocal8Bit("弹道导弹5"),117,33,0));
|
|
|
+ allymissile.push_back(new Platform(this, 1006, QString::fromLocal8Bit("弹道导弹6"),117,33,0));
|
|
|
+ allymissile.push_back(new Platform(this, 1007, QString::fromLocal8Bit("弹道导弹7"),117,33,0));
|
|
|
|
|
|
ally.push_back(allyplane);
|
|
|
ally.push_back(allymissile);
|
|
@@ -73,29 +74,29 @@ void SimulationControl::SlotGetLeadPost(QWebSocket *pSender, QJsonObject obj)
|
|
|
|
|
|
CurrentLeadPost = new QJsonObject();
|
|
|
CurrentLeadPost->insert("time", "20:20:01");
|
|
|
- CurrentLeadPost->insert("GroupID", "0001");
|
|
|
- CurrentLeadPost->insert("LeaderID", "8013");
|
|
|
+ CurrentLeadPost->insert("GroupID", QString::fromLocal8Bit("编队1"));
|
|
|
+ CurrentLeadPost->insert("LeaderID", "1001");
|
|
|
CurrentLeadPost->insert("Abstract", QString::fromLocal8Bit("发现雷达"));
|
|
|
LeadPost->append(*CurrentLeadPost);
|
|
|
delete CurrentLeadPost;
|
|
|
CurrentLeadPost = new QJsonObject();
|
|
|
CurrentLeadPost->insert("time", "20:20:30");
|
|
|
- CurrentLeadPost->insert("GroupID", "0001");
|
|
|
- CurrentLeadPost->insert("LeaderID", "8013");
|
|
|
+ CurrentLeadPost->insert("GroupID", QString::fromLocal8Bit("编队1"));
|
|
|
+ CurrentLeadPost->insert("LeaderID", "1002");
|
|
|
CurrentLeadPost->insert("Abstract", QString::fromLocal8Bit("请求施加干扰"));
|
|
|
LeadPost->append(*CurrentLeadPost);
|
|
|
delete CurrentLeadPost;
|
|
|
CurrentLeadPost = new QJsonObject();
|
|
|
CurrentLeadPost->insert("time", "20:20:40");
|
|
|
- CurrentLeadPost->insert("GroupID", "0003");
|
|
|
- CurrentLeadPost->insert("LeaderID", "8014");
|
|
|
+ CurrentLeadPost->insert("GroupID", QString::fromLocal8Bit("编队1"));
|
|
|
+ CurrentLeadPost->insert("LeaderID", "1002");
|
|
|
CurrentLeadPost->insert("Abstract", QString::fromLocal8Bit("干扰样式生成"));
|
|
|
LeadPost->append(*CurrentLeadPost);
|
|
|
delete CurrentLeadPost;
|
|
|
CurrentLeadPost = new QJsonObject();
|
|
|
CurrentLeadPost->insert("time", "20:21:00");
|
|
|
- CurrentLeadPost->insert("GroupID", "0002");
|
|
|
- CurrentLeadPost->insert("LeaderID", "8015");
|
|
|
+ CurrentLeadPost->insert("GroupID", QString::fromLocal8Bit("编队1"));
|
|
|
+ CurrentLeadPost->insert("LeaderID", "1003");
|
|
|
CurrentLeadPost->insert("Abstract", QString::fromLocal8Bit("干扰信号发射"));
|
|
|
LeadPost->append(*CurrentLeadPost);
|
|
|
delete CurrentLeadPost;
|
|
@@ -210,7 +211,7 @@ void SimulationControl::SlotGetPlatformTable(QWebSocket *pSender, QJsonObject ob
|
|
|
for (int i = 0; i < ally.size(); i++)
|
|
|
{
|
|
|
std::vector<Platform *> allyplatforms = ally.at(i);
|
|
|
- if (i == 0)
|
|
|
+ if (true || i == 0) // for simplicity
|
|
|
{
|
|
|
for (auto j : allyplatforms)
|
|
|
{
|