| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 867 人关注过本帖
标题:有谁能帮我看一下这段程序是什么意思?拜托了,我正在搞毕业设计!
只看楼主 加入收藏
wjm19871117
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2008-5-7
收藏
 问题点数:0 回复次数:2 
有谁能帮我看一下这段程序是什么意思?拜托了,我正在搞毕业设计!
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;
}
搜索更多相关主题的帖子: include 毕业设计 ownship tgt 
2008-05-09 10:04
PcrazyC
Rank: 6Rank: 6
等 级:贵宾
威 望:29
帖 子:5652
专家分:0
注 册:2006-10-20
收藏
得分:0 
最重要的文件不发上来,怎么知道做什么

simulation_aim9.h

雁无留踪之意,水无取影之心
2008-05-09 10:43
wjm19871117
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2008-5-7
收藏
得分:0 
对不起,文件太多了,我不知道哪些是重要的?
#ifndef SIMULATION_H
#define SIMULATION_H


#include "General.h"
#include "targetModel_aim9.h"
#include "missileModel_aim9.h"


class simulation_aim9
{
public:

    simulation_aim9(void);

private:

    int                mMatrixContr;
    int                mIcountMax;
    int                mMinMax;

    SecondType        mTSin;

    FeetType        mRangeToTarget;            
    RadianType        mPathAngleTarget0;
    RadianType        mHeadingAngleTarget0;
    FpsType            mVTarget0;
    VectorType        mRT;                
    RadianType        mQAngle_z0;            
    RadianType        mQAngle_y0;    
    RadianType        mQA_z0;    
    RadianType        mQA_y0;            

public:
    SecondType        mh0;                

    SecondType        mTime_Start;
    SecondType        mTime[3000];
    FeetVectorType    mTPosition[3000];    
    FpsVectorType    mTVelocity[3000];    
    Fps2VectorType    mTAccel[3000];        
    VectorType        mTAngle[3000];        
    FeetVectorType    mTPosition_real[3000];    
    FpsVectorType    mTVelocity_real[3000];    
    Fps2VectorType    mTAccel_real[3000];        

    FeetVectorType    mMissilePosition[3000];    
    FpsVectorType    mMissileVelocity[3000];    

    FeetType        mMissDistance[3000];
    FpsType            mRelativeVel[3000];

    VectorType        mTgtPosi;
    VectorType        mTgtVel;
    Fps2VectorType    mTgtAccel;
    VectorType        mTgtPosi_real;
    VectorType        mTgtVel_real;
    Fps2VectorType    mTgtAccel_real;

    VectorType        mRO;                
    RadianType        mPathAngleOwnership0;
    RadianType        mHeadingAngleOwnership0;

    FeetVectorType    mOTPosition[3000];    
    FpsVectorType    mOTVelocity[3000];    
    Fps2VectorType    mOTAccel[3000];    

private:
    void ProduceTrajectory(SecondType time, FlyerManueverType flyerManueverType,
        int iCountMax);

    int     RkForwardIntegration1(Int32Type n, Float64Type step, int L,
            Float64Type y[], Float64Type dy[], Float64Type b[], Float64Type c[]);

    void MotionDifferentialEquation(SecondType time, Float64Type x[],
                             Float64Type func[]);

    void simulateMissileTgtMotion(int tgtNumber, Float64Type load, VectorType ownship_RO,
        FpsType ownship_Speed, RadianType ownship_PathAngle, RadianType ownship_HeadingAngle,
        RadianType qAngle_y, RadianType qAngle_z, FeetType rangeToTarget,
        FpsType vTarget0, RadianType tgt_headingAngle0, RadianType tgt_pathAngle0,
        int min_Max, RadianType positionAngle_y, RadianType positionAngle_z,
        VectorType tgt_Position0, FpsVectorType tgt_Velocity0);
    
    void store_Pa
2008-05-09 14:49
快速回复:有谁能帮我看一下这段程序是什么意思?拜托了,我正在搞毕业设计!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012081 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved