1 /*******************************************************************************
3 Header: FGInitialCondition.cpp
7 ------------- Copyright (C) 1999 Anthony K. Peden (apeden@earthlink.net) -------------
9 This program is free software; you can redistribute it and/or modify it under
10 the terms of the GNU General Public License as published by the Free Software
11 Foundation; either version 2 of the License, or (at your option) any later
14 This program is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
19 You should have received a copy of the GNU General Public License along with
20 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21 Place - Suite 330, Boston, MA 02111-1307, USA.
23 Further information about the GNU General Public License can also be found on
24 the world wide web at http://www.gnu.org.
28 --------------------------------------------------------------------------------
32 FUNCTIONAL DESCRIPTION
33 --------------------------------------------------------------------------------
35 The purpose of this class is to take a set of initial conditions and provide
36 a kinematically consistent set of body axis velocity components, euler
37 angles, and altitude. This class does not attempt to trim the model i.e.
38 the sim will most likely start in a very dynamic state (unless, of course,
39 you have chosen your IC's wisely) even after setting it up with this class.
41 ********************************************************************************
43 *******************************************************************************/
45 #include "FGInitialCondition.h"
46 #include "FGFDMExec.h"
48 #include "FGAtmosphere.h"
50 #include "FGAircraft.h"
51 #include "FGTranslation.h"
52 #include "FGRotation.h"
53 #include "FGPosition.h"
54 #include "FGAuxiliary.h"
56 #include "FGConfigFile.h"
57 #include "FGPropertyManager.h"
59 static const char *IdSrc = "$Id$";
60 static const char *IdHdr = ID_INITIALCONDITION;
62 //******************************************************************************
64 FGInitialCondition::FGInitialCondition(FGFDMExec *FDMExec)
80 sea_level_radius = FDMExec->GetInertial()->RefRadius();
81 radius_to_vehicle = FDMExec->GetInertial()->RefRadius();
84 salpha=sbeta=stheta=sphi=spsi=sgamma=0;
85 calpha=cbeta=ctheta=cphi=cpsi=cgamma=1;
87 if(FDMExec != NULL ) {
89 fdmex->GetPosition()->Seth(altitude);
90 fdmex->GetAtmosphere()->Run();
91 PropertyManager=fdmex->GetPropertyManager();
94 cout << "FGInitialCondition: This class requires a pointer to a valid FGFDMExec object" << endl;
100 //******************************************************************************
102 FGInitialCondition::~FGInitialCondition()
108 //******************************************************************************
110 void FGInitialCondition::SetVcalibratedKtsIC(double tt) {
112 if(getMachFromVcas(&mach,tt*ktstofps)) {
113 //cout << "Mach: " << mach << endl;
116 vt=mach*fdmex->GetAtmosphere()->GetSoundSpeed();
117 ve=vt*sqrt(fdmex->GetAtmosphere()->GetDensityRatio());
118 //cout << "Vt: " << vt*fpstokts << " Vc: " << vc*fpstokts << endl;
121 cout << "Failed to get Mach number for given Vc and altitude, Vc unchanged." << endl;
122 cout << "Please mail the set of initial conditions used to apeden@earthlink.net" << endl;
126 //******************************************************************************
128 void FGInitialCondition::SetVequivalentKtsIC(double tt) {
131 vt=ve*1/sqrt(fdmex->GetAtmosphere()->GetDensityRatio());
132 mach=vt/fdmex->GetAtmosphere()->GetSoundSpeed();
136 //******************************************************************************
138 void FGInitialCondition::SetVgroundFpsIC(double tt) {
144 vnorth = vg*cos(psi); veast = vg*sin(psi); vdown = 0;
146 ua = u + uw; va = v + vw; wa = w + ww;
147 vt = sqrt( ua*ua + va*va + wa*wa );
149 vxz = sqrt( u*u + w*w );
150 if( w != 0 ) alpha = atan2( w, u );
151 if( vxz != 0 ) beta = atan2( v, vxz );
152 mach=vt/fdmex->GetAtmosphere()->GetSoundSpeed();
154 ve=vt*sqrt(fdmex->GetAtmosphere()->GetDensityRatio());
157 //******************************************************************************
159 void FGInitialCondition::SetVtrueFpsIC(double tt) {
162 mach=vt/fdmex->GetAtmosphere()->GetSoundSpeed();
164 ve=vt*sqrt(fdmex->GetAtmosphere()->GetDensityRatio());
167 //******************************************************************************
169 void FGInitialCondition::SetMachIC(double tt) {
171 lastSpeedSet=setmach;
172 vt=mach*fdmex->GetAtmosphere()->GetSoundSpeed();
174 ve=vt*sqrt(fdmex->GetAtmosphere()->GetDensityRatio());
175 //cout << "Vt: " << vt*fpstokts << " Vc: " << vc*fpstokts << endl;
178 //******************************************************************************
180 void FGInitialCondition::SetClimbRateFpmIC(double tt) {
181 SetClimbRateFpsIC(tt/60.0);
184 //******************************************************************************
186 void FGInitialCondition::SetClimbRateFpsIC(double tt) {
191 sgamma=sin(gamma); cgamma=cos(gamma);
195 //******************************************************************************
197 void FGInitialCondition::SetFlightPathAngleRadIC(double tt) {
199 sgamma=sin(gamma); cgamma=cos(gamma);
204 //******************************************************************************
206 void FGInitialCondition::SetAlphaRadIC(double tt) {
208 salpha=sin(alpha); calpha=cos(alpha);
212 //******************************************************************************
214 void FGInitialCondition::SetPitchAngleRadIC(double tt) {
216 stheta=sin(theta); ctheta=cos(theta);
220 //******************************************************************************
222 void FGInitialCondition::SetBetaRadIC(double tt) {
224 sbeta=sin(beta); cbeta=cos(beta);
229 //******************************************************************************
231 void FGInitialCondition::SetRollAngleRadIC(double tt) {
233 sphi=sin(phi); cphi=cos(phi);
237 //******************************************************************************
239 void FGInitialCondition::SetTrueHeadingRadIC(double tt) {
241 spsi=sin(psi); cpsi=cos(psi);
245 //******************************************************************************
247 void FGInitialCondition::SetUBodyFpsIC(double tt) {
249 vt=sqrt(u*u + v*v + w*w);
253 //******************************************************************************
255 void FGInitialCondition::SetVBodyFpsIC(double tt) {
257 vt=sqrt(u*u + v*v + w*w);
261 //******************************************************************************
263 void FGInitialCondition::SetWBodyFpsIC(double tt) {
265 vt=sqrt( u*u + v*v + w*w );
269 //******************************************************************************
271 double FGInitialCondition::GetUBodyFpsIC(void) {
272 if(lastSpeedSet == setvg )
275 return vt*calpha*cbeta - uw;
278 //******************************************************************************
280 double FGInitialCondition::GetVBodyFpsIC(void) {
281 if( lastSpeedSet == setvg )
284 return vt*sbeta - vw;
288 //******************************************************************************
290 double FGInitialCondition::GetWBodyFpsIC(void) {
291 if( lastSpeedSet == setvg )
294 return vt*salpha*cbeta -ww;
297 //******************************************************************************
299 void FGInitialCondition::SetWindNEDFpsIC(double wN, double wE, double wD ) {
300 wnorth = wN; weast = wE; wdown = wD;
301 lastWindSet = setwned;
303 if(lastSpeedSet == setvg)
307 //******************************************************************************
309 // positive from left
310 void FGInitialCondition::SetHeadWindKtsIC(double head){
314 if(lastSpeedSet == setvg)
319 //******************************************************************************
321 void FGInitialCondition::SetCrossWindKtsIC(double cross){
322 wcross=cross*ktstofps;
325 if(lastSpeedSet == setvg)
330 //******************************************************************************
332 void FGInitialCondition::SetWindDownKtsIC(double wD) {
335 if(lastSpeedSet == setvg)
339 //******************************************************************************
341 void FGInitialCondition::SetWindMagKtsIC(double mag) {
345 if(lastSpeedSet == setvg)
349 //******************************************************************************
351 void FGInitialCondition::SetWindDirDegIC(double dir) {
355 if(lastSpeedSet == setvg)
360 //******************************************************************************
362 void FGInitialCondition::calcWindUVW(void) {
364 switch(lastWindSet) {
366 wnorth=wmag*cos(wdir);
367 weast=wmag*sin(wdir);
370 wnorth=whead*cos(psi) + wcross*cos(psi+M_PI/2);
371 weast=whead*sin(psi) + wcross*sin(psi+M_PI/2);
376 uw=wnorth*ctheta*cpsi +
379 vw=wnorth*( sphi*stheta*cpsi - cphi*spsi ) +
380 weast*( sphi*stheta*spsi + cphi*cpsi ) +
382 ww=wnorth*(cphi*stheta*cpsi + sphi*spsi) +
383 weast*(cphi*stheta*spsi - sphi*cpsi) +
387 /* cout << "FGInitialCondition::calcWindUVW: wnorth, weast, wdown "
388 << wnorth << ", " << weast << ", " << wdown << endl;
389 cout << "FGInitialCondition::calcWindUVW: theta, phi, psi "
390 << theta << ", " << phi << ", " << psi << endl;
391 cout << "FGInitialCondition::calcWindUVW: uw, vw, ww "
392 << uw << ", " << vw << ", " << ww << endl; */
396 //******************************************************************************
398 void FGInitialCondition::SetAltitudeFtIC(double tt) {
400 fdmex->GetPosition()->Seth(altitude);
401 fdmex->GetAtmosphere()->Run();
402 //lets try to make sure the user gets what they intended
404 switch(lastSpeedSet) {
408 SetVtrueKtsIC(vt*fpstokts);
411 SetVcalibratedKtsIC(vc*fpstokts);
414 SetVequivalentKtsIC(ve*fpstokts);
425 //******************************************************************************
427 void FGInitialCondition::SetAltitudeAGLFtIC(double tt) {
428 fdmex->GetPosition()->SetDistanceAGL(tt);
429 altitude=fdmex->GetPosition()->Geth();
430 SetAltitudeFtIC(altitude);
433 //******************************************************************************
435 void FGInitialCondition::SetSeaLevelRadiusFtIC(double tt) {
436 sea_level_radius = tt;
439 //******************************************************************************
441 void FGInitialCondition::SetTerrainAltitudeFtIC(double tt) {
445 //******************************************************************************
447 void FGInitialCondition::calcUVWfromNED(void) {
448 u=vnorth*ctheta*cpsi +
451 v=vnorth*( sphi*stheta*cpsi - cphi*spsi ) +
452 veast*( sphi*stheta*spsi + cphi*cpsi ) +
454 w=vnorth*( cphi*stheta*cpsi + sphi*spsi ) +
455 veast*( cphi*stheta*spsi - sphi*cpsi ) +
459 //******************************************************************************
461 void FGInitialCondition::SetVnorthFpsIC(double tt) {
464 vt=sqrt(u*u + v*v + w*w);
468 //******************************************************************************
470 void FGInitialCondition::SetVeastFpsIC(double tt) {
473 vt=sqrt(u*u + v*v + w*w);
477 //******************************************************************************
479 void FGInitialCondition::SetVdownFpsIC(double tt) {
482 vt=sqrt(u*u + v*v + w*w);
483 SetClimbRateFpsIC(-1*vdown);
487 //******************************************************************************
489 bool FGInitialCondition::getMachFromVcas(double *Mach,double vcas) {
495 sfunc=&FGInitialCondition::calcVcas;
496 if(findInterval(vcas,guess)) {
497 if(solve(&mach,vcas))
503 //******************************************************************************
505 bool FGInitialCondition::getAlpha(void) {
507 double guess=theta-gamma;
509 if(vt < 0.01) return 0;
512 xmin=fdmex->GetAircraft()->GetAlphaCLMin();
513 xmax=fdmex->GetAircraft()->GetAlphaCLMax();
514 sfunc=&FGInitialCondition::GammaEqOfAlpha;
515 if(findInterval(0,guess)){
526 //******************************************************************************
528 bool FGInitialCondition::getTheta(void) {
530 double guess=alpha+gamma;
532 if(vt < 0.01) return 0;
536 sfunc=&FGInitialCondition::GammaEqOfTheta;
537 if(findInterval(0,guess)){
548 //******************************************************************************
550 double FGInitialCondition::GammaEqOfTheta(double Theta) {
552 double sTheta,cTheta;
554 //theta=Theta; stheta=sin(theta); ctheta=cos(theta);
555 sTheta=sin(Theta); cTheta=cos(Theta);
557 a=wdown + vt*calpha*cbeta + uw;
558 b=vt*sphi*sbeta + vw*sphi;
559 c=vt*cphi*salpha*cbeta + ww*cphi;
560 return vt*sgamma - ( a*sTheta - (b+c)*cTheta);
563 //******************************************************************************
565 double FGInitialCondition::GammaEqOfAlpha(double Alpha) {
567 double sAlpha,cAlpha;
568 sAlpha=sin(Alpha); cAlpha=cos(Alpha);
569 a=wdown + vt*cAlpha*cbeta + uw;
570 b=vt*sphi*sbeta + vw*sphi;
571 c=vt*cphi*sAlpha*cbeta + ww*cphi;
573 return vt*sgamma - ( a*stheta - (b+c)*ctheta );
576 //******************************************************************************
578 double FGInitialCondition::calcVcas(double Mach) {
580 double p=fdmex->GetAtmosphere()->GetPressure();
581 double psl=fdmex->GetAtmosphere()->GetPressureSL();
582 double rhosl=fdmex->GetAtmosphere()->GetDensitySL();
583 double pt,A,B,D,vcas;
585 if(Mach < 1) //calculate total pressure assuming isentropic flow
586 pt=p*pow((1 + 0.2*Mach*Mach),3.5);
588 // shock in front of pitot tube, we'll assume its normal and use
589 // the Rayleigh Pitot Tube Formula, i.e. the ratio of total
590 // pressure behind the shock to the static pressure in front
593 //the normal shock assumption should not be a bad one -- most supersonic
594 //aircraft place the pitot probe out front so that it is the forward
595 //most point on the aircraft. The real shock would, of course, take
596 //on something like the shape of a rounded-off cone but, here again,
597 //the assumption should be good since the opening of the pitot probe
598 //is very small and, therefore, the effects of the shock curvature
599 //should be small as well. AFAIK, this approach is fairly well accepted
600 //within the aerospace community
602 B = 5.76*Mach*Mach/(5.6*Mach*Mach - 0.8);
604 // The denominator above is zero for Mach ~ 0.38, for which
605 // we'll never be here, so we're safe
607 D = (2.8*Mach*Mach-0.4)*0.4167;
611 A = pow(((pt-p)/psl+1),0.28571);
612 vcas = sqrt(7*psl/rhosl*(A-1));
613 //cout << "calcVcas: vcas= " << vcas*fpstokts << " mach= " << Mach << " pressure: " << pt << endl;
617 //******************************************************************************
619 bool FGInitialCondition::findInterval(double x,double guess) {
620 //void find_interval(inter_params &ip,eqfunc f,double y,double constant, int &flag){
624 double flo,fhi,fguess;
627 fguess=(this->*sfunc)(guess)-x;
633 if(lo < xmin) lo=xmin;
634 if(hi > xmax) hi=xmax;
636 flo=(this->*sfunc)(lo)-x;
637 fhi=(this->*sfunc)(hi)-x;
638 if(flo*fhi <=0) { //found interval with root
640 if(flo*fguess <= 0) { //narrow interval down a bit
641 hi=lo+step; //to pass solver interval that is as
644 else if(fhi*fguess <= 0) {
648 //cout << "findInterval: i=" << i << " Lo= " << lo << " Hi= " << hi << endl;
650 while((found == 0) && (i <= 100));
656 //******************************************************************************
658 bool FGInitialCondition::solve(double *y,double x)
660 double x1,x2,x3,f1,f2,f3,d,d0;
662 double const relax =0.9;
670 f1=(this->*sfunc)(x1)-x;
671 f3=(this->*sfunc)(x3)-x;
676 while ((fabs(d) > eps) && (i < 100)) {
678 x2 = x1-d*d0*f1/(f3-f1);
680 f2=(this->*sfunc)(x2)-x;
681 //cout << "solve x1,x2,x3: " << x1 << "," << x2 << "," << x3 << endl;
682 //cout << " " << f1 << "," << f2 << "," << f3 << endl;
684 if(fabs(f2) <= 0.001) {
686 } else if(f1*f2 <= 0.0) {
690 } else if(f2*f3 <= 0) {
703 //cout << "Success= " << success << " Vcas: " << vcas*fpstokts << " Mach: " << x2 << endl;
707 //******************************************************************************
709 double FGInitialCondition::GetWindDirDegIC(void) {
711 return atan2(weast,wnorth)*radtodeg;
718 //******************************************************************************
720 bool FGInitialCondition::Load(string acpath, string acname, string rstfile)
728 resetDef = acpath + "/" + acname + "/" + rstfile + ".xml";
730 resetDef = acpath + ";" + acname + ";" + rstfile + ".xml";
733 FGConfigFile resetfile(resetDef);
734 if (!resetfile.IsOpen()) {
735 cerr << "Failed to open reset file: " << resetDef << endl;
739 resetfile.GetNextConfigLine();
740 token = resetfile.GetValue();
741 if (token != string("initialize")) {
742 cerr << "The reset file " << resetDef
743 << " does not appear to be a reset file" << endl;
747 resetfile.GetNextConfigLine();
749 while (token != string("/initialize") && token != string("EOF")) {
750 if (token == "UBODY" ) { resetfile >> temp; SetUBodyFpsIC(temp); }
751 if (token == "VBODY" ) { resetfile >> temp; SetVBodyFpsIC(temp); }
752 if (token == "WBODY" ) { resetfile >> temp; SetWBodyFpsIC(temp); }
753 if (token == "LATITUDE" ) { resetfile >> temp; SetLatitudeDegIC(temp); }
754 if (token == "LONGITUDE" ) { resetfile >> temp; SetLongitudeDegIC(temp); }
755 if (token == "PHI" ) { resetfile >> temp; SetRollAngleDegIC(temp); }
756 if (token == "THETA" ) { resetfile >> temp; SetPitchAngleDegIC(temp); }
757 if (token == "PSI" ) { resetfile >> temp; SetTrueHeadingDegIC(temp); }
758 if (token == "ALPHA" ) { resetfile >> temp; SetAlphaDegIC(temp); }
759 if (token == "BETA" ) { resetfile >> temp; SetBetaDegIC(temp); }
760 if (token == "GAMMA" ) { resetfile >> temp; SetFlightPathAngleDegIC(temp); }
761 if (token == "ROC" ) { resetfile >> temp; SetClimbRateFpmIC(temp); }
762 if (token == "ALTITUDE" ) { resetfile >> temp; SetAltitudeFtIC(temp); }
763 if (token == "WINDDIR" ) { resetfile >> temp; SetWindDirDegIC(temp); }
764 if (token == "VWIND" ) { resetfile >> temp; SetWindMagKtsIC(temp); }
765 if (token == "HWIND" ) { resetfile >> temp; SetHeadWindKtsIC(temp); }
766 if (token == "XWIND" ) { resetfile >> temp; SetCrossWindKtsIC(temp); }
767 if (token == "VC" ) { resetfile >> temp; SetVcalibratedKtsIC(temp); }
768 if (token == "MACH" ) { resetfile >> temp; SetMachIC(temp); }
769 if (token == "VGROUND" ) { resetfile >> temp; SetVgroundKtsIC(temp); }
778 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
779 // The bitmasked value choices are as follows:
780 // unset: In this case (the default) JSBSim would only print
781 // out the normally expected messages, essentially echoing
782 // the config files as they are read. If the environment
783 // variable is not set, debug_lvl is set to 1 internally
784 // 0: This requests JSBSim not to output any messages
786 // 1: This value explicity requests the normal JSBSim
788 // 2: This value asks for a message to be printed out when
789 // a class is instantiated
790 // 4: When this value is set, a message is displayed when a
791 // FGModel object executes its Run() method
792 // 8: When this value is set, various runtime state variables
793 // are printed out periodically
794 // 16: When set various parameters are sanity checked and
795 // a message is printed out when they go out of bounds
797 void FGInitialCondition::Debug(int from)
799 if (debug_lvl <= 0) return;
801 if (debug_lvl & 1) { // Standard console startup message output
803 if (debug_lvl & 2 ) { // Instantiation/Destruction notification
804 if (from == 0) cout << "Instantiated: FGInitialCondition" << endl;
805 if (from == 1) cout << "Destroyed: FGInitialCondition" << endl;
807 if (debug_lvl & 4 ) { // Run() method entry print for FGModel-derived objects
809 if (debug_lvl & 8 ) { // Runtime state variables
811 if (debug_lvl & 16) { // Sanity checking
813 if (debug_lvl & 64) {
814 if (from == 0) { // Constructor
815 cout << IdSrc << endl;
816 cout << IdHdr << endl;
821 void FGInitialCondition::bind(void){
822 PropertyManager->Tie("ic/vc-kts", this,
823 &FGInitialCondition::GetVcalibratedKtsIC,
824 &FGInitialCondition::SetVcalibratedKtsIC,
826 PropertyManager->Tie("ic/ve-kts", this,
827 &FGInitialCondition::GetVequivalentKtsIC,
828 &FGInitialCondition::SetVequivalentKtsIC,
830 PropertyManager->Tie("ic/vg-kts", this,
831 &FGInitialCondition::GetVgroundKtsIC,
832 &FGInitialCondition::SetVgroundKtsIC,
834 PropertyManager->Tie("ic/vt-kts", this,
835 &FGInitialCondition::GetVtrueKtsIC,
836 &FGInitialCondition::SetVtrueKtsIC,
838 PropertyManager->Tie("ic/mach-norm", this,
839 &FGInitialCondition::GetMachIC,
840 &FGInitialCondition::SetMachIC,
842 PropertyManager->Tie("ic/roc-fpm", this,
843 &FGInitialCondition::GetClimbRateFpmIC,
844 &FGInitialCondition::SetClimbRateFpmIC,
846 PropertyManager->Tie("ic/gamma-deg", this,
847 &FGInitialCondition::GetFlightPathAngleDegIC,
848 &FGInitialCondition::SetFlightPathAngleDegIC,
850 PropertyManager->Tie("ic/alpha-deg", this,
851 &FGInitialCondition::GetAlphaDegIC,
852 &FGInitialCondition::SetAlphaDegIC,
854 PropertyManager->Tie("ic/beta-deg", this,
855 &FGInitialCondition::GetBetaDegIC,
856 &FGInitialCondition::SetBetaDegIC,
858 PropertyManager->Tie("ic/theta-deg", this,
859 &FGInitialCondition::GetPitchAngleDegIC,
860 &FGInitialCondition::SetPitchAngleDegIC,
862 PropertyManager->Tie("ic/phi-deg", this,
863 &FGInitialCondition::GetRollAngleDegIC,
864 &FGInitialCondition::SetRollAngleDegIC,
866 PropertyManager->Tie("ic/psi-true-deg", this,
867 &FGInitialCondition::GetHeadingDegIC );
868 PropertyManager->Tie("ic/lat-gc-deg", this,
869 &FGInitialCondition::GetLatitudeDegIC,
870 &FGInitialCondition::SetLatitudeDegIC,
872 PropertyManager->Tie("ic/long-gc-deg", this,
873 &FGInitialCondition::GetLongitudeDegIC,
874 &FGInitialCondition::SetLongitudeDegIC,
876 PropertyManager->Tie("ic/h-sl-ft", this,
877 &FGInitialCondition::GetAltitudeFtIC,
878 &FGInitialCondition::SetAltitudeFtIC,
880 PropertyManager->Tie("ic/h-agl-ft", this,
881 &FGInitialCondition::GetAltitudeAGLFtIC,
882 &FGInitialCondition::SetAltitudeAGLFtIC,
884 PropertyManager->Tie("ic/sea-level-radius-ft", this,
885 &FGInitialCondition::GetSeaLevelRadiusFtIC,
886 &FGInitialCondition::SetSeaLevelRadiusFtIC,
888 PropertyManager->Tie("ic/terrain-altitude-ft", this,
889 &FGInitialCondition::GetTerrainAltitudeFtIC,
890 &FGInitialCondition::SetTerrainAltitudeFtIC,
892 PropertyManager->Tie("ic/vg-fps", this,
893 &FGInitialCondition::GetVgroundFpsIC,
894 &FGInitialCondition::SetVgroundFpsIC,
896 PropertyManager->Tie("ic/vt-fps", this,
897 &FGInitialCondition::GetVtrueFpsIC,
898 &FGInitialCondition::SetVtrueFpsIC,
900 PropertyManager->Tie("ic/vw-bx-fps", this,
901 &FGInitialCondition::GetWindUFpsIC);
902 PropertyManager->Tie("ic/vw-by-fps", this,
903 &FGInitialCondition::GetWindVFpsIC);
904 PropertyManager->Tie("ic/vw-bz-fps", this,
905 &FGInitialCondition::GetWindWFpsIC);
906 PropertyManager->Tie("ic/vw-north-fps", this,
907 &FGInitialCondition::GetWindNFpsIC);
908 PropertyManager->Tie("ic/vw-east-fps", this,
909 &FGInitialCondition::GetWindEFpsIC);
910 PropertyManager->Tie("ic/vw-down-fps", this,
911 &FGInitialCondition::GetWindDFpsIC);
912 PropertyManager->Tie("ic/vw-mag-fps", this,
913 &FGInitialCondition::GetWindFpsIC);
914 /* PropertyManager->Tie("ic/vw-dir-deg", this,
915 &FGInitialCondition::GetWindDirDegIC,
916 &FGInitialCondition::SetWindDirDegIC,
919 PropertyManager->Tie("ic/roc-fps", this,
920 &FGInitialCondition::GetClimbRateFpsIC,
921 &FGInitialCondition::SetClimbRateFpsIC,
923 /* PropertyManager->Tie("ic/u-fps", this,
924 &FGInitialCondition::GetUBodyFpsIC,
925 &FGInitialCondition::SetUBodyFpsIC,
927 PropertyManager->Tie("ic/v-fps", this,
928 &FGInitialCondition::GetVBodyFpsIC,
929 &FGInitialCondition::SetVBodyFpsIC,
931 PropertyManager->Tie("ic/w-fps", this,
932 &FGInitialCondition::GetWBodyFpsIC,
933 &FGInitialCondition::SetWBodyFpsIC,
936 PropertyManager->Tie("ic/gamma-rad", this,
937 &FGInitialCondition::GetFlightPathAngleRadIC,
938 &FGInitialCondition::SetFlightPathAngleRadIC,
940 PropertyManager->Tie("ic/alpha-rad", this,
941 &FGInitialCondition::GetAlphaRadIC,
942 &FGInitialCondition::SetAlphaRadIC,
944 PropertyManager->Tie("ic/theta-rad", this,
945 &FGInitialCondition::GetPitchAngleRadIC,
946 &FGInitialCondition::SetPitchAngleRadIC,
948 PropertyManager->Tie("ic/beta-rad", this,
949 &FGInitialCondition::GetBetaRadIC,
950 &FGInitialCondition::SetBetaRadIC,
952 PropertyManager->Tie("ic/phi-rad", this,
953 &FGInitialCondition::GetRollAngleRadIC,
954 &FGInitialCondition::SetRollAngleRadIC,
956 PropertyManager->Tie("ic/psi-true-rad", this,
957 &FGInitialCondition::GetHeadingRadIC);
958 PropertyManager->Tie("ic/lat-gc-rad", this,
959 &FGInitialCondition::GetLatitudeRadIC,
960 &FGInitialCondition::SetLatitudeRadIC,
962 PropertyManager->Tie("ic/long-gc-rad", this,
963 &FGInitialCondition::GetLongitudeRadIC,
964 &FGInitialCondition::SetLongitudeRadIC,
968 void FGInitialCondition::unbind(void){
969 PropertyManager->Untie("ic/vc-kts");
970 PropertyManager->Untie("ic/ve-kts");
971 PropertyManager->Untie("ic/vg-kts");
972 PropertyManager->Untie("ic/vt-kts");
973 PropertyManager->Untie("ic/mach-norm");
974 PropertyManager->Untie("ic/roc-fpm");
975 PropertyManager->Untie("ic/gamma-deg");
976 PropertyManager->Untie("ic/alpha-deg");
977 PropertyManager->Untie("ic/beta-deg");
978 PropertyManager->Untie("ic/theta-deg");
979 PropertyManager->Untie("ic/phi-deg");
980 PropertyManager->Untie("ic/psi-true-deg");
981 PropertyManager->Untie("ic/lat-gc-deg");
982 PropertyManager->Untie("ic/long-gc-deg");
983 PropertyManager->Untie("ic/h-sl-ft");
984 PropertyManager->Untie("ic/h-agl-ft");
985 PropertyManager->Untie("ic/sea-level-radius-ft");
986 PropertyManager->Untie("ic/terrain-altitude-ft");
987 PropertyManager->Untie("ic/vg-fps");
988 PropertyManager->Untie("ic/vt-fps");
989 PropertyManager->Untie("ic/vw-bx-fps");
990 PropertyManager->Untie("ic/vw-by-fps");
991 PropertyManager->Untie("ic/vw-bz-fps");
992 PropertyManager->Untie("ic/vw-north-fps");
993 PropertyManager->Untie("ic/vw-east-fps");
994 PropertyManager->Untie("ic/vw-down-fps");
995 PropertyManager->Untie("ic/vw-mag-fps");
996 /* PropertyManager->Untie("ic/vw-dir-deg"); */
998 PropertyManager->Untie("ic/roc-fps");
1000 /* PropertyManager->Untie("ic/u-fps");
1001 PropertyManager->Untie("ic/v-fps");
1002 PropertyManager->Untie("ic/w-fps"); */
1004 PropertyManager->Untie("ic/gamma-rad");
1005 PropertyManager->Untie("ic/alpha-rad");
1006 PropertyManager->Untie("ic/theta-rad");
1007 PropertyManager->Untie("ic/beta-rad");
1008 PropertyManager->Untie("ic/phi-rad");
1009 PropertyManager->Untie("ic/psi-true-rad");
1010 PropertyManager->Untie("ic/lat-gc-rad");
1011 PropertyManager->Untie("ic/long-gc-rad");