有谁能帮我看一下这段程序是什么意思?拜托了,我正在搞毕业设计!
aMain3.cpp#include <string.h>
#include <fstream.h>
#include <iostream.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <iomanip.h>
#include <time.h>
#include "simulation_aim9.h"
void main()
{
simulation_aim9 getTraj;
VectorType ownship_Position0;
FpsVectorType ownship_Velocity0;
VectorType tgt_Position0;
FpsVectorType tgt_Velocity0;
Float64Type theta;
ownship_Position0.x = 0.0;
ownship_Position0.y = 0.0;
ownship_Position0.z = 0.0;
ownship_Velocity0.x = 0.0;
ownship_Velocity0.y = 100.0;
ownship_Velocity0.z = 0.0;
// tgt_Position0.x = 2000.0;
// tgt_Position0.y = 2000.0;
// tgt_Position0.z = 2000.0;
// tgt_Velocity0.x = -300.0;
tgt_Velocity0.y = 0.0;
// tgt_Velocity0.z = -300.0;
double V0 = 500.0; //meter/sec
char filenames[100];
sprintf(filenames, "trajectory555.m");
ofstream outFileTraj(filenames, ios::app);
outFileTraj<<"traj"<<"=[..."<<endl;
for(tgt_Position0.y=20000;tgt_Position0.y>=1000;tgt_Position0.y-=1000){
for(theta=0;theta<2*PI;theta+=PI/24){
tgt_Position0.x=R*cos(theta);
tgt_Position0.z=R*sin(theta);
tgt_Velocity0.x=-V0*cos(theta);
tgt_Velocity0.z=-V0*sin(theta);
ownship_Velocity0.x = 100.0*cos(theta);
ownship_Velocity0.z = 100.0*sin(theta);
getTraj.simulateMissile_Tgt_Bait_Motion(ownship_Position0,
ownship_Velocity0,tgt_Position0, tgt_Velocity0);
}
}
outFileTraj<<"];"<<endl;
}