⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fginitialcondition.h

📁 6 DOF Missle Simulation
💻 H
📖 第 1 页 / 共 2 页
字号:
  /** Gets the initial roll angle.      @return Initial phi in degrees */  inline double GetPhiDegIC(void) const { return phi*radtodeg; }  /** Gets the initial heading angle.      @return Initial psi in degrees */  inline double GetPsiDegIC(void) const { return psi*radtodeg; }  /** Gets the initial latitude.      @return Initial geocentric latitude in degrees */  inline double GetLatitudeDegIC(void) const { return latitude*radtodeg; }  /** Gets the initial longitude.      @return Initial longitude in degrees */  inline double GetLongitudeDegIC(void) const { return longitude*radtodeg; }  /** Gets the initial altitude.      @return Initial altitude in feet. */  inline double GetAltitudeFtIC(void) const { return altitude; }  /** Gets the initial altitude above ground level.      @return Initial altitude AGL in feet */  inline double GetAltitudeAGLFtIC(void) const { return altitude - terrain_altitude; }  /** Gets the initial sea level radius.      @return Initial sea level radius */  inline double GetSeaLevelRadiusFtIC(void) const { return sea_level_radius; }  /** Gets the initial terrain elevation.      @return Initial terrain elevation in feet */  inline double GetTerrainAltitudeFtIC(void) const { return terrain_altitude; }  /** Sets the initial ground speed.      @param vg Initial ground speed in feet/second */  void SetVgroundFpsIC(double vg);  /** Sets the initial true airspeed.      @param vt Initial true airspeed in feet/second */  void SetVtrueFpsIC(double vt);  /** Sets the initial body axis X velocity.      @param ubody Initial X velocity in feet/second */  void SetUBodyFpsIC(double ubody);  /** Sets the initial body axis Y velocity.      @param vbody Initial Y velocity in feet/second */  void SetVBodyFpsIC(double vbody);  /** Sets the initial body axis Z velocity.      @param wbody Initial Z velocity in feet/second */  void SetWBodyFpsIC(double wbody);  /** Sets the initial local axis north velocity.      @param vn Initial north velocity in feet/second */  void SetVNorthFpsIC(double vn);  /** Sets the initial local axis east velocity.      @param ve Initial east velocity in feet/second */  void SetVEastFpsIC(double ve);  /** Sets the initial local axis down velocity.      @param vd Initial down velocity in feet/second */  void SetVDownFpsIC(double vd);  /** Sets the initial roll rate.      @param P Initial roll rate in radians/second */  void SetPRadpsIC(double P)  { p = P; }  /** Sets the initial pitch rate.      @param Q Initial pitch rate in radians/second */  void SetQRadpsIC(double Q) { q = Q; }  /** Sets the initial yaw rate.      @param R initial yaw rate in radians/second */  void SetRRadpsIC(double R) { r = R; }  /** Sets the initial wind velocity.      @param wN Initial wind velocity in local north direction, feet/second      @param wE Initial wind velocity in local east direction, feet/second      @param wD Initial wind velocity in local down direction, feet/second   */  void SetWindNEDFpsIC(double wN, double wE, double wD);  /** Sets the initial total wind speed.      @param mag Initial wind velocity magnitude in knots */  void SetWindMagKtsIC(double mag);  /** Sets the initial wind direction.      @param dir Initial direction wind is coming from in degrees */  void SetWindDirDegIC(double dir);  /** Sets the initial headwind velocity.      @param head Initial headwind speed in knots */  void SetHeadWindKtsIC(double head);  /** Sets the initial crosswind speed.      @param cross Initial crosswind speed, positive from left to right */  void SetCrossWindKtsIC(double cross);  /** Sets the initial wind downward speed.      @param wD Initial downward wind speed in knots*/  void SetWindDownKtsIC(double wD);  /** Sets the initial climb rate.      @param roc Initial Rate of climb in feet/second */  void SetClimbRateFpsIC(double roc);  /** Gets the initial ground velocity.      @return Initial ground velocity in feet/second */  inline double GetVgroundFpsIC(void) const  { return vg; }  /** Gets the initial true velocity.      @return Initial true velocity in feet/second */  inline double GetVtrueFpsIC(void) const { return vt; }  /** Gets the initial body axis X wind velocity.      @return Initial body axis X wind velocity in feet/second */  inline double GetWindUFpsIC(void) const { return uw; }  /** Gets the initial body axis Y wind velocity.      @return Initial body axis Y wind velocity in feet/second */  inline double GetWindVFpsIC(void) const { return vw; }  /** Gets the initial body axis Z wind velocity.      @return Initial body axis Z wind velocity in feet/second */  inline double GetWindWFpsIC(void) const { return ww; }  /** Gets the initial wind velocity in local frame.      @return Initial wind velocity toward north in feet/second */  inline double GetWindNFpsIC(void) const { return wnorth; }  /** Gets the initial wind velocity in local frame.      @return Initial wind velocity eastwards in feet/second */  inline double GetWindEFpsIC(void) const { return weast; }  /** Gets the initial wind velocity in local frame.      @return Initial wind velocity downwards in feet/second */  inline double GetWindDFpsIC(void) const { return wdown; }  /** Gets the initial total wind velocity in feet/sec.      @return Initial wind velocity in feet/second */  inline double GetWindFpsIC(void)  const { return sqrt(wnorth*wnorth + weast*weast); }  /** Gets the initial wind direction.      @return Initial wind direction in feet/second */  double GetWindDirDegIC(void) const;  /** Gets the initial climb rate.      @return Initial rate of climb in feet/second */  inline double GetClimbRateFpsIC(void) const { return hdot; }  /** Gets the initial body axis X velocity.      @return Initial body axis X velocity in feet/second. */  double GetUBodyFpsIC(void) const;  /** Gets the initial body axis Y velocity.      @return Initial body axis Y velocity in feet/second. */  double GetVBodyFpsIC(void) const;  /** Gets the initial body axis Z velocity.      @return Initial body axis Z velocity in feet/second. */  double GetWBodyFpsIC(void) const;  /** Gets the initial local frame X (North) velocity.      @return Initial local frame X (North) axis velocity in feet/second. */  double GetVNorthFpsIC(void) const {return vnorth;};  /** Gets the initial local frame Y (East) velocity.      @return Initial local frame Y (East) axis velocity in feet/second. */  double GetVEastFpsIC(void) const {return veast;};  /** Gets the initial local frame Z (Down) velocity.      @return Initial local frame Z (Down) axis velocity in feet/second. */  double GetVDownFpsIC(void) const {return vdown;};  /** Gets the initial body axis roll rate.      @return Initial body axis roll rate in radians/second */  double GetPRadpsIC() const { return p; }  /** Gets the initial body axis pitch rate.      @return Initial body axis pitch rate in radians/second */  double GetQRadpsIC() const { return q; }  /** Gets the initial body axis yaw rate.      @return Initial body axis yaw rate in radians/second */  double GetRRadpsIC() const { return r; }  /** Sets the initial flight path angle.      @param gamma Initial flight path angle in radians */  void SetFlightPathAngleRadIC(double gamma);  /** Sets the initial angle of attack.      @param alpha Initial angle of attack in radians */  void SetAlphaRadIC(double alpha);  /** Sets the initial pitch angle.      @param theta Initial pitch angle in radians */  void SetThetaRadIC(double theta);  /** Sets the initial sideslip angle.      @param beta Initial angle of sideslip in radians. */  void SetBetaRadIC(double beta);  /** Sets the initial roll angle.      @param phi Initial roll angle in radians */  void SetPhiRadIC(double phi);  /** Sets the initial heading angle.      @param psi Initial heading angle in radians */  void SetPsiRadIC(double psi);  /** Sets the initial latitude.      @param lat Initial latitude in radians */  inline void SetLatitudeRadIC(double lat) { latitude=lat; }  /** Sets the initial longitude.      @param lon Initial longitude in radians */  inline void SetLongitudeRadIC(double lon) { longitude=lon; }  /** Sets the target normal load factor.      @param nlf Normal load factor*/  inline void SetTargetNlfIC(double nlf) { targetNlfIC=nlf; }  /** Gets the initial flight path angle.      @return Initial flight path angle in radians */  inline double GetFlightPathAngleRadIC(void) const { return gamma; }  /** Gets the initial angle of attack.      @return Initial alpha in radians */  inline double GetAlphaRadIC(void) const      { return alpha; }  /** Gets the initial angle of sideslip.      @return Initial sideslip angle in radians */  inline double GetBetaRadIC(void) const       { return beta; }  /** Gets the initial roll angle.      @return Initial roll angle in radians */  inline double GetPhiRadIC(void) const  { return phi; }  /** Gets the initial latitude.      @return Initial latitude in radians */  inline double GetLatitudeRadIC(void) const { return latitude; }  /** Gets the initial longitude.      @return Initial longitude in radians */  inline double GetLongitudeRadIC(void) const { return longitude; }  /** Gets the initial pitch angle.      @return Initial pitch angle in radians */  inline double GetThetaRadIC(void) const { return theta; }  /** Gets the initial heading angle.      @return Initial heading angle in radians */  inline double GetPsiRadIC(void) const   { return psi; }  /** Gets the initial speedset.      @return Initial speedset */  inline speedset GetSpeedSet(void) { return lastSpeedSet; }  /** Gets the initial windset.      @return Initial windset */  inline windset GetWindSet(void) { return lastWindSet; }  /** Gets the target normal load factor set from IC.      @return target normal load factor set from IC*/  inline double GetTargetNlfIC(void) { return targetNlfIC; }  /** Loads the initial conditions.      @param rstname The name of an initial conditions file      @param useStoredPath true if the stored path to the IC file should be used      @return true if successful */  bool Load(string rstname, bool useStoredPath = true );  /** Get init-file name  */  string GetInitFile(void) {return init_file_name;}  /** Set init-file name  */  void SetInitFile(string f) { init_file_name = f;}  void WriteStateFile(int num);private:  double vt,vc,ve,vg;  double mach;  double altitude,hdot;  double latitude,longitude;  double u,v,w;  double p,q,r;  double uw,vw,ww;  double vnorth,veast,vdown;  double wnorth,weast,wdown;  double whead, wcross, wdir, wmag;  double sea_level_radius;  double terrain_altitude;  double radius_to_vehicle;  double targetNlfIC;  double  alpha, beta, theta, phi, psi, gamma;  double salpha,sbeta,stheta,sphi,spsi,sgamma;  double calpha,cbeta,ctheta,cphi,cpsi,cgamma;  double xlo, xhi,xmin,xmax;  typedef double (FGInitialCondition::*fp)(double x);  fp sfunc;  speedset lastSpeedSet;  windset lastWindSet;  FGFDMExec *fdmex;  FGPropertyManager *PropertyManager;  bool getAlpha(void);  bool getTheta(void);  bool getMachFromVcas(double *Mach,double vcas);  double GammaEqOfTheta(double Theta);  void InitializeIC(void);  double GammaEqOfAlpha(double Alpha);  double calcVcas(double Mach);  void calcUVWfromNED(void);  void calcWindUVW(void);  bool findInterval(double x,double guess);  bool solve(double *y, double x);  void bind(void);  void Debug(int from);  string init_file_name;};}#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -