+++ /dev/null
-# Microsoft Developer Studio Project File - Name="FlightGear" - Package Owner=<4>\r
-# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
-# ** DO NOT EDIT **\r
-\r
-# TARGTYPE "Win32 (x86) Console Application" 0x0103\r
-\r
-CFG=FlightGear - Win32 Debug\r
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
-!MESSAGE use the Export Makefile command and run\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "FlightGear.mak".\r
-!MESSAGE \r
-!MESSAGE You can specify a configuration when running NMAKE\r
-!MESSAGE by defining the macro CFG on the command line. For example:\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "FlightGear.mak" CFG="FlightGear - Win32 Debug"\r
-!MESSAGE \r
-!MESSAGE Possible choices for configuration are:\r
-!MESSAGE \r
-!MESSAGE "FlightGear - Win32 Release" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "FlightGear - Win32 Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE \r
-\r
-# Begin Project\r
-# PROP AllowPerConfigDependencies 0\r
-# PROP Scc_ProjName ""\r
-# PROP Scc_LocalPath ""\r
-CPP=cl.exe\r
-RSC=rc.exe\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 0\r
-# PROP Output_Dir "Release"\r
-# PROP Intermediate_Dir "Release"\r
-# PROP Target_Dir ""\r
-# ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FD /c /MT /I ".." /I "src" /I "src\include" /I "src\FDM\JSBsim" /I "..\SimGear" /I "..\zlib-1.2.3" /I "..\freeglut-2.4.0\include" /I "..\OpenAL 1.0 Software Development Kit\include" /I "..\Pre-built.2\include" /D "_USE_MATH_DEFINES" /D "_CRT_SECURE_NO_DEPRECATE" /D "HAVE_CONFIG_H" /D "FGFS" /D "FG_NEW_ENVIRONMENT" /D "ENABLE_AUDIO_SUPPORT" /D "ENABLE_PLIB_JOYSTICK"\r
-# SUBTRACT CPP /YX\r
-# ADD RSC /l 0xc09 /d "NDEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib uuid.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 \r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "Debug"\r
-# PROP Intermediate_Dir "Debug"\r
-# PROP Ignore_Export_Lib 0\r
-# PROP Target_Dir ""\r
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /FR /FD /GZ /c /MTd /I ".." /I "src" /I "src\include" /I "src\FDM\JSBsim" /I "..\SimGear" /I "..\zlib-1.2.3" /I "..\freeglut-2.4.0\include" /I "..\OpenAL 1.0 Software Development Kit\include" /I "..\Pre-built.2\include" /D "_USE_MATH_DEFINES" /D "_CRT_SECURE_NO_DEPRECATE" /D "HAVE_CONFIG_H" /D "FGFS" /D "FG_NEW_ENVIRONMENT" /D "ENABLE_AUDIO_SUPPORT" /D "ENABLE_PLIB_JOYSTICK"\r
-# ADD RSC /l 0xc09 /d "_DEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD LINK32 kernel32.lib user32.lib winspool.lib comdlg32.lib gdi32.lib shell32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept \r
-\r
-!ENDIF \r
-\r
-# Begin Target\r
-\r
-# Name "FlightGear - Win32 Release"\r
-# Name "FlightGear - Win32 Debug"\r
-# Begin Group "Lib_Aircraft"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Aircraft\aircraft.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Aircraft"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Aircraft"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Aircraft\aircraft.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Aircraft"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Aircraft"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Aircraft\controls.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Aircraft"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Aircraft"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Aircraft\controls.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Aircraft"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Aircraft"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Aircraft\replay.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Aircraft"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Aircraft"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Aircraft\replay.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Aircraft"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Aircraft"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_Airports"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Airports\apt_loader.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Airports"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Airports"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Airports\apt_loader.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Airports"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Airports"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Airports\runways.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Airports"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Airports"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Airports\runways.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Airports"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Airports"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Airports\simple.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Airports"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Airports"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Airports\simple.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Airports"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Airports"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Airports\runwayprefs.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Airports"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Airports"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Airports\runwayprefs.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Airports"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Airports"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Airports\parking.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Airports"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Airports"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Airports\parking.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Airports"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Airports"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Airports\gnnode.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Airports"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Airports"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Airports\gnnode.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Airports"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Airports"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Airports\groundnetwork.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Airports"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Airports"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Airports\groundnetwork.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Airports"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Airports"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Airports\dynamics.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Airports"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Airports"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Airports\dynamics.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Airports"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Airports"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Airports\dynamicloader.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Airports"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Airports"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Airports\dynamicloader.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Airports"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Airports"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Airports\runwayprefloader.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Airports"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Airports"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Airports\runwayprefloader.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Airports"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Airports"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Airports\xmlloader.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Airports"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Airports"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Airports\xmlloader.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Airports"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Airports"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_ATC"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATC\trafficcontrol.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATC"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATC"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATC\trafficcontrol.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATC"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATC"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_ATCDCL"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\ATC.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\ATC.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\atis.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\atis.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\tower.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\tower.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\approach.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\approach.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\ground.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\ground.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\commlist.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\commlist.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\ATCDialog.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\ATCDialog.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\ATCVoice.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\ATCVoice.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\ATCmgr.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\ATCmgr.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\ATCutils.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\ATCutils.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\ATCProjection.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\ATCProjection.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\AIMgr.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\AIMgr.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\AIEntity.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\AIEntity.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\AIPlane.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\AIPlane.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\AILocalTraffic.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\AILocalTraffic.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\AIGAVFRTraffic.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\AIGAVFRTraffic.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\transmission.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\transmission.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\transmissionlist.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\ATCDCL\transmissionlist.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ATCDCL"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ATCDCL"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_Autopilot"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Autopilot\route_mgr.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Autopilot"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Autopilot"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Autopilot\route_mgr.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Autopilot"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Autopilot"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Autopilot\xmlauto.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Autopilot"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Autopilot"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Autopilot\xmlauto.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Autopilot"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Autopilot"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_Cockpit"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Cockpit\cockpit.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Cockpit"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Cockpit"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Cockpit\cockpit.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Cockpit"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Cockpit"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Cockpit\hud.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Cockpit"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Cockpit"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Cockpit\hud.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Cockpit"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Cockpit"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Cockpit\hud_card.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Cockpit"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Cockpit"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Cockpit\hud_dnst.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Cockpit"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Cockpit"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Cockpit\hud_gaug.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Cockpit"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Cockpit"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Cockpit\hud_inst.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Cockpit"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Cockpit"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Cockpit\hud_labl.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Cockpit"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Cockpit"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Cockpit\hud_ladr.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Cockpit"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Cockpit"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Cockpit\hud_rwy.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Cockpit"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Cockpit"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Cockpit\hud_scal.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Cockpit"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Cockpit"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Cockpit\hud_tbi.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Cockpit"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Cockpit"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Cockpit\panel.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Cockpit"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Cockpit"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Cockpit\panel.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Cockpit"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Cockpit"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Cockpit\panel_io.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Cockpit"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Cockpit"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Cockpit\panel_io.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Cockpit"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Cockpit"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_Built_in"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Cockpit\built_in\FGMagRibbon.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Built_in"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Built_in"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Cockpit\built_in\FGMagRibbon.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Built_in"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Built_in"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_Environment"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Environment\environment.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Environment"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Environment"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Environment\environment.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Environment"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Environment"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Environment\environment_mgr.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Environment"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Environment"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Environment\environment_mgr.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Environment"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Environment"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Environment\environment_ctrl.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Environment"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Environment"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Environment\environment_ctrl.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Environment"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Environment"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Environment\fgmetar.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Environment"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Environment"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Environment\fgmetar.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Environment"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Environment"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Environment\fgclouds.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Environment"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Environment"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Environment\fgclouds.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Environment"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Environment"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Environment\atmosphere.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Environment"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Environment"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Environment\atmosphere.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Environment"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Environment"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Environment\precipitation_mgr.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Environment"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Environment"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Environment\precipitation_mgr.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Environment"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Environment"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_ExternalNet"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\ExternalNet\ExternalNet.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ExternalNet"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ExternalNet"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\ExternalNet\ExternalNet.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ExternalNet"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ExternalNet"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_ExternalPipe"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\ExternalPipe\ExternalPipe.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ExternalPipe"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ExternalPipe"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\ExternalPipe\ExternalPipe.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_ExternalPipe"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_ExternalPipe"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_JSBSim"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\FGFDMExec.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_JSBSim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_JSBSim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\FGJSBBase.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_JSBSim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_JSBSim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\FGState.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_JSBSim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_JSBSim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\JSBSim.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_JSBSim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_JSBSim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_Init"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\initialization\FGInitialCondition.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Init"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Init"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\initialization\FGTrim.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Init"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Init"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\initialization\FGTrimAxis.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Init"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Init"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_InputOutput"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\input_output\FGGroundCallback.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_InputOutput"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_InputOutput"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\input_output\FGPropertyManager.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_InputOutput"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_InputOutput"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\input_output\FGScript.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_InputOutput"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_InputOutput"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\input_output\FGXMLElement.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_InputOutput"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_InputOutput"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\input_output\FGXMLParse.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_InputOutput"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_InputOutput"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\input_output\FGfdmSocket.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_InputOutput"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_InputOutput"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_Math"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\math\FGColumnVector3.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Math"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Math"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\math\FGFunction.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Math"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Math"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\math\FGLocation.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Math"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Math"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\math\FGMatrix33.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Math"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Math"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\math\FGPropertyValue.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Math"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Math"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\math\FGQuaternion.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Math"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Math"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\math\FGRealValue.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Math"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Math"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\math\FGTable.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Math"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Math"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\math\FGCondition.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Math"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Math"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_Models"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\FGAerodynamics.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Models"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Models"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\FGAircraft.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Models"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Models"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\FGAtmosphere.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Models"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Models"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\FGAuxiliary.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Models"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Models"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\FGFCS.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Models"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Models"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\FGGroundReactions.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Models"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Models"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\FGInertial.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Models"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Models"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\FGBuoyantForces.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Models"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Models"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\FGExternalForce.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Models"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Models"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\FGLGear.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Models"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Models"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\FGMassBalance.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Models"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Models"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\FGModel.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Models"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Models"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\FGOutput.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Models"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Models"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\FGPropagate.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Models"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Models"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\FGPropulsion.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Models"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Models"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\FGInput.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Models"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Models"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\FGExternalReactions.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Models"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Models"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\FGGasCell.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Models"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Models"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_FlightControl"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\flight_control\FGPID.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_FlightControl"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_FlightControl"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\flight_control\FGDeadBand.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_FlightControl"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_FlightControl"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\flight_control\FGFCSComponent.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_FlightControl"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_FlightControl"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\flight_control\FGFilter.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_FlightControl"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_FlightControl"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\flight_control\FGGain.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_FlightControl"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_FlightControl"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\flight_control\FGGradient.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_FlightControl"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_FlightControl"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\flight_control\FGKinemat.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_FlightControl"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_FlightControl"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\flight_control\FGSummer.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_FlightControl"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_FlightControl"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\flight_control\FGSwitch.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_FlightControl"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_FlightControl"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\flight_control\FGFCSFunction.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_FlightControl"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_FlightControl"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\flight_control\FGSensor.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_FlightControl"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_FlightControl"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\flight_control\FGActuator.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_FlightControl"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_FlightControl"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_Atmosphere"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\atmosphere\FGMSIS.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Atmosphere"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Atmosphere"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\atmosphere\FGMSISData.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Atmosphere"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Atmosphere"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\atmosphere\FGMars.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Atmosphere"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Atmosphere"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_Propulsion"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\propulsion\FGElectric.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Propulsion"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Propulsion"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\propulsion\FGEngine.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Propulsion"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Propulsion"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\propulsion\FGForce.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Propulsion"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Propulsion"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\propulsion\FGNozzle.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Propulsion"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Propulsion"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\propulsion\FGPiston.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Propulsion"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Propulsion"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\propulsion\FGPropeller.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Propulsion"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Propulsion"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\propulsion\FGRocket.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Propulsion"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Propulsion"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\propulsion\FGTank.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Propulsion"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Propulsion"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\propulsion\FGThruster.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Propulsion"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Propulsion"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\propulsion\FGTurbine.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Propulsion"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Propulsion"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\JSBSim\models\propulsion\FGTurboProp.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Propulsion"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Propulsion"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_LaRCsim"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\LaRCsim.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\LaRCsim.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\LaRCsimIC.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\LaRCsimIC.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\IO360.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\IO360.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\atmos_62.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\atmos_62.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\default_model_routines.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\default_model_routines.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\ls_accel.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\ls_accel.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\ls_aux.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\ls_aux.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\ls_cockpit.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\ls_constants.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\ls_generic.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\ls_geodesy.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\ls_geodesy.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\ls_gravity.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\ls_gravity.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\ls_init.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\ls_init.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\ls_matrix.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\ls_matrix.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\ls_model.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\ls_model.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\ls_sim_control.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\ls_step.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\ls_step.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\ls_sym.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\ls_types.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\c172_aero.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\c172_engine.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\c172_gear.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\c172_init.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\basic_init.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\basic_init.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\basic_aero.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\basic_aero.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\basic_engine.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\basic_gear.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\navion_init.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\navion_aero.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\navion_engine.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\navion_gear.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\navion_init.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\uiuc_aero.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\cherokee_aero.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\cherokee_engine.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\cherokee_gear.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\cherokee_init.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\ls_interface.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\LaRCsim\ls_interface.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_SPFDM"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\SP\ADA.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_SPFDM"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_SPFDM"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\SP\ADA.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_SPFDM"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_SPFDM"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\SP\ACMS.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_SPFDM"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_SPFDM"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\SP\ACMS.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_SPFDM"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_SPFDM"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\SP\Balloon.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_SPFDM"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_SPFDM"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\SP\Balloon.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_SPFDM"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_SPFDM"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\SP\BalloonSim.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_SPFDM"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_SPFDM"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\SP\BalloonSim.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_SPFDM"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_SPFDM"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\SP\MagicCarpet.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_SPFDM"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_SPFDM"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\SP\MagicCarpet.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_SPFDM"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_SPFDM"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_UIUCModel"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_1DdataFileReader.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_1DdataFileReader.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_1Dinterpolation.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_1Dinterpolation.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_2DdataFileReader.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_2DdataFileReader.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_2Dinterpolation.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_2Dinterpolation.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_3Dinterpolation.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_3Dinterpolation.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_aerodeflections.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_aerodeflections.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_aircraft.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_alh_ap.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_alh_ap.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_auto_pilot.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_auto_pilot.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_betaprobe.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_betaprobe.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_coef_drag.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_coef_drag.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_coef_lift.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_coef_lift.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_coef_pitch.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_coef_pitch.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_coef_roll.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_coef_roll.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_coef_sideforce.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_coef_sideforce.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_coef_yaw.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_coef_yaw.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_coefficients.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_coefficients.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_controlInput.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_controlInput.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_convert.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_convert.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_engine.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_engine.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_flapdata.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_flapdata.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_find_position.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_find_position.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_fog.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_fog.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_gear.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_gear.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_get_flapper.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_get_flapper.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_getwind.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_getwind.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_hh_ap.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_hh_ap.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_ice.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_ice.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_iceboot.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_iceboot.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_iced_nonlin.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_iced_nonlin.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_icing_demo.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_icing_demo.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_initializemaps.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_initializemaps.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_CD.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_CD.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_CL.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_CL.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_CY.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_CY.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_Cm.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_Cm.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_Cn.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_Cn.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_Croll.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_Croll.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_controlSurface.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_controlSurface.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_engine.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_engine.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_fog.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_fog.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_geometry.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_geometry.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_ice.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_ice.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_gear.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_gear.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_init.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_init.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_keyword.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_keyword.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_mass.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_mass.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_misc.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_misc.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_record1.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_record1.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_record2.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_record2.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_record3.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_record3.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_record4.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_record4.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_record5.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_record5.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_record6.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_map_record6.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_init.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_init.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_geometry.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_geometry.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_controlSurface.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_controlSurface.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_mass.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_mass.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_engine.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_engine.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_CD.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_CD.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_CL.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_CL.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_Cm.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_Cm.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_CY.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_CY.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_Croll.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_Croll.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_Cn.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_Cn.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_gear.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_gear.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_ice.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_ice.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_fog.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_fog.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_record.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_record.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_misc.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_misc.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_functions.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_menu_functions.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_pah_ap.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_pah_ap.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_parsefile.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_parsefile.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_rah_ap.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_rah_ap.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_recorder.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_recorder.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_warnings_errors.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_warnings_errors.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_wrapper.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UIUCModel\uiuc_wrapper.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_UIUCModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_UIUCModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_YASim"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\YASim.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\YASim.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\FGGround.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\FGGround.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Airplane.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Airplane.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Atmosphere.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Atmosphere.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\BodyEnvironment.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\ControlMap.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\ControlMap.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\FGFDM.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\FGFDM.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Gear.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Gear.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Glue.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Glue.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Ground.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Ground.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Hitch.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Hitch.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Hook.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Hook.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Launchbar.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Launchbar.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Integrator.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Integrator.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Jet.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Jet.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Math.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Math.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Model.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Model.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\PropEngine.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\PropEngine.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Propeller.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Propeller.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Engine.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\PistonEngine.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\PistonEngine.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\TurbineEngine.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\TurbineEngine.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\RigidBody.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\RigidBody.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Rotor.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Rotor.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Rotorpart.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Rotorpart.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\SimpleJet.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\SimpleJet.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Surface.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Surface.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Thruster.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Thruster.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Vector.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Wing.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Wing.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Turbulence.cpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\YASim\Turbulence.hpp\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_YASim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_YASim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_Flight"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\flight.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Flight"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Flight"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\flight.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Flight"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Flight"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\groundcache.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Flight"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Flight"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\groundcache.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Flight"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Flight"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UFO.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Flight"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Flight"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\UFO.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Flight"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Flight"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\NullFDM.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Flight"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Flight"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\FDM\NullFDM.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Flight"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Flight"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_GUI"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\GUI\new_gui.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_GUI"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_GUI"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\GUI\new_gui.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_GUI"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_GUI"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\GUI\dialog.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_GUI"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_GUI"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\GUI\dialog.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_GUI"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_GUI"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\GUI\menubar.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_GUI"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_GUI"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\GUI\menubar.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_GUI"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_GUI"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\GUI\gui.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_GUI"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_GUI"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\GUI\gui.h\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_GUI"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_GUI"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\GUI\gui_funcs.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_GUI"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_GUI"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\GUI\fonts.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_GUI"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_GUI"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\GUI\AirportList.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_GUI"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_GUI"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\GUI\AirportList.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_GUI"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_GUI"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\GUI\property_list.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_GUI"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_GUI"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\GUI\property_list.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_GUI"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_GUI"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\GUI\layout.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_GUI"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_GUI"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\GUI\layout-props.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_GUI"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_GUI"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\GUI\layout.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_GUI"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_GUI"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\GUI\SafeTexFont.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_GUI"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_GUI"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\GUI\SafeTexFont.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_GUI"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_GUI"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_Input"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Input\input.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Input"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Input"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Input\input.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Input"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Input"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_Instrumentation"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\instrument_mgr.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\instrument_mgr.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\adf.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\adf.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\airspeed_indicator.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\airspeed_indicator.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\altimeter.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\altimeter.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\attitude_indicator.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\attitude_indicator.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\clock.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\clock.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\dme.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\dme.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\gps.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\gps.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\gsdi.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\gsdi.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\gyro.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\gyro.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\heading_indicator.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\heading_indicator.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\heading_indicator_fg.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\heading_indicator_fg.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\heading_indicator_dg.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\heading_indicator_dg.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\kr_87.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\kr_87.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\kt_70.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\kt_70.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\mag_compass.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\mag_compass.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\marker_beacon.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\marker_beacon.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\mrg.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\mrg.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\navradio.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\navradio.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\slip_skid_ball.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\slip_skid_ball.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\transponder.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\transponder.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\turn_indicator.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\turn_indicator.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\vertical_speed_indicator.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\vertical_speed_indicator.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\inst_vertical_speed_indicator.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\inst_vertical_speed_indicator.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\od_gauge.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\od_gauge.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\wxradar.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\wxradar.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\tacan.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\tacan.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\mk_viii.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\mk_viii.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\dclgps.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\dclgps.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\render_area_2d.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\render_area_2d.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\groundradar.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\groundradar.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\agradar.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\agradar.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\rad_alt.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\rad_alt.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Instrumentation"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Instrumentation"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_KLN89"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_act.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_act.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_apt.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_apt.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_cal.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_cal.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_dir.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_dir.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_fpl.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_fpl.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_int.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_int.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_nav.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_nav.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_ndb.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_ndb.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_nrst.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_nrst.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_oth.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_oth.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_set.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_set.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_usr.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_usr.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_vor.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_page_vor.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\KLN89\kln89_symbols.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_KLN89"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_KLN89"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_HUD"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\HUD\HUD.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_HUD"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_HUD"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\HUD\HUD.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_HUD"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_HUD"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\HUD\HUD_tape.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_HUD"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_HUD"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\HUD\HUD_dial.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_HUD"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_HUD"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\HUD\HUD_gauge.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_HUD"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_HUD"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\HUD\HUD_instrument.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_HUD"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_HUD"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\HUD\HUD_label.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_HUD"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_HUD"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\HUD\HUD_ladder.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_HUD"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_HUD"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\HUD\HUD_misc.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_HUD"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_HUD"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\HUD\HUD_runway.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_HUD"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_HUD"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\HUD\HUD_scale.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_HUD"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_HUD"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Instrumentation\HUD\HUD_tbi.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_HUD"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_HUD"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "main"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\bootstrap.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_Main"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\main.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\main.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\renderer.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\renderer.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\fg_commands.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\fg_commands.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\fg_init.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\fg_init.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\fg_io.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\fg_io.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\fg_props.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\fg_props.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\globals.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\globals.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\logger.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\logger.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\options.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\options.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\splash.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\splash.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\util.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\util.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\viewer.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\viewer.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\viewmgr.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\viewmgr.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\CameraGroup.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\CameraGroup.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\FGManipulator.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\FGManipulator.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\WindowSystemAdapter.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\WindowSystemAdapter.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\WindowBuilder.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\WindowBuilder.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\fg_os_osgviewer.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Main\$(GFX_COMMON)\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Main"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Main"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_Model"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Model\acmodel.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Model"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Model"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Model\acmodel.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Model"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Model"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Model\model_panel.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Model"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Model"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Model\model_panel.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Model"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Model"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Model\modelmgr.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Model"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Model"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Model\modelmgr.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Model"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Model"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Model\panelnode.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Model"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Model"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Model\panelnode.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Model"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Model"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_AIModel"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\submodel.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\submodel.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIManager.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIManager.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIBase.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIBase.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIModelData.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIModelData.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIAircraft.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIAircraft.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIMultiplayer.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIMultiplayer.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIShip.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIShip.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIBallistic.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIBallistic.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIStorm.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIStorm.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIThermal.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIThermal.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIFlightPlan.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIFlightPlan.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIFlightPlanCreate.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIFlightPlanCreatePushBack.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIFlightPlanCreateCruise.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AICarrier.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AICarrier.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIStatic.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIStatic.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AITanker.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AITanker.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIWingman.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\AIWingman.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\performancedata.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\performancedata.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\performancedb.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\AIModel\performancedb.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_AIModel"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_AIModel"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_MultiPlayer"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\MultiPlayer\multiplaymgr.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_MultiPlayer"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_MultiPlayer"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\MultiPlayer\multiplaymgr.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_MultiPlayer"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_MultiPlayer"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\MultiPlayer\mpmessages.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_MultiPlayer"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_MultiPlayer"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\MultiPlayer\tiny_xdr.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_MultiPlayer"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_MultiPlayer"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\MultiPlayer\tiny_xdr.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_MultiPlayer"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_MultiPlayer"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_Navaids"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Navaids\navdb.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Navaids"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Navaids"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Navaids\navdb.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Navaids"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Navaids"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Navaids\fix.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Navaids"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Navaids"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Navaids\fixlist.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Navaids"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Navaids"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Navaids\fixlist.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Navaids"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Navaids"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Navaids\awynet.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Navaids"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Navaids"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Navaids\awynet.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Navaids"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Navaids"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Navaids\navrecord.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Navaids"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Navaids"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Navaids\navrecord.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Navaids"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Navaids"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Navaids\navlist.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Navaids"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Navaids"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Navaids\navlist.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Navaids"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Navaids"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Navaids\positioned.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Navaids"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Navaids"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Navaids\positioned.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Navaids"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Navaids"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_Network"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\protocol.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\protocol.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\ATC-Main.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\ATC-Main.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\ATC-Inputs.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\ATC-Inputs.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\ATC-Outputs.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\ATC-Outputs.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\atlas.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\atlas.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\AV400.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\AV400.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\garmin.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\garmin.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\lfsglass.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\lfsglass.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\lfsglass_data.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\httpd.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\httpd.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\joyclient.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\joyclient.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\jsclient.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\jsclient.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\native.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\native.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\native_ctrls.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\native_ctrls.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\native_fdm.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\native_fdm.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\native_gui.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\native_gui.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\net_ctrls.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\net_fdm.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\net_fdm_mini.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\net_gui.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\nmea.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\nmea.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\opengc.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\opengc.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\opengc_data.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\multiplay.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\multiplay.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\props.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\props.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\pve.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\pve.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\ray.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\ray.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\rul.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\rul.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\generic.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Network\generic.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Network"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Network"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_Scenery"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Scenery\redout.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Scenery"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Scenery"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Scenery\redout.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Scenery"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Scenery"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Scenery\scenery.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Scenery"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Scenery"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Scenery\scenery.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Scenery"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Scenery"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Scenery\SceneryPager.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Scenery"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Scenery"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Scenery\SceneryPager.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Scenery"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Scenery"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Scenery\tilemgr.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Scenery"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Scenery"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Scenery\tilemgr.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Scenery"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Scenery"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_Scripting"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Scripting\NasalSys.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Scripting"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Scripting"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Scripting\NasalSys.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Scripting"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Scripting"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Scripting\nasal-props.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Scripting"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Scripting"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_Sound"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Sound\beacon.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Sound"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Sound"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Sound\beacon.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Sound"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Sound"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Sound\fg_fx.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Sound"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Sound"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Sound\fg_fx.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Sound"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Sound"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Sound\morse.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Sound"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Sound"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Sound\morse.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Sound"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Sound"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Sound\voice.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Sound"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Sound"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Sound\voice.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Sound"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Sound"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_Systems"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Systems\system_mgr.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Systems"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Systems"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Systems\system_mgr.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Systems"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Systems"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Systems\electrical.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Systems"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Systems"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Systems\electrical.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Systems"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Systems"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Systems\pitot.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Systems"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Systems"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Systems\pitot.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Systems"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Systems"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Systems\static.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Systems"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Systems"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Systems\static.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Systems"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Systems"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Systems\vacuum.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Systems"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Systems"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Systems\vacuum.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Systems"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Systems"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_Time"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Time\fg_timer.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Time"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Time"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Time\fg_timer.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Time"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Time"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Time\light.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Time"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Time"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Time\light.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Time"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Time"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Time\sunsolver.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Time"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Time"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Time\sunsolver.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Time"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Time"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Time\tmp.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Time"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Time"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Time\tmp.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Time"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Time"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Group "Lib_Traffic"\r
-\r
-# PROP Default_Filter ""\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Traffic\SchedFlight.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Traffic"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Traffic"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Traffic\SchedFlight.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Traffic"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Traffic"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Traffic\Schedule.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Traffic"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Traffic"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Traffic\Schedule.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Traffic"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Traffic"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Traffic\TrafficMgr.cxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Traffic"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Traffic"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
-SOURCE=.\src\Traffic\TrafficMgr.hxx\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_Traffic"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_Traffic"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# End Group\r
-# Begin Source File\r
-\r
-SOURCE = .\src\Include\config.h-msvc6\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# Begin Custom Build - Creating config.h\r
-InputPath=.\src\Include\config.h-msvc6\r
-\r
-".\src\Include\config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
- copy .\src\Include\config.h-msvc6 .\src\Include\config.h\r
-\r
-# End Custom Build\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# Begin Custom Build - Creating config.h\r
-InputPath=.\src\Include\config.h-msvc6\r
-\r
-".\src\Include\config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"\r
- copy .\src\Include\config.h-msvc6 .\src\Include\config.h\r
-\r
-# End Custom Build\r
-\r
-!ENDIF\r
-\r
-# End Source File\r
-# End Target\r
-# End Project\r
+++ /dev/null
-Microsoft Developer Studio Workspace File, Format Version 6.00\r
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!\r
-\r
-###############################################################################\r
-\r
-Project: "FlightGear"=".\FlightGear.dsp" - Package Owner=<4>\r
-\r
-Package=<5>\r
-{{{\r
-}}}\r
-\r
-Package=<4>\r
-{{{\r
-}}}\r
-\r
-###############################################################################\r
-\r
-Global:\r
-\r
-Package=<5>\r
-{{{\r
-}}}\r
-\r
-Package=<3>\r
-{{{\r
-}}}\r
-\r
-###############################################################################\r
-\r
if test "$_version" = "0" ; then
AC_MSG_ERROR([[We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.]])
else
- AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).])
+ AC_MSG_ERROR([Your boost libraries seems to old (version $_version).])
fi
else
AC_SUBST(BOOST_CPPFLAGS)
AC_PROG_RANLIB
AC_PROG_INSTALL
AC_PROG_LN_S
-AX_BOOST_BASE([1.34.0])
+AX_BOOST_BASE([1.37.0])
if test "x$BOOST_CPPFLAGS" != "x-I/usr/include" ; then
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
esac
AM_CONDITIONAL(HAVE_FRAMEWORK_OSG, test "x$ac_cv_framework_osg" != "x")
+AC_MSG_CHECKING([checking for osg::CullSettings::CLEAR_MASK])
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <osg/CullSettings>]],
+ [[osg::CullSettings::VariablesMask mask = osg::CullSettings::CLEAR_MASK;]])],
+ [AC_DEFINE([HAVE_CULLSETTINGS_CLEAR_MASK],1,[define if OSG has CullSettings::CLEAR_MASK])
+ AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])])
AC_LANG_POP
dnl Check for system installed zlib
+Effects
+-------
+
Effects describe the graphical appearance of 3d objects and scenery in
FlightGear. The main motivation for effects is to support OpenGL
shaders and to provide different implementations for graphics hardware
created on-the-fly by FlightGear at runtime. An effect consists of a
"parameters" section followed by "technique" descriptions. The
"parameters" section is a tree of values that describe, abstractly,
-the graphical appearence of objects that use the effect. Techniques
+the graphical characteristics of objects that use the effect. Techniques
refer to these parameters and use them to set OpenGL state or to set
-parameters for shader programs.
+parameters for shader programs. The names of properties in the
+parameter section can be whatever the effects author chooses, although
+some standard parameters are set by FlightGear itself. On the other
+hand, the properties in the techniques section are all defined by the
+FlightGear.
-Parameters can be declared to have a dynamic variance, which means
-that if their value is changed the corresponding value in the
-technique will be changed too. [TO BE IMPLEMENTED]
+Techniques
+----------
A technique can contain a predicate that describes the OpenGL
functionality required to support the technique. The first
glversion - returns the version number of OpenGL
extension-supported - returns true if an OpenGL extension is supported
property - returns the boolean value of a property
+shader-language - returns the version of GLSL supported, or 0 if there is none.
+
+The proper way to test whether to enable a shader-based technique is:
+ <predicate>
+ <and>
+ <property>/sim/rendering/shader-effects</property>
+ <less-equal>
+ <value type="float">1.0</value>
+ <shader-language/>
+ </less-equal>
+ </and>
+ </predicate>
+
A technique can consist of several passes. A pass is basically an Open
Scene Graph StateSet. Ultimately all OpenGL and OSG modes and state
-attributes will be setable in a technique. The following are
-are currently implemented:
-lighting - true, false
-shade-model - flat, smooth
+attributes will be accessable in techniques. State attributes -- that
+is, technique properties that have children and are not just boolean
+modes -- have an <active> parameter which enables or disables the
+attribute. In this way a technique can declare parameters it needs,
+but not enable the attribute at all if it is not needed; the decision
+can be based on a parameter in the parameters section of the
+effect. For example, effects that support transparent and opaque
+geometry could have as part of a technique:
+
+ <blend>
+ <active><use>blend/active</use></active>
+ <source>src-alpha</source>
+ <destination>one-minus-src-alpha</destination>
+ </blend>
+
+So if the blend/active parameter is true blending will be activated
+using the usual blending equation; otherwise blending is disabled.
+
+Values of Technique Attributes
+------------------------------
+
+Values are assigned to technique properties in several ways:
+
+ * They can appear directly in the techniques section as a
+ constant. For example:
+ <uniform>
+ <name>ColorsTex</name>
+ <type>sampler-1d</type>
+ <value type="int">2</value>
+ </uniform>
+ * The name of a property in the parameters section can be
+ referenced using a "use" clause. For example, in the technique
+ section:
+ <material>
+ <ambient><use>material/ambient</use></ambient>
+ </material>
+ Then, in the parameters section of the effect:
+ <parameters>
+ <material>
+ <ambient type="vec4d">
+ 0.2 .2 0.2 1.0
+ </ambient>
+ </material>
+ </parameters>
+
+ It's worth pointing out that the "material" property in a
+ technique specifies part of OpenGL's state, whereas "material"
+ in the parameters section is just a name, part of a
+ hierarchical namespace.
+
+ * A property in the parameters section doesn't need to contain
+ a constant value; it can also contain a "use" property. Here
+ the value of the use clause is the name of a node in an
+ external property tree which will be used as the source of a
+ value. If the name begins with '/', the node is in
+ FlightGear's global property tree; otherwise, it is in a local
+ property tree, usually belonging to a model [NOT IMPLEMENTED
+ YET]. For example:
+ <parameters>
+ <chrome-light><use>/rendering/scene/chrome-light</use></chrome-light>
+ </parameters>
+ The type is determined by what is expected by the technique
+ attribute that will ultimately receive the value. [There is
+ no way to get vector values out of the main property system
+ yet; this will be fixed shortly.] Values that are declared
+ this way are dynamically updated if the property node
+ changes.
+
+OpenGL Attributes
+-----------------
+
+The following attributes are currently implemented in techiques:
+alpha-test - children: active, comparison, reference
+ Valid values for comparision:
+ never, less, equal, lequal, greater, notequal, gequal,
+ always
+
+blend - children: active, source, destination, source-rgb,
+ source-alpha, destination-rgb, destination-alpha
+ Each operand can have the following values:
+ dst-alpha, dst-color, one, one-minus-dst-alpha,
+ one-minus-dst-color, one-minus-src-alpha,
+ one-minus-src-color, src-alpha, src-alpha-saturate,
+ src-color, constant-color, one-minus-constant-color,
+ constant-alpha, one-minus-constant-alpha, zero
+
cull-face - front, back, front-back
+
+lighting - true, false
+
+material - children: active, ambient, ambient-front, ambient-back, diffuse,
+ diffuse-front, diffuse-back, specular, specular-front,
+ specular-back, emissive, emissive-front, emissive-back, shininess,
+ shininess-front, shininess-back, color-mode
+
+polygon-mode - children: front, back
+ Valid values:
+ fill, line, point
+
+program
+ vertex-shader
+ fragment-shader
+
+render-bin - (OSG) children: bin-number, bin-name
+
rendering-hint - (OSG) opaque, transparent
-render-bin - children: bin-number, bin-name
-material - children: ambient, ambient-front, ambient-back, diffuse,
-diffuse-front, diffuse-back, specular, specular-front,
-specular-back, emissive, emissive-front, emissive-back, shininess,
-shininess-front, shininess-back, color-mode
-blend - true, false
-alpha-test - true, false
+
+shade-model - flat, smooth
+
texture-unit - has several child properties:
unit - The number of an OpenGL texture unit
type - This is either an OpenGL texture type or the name of a
environment
mode
color
-program
- vertex-shader
- fragment-shader
uniform
name
type - float, float-vec3, float-vec4, sampler-1d, sampler-2d,
sampler-3d
-polygon-mode
-front - fill, line, point
-back - fill, line, point
+
+vertex-program-two-side - true, false
+
+vertex-program-point-size - true, false
+
+Inheritance
+-----------
One feature not fully illustrated in the sample below is that
effects can inherit from each other. The parent effect is listed in
effect below could be very short, listing just new
parameters and adding nothing to the techniques section;
alternatively, a technique could be altered or customized in a
-child, listing (for example) a different shader program. Terrain
-materials work in this way: for each material type in materials.xml
-an effect is created that inherits from a single default terrain
-effect. The parameters section of the effect is filled in using the
-ambient, diffuse, specular, emissive, shininess, and transparent
-fields of the material. Seperate effects are created for each texture
+child, listing (for example) a different shader program. An example
+showing inheritance Effects/crop.eff, which inherits some if its
+values from Effects/terrain-default.eff.
+
+FlightGear directly uses effects inheritance to assign effects to 3D
+models and terrain. As described below, at runtime small effects are
+created that contain material and texture values in a "parameters"
+section. These effects inherit from another effect which references
+those parameters in its "techniques" section. The derived effect
+overrides any default values that might be in the base effect's
+parameters section.
+
+Default Effects in Terrain Materials and Models
+---------------------------------------
+
+Effects for terrain work in this way: for each material type in
+materials.xml an effect is created that inherits from a single default
+terrain effect, Effects/terrain-default.eff. The parameters section of
+the effect is filled in using the ambient, diffuse, specular,
+emissive, shininess, and transparent fields of the material. The
+parameters image, filter, wrap-s, and wrap-t are also initialized from
+the material xml. Seperate effects are created for each texture
variant of a material.
+Model effects are created by walking the OpenSceneGraph scene graph
+for a model and replacing nodes (osg::Geode) that have state sets with
+node that uses an effect instead. Again, a small effect is created
+with parameters extracted from OSG objects; this effect inherits, by
+default, from Effects/model-default.eff. A larger set of parameters is
+created for model effects than for terrain because there is more
+variation possible from the OSG model loaders than from the terrain
+system. The parameters created are:
+
+ * material active, ambient, diffuse, specular, emissive,
+ shininess, color mode
+ * blend active, source, destination
+ * shade-model
+ * cull-face
+ * rendering-hint
+ * texture type, image, filter, wrap-s, wrap-t
+
+Specifying Custom Effects
+-------------------------
+
+You can specify the effects that will be used by FlightGear as the
+base effect when it creates terrain and model effects.
+
+In the terrain materials.xml, an "effect" property specifies the name
+of the model to use.
+
+In model .xml files, A richer syntax is supported. [TO BE DETERMINED]
+
Material animations will be implemented by creating a new effect
that inherits from one in a model, overriding the parameters that
will be animated.
+Examples
+--------
-<PropertyList>
- <effect>
- <name>city</name>
- <!-- <inherits-from>another-effect</inherits-from> -->
- <parameters>
- <material>
- <ambient type="vec4d">
- 0.0 0.0 0.0 1.0
- </ambient>
- <diffuse type="vec4d">
- .5 .5 .5 1.0
- </diffuse>
- <specular type="vec4d">
- 0.3 0.3 0.3 1.0
- </specular>
- <emissive type="vec4d" variance="dynamic">
- 0.0 0.0 0.0 1.0
- </emissive>
- <shininess>1.2</shininess>
- </material>
- <texture n="0">
- <image>city.png</image>
- <filter>linear-mipmap-linear</filter>
- <!-- also repeat -->
- <wrap-s>clamp</wrap-s>
- <wrap-t>clamp-to-edge</wrap-t>
- <!--
- <wrap-r>clamp-to-border</wrap-r>
- -->
- <!-- float, signed-integer, integer -->
- <internal-format>normalized</internal-format>
- </texture>
- <texture n="1">
- <image>detail.png</image>
- <filter>linear-mipmap-linear</filter>
- <!-- also repeat -->
- <wrap-s>clamp</wrap-s>
- <wrap-t>clamp-to-edge</wrap-t>
- <!--
- <wrap-r>clamp-to-border</wrap-r>
- -->
- <!-- float, signed-integer, integer -->
- <internal-format>normalized</internal-format>
- </texture>
- <bump-height type="double">.05</bump-height>
- <pattern-rotation type="vec4d">0 0 1 1.5708</pattern-rotation>
- </parameters>
- <technique>
- <predicate>
- <!-- This is the general way to test for shader support -->
- <or>
- <less-equal>
- <value type="float">2.0</value>
- <glversion/>
- </less-equal>
- <and>
- <extension-supported>GL_ARB_shader_objects</extension-supported>
- <extension-supported>GL_ARB_shading_language_100</extension-supported>
- <extension-supported>GL_ARB_vertex_shader</extension-supported>
- <extension-supported>GL_ARB_fragment_shader</extension-supported>
- </and>
- </or>
- </predicate>
- <pass>
- <lighting>true</lighting>
- <material>
- <ambient><use>material/ambient</use></ambient>
- <diffuse><use>material/diffuse</use></diffuse>
- <specular><use>material/specular</use></specular>
- <shininess><use>material/shininess</use></shininess>
- </material>
- <texture-unit>
- <unit>0</unit>
- <image><use>texture[0]/image</use></image>
- <filter><use>texture[0]/filter</use></filter>
- <wrap-s><use>texture[0]/wrap-s</use></wrap-s>
- <wrap-t><use>texture[0]/wrap-t</use></wrap-t>
- <internal-format>
- <use>texture[0]/internal-format</use>
- </internal-format>
- </texture-unit>
- <texture-unit>
- <unit>1</unit>
- <image><use>texture[1]/image</use></image>
- <filter><use>texture[1]/filter</use></filter>
- <wrap-s><use>texture[1]/wrap-s</use></wrap-s>
- <wrap-t><use>texture[1]/wrap-t</use></wrap-t>
- <internal-format>
- <use>texture[1]/internal-format</use>
- </internal-format>
- </texture-unit>
- <uniform>
- <name>bumpHeight</name>
- <type>float</type>
- <use>bump-height</use>
- </uniform>
- <uniform>
- <name>patternRotation</name>
- <type>float-vec4</type>
- <use>pattern-rotation</use>
- </uniform>
- <uniform>
- <name>baseTexture</name>
- <type>sampler-2d</type>
- <value>0</value>
- </uniform>
- <uniform>
- <name>detailTexture</name>
- <type>sampler-2d</type>
- <value>1</value>
- </uniform>
- <shader-program>
- <!-- These two vertex shaders are linked together -->
- <vertex-shader>
- "Shaders/util.vert"
- </vertex-shader>
- <vertex-shader>
- "Shaders/foo.vert"
- </vertex-shader>
- <fragment-shader>
- "Shaders/foo.frag"
- </fragment-shader>
- </shader-program>
- </pass>
- </technique>
- <!-- This technique is always valid -->
- <technique>
- <pass>
- <lighting>true</lighting>
- <material>
- <ambient><use>material/ambient</use></ambient>
- <diffuse><use>material/diffuse</use></diffuse>
- <specular><use>material/specular</use></specular>
- </material>
- <texture-unit>
- <unit>0</unit>
- <image><use>texture[0]/image</use></image>
- <filter><use>texture[0]/filter</use></filter>
- <wrap-s><use>texture[0]/wrap-s</use></wrap-s>
- <wrap-t><use>texture[0]/wrap-t</use></wrap-t>
- <internal-format>
- <use>texture[0]/internal-format</use>
- </internal-format>
- </texture-unit>
- </pass>
- </technique>
- </effect>
-</PropertyList>
+The Effects directory contains the effects definitions; look there for
+examples. Effects/crop.eff is a good example of a complex effect.
<Filter
Name="Lib_Autopilot"
Filter="">
+ <File
+ RelativePath="..\..\src\Autopilot\autobrake.cxx">
+ </File>
+ <File
+ RelativePath="..\..\src\Autopilot\autobrake.hxx">
+ </File>
<File
RelativePath="..\..\src\Autopilot\route_mgr.cxx">
</File>
<Filter
Name="Lib_Autopilot"
>
+ <File
+ RelativePath="..\..\..\src\Autopilot\autobrake.cxx"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\src\Autopilot\autobrake.hxx"
+ >
+ </File>
<File
RelativePath="..\..\..\src\Autopilot\route_mgr.cxx"
>
#include <string>
#include <math.h>
#include <time.h>
+
#ifdef _MSC_VER
# include <float.h>
# define finite _finite
}
//cerr << "1"<< endl;
- SGGeoc geoc = SGGeoc::fromCart(SGVec3d(newPos[0], newPos[1], newPos[2]));
-
- double midlat = geoc.getLatitudeDeg();
- double midlon = geoc.getLongitudeDeg();
+ SGGeod geod = SGGeod::fromCart(SGVec3d(newPos[0], newPos[1], newPos[2]));
prevNode = tmpNode;
- tmpNode = globals->get_airwaynet()->findNearestNode(midlat, midlon);
+ tmpNode = globals->get_airwaynet()->findNearestNode(geod);
FGNode* node = globals->get_airwaynet()->findNode(tmpNode);
- SGGeoc nodePos(SGGeoc::fromGeod(node->getPosition()));
- if ((tmpNode != prevNode) && (SGGeodesy::distanceM(geoc, nodePos) < 25000)) {
+ if ((tmpNode != prevNode) && (SGGeodesy::distanceM(geod, node->getPosition()) < 25000)) {
nodes.push_back(tmpNode);
}
}
_pitch(0),
_pitch_deg(0),
_speed_kt(0),
+_selected_ac(0),
_range_ft(0),
_relbrg (0),
_parent_speed(0),
+_dt_count(0),
+_next_run(0),
_parent_x_offset(0),
-_selected_ac(0)
+_parent_y_offset(0),
+_parent("")
+
{
invisible = false;
}
setNoRoll(scFileNode->getBoolValue("no-roll", true));
setName(scFileNode->getStringValue("name", "groundvehicle"));
setSMPath(scFileNode->getStringValue("submodel-path", ""));
- setContactX1offset(scFileNode->getDoubleValue("contact_x1_offset", 0.0));
- setContactX2offset(scFileNode->getDoubleValue("contact_x2_offset", 0.0));
+ setContactX1offset(scFileNode->getDoubleValue("contact-x1-offset", 0.0));
+ setContactX2offset(scFileNode->getDoubleValue("contact-x2-offset", 0.0));
setXOffset(scFileNode->getDoubleValue("hitch-x-offset", 38.55));
+ setYOffset(scFileNode->getDoubleValue("hitch-y-offset", 0.0));
setPitchoffset(scFileNode->getDoubleValue("pitch-offset", 0.0));
setRolloffset(scFileNode->getDoubleValue("roll-offset", 0.0));
setYawoffset(scFileNode->getDoubleValue("yaw-offset", 0.0));
- setPitchCoeff(scFileNode->getDoubleValue("pitch-coefficient", 0.5));
- setElevCoeff(scFileNode->getDoubleValue("elevation-coefficient", 0.5));
+ setPitchCoeff(scFileNode->getDoubleValue("pitch-coefficient", 0.1));
+ setElevCoeff(scFileNode->getDoubleValue("elevation-coefficient", 0.25));
setParentName(scFileNode->getStringValue("parent", ""));
setTowAngleGain(scFileNode->getDoubleValue("tow-angle-gain", 2.0));
setTowAngleLimit(scFileNode->getDoubleValue("tow-angle-limit-deg", 2.0));
SGRawValuePointer<double>(&_range_ft));
props->tie("hitch/x-offset-ft",
SGRawValuePointer<double>(&_x_offset));
+ props->tie("hitch/y-offset-ft",
+ SGRawValuePointer<double>(&_y_offset));
props->tie("hitch/parent-x-offset-ft",
SGRawValuePointer<double>(&_parent_x_offset));
+ props->tie("hitch/parent-y-offset-ft",
+ SGRawValuePointer<double>(&_parent_y_offset));
props->tie("controls/constants/tow-angle/gain",
SGRawValuePointer<double>(&_tow_angle_gain));
props->tie("controls/constants/tow-angle/limit-deg",
SGRawValuePointer<double>(&_tow_angle_limit));
-
-
- //we may need these later for towed vehicles
-
- // (*this, &FGAIBallistic::getElevHitchToUser));
- //props->tie("position/x-offset",
- // SGRawValueMethods<FGAIBase,double>(*this, &FGAIBase::_getXOffset, &FGAIBase::setXoffset));
- //props->tie("position/y-offset",
- // SGRawValueMethods<FGAIBase,double>(*this, &FGAIBase::_getYOffset, &FGAIBase::setYoffset));
- //props->tie("position/z-offset",
- // SGRawValueMethods<FGAIBase,double>(*this, &FGAIBase::_getZOffset, &FGAIBase::setZoffset));
- //props->tie("position/tgt-x-offset",
- // SGRawValueMethods<FGAIWingman,double>(*this, &FGAIWingman::getTgtXOffset, &FGAIWingman::setTgtXOffset));
- //props->tie("position/tgt-y-offset",
- // SGRawValueMethods<FGAIWingman,double>(*this, &FGAIWingman::getTgtYOffset, &FGAIWingman::setTgtYOffset));
- //props->tie("position/tgt-z-offset",
- // SGRawValueMethods<FGAIWingman,double>(*this, &FGAIWingman::getTgtZOffset, &FGAIWingman::setTgtZOffset));
+ props->tie("controls/contact-x1-offset-ft",
+ SGRawValuePointer<double>(&_contact_x1_offset));
+ props->tie("controls/contact-x2-offset-ft",
+ SGRawValuePointer<double>(&_contact_x2_offset));
}
void FGAIGroundVehicle::unbind() {
props->untie("hitch/tow-angle-deg");
props->untie("hitch/range-ft");
props->untie("hitch/x-offset-ft");
+ props->untie("hitch/y-offset-ft");
props->untie("hitch/parent-x-offset-ft");
+ props->untie("hitch/parent-y-offset-ft");
props->untie("controls/constants/tow-angle/gain");
props->untie("controls/constants/tow-angle/limit-deg");
-
- //we may need these later for towed vehicles
- //props->untie("load/rel-brg-to-user-deg");
- //props->untie("load/elev-to-user-deg");
- //props->untie("velocities/vertical-speed-fps");
- //props->untie("position/x-offset");
- //props->untie("position/y-offset");
- //props->untie("position/z-offset");
- //props->untie("position/tgt-x-offset");
- //props->untie("position/tgt-y-offset");
- //props->untie("position/tgt-z-offset");
+ props->untie("controls/contact-x1-offset-ft");
+ props->untie("controls/contact-x2-offset-ft");
}
bool FGAIGroundVehicle::init(bool search_in_AI_path) {
return false;
invisible = false;
-
_limit = 200;
no_roll = true;
void FGAIGroundVehicle::update(double dt) {
// SG_LOG(SG_GENERAL, SG_ALERT, "updating GroundVehicle: " << _name );
- if (getPitch()){
- setElevation(_elevation, dt, _elevation_coeff);
- ClimbTo(_elevation_ft);
- setPitch(_pitch, dt, _pitch_coeff);
- PitchTo(_pitch_deg);
- }
-
- if(_parent !=""){
- setParent();
-
- string parent_next_name = _selected_ac->getStringValue("waypoint/name-next");
- bool parent_waiting = _selected_ac->getBoolValue("waypoint/waiting");
- _parent_speed = _selected_ac->getDoubleValue("velocities/true-airspeed-kt");
-
- if (parent_next_name == "END" && fp->getNextWaypoint()->name != "END" ){
- SG_LOG(SG_GENERAL, SG_DEBUG, "AIGroundVeh1cle: " << _name
- << " setting END: getting new waypoints ");
- AdvanceFP();
- setWPNames();
- /*} else if (parent_next_name == "WAIT" && fp->getNextWaypoint()->name != "WAIT" ){*/
- } else if (parent_waiting && !_waiting){
- SG_LOG(SG_GENERAL, SG_DEBUG, "AIGroundVeh1cle: " << _name
- << " setting WAIT/WAITUNTIL: getting new waypoints ");
- AdvanceFP();
- setWPNames();
- _waiting = true;
- } else if (parent_next_name != "WAIT" && fp->getNextWaypoint()->name == "WAIT"){
- SG_LOG(SG_GENERAL, SG_DEBUG, "AIGroundVeh1cle: " << _name
- << " wait done: getting new waypoints ");
- _waiting = false;
- _wait_count = 0;
- fp->IncrementWaypoint(false);
- next = fp->getNextWaypoint();
-
- if (next->name == "WAITUNTIL" || next->name == "WAIT"
- || next->name == "END"){
- } else {
- prev = curr;
- fp->IncrementWaypoint(false);
- curr = fp->getCurrentWaypoint();
- next = fp->getNextWaypoint();
- }
-
- setWPNames();
- } else if (_range_ft > 1000){
-
- SG_LOG(SG_GENERAL, SG_INFO, "AIGroundVeh1cle: " << _name
- << " rescue: reforming train " << _range_ft << " " << _x_offset * 15);
-
- setTowAngle(0, dt, 1);
- setSpeed(_parent_speed * 2);
-
- } else if (_parent_speed > 1){
-
- setTowSpeed();
- setTowAngle(_relbrg, dt, 1);
-
- } else if (_parent_speed < -1){
-
- setTowSpeed();
-
- if (_relbrg < 0)
- setTowAngle(-(180 - (360 + _relbrg)), dt, 1);
- else
- setTowAngle(-(180 - _relbrg), dt, 1);
-
- } else
- setSpeed(_parent_speed);
- }
-
- FGAIShip::update(dt);
+ RunGroundVehicle(dt);
+// FGAIShip::update(dt);
}
void FGAIGroundVehicle::setNoRoll(bool nr) {
_x_offset = x;
}
+void FGAIGroundVehicle::setYOffset(double y) {
+ _y_offset = y;
+}
+
void FGAIGroundVehicle::setPitchCoeff(double pc) {
_pitch_coeff = pc;
}
}
void FGAIGroundVehicle::setTowAngle(double ta, double dt, double coeff){
- ta *= _tow_angle_gain;
- //_tow_angle = pow(ta,2) * sign(ta);
- //if (_tow_angle > _tow_angle_limit) _tow_angle = _tow_angle_limit;
- //if (_tow_angle < -_tow_angle_limit) _tow_angle = -_tow_angle_limit;
+ //_tow_angle = ta * _tow_angle_gain;
+ _tow_angle = pow(ta,2) * sign(ta);
SG_CLAMP_RANGE(_tow_angle, -_tow_angle_limit, _tow_angle_limit);
}
bool FGAIGroundVehicle::getGroundElev(SGGeod inpos) {
- if (globals->get_scenery()->get_elevation_m(SGGeod::fromGeodM(inpos, 10000),
- _elevation_m, &_material)){
- _ht_agl_ft = pos.getElevationFt() - _elevation_m * SG_METER_TO_FEET;
+ double height_m ;
+
+ if (globals->get_scenery()->get_elevation_m(SGGeod::fromGeodM(inpos, 3000), height_m, &_material,0)){
+ _ht_agl_ft = inpos.getElevationFt() - height_m * SG_METER_TO_FEET;
if (_material) {
const vector<string>& names = _material->get_names();
_solid = _material->get_solid();
- _load_resistance = _material->get_load_resistance();
- _frictionFactor =_material->get_friction_factor();
- _elevation = _elevation_m * SG_METER_TO_FEET;
if (!names.empty())
props->setStringValue("material/name", names[0].c_str());
bool FGAIGroundVehicle::getPitch() {
- double vel = props->getDoubleValue("velocities/true-airspeed-kt", 0);
- double contact_offset_x1_m = _contact_x1_offset * SG_FEET_TO_METER;
- double contact_offset_x2_m = _contact_x2_offset * SG_FEET_TO_METER;
+ if (!_tunnel){
+
+ double vel = props->getDoubleValue("velocities/true-airspeed-kt", 0);
+ double contact_offset_x1_m = _contact_x1_offset * SG_FEET_TO_METER;
+ double contact_offset_x2_m = _contact_x2_offset * SG_FEET_TO_METER;
+
+ SGVec3d front(-contact_offset_x1_m, 0, 0);
+ SGVec3d rear(-contact_offset_x2_m, 0, 0);
+ SGVec3d Front = getCartPosAt(front);
+ SGVec3d Rear = getCartPosAt(rear);
- SGVec3d front(-contact_offset_x1_m, 0, 0);
- SGVec3d rear(-contact_offset_x2_m, 0, 0);
- SGVec3d Front = getCartPosAt(front);
- SGVec3d Rear = getCartPosAt(rear);
+ SGGeod geodFront = SGGeod::fromCart(Front);
+ SGGeod geodRear = SGGeod::fromCart(Rear);
- SGGeod geodFront = SGGeod::fromCart(Front);
- SGGeod geodRear = SGGeod::fromCart(Rear);
+ double front_elev_m = 0;
+ double rear_elev_m = 0;
+ double elev_front = 0;
+ double elev_rear = 0;
+ double max_alt = 10000;
- double front_elev_m = 0;
- double rear_elev_m = 0;
- double elev_front = 0;
- double elev_rear = 0;
+ if (globals->get_scenery()->get_elevation_m(SGGeod::fromGeodM(geodFront, 3000), elev_front,
+ &_material, 0)){
+ front_elev_m = elev_front;
+ } else
+ return false;
- if (globals->get_scenery()->get_elevation_m(SGGeod::fromGeodM(geodFront, 10000),
- elev_front, &_material)){
+ if (globals->get_scenery()->get_elevation_m(SGGeod::fromGeodM(geodRear, 3000),
+ elev_rear, &_material, 0)){
+ rear_elev_m = elev_rear;
+ } else
+ return false;
- front_elev_m = elev_front;
+ if (vel >= 0){
+ double diff = front_elev_m - rear_elev_m;
+ _pitch = atan2 (diff,
+ fabs(contact_offset_x1_m) + fabs(contact_offset_x2_m)) * SG_RADIANS_TO_DEGREES;
+ _elevation = (rear_elev_m + diff/2) * SG_METER_TO_FEET;
+ } else {
+ double diff = rear_elev_m - front_elev_m;
+ _pitch = atan2 (diff,
+ fabs(contact_offset_x1_m) + fabs(contact_offset_x2_m)) * SG_RADIANS_TO_DEGREES;
+ _elevation = (front_elev_m + diff/2) * SG_METER_TO_FEET;
+ _pitch = -_pitch;
+ }
- //if (_material) {
- //
- //}
+ } else {
- } else
- return false;
+ if (prev->altitude == 0 || curr->altitude == 0) return false;
- if (globals->get_scenery()->get_elevation_m(SGGeod::fromGeodM(geodRear, 10000),
- elev_rear, &_material)){
- rear_elev_m = elev_rear;
- //if (_material) {
- // rear_elev_m = elev_rear;
- //}
+ static double distance;
+ static double d_alt;
+ static double curr_alt;
+ static double prev_alt;
- } else
- return false;
+ if (_new_waypoint){
+ cout << "new waypoint, calculating pitch " << endl;
+ curr_alt = curr->altitude * SG_METER_TO_FEET;
+ prev_alt = prev->altitude * SG_METER_TO_FEET;
+ d_alt = curr_alt - prev_alt;
+
+ distance = SGGeodesy::distanceM(SGGeod::fromDeg(prev->longitude, prev->latitude),
+ SGGeod::fromDeg(curr->longitude, curr->latitude));
+
+ _pitch = atan2(d_alt, distance * SG_METER_TO_FEET) * SG_RADIANS_TO_DEGREES;
+// cout << "new waypoint, calculating pitch " << _pitch << endl;
+ }
+
+
+ double distance_to_go = SGGeodesy::distanceM(SGGeod::fromDeg(pos.getLongitudeDeg(), pos.getLatitudeDeg()),
+ SGGeod::fromDeg(curr->longitude, curr->latitude));
+
+ //cout << "tunnel " << _tunnel
+ // << " distance curr & prev " << prev->name << " " << curr->name << " " << distance * SG_METER_TO_FEET
+ // << " distance to go " << distance_to_go * SG_METER_TO_FEET
+ // << " d_alt ft " << d_alt
+ // << endl;
+
+ if (distance_to_go > distance)
+ _elevation = prev_alt;
+ else
+ _elevation = curr_alt - (tan(_pitch * SG_DEGREES_TO_RADIANS) * distance_to_go * SG_METER_TO_FEET);
- if (vel >= 0){
- double diff = front_elev_m - rear_elev_m;
- _pitch = atan2 (diff,
- fabs(contact_offset_x1_m) + fabs(contact_offset_x2_m)) * SG_RADIANS_TO_DEGREES;
- _elevation = (rear_elev_m + diff/2) * SG_METER_TO_FEET;
- } else {
- double diff = rear_elev_m - front_elev_m;
- _pitch = atan2 (diff,
- fabs(contact_offset_x1_m) + fabs(contact_offset_x2_m)) * SG_RADIANS_TO_DEGREES;
- _elevation = (front_elev_m + diff/2) * SG_METER_TO_FEET;
- _pitch = -_pitch;
}
+ getGroundElev(pos);
+
return true;
}
model = _selected_ac;
} else {
model = ai->getChild(i);
+ string path = ai->getPath();
const string name = model->getStringValue("name");
if (!model->nChildren()){
double lat = _selected_ac->getDoubleValue("position/latitude-deg");
double lon = _selected_ac->getDoubleValue("position/longitude-deg");
double elevation = _selected_ac->getDoubleValue("position/altitude-ft");
- double hitch_offset_m = _x_offset * SG_FEET_TO_METER;
+ double hitch_x_offset_m = _selected_ac->getDoubleValue("hitch/x-offset-ft")
+ * SG_FEET_TO_METER;
+ double hitch_y_offset_m = _selected_ac->getDoubleValue("hitch/y-offset-ft")
+ * SG_FEET_TO_METER;
+
_selectedpos.setLatitudeDeg(lat);
_selectedpos.setLongitudeDeg(lon);
_selectedpos.setElevationFt(elevation);
- SGVec3d rear_hitch(-hitch_offset_m, 0, 0);
+ _parent_x_offset = _selected_ac->getDoubleValue("hitch/x-offset-ft");
+ _parent_y_offset = _selected_ac->getDoubleValue("hitch/y-offset-ft");
+ _parent_speed = _selected_ac->getDoubleValue("velocities/true-airspeed-kt");
+
+ SGVec3d rear_hitch(-hitch_x_offset_m, hitch_y_offset_m, 0);
SGVec3d RearHitch = getCartHitchPosAt(rear_hitch);
SGGeod rearpos = SGGeod::fromCart(RearHitch);
// calculate the bearing and range of the second pos from the first
double az2, distance;
geo_inverse_wgs_84(lat, lon, lat2, lon2, &bearing, &az2, &distance);
- range = distance *= SG_METER_TO_NM;
+ range = distance * SG_METER_TO_NM;
}
double FGAIGroundVehicle::calcRelBearingDeg(double bearing, double heading)
{
double angle = bearing - heading;
-
SG_NORMALIZE_RANGE(angle, -180.0, 180.0);
-
return angle;
}
void FGAIGroundVehicle::setTowSpeed(){
- _parent_x_offset = _selected_ac->getDoubleValue("hitch/x-offset-ft");
-
- // double diff = _range_ft - _parent_x_offset;
+ double diff = _range_ft - _x_offset;
double x = 0;
if (_range_ft > _x_offset * 3) x = 50;
if (_relbrg < -90 || _relbrg > 90){
setSpeed(_parent_speed - 5 - x);
//cout << _name << " case 1r _relbrg spd - 5 " << _relbrg << " " << diff << endl;
- }else if (_range_ft > _parent_x_offset + 0.25 && _relbrg >= -90 && _relbrg <= 90){
+ }else if (_range_ft > _x_offset + 0.25 && _relbrg >= -90 && _relbrg <= 90){
setSpeed(_parent_speed + 1 + x);
//cout << _name << " case 2r _relbrg spd + 1 " << _relbrg << " "
// << diff << " range " << _range_ft << endl;
- } else if (_range_ft < _parent_x_offset - 0.25 && _relbrg >= -90 && _relbrg <= 90){
+ } else if (_range_ft < _x_offset - 0.25 && _relbrg >= -90 && _relbrg <= 90){
setSpeed(_parent_speed - 1 - x);
//cout << _name << " case 3r _relbrg spd - 2 " << _relbrg << " "
// << diff << " " << _range_ft << endl;
}
}
+
+void FGAIGroundVehicle::RunGroundVehicle(double dt){
+
+ _dt_count += dt;
+
+ ///////////////////////////////////////////////////////////////////////////
+ // Check execution time (currently once every 0.05 sec or 20 fps)
+ // Add a bit of randomization to prevent the execution of all flight plans
+ // in synchrony, which can add significant periodic framerate flutter.
+ // Randomization removed to get better appearance
+ ///////////////////////////////////////////////////////////////////////////
+
+ //cout << "_start_sec " << _start_sec << " time_sec " << time_sec << endl;
+ if (_dt_count < _next_run)
+ return;
+
+ _next_run = 0.055 /*+ (0.015 * sg_random())*/;
+
+ if (getPitch()){
+ setElevation(_elevation, _dt_count, _elevation_coeff);
+ ClimbTo(_elevation_ft);
+ setPitch(_pitch, _dt_count, _pitch_coeff);
+ PitchTo(_pitch_deg);
+ }
+
+ if(_parent == ""){
+ AccelTo(prev->speed);
+ FGAIShip::update(_dt_count);
+ _dt_count = 0;
+ return;
+ }
+
+ setParent();
+
+ string parent_next_name = _selected_ac->getStringValue("waypoint/name-next");
+ bool parent_waiting = _selected_ac->getBoolValue("waypoint/waiting");
+
+ if (parent_next_name == "END" && fp->getNextWaypoint()->name != "END" ){
+ SG_LOG(SG_GENERAL, SG_DEBUG, "AIGroundVeh1cle: " << _name
+ << " setting END: getting new waypoints ");
+ AdvanceFP();
+ setWPNames();
+ /*} else if (parent_next_name == "WAIT" && fp->getNextWaypoint()->name != "WAIT" ){*/
+ } else if (parent_waiting && !_waiting){
+ SG_LOG(SG_GENERAL, SG_DEBUG, "AIGroundVeh1cle: " << _name
+ << " setting WAIT/WAITUNTIL: getting new waypoints ");
+ AdvanceFP();
+ setWPNames();
+ _waiting = true;
+ } else if (parent_next_name != "WAIT" && fp->getNextWaypoint()->name == "WAIT"){
+ SG_LOG(SG_GENERAL, SG_DEBUG, "AIGroundVeh1cle: " << _name
+ << " wait done: getting new waypoints ");
+ _waiting = false;
+ _wait_count = 0;
+ fp->IncrementWaypoint(false);
+ next = fp->getNextWaypoint();
+
+ if (next->name == "WAITUNTIL" || next->name == "WAIT"
+ || next->name == "END"){
+ } else {
+ prev = curr;
+ fp->IncrementWaypoint(false);
+ curr = fp->getCurrentWaypoint();
+ next = fp->getNextWaypoint();
+ }
+
+ setWPNames();
+ } else if (_range_ft > _parent_x_offset * 4){
+ SG_LOG(SG_GENERAL, SG_INFO, "AIGroundVeh1cle: " << _name
+ << " rescue: reforming train " << _range_ft << " " << _x_offset * 15);
+
+ setTowAngle(0, dt, 1);
+ setSpeed(_parent_speed * 2);
+
+ } else if (_parent_speed > 1){
+
+ setTowSpeed();
+ setTowAngle(_relbrg, dt, 1);
+
+ } else if (_parent_speed < -1){
+
+ setTowSpeed();
+
+ if (_relbrg < 0)
+ setTowAngle(-(180 - (360 + _relbrg)), dt, 1);
+ else
+ setTowAngle(-(180 - _relbrg), dt, 1);
+
+ } else
+ setSpeed(_parent_speed);
+
+ FGAIShip::update(_dt_count);
+ _dt_count = 0;
+
+}
+
// end AIGroundvehicle
void setContactX1offset(double x1);
void setContactX2offset(double x2);
void setXOffset(double x);
+ void setYOffset(double y);
void setPitchCoeff(double pc);
void setElevCoeff(double ec);
void setParent();
void AdvanceFP();
void setTowSpeed();
+ void RunGroundVehicle(double dt);
bool getGroundElev(SGGeod inpos);
bool getPitch();
double _contact_x1_offset, _contact_x2_offset, _contact_z_offset;
double _pitch, _pitch_coeff, _pitch_deg;
double _speed_coeff, _speed_kt;
- double _x_offset;
+ double _x_offset, _y_offset;
double _range_ft;
double _relbrg;
- double _parent_speed, _parent_x_offset;
+ double _parent_speed, _parent_x_offset, _parent_y_offset;
+ double _dt_count, _next_run;
const SGMaterial* _material;
const SGPropertyNode *_selected_ac;
continue;
std::string type = scEntry->getStringValue("type", "aircraft");
- if (type == "tanker") { // refueling scenarios
- FGAITanker* tanker = new FGAITanker;
+ if (type == "tanker") { // refueling scenarios
+ FGAITanker* tanker = new FGAITanker;
tanker->readFromScenario(scEntry);
attach(tanker);
wingman->readFromScenario(scEntry);
attach(wingman);
- } else if (type == "aircraft") {
+ } else if (type == "aircraft") {
FGAIAircraft* aircraft = new FGAIAircraft;
aircraft->readFromScenario(scEntry);
attach(aircraft);
tgt_ht[type] += fuse_range;
if (fabs(tgt_alt - alt) > tgt_ht[type] || type == FGAIBase::otBallistic
- || type == FGAIBase::otStorm || type == FGAIBase::otThermal ) {
- SG_LOG(SG_GENERAL, SG_DEBUG, "AIManager: skipping "
- << fabs(tgt_alt - alt)
- << " "
- << type
- );
- ++ai_list_itr;
- continue;
+ || type == FGAIBase::otStorm || type == FGAIBase::otThermal ) {
+ SG_LOG(SG_GENERAL, SG_DEBUG, "AIManager: skipping "
+ << fabs(tgt_alt - alt)
+ << " "
+ << type
+ );
+ ++ai_list_itr;
+ continue;
}
double tgt_lat = (*ai_list_itr)->_getLatitude();
FGAIShip::FGAIShip(object_type ot) :
- FGAIBase(ot),
- _limit(40),
- _elevation_m(0),
- _elevation_ft(0),
- _tow_angle(0),
- _dt_count(0),
- _next_run(0),
- _lead_angle(0),
- _xtrack_error(0)
+FGAIBase(ot),
+_limit(40),
+_elevation_m(0),
+_elevation_ft(0),
+_tow_angle(0),
+_dt_count(0),
+_next_run(0),
+_lead_angle(0),
+_xtrack_error(0),
+_tunnel(false),
+_curr_alt(0),
+_prev_alt(0),
+_until_time(""),
+_fp_init(false),
+_missed(false),
+_waiting(false),
+_new_waypoint(true),
+_missed_count(0),
+_wait_count(0),
+_missed_time_sec(30),
+_day(86400),
+_wp_range(0),
+_old_range(0),
+_range_rate(0),
+_roll_constant(0.001),
+_hdg_constant(0.01),
+_roll_factor(-0.0083335)
{
+ invisible = false;
}
FGAIShip::~FGAIShip() {
setSpeedConstant(scFileNode->getDoubleValue("speed-constant", 0.5));
if (!flightplan.empty()) {
- SG_LOG(SG_GENERAL, SG_ALERT, "getting flightplan: " << _name );
+ SG_LOG(SG_GENERAL, SG_ALERT, "getting flightplan: " << _name );
FGAIFlightPlan* fp = new FGAIFlightPlan(flightplan);
setFlightPlan(fp);
curr = 0; // the one ahead
next = 0; // the next plus 1
- _until_time = "";
-
props->setStringValue("name", _name.c_str());
props->setStringValue("waypoint/name-prev", _prev_name.c_str());
props->setStringValue("waypoint/name-curr", _curr_name.c_str());
_rudder = 0.0;
no_roll = false;
- _roll_constant = 0.001;
- _hdg_constant = 0.01;
- _roll_factor = -0.0083335;
-
_rd_turn_radius_ft = _sp_turn_radius_ft = turn_radius_ft;
- _fp_init = false;
- _missed = false;
- _waiting = false;
- _new_waypoint = true;
-
- _missed_count = 0;
- _wait_count = 0;
- _missed_time_sec = 30;
-
- _day = 86400;
-
-
- _wp_range = _old_range = 0;
- _range_rate = 0;
-
if (fp)
_fp_init = initFlightPlan();
SGRawValuePointer<bool>(&_waiting));
props->tie("waypoint/lead-angle-deg",
SGRawValuePointer<double>(&_lead_angle));
+ props->tie("waypoint/tunnel",
+ SGRawValuePointer<bool>(&_tunnel));
+ props->tie("waypoint/alt-curr-m",
+ SGRawValuePointer<double>(&_curr_alt));
+ props->tie("waypoint/alt-prev-m",
+ SGRawValuePointer<double>(&_prev_alt));
props->tie("submodels/serviceable",
SGRawValuePointer<bool>(&_serviceable));
props->tie("controls/turn-radius-ft",
props->untie("waypoint/lead-angle-deg");
props->untie("waypoint/xtrack-error-ft");
props->untie("waypoint/waiting");
+ props->untie("waypoint/tunnel");
+ props->untie("waypoint/alt-curr-m");
+ props->untie("waypoint/alt-prev-m");
props->untie("submodels/serviceable");
props->untie("controls/turn-radius-ft");
props->untie("controls/turn-radius-corrected-ft");
// Only change these values if we are able to compute them safely
if (SGLimits<double>::min() < dt) {
// Now here is the finite difference ...
-
+
// Transform that one to the horizontal local coordinate system.
SGQuatd ec2hlNew = SGQuatd::fromLonLat(pos);
// compute the new orientation
dOr.getAngleAxis(dOrAngleAxis);
// divided by the time difference provides a rotation speed vector
dOrAngleAxis /= dt;
-
+
aip.setBodyAngularVelocity(dOrAngleAxis);
}
}
// adjust turn radius for speed. The equation is very approximate.
// we need to allow for negative speeds
if (type == "ship")
- _sp_turn_radius_ft = 10 * pow ((fabs(speed) - 15), 2) + turn_radius_ft;
+ _sp_turn_radius_ft = 10 * pow ((fabs(speed) - 15), 2) + turn_radius_ft;
else
_sp_turn_radius_ft = turn_radius_ft;
// set the _rudder limit by speed
if (type == "ship"){
- if (speed <= 40)
- rudder_limit = (-0.825 * speed) + 35;
- else
- rudder_limit = 2;
+ if (speed <= 40)
+ rudder_limit = (-0.825 * speed) + 35;
+ else
+ rudder_limit = 2;
} else
rudder_limit = 20;
setPrevName("");
if (curr != 0)
- setCurrName(curr->name);
+ setCurrName(curr->name);
else{
setCurrName("");
SG_LOG(SG_GENERAL, SG_ALERT, "AIShip: current wp name error" );
void FGAIShip::ProcessFlightPlan(double dt) {
double time_sec = getDaySeconds();
- double until_time_sec = 0;
- _missed = false;
_dt_count += dt;
///////////////////////////////////////////////////////////////////////////
_next_run = 1.0 + (0.5 * sg_random());
+ double until_time_sec = 0;
+ _missed = false;
+
// check to see if we've reached the point for our next turn
// if the range to the waypoint is less than the calculated turn
// radius we can start the turn to the next leg
if ((_wp_range < (sp_turn_radius_nm * 1.25)) || _missed || (_waiting && !_new_waypoint)) {
- if (_next_name == "END" || fp->getNextWaypoint() == 0) {
+ if (_next_name == "TUNNEL"){
+ _tunnel = !_tunnel;
+
+ //SG_LOG(SG_GENERAL, SG_ALERT, "AIShip: " << _name << " TUNNEL ");
+
+ fp->IncrementWaypoint(false);
+ next = fp->getNextWaypoint();
+
+ if (next->name == "WAITUNTIL" || next->name == "WAIT"
+ || next->name == "END" || next->name == "TUNNEL")
+ return;
+
+ prev = curr;
+ fp->IncrementWaypoint(false);
+ curr = fp->getCurrentWaypoint();
+ next = fp->getNextWaypoint();
+
+ }else if(_next_name == "END" || fp->getNextWaypoint() == 0) {
if (_repeat) {
SG_LOG(SG_GENERAL, SG_ALERT, "AIShip: "<< _name << "Flightplan restarting ");
next = fp->getNextWaypoint();
if (next->name == "WAITUNTIL" || next->name == "WAIT"
- || next->name == "END")
+ || next->name == "END" || next->name == "TUNNEL")
return;
prev = curr;
_until_time = next->time;
setUntilTime(next->time);
if (until_time_sec > time_sec) {
- SG_LOG(SG_GENERAL, SG_DEBUG, "AIShip: " << _name << " "
+ SG_LOG(SG_GENERAL, SG_ALERT, "AIShip: " << _name << " "
<< curr->name << " waiting until: "
<< _until_time << " " << until_time_sec << " now " << time_sec );
setSpeed(0);
_wp_range = getRange(pos.getLatitudeDeg(), pos.getLongitudeDeg(), curr->latitude, curr->longitude);
_old_range = _wp_range;
setWPPos();
- AccelTo(prev->speed);
+ object_type type = getType();
+
+ if (type != 10)
+ AccelTo(prev->speed);
+
+ _curr_alt = curr->altitude;
+ _prev_alt = prev->altitude;
} else {
_new_waypoint = false;
else
SG_LOG(SG_GENERAL, SG_ALERT, "AIShip: Bearing or Range is not a finite number");
- _dt_count = 0;
+ _dt_count = 0;
} // end Processing FlightPlan
bool FGAIShip::initFlightPlan() {
SG_LOG(SG_GENERAL, SG_ALERT, "AIShip: " << _name << " initializing waypoints ");
bool init = false;
-
_start_sec = 0;
fp->restart();
fp->IncrementWaypoint(false);
curr = fp->getCurrentWaypoint();
next = fp->getNextWaypoint();
- }
+ } // end while loop
if (!_start_time.empty()){
_start_sec = processTimeString(_start_time);
}
} else {
- setLatitude(prev->latitude);
- setLongitude(prev->longitude);
- setSpeed(prev->speed);
+ setLatitude(prev->latitude);
+ setLongitude(prev->longitude);
+ setSpeed(prev->speed);
}
setWPNames();
next = fp->getNextWaypoint();
if (next->name != "WAITUNTIL" && next->name != "WAIT"
- && next->name != "END") {
- prev = curr;
- fp->IncrementWaypoint(false);
- curr = fp->getCurrentWaypoint();
- next = fp->getNextWaypoint();
+ && next->name != "END") {
+ prev = curr;
+ fp->IncrementWaypoint(false);
+ curr = fp->getCurrentWaypoint();
+ next = fp->getNextWaypoint();
}
} else if (next->name == "WAITUNTIL") {
// so we will calculate the distance back up the track from the current waypoint
// then calculate the lat and lon.
- /*cout << "advancing flight plan done elapsed_sec: " << elapsed_sec
- << " " << day_sec << endl;*/
+ //cout << "advancing flight plan done elapsed_sec: " << elapsed_sec
+ // << " " << day_sec << endl;
double time_diff = elapsed_sec - day_sec;
double lat, lon, recip;
void FGAIShip::setWPPos() {
- if (curr->name == "END" || curr->name == "WAIT" || curr->name == "WAITUNTIL"){
- cout<< curr->name << endl;
- return;
+ if (curr->name == "END" || curr->name == "WAIT"
+ || curr->name == "WAITUNTIL" || curr->name == "TUNNEL"){
+ //cout << curr->name << " returning" << endl;
+ return;
}
double elevation_m = 0;
wppos.setLatitudeDeg(curr->latitude);
wppos.setLongitudeDeg(curr->longitude);
- wppos.setElevationFt(0);
+ wppos.setElevationM(0);
if (curr->on_ground){
- if (globals->get_scenery()->get_elevation_m(SGGeod::fromGeodM(wppos, 10000),
- elevation_m, &_material)){
+ if (globals->get_scenery()->get_elevation_m(SGGeod::fromGeodM(wppos, 3000),
+ elevation_m, &_material, 0)){
wppos.setElevationM(elevation_m);
}
+ //cout << curr->name << " setting measured elev " << elevation_m << endl;
+
} else {
- wppos.setElevationFt(curr->altitude);
+ wppos.setElevationM(curr->altitude);
+ //cout << curr->name << " setting FP elev " << elevation_m << endl;
}
+ curr->altitude = wppos.getElevationM();
+
}
void FGAIShip::setXTrackError() {
curr->latitude, curr->longitude);
double xtrack_error_nm = sin((course - brg)* SG_DEGREES_TO_RADIANS) * _wp_range;
- //if (_wp_range > _sp_turn_radius_ft / (2 * 6076.1155)){
if (_wp_range > 0){
_lead_angle = atan2(xtrack_error_nm,(_wp_range * _proportion)) * SG_RADIANS_TO_DEGREES;
} else
_lead_angle *= _lead_angle_gain;
_xtrack_error = xtrack_error_nm * 6076.1155;
- if (_lead_angle<= -_lead_angle_limit)
- _lead_angle = -_lead_angle_limit;
- else if (_lead_angle >= _lead_angle_limit)
- _lead_angle = _lead_angle_limit;
+ SG_CLAMP_RANGE(_lead_angle, -_lead_angle_limit, _lead_angle_limit);
}
void setSpeedConstant(double sc);
void setFixedTurnRadius(double ft);
void setWPNames();
+ void setWPPos();
double sign(double x);
bool _hdg_lock;
bool _serviceable;
bool _waiting;
bool _new_waypoint;
+ bool _tunnel;
+
virtual const char* getTypeString(void) const { return "ship"; }
double _rudder_constant, _speed_constant, _hdg_constant, _limit ;
double _elevation_m, _elevation_ft;
- double _missed_range, _tow_angle, _wait_count;
+ double _missed_range, _tow_angle, _wait_count, _wp_range;
FGAIFlightPlan::waypoint* prev; // the one behind you
FGAIFlightPlan::waypoint* curr; // the one ahead
void Run(double dt);
void setStartTime(const string&);
void setUntilTime(const string&);
- void setWPPos();
+ //void setWPPos();
void setWPAlt();
void setXTrackError();
double _roll_constant, _roll_factor;
double _sp_turn_radius_ft, _rd_turn_radius_ft, _fixed_turn_radius;
- double _wp_range, _old_range, _range_rate;
+ double _old_range, _range_rate;
double _dt_count, _missed_count;
double _next_run;
double _missed_time_sec;
double _lead_angle_gain, _lead_angle_limit, _proportion;
double _course;
double _xtrack_error;
+ double _curr_alt, _prev_alt;
string _prev_name, _curr_name, _next_name;
string _path;
+#include <simgear/math/SGMath.hxx>
#include <simgear/misc/sg_path.hxx>
#include <simgear/props/props.hxx>
#include <simgear/props/props_io.hxx>
// TODO - At hot 'n high airports this may be 500ft AGL though - need to make this a variable.
if((_pos.getElevationM() - rwy.threshold_pos.getElevationM()) * SG_METER_TO_FEET > 700) {
double cc = 0.0;
- if(tower && tower->GetCrosswindConstraint(cc)) {
+ if(_controlled && tower->GetCrosswindConstraint(cc)) {
if(orthopos.y() > cc) {
//cout << "Turning to crosswind, distance from threshold = " << orthopos.y() << '\n';
leg = TURN1;
// turn 1000m out for now, taking other traffic into accout
if(fabs(orthopos.x()) > 900) {
double dd = 0.0;
- if(tower && tower->GetDownwindConstraint(dd)) {
+ if(_controlled && tower->GetDownwindConstraint(dd)) {
if(fabs(orthopos.x()) > fabs(dd)) {
//cout << "Turning to downwind, distance from centerline = " << fabs(orthopos.x()) << '\n';
leg = TURN2;
// For now we're assuming that we aim to follow the same glidepath regardless of wind.
double d1;
double d2;
- CalculateSoD(((tower && tower->GetBaseConstraint(d1)) ? d1 : -1000.0), ((tower && tower->GetDownwindConstraint(d2)) ? d2 : 1000.0 * patternDirection), (patternDirection ? true : false));
+ CalculateSoD(((_controlled && tower->GetBaseConstraint(d1)) ? d1 : -1000.0), ((_controlled && tower->GetDownwindConstraint(d2)) ? d2 : 1000.0 * patternDirection), (patternDirection ? true : false));
if(SoD.leg == DOWNWIND) {
descending = (orthopos.y() < SoD.y ? true : false);
}
if(orthopos.y() < -1000.0 + turn_radius) {
//if(orthopos.y() < -980) {
double bb = 0.0;
- if(tower && tower->GetBaseConstraint(bb)) {
+ if(_controlled && tower->GetBaseConstraint(bb)) {
if(fabs(orthopos.y()) > fabs(bb)) {
//cout << "Turning to base, distance from threshold = " << fabs(orthopos.y()) << '\n';
leg = TURN3;
double d1;
// Make downwind leg position artifically large to avoid any chance of SoD being returned as
// on downwind when we are already on base.
- CalculateSoD(((tower && tower->GetBaseConstraint(d1)) ? d1 : -1000.0), (10000.0 * patternDirection), (patternDirection ? true : false));
+ CalculateSoD(((_controlled && tower->GetBaseConstraint(d1)) ? d1 : -1000.0), (10000.0 * patternDirection), (patternDirection ? true : false));
if(SoD.leg == BASE) {
descending = (fabs(orthopos.y()) < fabs(SoD.y) ? true : false);
}
double axx = gxx - wxx; // Plane in-air velocity x component
double ayy = gyy - wyy; // Plane in-air velocity y component
// Now we want the angle between gxx and axx (which is the crab)
- double maga = sqrt(axx*axx + ayy*ayy);
- double magg = sqrt(gxx*gxx + gyy*gyy);
- crab = acos((axx*gxx + ayy*gyy) / (maga * magg));
- // At this point this works except we're getting the modulus of the angle
+ crab = atan2(ayy - gyy, axx - gxx) * DCL_RADIANS_TO_DEGREES;
//cout << "crab = " << crab << '\n';
-
- // Make sure both headings are in the 0->360 circle in order to get sane differences
- dclBoundHeading(wind_from);
- dclBoundHeading(track);
- if(track > wind_from) {
- if((track - wind_from) <= 180) {
- crab *= -1.0;
- }
- } else {
- if((wind_from - track) >= 180) {
- crab *= -1.0;
- }
- }
} else { // on the ground - crab dosen't apply
crab = 0.0;
}
//cout << "X " << orthopos.x() << " Y " << orthopos.y() << " SLOPE " << slope << " elev " << _pos.elev() * SG_METER_TO_FEET << '\n';
_hdg = track + crab;
+ dclBoundHeading(_hdg);
dist = vel * 0.514444 * dt;
_pos = dclUpdatePosition(_pos, track, slope, dist);
}
// airport name + "traffic" + airplane callsign + pattern direction + pattern leg + rwy + ?
string trns;
int code = 0;
- const string& apt_name = tower ? tower->get_name() : airportID;
+ const string& apt_name = _controlled ? tower->get_name() : airportID;
trns += apt_name;
trns += " Traffic ";
comm_list_type stations;
int found = current_commlist->FindByPos(a->geod(), 20.0, &stations);
if(found) {
- ostringstream ostr;
comm_list_iterator itr = stations.begin();
for (n = 0; itr != stations.end(); ++itr) {
if(itr->ident != ident)
copyProperties(freq_group->getNode("group-template", true), entry);
entry->removeChildren("enabled", true);
+ ostringstream ostr;
ostr << itr->type;
- entry->setStringValue("text[0]/label", ostr.str().c_str());
+ entry->setStringValue("text[0]/label", ostr.str());
char buf[8];
snprintf(buf, 8, "%.2f", (itr->freq / 100.0)); // Convert from KHz to MHz
buf[7] = '\0';
entry->setStringValue("text[1]/label", buf);
-
- ostr.seekp(0);
n++;
}
}
SGBucket buck(aPos);
// get neigboring buckets
- int bx = (int)( range*SG_NM_TO_METER / buck.get_width_m() / 2);
- int by = (int)( range*SG_NM_TO_METER / buck.get_height_m() / 2 );
+ int bx = (int)( range*SG_NM_TO_METER / buck.get_width_m() / 2) + 1;
+ int by = (int)( range*SG_NM_TO_METER / buck.get_height_m() / 2 ) + 1;
// loop over bucket range
for ( int i=-bx; i<=bx; i++) {
for ( int j=-by; j<=by; j++) {
buck = sgBucketOffset(aPos.getLongitudeDeg(), aPos.getLatitudeDeg(), i, j);
long int bucket = buck.gen_index();
- comm_list_type Fstations = commlist_bck[bucket];
- comm_list_iterator current = Fstations.begin();
- comm_list_iterator last = Fstations.end();
+ comm_map_const_iterator Fstations = commlist_bck.find(bucket);
+ if (Fstations == commlist_bck.end()) continue;
+ comm_list_const_iterator current = Fstations->second.begin();
+ comm_list_const_iterator last = Fstations->second.end();
// double az1, az2, s;
TowerPlaneRec::TowerPlaneRec() :
planePtr(NULL),
+ eta(0),
+ dist_out(0),
clearedToLand(false),
clearedToLineUp(false),
clearedToTakeOff(false),
TowerPlaneRec::TowerPlaneRec(const PlaneRec& p) :
planePtr(NULL),
+ eta(0),
+ dist_out(0),
clearedToLand(false),
clearedToLineUp(false),
clearedToTakeOff(false),
TowerPlaneRec::TowerPlaneRec(const SGGeod& pt) :
planePtr(NULL),
+ eta(0),
+ dist_out(0),
clearedToLand(false),
clearedToLineUp(false),
clearedToTakeOff(false),
TowerPlaneRec::TowerPlaneRec(const PlaneRec& p, const SGGeod& pt) :
planePtr(NULL),
+ eta(0),
+ dist_out(0),
clearedToLand(false),
clearedToLineUp(false),
clearedToTakeOff(false),
t->plane.type = GA_SINGLE; // FIXME - Another assumption!
t->plane.callsign = usercall;
+ CalcETA(t);
t->vfrArrivalReported = true;
responseReqd = true;
_displ_thresh = aThreshold->getDoubleValue("displ-m") * SG_METER_TO_FEET;
_stopway = aThreshold->getDoubleValue("stopw-m") * SG_METER_TO_FEET;
- // compute the new runway center, based on the threshold lat/lon, length,
- // and any displaced threshold.
- double offsetFt = (0.5 * _length) - _displ_thresh;
+ // compute the new runway center, based on the threshold lat/lon and length,
+ double offsetFt = (0.5 * _length);
SGGeod newCenter;
double dummy;
SGGeodesy::direct(newThreshold, _heading, offsetFt * SG_FEET_TO_METER, newCenter, dummy);
FGAirport* FGAirport::findByIdent(const std::string& aIdent)
{
FGPositionedRef r;
- AirportFilter filter;
+ PortsFilter filter;
r = FGPositioned::findNextWithPartialId(r, aIdent, &filter);
if (!r) {
return NULL; // we don't warn here, let the caller do that
FGAirport* FGAirport::getByIdent(const std::string& aIdent)
{
FGPositionedRef r;
- AirportFilter filter;
+ PortsFilter filter;
r = FGPositioned::findNextWithPartialId(r, aIdent, &filter);
if (!r) {
throw sg_range_exception("No such airport with ident: " + aIdent);
{
// allow users to disable the scenery data in the short-term
// longer term, this option can probably disappear
- if (!fgGetBool("/sim/use-scenery-airport-data")) {
+ if (!fgGetBool("/sim/paths/use-custom-scenery-data")) {
return;
}
}
virtual Type maxType() const {
- return SEAPORT;
+ return AIRPORT;
}
virtual bool passAirport(FGAirport* aApt) const {
}
};
+ /**
+ * Filter which passes heliports and seaports in addition to airports
+ */
+ class PortsFilter : public AirportFilter
+ {
+ public:
+ virtual Type maxType() const {
+ return SEAPORT;
+ }
+ };
+
class HardSurfaceFilter : public AirportFilter
{
public:
virtual bool passAirport(FGAirport* aApt) const;
- virtual Type maxType() const {
- return AIRPORT;
- }
private:
double mMinLengthFt;
};
/**
* Syntactic wrapper around FGPositioned::findClosest - find the closest
* match for filter, and return it cast to FGAirport. The default filter
- * passes all airports, including seaports and heliports.
+ * passes airports, but not seaports or heliports
*/
static FGAirport* findClosest(const SGGeod& aPos, double aCuttofNm, Filter* filter = NULL);
void XMLLoader::load(FGAirportDynamics* d) {
FGAirportDynamicsXMLLoader visitor(d);
- if (fgGetBool("/sim/traffic-manager/use-custom-scenery-data") == false) {
+ if (fgGetBool("/sim/paths/use-custom-scenery-data") == false) {
SGPath parkpath( globals->get_fg_root() );
parkpath.append( "/AI/Airports/" );
parkpath.append( d->getId() );
void XMLLoader::load(FGRunwayPreference* p) {
FGRunwayPreferenceXMLLoader visitor(p);
- if (fgGetBool("/sim/traffic-manager/use-custom-scenery-data") == false) {
+ if (fgGetBool("/sim/paths/use-custom-scenery-data") == false) {
SGPath rwyPrefPath( globals->get_fg_root() );
rwyPrefPath.append( "AI/Airports/" );
rwyPrefPath.append( p->getId() );
libAutopilot_a_SOURCES = \
route_mgr.cxx route_mgr.hxx \
- xmlauto.cxx xmlauto.hxx
+ xmlauto.cxx xmlauto.hxx \
+ autobrake.cxx autobrake.hxx
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src
--- /dev/null
+// autobrake.cxx - generic, configurable autobrake system
+//
+// Written by James Turner, started September 2009.
+//
+// Copyright (C) 2009 Curtis L. Olson
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// $Id$
+
+#include "autobrake.hxx"
+
+#include <Main/fg_props.hxx>
+
+FGAutoBrake::FGAutoBrake() :
+ _lastGroundspeedKts(0.0),
+ _step(0),
+ _rto(false),
+ _armed(false),
+ _rtoArmed(false),
+ _engaged(false),
+ _targetDecel(0.0),
+ _fcsBrakeControl(0.0),
+ _leftBrakeOutput(0.0),
+ _rightBrakeOutput(0.0)
+{
+ // default config, close to Boeing 747-400 / 777 values
+ _configNumSteps = 4;
+ _configRTOStep = -1;
+ _configDisengageStep = 0;
+ _configMaxDecel = 11; // ft-sec-sec
+ _configRTODecel = 11; // ft-sec-sec
+ _configRTOSpeed = 85; // kts
+}
+
+FGAutoBrake::~FGAutoBrake()
+{
+}
+
+void FGAutoBrake::init()
+{
+ _root = fgGetNode("/autopilot/autobrake", true);
+
+ _root->tie("armed", SGRawValueMethods<FGAutoBrake, bool>
+ (*this, &FGAutoBrake::getArmed, &FGAutoBrake::setArmed));
+
+ _root->tie("step", SGRawValueMethods<FGAutoBrake, int>
+ (*this, &FGAutoBrake::getStep, &FGAutoBrake::setStep));
+
+ _root->tie("rto", SGRawValueMethods<FGAutoBrake, bool>
+ (*this, &FGAutoBrake::getRTO, &FGAutoBrake::setRTO));
+
+ _engineControlsNode = fgGetNode("/controls/engines");
+
+ // brake position nodes
+ _brakeInputs[0] = fgGetNode("/controls/gear/brake-left");
+ _brakeInputs[1] = fgGetNode("/controls/gear/brake-right");
+ _brakeInputs[2] = fgGetNode("/controls/gear/copilot-brake-left");
+ _brakeInputs[3] = fgGetNode("/controls/gear/copilot-brake-right");
+
+ // config
+ SGPropertyNode_ptr config = _root->getChild("config", 0, true);
+ config->tie("num-steps", SGRawValuePointer<int>(&_configNumSteps));
+ config->tie("rto-step", SGRawValuePointer<int>(&_configRTOStep));
+ config->tie("disengage-step", SGRawValuePointer<int>(&_configDisengageStep));
+ config->tie("rto-decel-fts-sec", SGRawValuePointer<double>(&_configRTODecel));
+ config->tie("max-decel-fts-sec", SGRawValuePointer<double>(&_configMaxDecel));
+ config->tie("rto-engage-kts", SGRawValuePointer<double>(&_configRTOSpeed));
+
+
+ // outputs
+ _root->tie("target-decel-fts-sec",
+ SGRawValueMethods<FGAutoBrake,double>(*this, &FGAutoBrake::getTargetDecel));
+ _root->tie("actual-decel-fts-sec",
+ SGRawValueMethods<FGAutoBrake,double>(*this, &FGAutoBrake::getActualDecel));
+ _root->tie("fcs-brake", SGRawValuePointer<double>(&_fcsBrakeControl));
+ _root->tie("brake-left-output", SGRawValuePointer<double>(&_leftBrakeOutput));
+ _root->tie("brake-right-output", SGRawValuePointer<double>(&_rightBrakeOutput));
+
+ _root->tie("engaged", SGRawValueMethods<FGAutoBrake, bool>(*this, &FGAutoBrake::getEngaged));
+}
+
+void FGAutoBrake::postinit()
+{
+ _weightOnWheelsNode = fgGetNode("/gear/gear/wow");
+ _groundspeedNode = fgGetNode("/velocities/groundspeed-kt");
+ if (!_weightOnWheelsNode) {
+ return; // don't crash if we're using an acft (UFO, ATC, with no WoW flag)
+ }
+
+ _lastWoW = _weightOnWheelsNode->getBoolValue();
+}
+
+
+void FGAutoBrake::bind()
+{
+}
+
+void FGAutoBrake::unbind()
+{
+}
+
+void FGAutoBrake::update(double dt)
+{
+ _leftBrakeInput = SGMiscd::max(_brakeInputs[0]->getDoubleValue(),
+ _brakeInputs[2]->getDoubleValue());
+ _rightBrakeInput = SGMiscd::max(_brakeInputs[1]->getDoubleValue(),
+ _brakeInputs[3]->getDoubleValue());
+
+ // various FDMs don't supply sufficent information for us to work,
+ // so just be passive in those cases.
+ if (!_weightOnWheelsNode || !_groundspeedNode || !_engineControlsNode) {
+ // pass the values straight through
+ _leftBrakeOutput = _leftBrakeInput;
+ _rightBrakeOutput = _rightBrakeInput;
+ return;
+ }
+
+ if (dt <= 0.0) {
+ return; // paused
+ }
+
+ double gs = _groundspeedNode->getDoubleValue();
+ _actualDecel = (_lastGroundspeedKts - gs) / dt;
+ _lastGroundspeedKts = gs;
+
+ if (!_armed || (_step == 0)) {
+ // even if we're off or disarmed, the physical valve system must pass
+ // pilot control values through.
+ _leftBrakeOutput = _leftBrakeInput;
+ _rightBrakeOutput = _rightBrakeInput;
+ return;
+ }
+
+ if (_engaged) {
+ updateEngaged(dt);
+ } else {
+ bool e = shouldEngage();
+ if (e) {
+ engage();
+ updateEngaged(dt);
+ }
+ }
+
+ // sum pilot inpiuts with auto-brake FCS input
+ _leftBrakeOutput = SGMiscd::max(_leftBrakeInput, _fcsBrakeControl);
+ _rightBrakeOutput = SGMiscd::max(_rightBrakeInput, _fcsBrakeControl);
+
+ _lastWoW = _weightOnWheelsNode->getBoolValue();
+}
+
+void FGAutoBrake::engage()
+{
+ SG_LOG(SG_AUTOPILOT, SG_INFO, "FGAutoBrake: engaging");
+ _engaged = true;
+}
+
+void FGAutoBrake::updateEngaged(double dt)
+{
+ // check for pilot braking input cancelling engage
+ const double BRAKE_INPUT_THRESHOLD = 0.02; // 2% application triggers
+ if ((_leftBrakeInput > BRAKE_INPUT_THRESHOLD) || (_rightBrakeInput > BRAKE_INPUT_THRESHOLD)) {
+ SG_LOG(SG_AUTOPILOT, SG_INFO, "auto-brake, detected pilot brake input, disengaing");
+ disengage();
+ return;
+ }
+
+ if (!throttlesAtIdle()) {
+ SG_LOG(SG_AUTOPILOT, SG_INFO, "auto-brake, throttles not at idle, disengaing");
+ disengage();
+ return;
+ }
+
+ // update the target deceleration; note step can be changed while engaged
+ if (_rto) {
+ _targetDecel = _configRTODecel;
+ } else {
+ double f = (double) _step / _configNumSteps;
+ _targetDecel = _configMaxDecel * f;
+ }
+}
+
+bool FGAutoBrake::shouldEngage()
+{
+ if (_rto) {
+ return shouldEngageRTO();
+ }
+
+ if (_lastWoW || !_weightOnWheelsNode->getBoolValue()) {
+ return false;
+ }
+
+
+ if (!throttlesAtIdle()) {
+ return false;
+ }
+
+ SG_LOG(SG_AUTOPILOT, SG_INFO, "Autobrake, should enage");
+ return true;
+}
+
+bool FGAutoBrake::shouldEngageRTO()
+{
+ double speed = _groundspeedNode->getDoubleValue();
+
+ if (_rtoArmed) {
+ if (speed < _configRTOSpeed) {
+ SG_LOG(SG_AUTOPILOT, SG_INFO, "FGAutoBrake: RTO armed, but speed is now below arming speed");
+ _rtoArmed = false;
+ return false;
+ }
+
+ if (!_weightOnWheelsNode->getBoolValue()) {
+ if (airborne()) {
+ SG_LOG(SG_AUTOPILOT, SG_INFO, "FGAutoBrake: RTO, airbone, disengaging");
+ _rtoArmed = false;
+ _armed = false;
+ _step = _configDisengageStep;
+ }
+
+ return false;
+ }
+
+ if (throttlesAtIdle()) {
+ SG_LOG(SG_AUTOPILOT, SG_INFO, "FGAutoBrake: RTO, throttles at idle, will engage");
+ return true;
+ } else {
+ return false;
+ }
+ } else {
+ // RTO arming case
+ if (speed > _configRTOSpeed) {
+ SG_LOG(SG_AUTOPILOT, SG_INFO, "Autobrake RTO: passed " << _configRTOSpeed << " knots, arming RTO mode");
+ _rtoArmed = true;
+ }
+ }
+
+ return false;
+}
+
+void FGAutoBrake::disengage()
+{
+ if (!_engaged) {
+ return;
+ }
+
+ SG_LOG(SG_AUTOPILOT, SG_INFO, "FGAutoBrake: disengage");
+ _engaged = false;
+ _fcsBrakeControl = 0.0;
+ _armed = false;
+ _rtoArmed = false;
+ _targetDecel = 0.0;
+ _step = _configDisengageStep;
+}
+
+bool FGAutoBrake::airborne() const
+{
+ return !_weightOnWheelsNode->getBoolValue();
+}
+
+bool FGAutoBrake::throttlesAtIdle() const
+{
+ SGPropertyNode_ptr e;
+ const double IDLE_THROTTLE = 0.05; // 5% margin for idle setting
+
+ for (int index=0; (e = _engineControlsNode->getChild("engine", index)) != NULL; ++index) {
+ if ((e->getDoubleValue("throttle") > IDLE_THROTTLE) && !e->getBoolValue("reverser")) {
+ return false;
+ }
+ } // of engines iteration
+
+ return true;
+}
+
+void FGAutoBrake::setArmed(bool aArmed)
+{
+ if (aArmed == _armed) {
+ return;
+ }
+
+ disengage();
+ _armed = aArmed;
+}
+
+void FGAutoBrake::setRTO(bool aRTO)
+{
+ if (aRTO) {
+ // ensure we meet RTO selection criteria:
+ if (!_weightOnWheelsNode->getBoolValue()) {
+ // some systems combine RTO with a standard step, selecting RTO if on
+ // the ground. Handle that case by setting _rto = false, and letting
+ // setStep() do the rest of the work as normal.
+ if ((_configRTOStep > 0) && (_configRTOStep <= _configNumSteps)) {
+ // RTO is combined with a normal step, select that
+ } else {
+ SG_LOG(SG_AUTOPILOT, SG_WARN, "auto-brake: cannot select RTO mode, no weight on wheels");
+ }
+
+ _rto = false;
+ return;
+ }
+
+ _rtoArmed = false;
+ _rto = true;
+ _step = _configRTOStep;
+ setArmed(true);
+ SG_LOG(SG_AUTOPILOT, SG_INFO, "RTO mode set");
+ } else {
+ _rto = false;
+ _rtoArmed = false;
+ // and if we're enaged?
+ disengage();
+ }
+}
+
+void FGAutoBrake::setStep(int aStep)
+{
+ if (aStep == _step) {
+ return;
+ }
+
+ SG_LOG(SG_AUTOPILOT, SG_INFO, "Autobrake step now=" << aStep);
+ _step = aStep;
+ bool validStep = false;
+
+ if (aStep == _configRTOStep) {
+ setRTO(true);
+ validStep = true;
+ } else {
+ _rto = false;
+ validStep = (_step > 0) && (_step <= _configNumSteps);
+ }
+
+ setArmed(validStep); // selecting a valid step arms the system
+}
+
+
--- /dev/null
+// autobrake.hxx - generic, configurable autobrake system
+//
+// Written by James Turner, started September 2009.
+//
+// Copyright (C) 2009 Curtis L. Olson
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+//
+// $Id$
+
+#ifndef FG_INSTR_AUTOBRAKE_HXX
+#define FG_INSTR_AUTOBRAKE_HXX
+
+#include <simgear/props/props.hxx>
+#include <simgear/structure/subsystem_mgr.hxx>
+
+// forward decls
+
+class FGAutoBrake : public SGSubsystem
+{
+public:
+ FGAutoBrake();
+ virtual ~FGAutoBrake();
+
+ virtual void init ();
+ virtual void postinit ();
+ virtual void bind ();
+ virtual void unbind ();
+ virtual void update (double dt);
+
+private:
+
+ void engage();
+ void disengage();
+
+ void updateEngaged(double dt);
+
+ bool shouldEngage();
+ bool shouldEngageRTO();
+
+ /**
+ * Helper to determine if all throttles are at idle
+ * (or have reverse thrust engaged)
+ */
+ bool throttlesAtIdle() const;
+
+ /**
+ * Helper to determine if we're airbone, i.e weight off all wheels
+ */
+ bool airborne() const;
+
+// accessors, mostly for SGRawValueMethods use
+ void setArmed(bool aArmed);
+ bool getArmed() const { return _armed; }
+
+ void setRTO(bool aRTO);
+ bool getRTO() const { return _rto; }
+
+ void setStep(int aStep);
+ int getStep() const { return _step; }
+
+ bool getEngaged() const { return _engaged;}
+ double getTargetDecel() const { return _targetDecel; }
+ double getActualDecel() const { return _actualDecel; }
+
+// members
+ double _lastGroundspeedKts;
+ int _step;
+ bool _rto; // true if in Rejected TakeOff mode
+ bool _armed;
+ bool _rtoArmed; ///< true if we have met arming criteria for RTO mode
+ bool _engaged; ///< true if auto-braking is currently active
+ double _targetDecel; // target deceleration ft-sec^2
+ double _actualDecel; // measured current deceleration in ft-sec^2
+ double _fcsBrakeControl;
+ bool _lastWoW;
+ double _leftBrakeInput; // summed pilot and co-pilot left brake input
+ double _rightBrakeInput; // summed pilot and co-pilot right brake input
+ double _leftBrakeOutput;
+ double _rightBrakeOutput;
+
+ SGPropertyNode_ptr _root;
+ SGPropertyNode* _brakeInputs[4];
+ SGPropertyNode_ptr _weightOnWheelsNode;
+ SGPropertyNode_ptr _engineControlsNode;
+ SGPropertyNode_ptr _groundspeedNode;
+
+ int _configNumSteps;
+ int _configRTOStep;
+ int _configDisengageStep;
+ double _configMaxDecel; ///< deceleration (in ft-sec^2) corresponding to step=numSteps
+ double _configRTODecel; ///< deceleration (in ft-sec^2) to use in RTO mode
+ double _configRTOSpeed; ///< speed (in kts) for RTO mode to arm
+};
+
+#endif // of FG_INSTR_AUTOBRAKE_HXX
# include <config.h>
#endif
-#include <simgear/compiler.h>
+#ifdef HAVE_WINDOWS_H
+#include <time.h>
+#endif
-#include <FDM/flight.hxx>
-#include <Main/fg_props.hxx>
-#include <Navaids/positioned.hxx>
+#include <simgear/compiler.h>
#include "route_mgr.hxx"
+#include <boost/algorithm/string/case_conv.hpp>
+
+#include <simgear/misc/strutils.hxx>
+#include <simgear/structure/exception.hxx>
+
+#include <simgear/props/props_io.hxx>
+#include <simgear/misc/sg_path.hxx>
+#include <simgear/route/route.hxx>
+#include <simgear/sg_inlines.h>
+
+#include "Main/fg_props.hxx"
+#include "Navaids/positioned.hxx"
+#include "Airports/simple.hxx"
+#include "Airports/runways.hxx"
+
+#include "FDM/flight.hxx" // for getting ground speed
+
#define RM "/autopilot/route-manager/"
+static double get_ground_speed() {
+ // starts in ft/s so we convert to kts
+ static const SGPropertyNode * speedup_node = fgGetNode("/sim/speed-up");
+
+ double ft_s = cur_fdm_state->get_V_ground_speed()
+ * speedup_node->getIntValue();
+ double kts = ft_s * SG_FEET_TO_METER * 3600 * SG_METER_TO_NM;
+ return kts;
+}
FGRouteMgr::FGRouteMgr() :
- route( new SGRoute ),
- lon( NULL ),
- lat( NULL ),
- alt( NULL ),
- true_hdg_deg( NULL ),
- target_altitude_ft( NULL ),
- altitude_lock( NULL ),
- wp0_id( NULL ),
- wp0_dist( NULL ),
- wp0_eta( NULL ),
- wp1_id( NULL ),
- wp1_dist( NULL ),
- wp1_eta( NULL ),
- wpn_id( NULL ),
- wpn_dist( NULL ),
- wpn_eta( NULL ),
+ _route( new SGRoute ),
input(fgGetNode( RM "input", true )),
- listener(new Listener(this)),
- mirror(fgGetNode( RM "route", true )),
- altitude_set( false )
+ mirror(fgGetNode( RM "route", true ))
{
+ listener = new InputListener(this);
input->setStringValue("");
input->addChangeListener(listener);
}
FGRouteMgr::~FGRouteMgr() {
input->removeChangeListener(listener);
+
delete listener;
- delete route;
+ delete _route;
}
void FGRouteMgr::init() {
- lon = fgGetNode( "/position/longitude-deg", true );
- lat = fgGetNode( "/position/latitude-deg", true );
- alt = fgGetNode( "/position/altitude-ft", true );
-
- true_hdg_deg = fgGetNode( "/autopilot/settings/true-heading-deg", true );
- target_altitude_ft = fgGetNode( "/autopilot/settings/target-altitude-ft", true );
- altitude_lock = fgGetNode( "/autopilot/locks/altitude", true );
-
- wp0_id = fgGetNode( RM "wp[0]/id", true );
- wp0_dist = fgGetNode( RM "wp[0]/dist", true );
- wp0_eta = fgGetNode( RM "wp[0]/eta", true );
-
- wp1_id = fgGetNode( RM "wp[1]/id", true );
- wp1_dist = fgGetNode( RM "wp[1]/dist", true );
- wp1_eta = fgGetNode( RM "wp[1]/eta", true );
-
- wpn_id = fgGetNode( RM "wp-last/id", true );
- wpn_dist = fgGetNode( RM "wp-last/dist", true );
- wpn_eta = fgGetNode( RM "wp-last/eta", true );
-
- route->clear();
- update_mirror();
+ SGPropertyNode_ptr rm(fgGetNode(RM));
+
+ lon = fgGetNode( "/position/longitude-deg", true );
+ lat = fgGetNode( "/position/latitude-deg", true );
+ alt = fgGetNode( "/position/altitude-ft", true );
+ magvar = fgGetNode("/environment/magnetic-variation-deg", true);
+
+ departure = fgGetNode(RM "departure", true);
+ departure->tie("airport", SGRawValueMethods<FGRouteMgr, const char*>(*this,
+ &FGRouteMgr::getDepartureICAO, &FGRouteMgr::setDepartureICAO));
+ departure->tie("name", SGRawValueMethods<FGRouteMgr, const char*>(*this,
+ &FGRouteMgr::getDepartureName, NULL));
+
+// init departure information from current location
+ SGGeod pos = SGGeod::fromDegFt(lon->getDoubleValue(), lat->getDoubleValue(), alt->getDoubleValue());
+ _departure = FGAirport::findClosest(pos, 20.0);
+ if (_departure) {
+ FGRunway* active = _departure->getActiveRunwayForUsage();
+ departure->setStringValue("runway", active->ident().c_str());
+ } else {
+ departure->setStringValue("runway", "");
+ }
+
+ departure->getChild("etd", 0, true);
+ departure->getChild("takeoff-time", 0, true);
+
+ destination = fgGetNode(RM "destination", true);
+ destination->getChild("airport", 0, true);
+
+ destination->tie("airport", SGRawValueMethods<FGRouteMgr, const char*>(*this,
+ &FGRouteMgr::getDestinationICAO, &FGRouteMgr::setDestinationICAO));
+ destination->tie("name", SGRawValueMethods<FGRouteMgr, const char*>(*this,
+ &FGRouteMgr::getDestinationName, NULL));
+
+ destination->getChild("runway", 0, true);
+ destination->getChild("eta", 0, true);
+ destination->getChild("touchdown-time", 0, true);
+
+ alternate = fgGetNode(RM "alternate", true);
+ alternate->getChild("airport", 0, true);
+ alternate->getChild("runway", 0, true);
+
+ cruise = fgGetNode(RM "cruise", true);
+ cruise->getChild("altitude-ft", 0, true);
+ cruise->setDoubleValue("altitude-ft", 10000.0);
+ cruise->getChild("flight-level", 0, true);
+ cruise->getChild("speed-kts", 0, true);
+ cruise->setDoubleValue("speed-kts", 160.0);
+
+ totalDistance = fgGetNode(RM "total-distance", true);
+ totalDistance->setDoubleValue(0.0);
+
+ ete = fgGetNode(RM "ete", true);
+ ete->setDoubleValue(0.0);
+
+ elapsedFlightTime = fgGetNode(RM "flight-time", true);
+ elapsedFlightTime->setDoubleValue(0.0);
+
+ active = fgGetNode(RM "active", true);
+ active->setBoolValue(false);
+
+ airborne = fgGetNode(RM "airborne", true);
+ airborne->setBoolValue(false);
+
+ _edited = fgGetNode(RM "signals/edited", true);
+ _finished = fgGetNode(RM "signals/finished", true);
+
+ _currentWpt = fgGetNode(RM "current-wp", true);
+ _currentWpt->tie(SGRawValueMethods<FGRouteMgr, int>
+ (*this, &FGRouteMgr::currentWaypoint, &FGRouteMgr::jumpToIndex));
+
+ // temporary distance / eta calculations, for backward-compatability
+ wp0 = fgGetNode(RM "wp", 0, true);
+ wp0->getChild("id", 0, true);
+ wp0->getChild("dist", 0, true);
+ wp0->getChild("eta", 0, true);
+ wp0->getChild("bearing-deg", 0, true);
+
+ wp1 = fgGetNode(RM "wp", 1, true);
+ wp1->getChild("id", 0, true);
+ wp1->getChild("dist", 0, true);
+ wp1->getChild("eta", 0, true);
+
+ wpn = fgGetNode(RM "wp-last", 0, true);
+ wpn->getChild("dist", 0, true);
+ wpn->getChild("eta", 0, true);
+
+ _route->clear();
+ update_mirror();
+
+ _pathNode = fgGetNode(RM "file-path", 0, true);
}
void FGRouteMgr::postinit() {
string_list *waypoints = globals->get_initial_waypoints();
- if (!waypoints)
- return;
-
- vector<string>::iterator it;
- for (it = waypoints->begin(); it != waypoints->end(); ++it)
+ if (waypoints) {
+ vector<string>::iterator it;
+ for (it = waypoints->begin(); it != waypoints->end(); ++it)
new_waypoint(*it);
+ }
+
+ weightOnWheels = fgGetNode("/gear/gear[0]/wow", false);
+ // check airbone flag agrees with presets
+
}
void FGRouteMgr::bind() { }
void FGRouteMgr::unbind() { }
-
-static double get_ground_speed() {
- // starts in ft/s so we convert to kts
- static const SGPropertyNode * speedup_node = fgGetNode("/sim/speed-up");
-
- double ft_s = cur_fdm_state->get_V_ground_speed()
- * speedup_node->getIntValue();
- double kts = ft_s * SG_FEET_TO_METER * 3600 * SG_METER_TO_NM;
-
- return kts;
+bool FGRouteMgr::isRouteActive() const
+{
+ return active->getBoolValue();
}
-void FGRouteMgr::updateTargetAltitude() {
- if (route->size() == 0) {
- altitude_set = false;
- return;
+void FGRouteMgr::update( double dt ) {
+ if (dt <= 0.0) {
+ // paused, nothing to do here
+ return;
}
-
- SGWayPoint wp = route->get_waypoint( 0 );
- if (wp.get_target_alt() < -9990.0) {
- altitude_set = false;
- return;
+
+ if (!active->getBoolValue()) {
+ return;
}
- altitude_set = true;
- target_altitude_ft->setDoubleValue( wp.get_target_alt() * SG_METER_TO_FEET );
-
- if ( !near_ground() ) {
- // James Turner [zakalawe]: there's no explanation for this logic,
- // it feels like the autopilot should pull the target altitude out of
- // wp0 instead of us pushing it through here. Hmmm.
- altitude_lock->setStringValue( "altitude-hold" );
- }
-}
-
-void FGRouteMgr::update( double dt ) {
- if (route->size() == 0) {
- return; // no route set, early return
+ double groundSpeed = get_ground_speed();
+ if (airborne->getBoolValue()) {
+ time_t now = time(NULL);
+ elapsedFlightTime->setDoubleValue(difftime(now, _takeoffTime));
+ } else { // not airborne
+ if (weightOnWheels->getBoolValue() || (groundSpeed < 40)) {
+ return;
+ }
+
+ airborne->setBoolValue(true);
+ _takeoffTime = time(NULL); // start the clock
+ departure->setIntValue("takeoff-time", _takeoffTime);
}
+ // basic course/distance information
double wp_course, wp_distance;
-
- // first way point
- SGWayPoint wp = route->get_waypoint( 0 );
+ SGWayPoint wp = _route->get_current();
wp.CourseAndDistance( lon->getDoubleValue(), lat->getDoubleValue(),
alt->getDoubleValue(), &wp_course, &wp_distance );
- true_hdg_deg->setDoubleValue( wp_course );
- if ( wp_distance < 200.0 ) {
- pop_waypoint();
- if (route->size() == 0) {
- return; // end of route, we're done for the time being
- }
-
- wp = route->get_waypoint( 0 );
- }
-
- // update the property tree info for WP0
- wp0_id->setStringValue( wp.get_id().c_str() );
- double accum = wp_distance;
- wp0_dist->setDoubleValue( accum * SG_METER_TO_NM );
- setETAPropertyFromDistance(wp0_eta, accum);
-
- // next way point
- if ( route->size() > 1 ) {
- SGWayPoint wp = route->get_waypoint( 1 );
-
- // update the property tree info
- wp1_id->setStringValue( wp.get_id().c_str() );
- accum += wp.get_distance();
- wp1_dist->setDoubleValue( accum * SG_METER_TO_NM );
- setETAPropertyFromDistance(wp1_eta, accum);
+ // update wp0 / wp1 / wp-last for legacy users
+ wp0->setDoubleValue("dist", wp_distance * SG_METER_TO_NM);
+ wp_course -= magvar->getDoubleValue(); // expose magnetic bearing
+ wp0->setDoubleValue("bearing-deg", wp_course);
+ setETAPropertyFromDistance(wp0->getChild("eta"), wp_distance);
+
+ if ((_route->current_index() + 1) < _route->size()) {
+ wp = _route->get_waypoint(_route->current_index() + 1);
+ double wp1_course, wp1_distance;
+ wp.CourseAndDistance(lon->getDoubleValue(), lat->getDoubleValue(),
+ alt->getDoubleValue(), &wp1_course, &wp1_distance);
+
+ wp1->setDoubleValue("dist", wp1_distance * SG_METER_TO_NM);
+ setETAPropertyFromDistance(wp1->getChild("eta"), wp1_distance);
}
-
- // summarize remaining way points
- if ( route->size() > 2 ) {
- SGWayPoint wp;
- for ( int i = 2; i < route->size(); ++i ) {
- wp = route->get_waypoint( i );
- accum += wp.get_distance();
- }
-
- // update the property tree info
- wpn_id->setStringValue( wp.get_id().c_str() );
- wpn_dist->setDoubleValue( accum * SG_METER_TO_NM );
- setETAPropertyFromDistance(wpn_eta, accum);
+
+ double totalDistanceRemaining = wp_distance; // distance to current waypoint
+ for (int i=_route->current_index() + 1; i<_route->size(); ++i) {
+ totalDistanceRemaining += _route->get_waypoint(i).get_distance();
}
+
+ wpn->setDoubleValue("dist", totalDistanceRemaining * SG_METER_TO_NM);
+ ete->setDoubleValue(totalDistanceRemaining * SG_METER_TO_NM / groundSpeed * 3600.0);
+ setETAPropertyFromDistance(wpn->getChild("eta"), totalDistanceRemaining);
+
+ // get time now at destination tz as tm struct
+ // add ete seconds
+ // convert to string ... and stash in property
+ //destination->setDoubleValue("eta", eta);
}
+
void FGRouteMgr::setETAPropertyFromDistance(SGPropertyNode_ptr aProp, double aDistance) {
+ double speed = get_ground_speed();
+ if (speed < 1.0) {
+ aProp->setStringValue("--:--");
+ return;
+ }
+
char eta_str[64];
double eta = aDistance * SG_METER_TO_NM / get_ground_speed();
if ( eta >= 100.0 ) {
}
if ( eta < (1.0/6.0) ) {
- // within 10 minutes, bump up to min/secs
- eta *= 60.0;
+ eta *= 60.0; // within 10 minutes, bump up to min/secs
}
int major = (int)eta,
}
void FGRouteMgr::add_waypoint( const SGWayPoint& wp, int n ) {
- route->add_waypoint( wp, n );
- update_mirror();
- if ((n==0) || (route->size() == 1)) {
- updateTargetAltitude();
- }
+ _route->add_waypoint( wp, n );
+
+ if (_route->current_index() > n) {
+ _route->set_current(_route->current_index() + 1);
+ }
+
+ update_mirror();
+ _edited->fireValueChanged();
}
SGWayPoint FGRouteMgr::pop_waypoint( int n ) {
- SGWayPoint wp;
-
- if ( route->size() > 0 ) {
- if ( n < 0 )
- n = route->size() - 1;
- wp = route->get_waypoint(n);
- route->delete_waypoint(n);
- }
-
- if ( route->size() <= 2 ) {
- wpn_id->setStringValue( "" );
- wpn_dist->setDoubleValue( 0.0 );
- wpn_eta->setStringValue( "" );
- }
-
- if ( route->size() <= 1 ) {
- wp1_id->setStringValue( "" );
- wp1_dist->setDoubleValue( 0.0 );
- wp1_eta->setStringValue( "" );
- }
-
- if ( route->size() <= 0 ) {
- wp0_id->setStringValue( "" );
- wp0_dist->setDoubleValue( 0.0 );
- wp0_eta->setStringValue( "" );
- }
-
- updateTargetAltitude();
- update_mirror();
- return wp;
+ if ( _route->size() <= 0 ) {
+ return SGWayPoint();
+ }
+
+ if ( n < 0 ) {
+ n = _route->size() - 1;
+ }
+
+ if (_route->current_index() > n) {
+ _route->set_current(_route->current_index() - 1);
+ }
+
+ SGWayPoint wp = _route->get_waypoint(n);
+ _route->delete_waypoint(n);
+
+ update_mirror();
+ _edited->fireValueChanged();
+ checkFinished();
+
+ return wp;
}
add_waypoint( *wp, n );
delete wp;
-
- if ( !near_ground() ) {
- fgSetString( "/autopilot/locks/heading", "true-heading-hold" );
- }
}
SGWayPoint* FGRouteMgr::make_waypoint(const string& tgt ) {
- string target = tgt;
+ string target(boost::to_upper_copy(tgt));
- // make upper case
- for (unsigned int i = 0; i < target.size(); i++)
- if (target[i] >= 'a' && target[i] <= 'z')
- target[i] -= 'a' - 'A';
-
// extract altitude
- double alt = -9999.0;
+ double alt = cruise->getDoubleValue("altitude-ft") * SG_FEET_TO_METER;
+
size_t pos = target.find( '@' );
if ( pos != string::npos ) {
alt = atof( target.c_str() + pos + 1 );
if ( pos != string::npos ) {
double lon = atof( target.substr(0, pos).c_str());
double lat = atof( target.c_str() + pos + 1);
-
- SG_LOG( SG_GENERAL, SG_INFO, "Adding waypoint lon = " << lon << ", lat = " << lat );
- return new SGWayPoint( lon, lat, alt, SGWayPoint::WGS84, target );
+ char buf[32];
+ char ew = (lon < 0.0) ? 'W' : 'E';
+ char ns = (lat < 0.0) ? 'S' : 'N';
+ snprintf(buf, 32, "%c%03d%c%03d", ew, (int) fabs(lon), ns, (int)fabs(lat));
+ return new SGWayPoint( lon, lat, alt, SGWayPoint::WGS84, buf);
}
SGGeod basePosition;
- if (route->size() > 0) {
- SGWayPoint wp = get_waypoint(route->size()-1);
- basePosition = SGGeod::fromDeg(wp.get_target_lon(), wp.get_target_lat());
+ if (_route->size() > 0) {
+ SGWayPoint wp = get_waypoint(_route->size()-1);
+ basePosition = wp.get_target();
} else {
// route is empty, use current position
basePosition = SGGeod::fromDeg(
fgGetNode("/position/longitude-deg")->getDoubleValue(),
fgGetNode("/position/latitude-deg")->getDoubleValue());
}
+
+ vector<string> pieces(simgear::strutils::split(target, "/"));
- FGPositionedRef p = FGPositioned::findClosestWithIdent(target, basePosition);
+ FGPositionedRef p = FGPositioned::findClosestWithIdent(pieces.front(), basePosition);
if (!p) {
- SG_LOG( SG_GENERAL, SG_INFO, "Unable to find FGPositioned with ident:" << target);
+ SG_LOG( SG_AUTOPILOT, SG_INFO, "Unable to find FGPositioned with ident:" << pieces.front());
+ return NULL;
+ }
+
+ SGGeod geod = SGGeod::fromGeodM(p->geod(), alt);
+ if (pieces.size() == 1) {
+ // simple case
+ return new SGWayPoint(geod, target, p->name());
+ }
+
+ if (pieces.size() == 3) {
+ // navaid/radial/distance-nm notation
+ double radial = atof(pieces[1].c_str()),
+ distanceNm = atof(pieces[2].c_str()),
+ az2;
+ radial += magvar->getDoubleValue(); // convert to true bearing
+ SGGeod offsetPos;
+ SGGeodesy::direct(geod, radial, distanceNm * SG_NM_TO_METER, offsetPos, az2);
+ offsetPos.setElevationM(alt);
+
+ SG_LOG(SG_AUTOPILOT, SG_INFO, "final offset radial is " << radial);
+ return new SGWayPoint(offsetPos, p->ident() + pieces[2], target);
+ }
+
+ if (pieces.size() == 2) {
+ FGAirport* apt = dynamic_cast<FGAirport*>(p.ptr());
+ if (!apt) {
+ SG_LOG(SG_AUTOPILOT, SG_INFO, "Waypoint is not an airport:" << pieces.front());
+ return NULL;
+ }
+
+ if (!apt->hasRunwayWithIdent(pieces[1])) {
+ SG_LOG(SG_AUTOPILOT, SG_INFO, "No runway: " << pieces[1] << " at " << pieces[0]);
return NULL;
+ }
+
+ FGRunway* runway = apt->getRunwayByIdent(pieces[1]);
+ SGGeod t = runway->threshold();
+ return new SGWayPoint(t.getLongitudeDeg(), t.getLatitudeDeg(), alt, SGWayPoint::WGS84, pieces[1]);
}
- return new SGWayPoint(p->longitude(), p->latitude(), alt, SGWayPoint::WGS84, target);
+ SG_LOG(SG_AUTOPILOT, SG_INFO, "Unable to parse waypoint:" << target);
+ return NULL;
}
// mirror internal route to the property system for inspection by other subsystems
void FGRouteMgr::update_mirror() {
mirror->removeChildren("wp");
- for (int i = 0; i < route->size(); i++) {
- SGWayPoint wp = route->get_waypoint(i);
+ for (int i = 0; i < _route->size(); i++) {
+ SGWayPoint wp = _route->get_waypoint(i);
SGPropertyNode *prop = mirror->getChild("wp", i, 1);
+ const SGGeod& pos(wp.get_target());
prop->setStringValue("id", wp.get_id().c_str());
prop->setStringValue("name", wp.get_name().c_str());
- prop->setDoubleValue("longitude-deg", wp.get_target_lon());
- prop->setDoubleValue("latitude-deg", wp.get_target_lat());
- prop->setDoubleValue("altitude-m", wp.get_target_alt());
- prop->setDoubleValue("altitude-ft", wp.get_target_alt() * SG_METER_TO_FEET);
+ prop->setDoubleValue("longitude-deg", pos.getLongitudeDeg());
+ prop->setDoubleValue("latitude-deg",pos.getLatitudeDeg());
+ prop->setDoubleValue("altitude-m", pos.getElevationM());
+ prop->setDoubleValue("altitude-ft", pos.getElevationFt());
}
// set number as listener attachment point
- mirror->setIntValue("num", route->size());
-}
-
-
-bool FGRouteMgr::near_ground() {
- SGPropertyNode *gear = fgGetNode( "/gear/gear/wow", false );
- if ( !gear || gear->getType() == simgear::props::NONE )
- return fgGetBool( "/sim/presets/onground", true );
-
- if ( fgGetDouble("/position/altitude-agl-ft", 300.0)
- < fgGetDouble("/autopilot/route-manager/min-lock-altitude-agl-ft") )
- return true;
-
- return gear->getBoolValue();
+ mirror->setIntValue("num", _route->size());
}
-
// command interface /autopilot/route-manager/input:
//
// @CLEAR ... clear route
// @INSERT2:KSFO@900 ... insert "KSFO@900" as 3rd entry
// KSFO@900 ... append "KSFO@900"
//
-void FGRouteMgr::Listener::valueChanged(SGPropertyNode *prop)
+void FGRouteMgr::InputListener::valueChanged(SGPropertyNode *prop)
{
const char *s = prop->getStringValue();
if (!strcmp(s, "@CLEAR"))
mgr->init();
- else if (!strcmp(s, "@POP"))
+ else if (!strcmp(s, "@ACTIVATE"))
+ mgr->activate();
+ else if (!strcmp(s, "@LOAD")) {
+ mgr->loadRoute();
+ } else if (!strcmp(s, "@SAVE")) {
+ mgr->saveRoute();
+ } else if (!strcmp(s, "@POP"))
mgr->pop_waypoint(0);
else if (!strncmp(s, "@DELETE", 7))
mgr->pop_waypoint(atoi(s + 7));
mgr->new_waypoint(s);
}
+// SGWayPoint( const double lon = 0.0, const double lat = 0.0,
+// const double alt = 0.0, const modetype m = WGS84,
+// const string& s = "", const string& n = "" );
+
+bool FGRouteMgr::activate()
+{
+ if (_departure) {
+ string runwayId(departure->getStringValue("runway"));
+ FGRunway* runway = NULL;
+ if (_departure->hasRunwayWithIdent(runwayId)) {
+ runway = _departure->getRunwayByIdent(runwayId);
+ } else {
+ SG_LOG(SG_AUTOPILOT, SG_INFO,
+ "route-manager, departure runway not found:" << runwayId);
+ runway = _departure->getActiveRunwayForUsage();
+ }
+
+ SGWayPoint swp(runway->threshold(),
+ _departure->ident() + "-" + runway->ident(), runway->name());
+ add_waypoint(swp, 0);
+ }
+
+ if (_destination) {
+ string runwayId = (destination->getStringValue("runway"));
+ if (_destination->hasRunwayWithIdent(runwayId)) {
+ FGRunway* runway = _destination->getRunwayByIdent(runwayId);
+ SGWayPoint swp(runway->end(),
+ _destination->ident() + "-" + runway->ident(), runway->name());
+ add_waypoint(swp);
+ } else {
+ // quite likely, since destination runway may not be known until enroute
+ // probably want a listener on the 'destination' node to allow an enroute
+ // update
+ add_waypoint(SGWayPoint(_destination->geod(), _destination->ident(), _destination->name()));
+ }
+ }
+
+ _route->set_current(0);
+
+ double routeDistanceNm = _route->total_distance() * SG_METER_TO_NM;
+ totalDistance->setDoubleValue(routeDistanceNm);
+ double cruiseSpeedKts = cruise->getDoubleValue("speed", 0.0);
+ if (cruiseSpeedKts > 1.0) {
+ // very very crude approximation, doesn't allow for climb / descent
+ // performance or anything else at all
+ ete->setDoubleValue(routeDistanceNm / cruiseSpeedKts * (60.0 * 60.0));
+ }
+
+ active->setBoolValue(true);
+ SG_LOG(SG_AUTOPILOT, SG_INFO, "route-manager, activate route ok");
+ return true;
+}
+
+
+void FGRouteMgr::sequence()
+{
+ if (!active->getBoolValue()) {
+ SG_LOG(SG_AUTOPILOT, SG_ALERT, "trying to sequence waypoints with no active route");
+ return;
+ }
+
+ if (checkFinished()) {
+ return;
+ }
+
+ _route->increment_current();
+ currentWaypointChanged();
+ _currentWpt->fireValueChanged();
+}
+
+bool FGRouteMgr::checkFinished()
+{
+ int lastWayptIndex = _route->size() - 1;
+ if (_route->current_index() < lastWayptIndex) {
+ return false;
+ }
+
+ SG_LOG(SG_AUTOPILOT, SG_INFO, "reached end of active route");
+ _finished->fireValueChanged();
+ active->setBoolValue(false);
+ return true;
+}
+
+void FGRouteMgr::jumpToIndex(int index)
+{
+ if (!active->getBoolValue()) {
+ SG_LOG(SG_AUTOPILOT, SG_ALERT, "trying to sequence waypoints with no active route");
+ return;
+ }
+
+ if ((index < 0) || (index >= _route->size())) {
+ SG_LOG(SG_AUTOPILOT, SG_ALERT, "passed invalid index (" <<
+ index << ") to FGRouteMgr::jumpToIndex");
+ return;
+ }
+
+ if (_route->current_index() == index) {
+ return; // no-op
+ }
+
+ _route->set_current(index);
+ currentWaypointChanged();
+}
+
+void FGRouteMgr::currentWaypointChanged()
+{
+ SGWayPoint previous = _route->get_previous();
+ SGWayPoint cur = _route->get_current();
+
+ wp0->getChild("id")->setStringValue(cur.get_id());
+ if ((_route->current_index() + 1) < _route->size()) {
+ wp1->getChild("id")->setStringValue(_route->get_next().get_id());
+ } else {
+ wp1->getChild("id")->setStringValue("");
+ }
+
+ SG_LOG(SG_AUTOPILOT, SG_INFO, "route manager, current-wp is now " << _route->current_index());
+}
+
+int FGRouteMgr::findWaypoint(const SGGeod& aPos) const
+{
+ for (int i=0; i<_route->size(); ++i) {
+ double d = SGGeodesy::distanceM(aPos, _route->get_waypoint(i).get_target());
+ if (d < 200.0) { // 200 metres seems close enough
+ return i;
+ }
+ }
+
+ return -1;
+}
+
+SGWayPoint FGRouteMgr::get_waypoint( int i ) const
+{
+ return _route->get_waypoint(i);
+}
+
+int FGRouteMgr::size() const
+{
+ return _route->size();
+}
+
+int FGRouteMgr::currentWaypoint() const
+{
+ return _route->current_index();
+}
+
+void FGRouteMgr::saveRoute()
+{
+ SGPath path(_pathNode->getStringValue());
+ SG_LOG(SG_IO, SG_INFO, "Saving route to " << path.str());
+ try {
+ writeProperties(path.str(), mirror, false, SGPropertyNode::ARCHIVE);
+ } catch (const sg_exception &e) {
+ SG_LOG(SG_IO, SG_WARN, "Error saving route:" << e.getMessage());
+ //guiErrorMessage("Error writing autosave.xml: ", e);
+ }
+}
+
+void FGRouteMgr::loadRoute()
+{
+ try {
+ // deactivate route first
+ active->setBoolValue(false);
+
+ SGPropertyNode_ptr routeData(new SGPropertyNode);
+ SGPath path(_pathNode->getStringValue());
+
+ SG_LOG(SG_IO, SG_INFO, "going to read flight-plan from:" << path.str());
+ readProperties(path.str(), routeData);
+
+ // departure nodes
+ SGPropertyNode* dep = routeData->getChild("departure");
+ if (!dep) {
+ throw sg_io_exception("malformed route file, no departure node");
+ }
+
+ string depIdent = dep->getStringValue("airport");
+ _departure = (FGAirport*) fgFindAirportID(depIdent);
+
+
+ // destination
+ SGPropertyNode* dst = routeData->getChild("destination");
+ if (!dst) {
+ throw sg_io_exception("malformed route file, no destination node");
+ }
+
+ _destination = (FGAirport*) fgFindAirportID(dst->getStringValue("airport"));
+ destination->setStringValue("runway", dst->getStringValue("runway"));
+
+ // alternate
+ SGPropertyNode* alt = routeData->getChild("alternate");
+ if (alt) {
+ alternate->setStringValue(alt->getStringValue("airport"));
+ } // of cruise data loading
+
+ // cruise
+ SGPropertyNode* crs = routeData->getChild("cruise");
+ if (crs) {
+ cruise->setDoubleValue(crs->getDoubleValue("speed"));
+ } // of cruise data loading
+
+ // route nodes
+ _route->clear();
+ SGPropertyNode_ptr _route = routeData->getChild("route", 0);
+ SGGeod lastPos = (_departure ? _departure->geod() : SGGeod());
+
+ for (int i=0; i<_route->nChildren(); ++i) {
+ SGPropertyNode_ptr wp = _route->getChild("wp", i);
+ parseRouteWaypoint(wp);
+ } // of route iteration
+ } catch (sg_exception& e) {
+ SG_LOG(SG_IO, SG_WARN, "failed to load flight-plan (from '" << e.getOrigin()
+ << "'):" << e.getMessage());
+ }
+}
+
+void FGRouteMgr::parseRouteWaypoint(SGPropertyNode* aWP)
+{
+ SGGeod lastPos;
+ if (_route->size() > 0) {
+ lastPos = get_waypoint(_route->size()-1).get_target();
+ } else {
+ // route is empty, use departure airport position
+ const FGAirport* apt = fgFindAirportID(departure->getStringValue("airport"));
+ assert(apt); // shouldn't have got this far with an invalid airport
+ lastPos = apt->geod();
+ }
+
+ SGPropertyNode_ptr altProp = aWP->getChild("altitude-ft");
+ double alt = cruise->getDoubleValue("altitude-ft") * SG_FEET_TO_METER;
+ if (altProp) {
+ alt = altProp->getDoubleValue();
+ }
+
+ string ident(aWP->getStringValue("ident"));
+ if (aWP->hasChild("longitude-deg")) {
+ // explicit longitude/latitude
+ SGWayPoint swp(aWP->getDoubleValue("longitude-deg"),
+ aWP->getDoubleValue("latitude-deg"), alt,
+ SGWayPoint::WGS84, ident, aWP->getStringValue("name"));
+ add_waypoint(swp);
+ } else if (aWP->hasChild("navid")) {
+ // lookup by navid (possibly with offset)
+ string nid(aWP->getStringValue("navid"));
+ FGPositionedRef p = FGPositioned::findClosestWithIdent(nid, lastPos);
+ if (!p) {
+ throw sg_io_exception("bad route file, unknown navid:" + nid);
+ }
+
+ SGGeod pos(p->geod());
+ if (aWP->hasChild("offset-nm") && aWP->hasChild("offset-radial")) {
+ double radialDeg = aWP->getDoubleValue("offset-radial");
+ // convert magnetic radial to a true radial!
+ radialDeg += magvar->getDoubleValue();
+ double offsetNm = aWP->getDoubleValue("offset-nm");
+ double az2;
+ SGGeodesy::direct(p->geod(), radialDeg, offsetNm * SG_NM_TO_METER, pos, az2);
+ }
+
+ SGWayPoint swp(pos.getLongitudeDeg(), pos.getLatitudeDeg(), alt,
+ SGWayPoint::WGS84, ident, "");
+ add_waypoint(swp);
+ } else {
+ // lookup by ident (symbolic waypoint)
+ FGPositionedRef p = FGPositioned::findClosestWithIdent(ident, lastPos);
+ if (!p) {
+ throw sg_io_exception("bad route file, unknown waypoint:" + ident);
+ }
+
+ SGWayPoint swp(p->longitude(), p->latitude(), alt,
+ SGWayPoint::WGS84, p->ident(), p->name());
+ add_waypoint(swp);
+ }
+}
+
+const char* FGRouteMgr::getDepartureICAO() const
+{
+ if (!_departure) {
+ return "";
+ }
+
+ return _departure->ident().c_str();
+}
+
+const char* FGRouteMgr::getDepartureName() const
+{
+ if (!_departure) {
+ return "";
+ }
+
+ return _departure->name().c_str();
+}
+
+void FGRouteMgr::setDepartureICAO(const char* aIdent)
+{
+ if ((aIdent == NULL) || (strlen(aIdent) < 4)) {
+ _departure = NULL;
+ } else {
+ _departure = FGAirport::findByIdent(aIdent);
+ }
+}
+
+const char* FGRouteMgr::getDestinationICAO() const
+{
+ if (!_destination) {
+ return "";
+ }
+
+ return _destination->ident().c_str();
+}
+
+const char* FGRouteMgr::getDestinationName() const
+{
+ if (!_destination) {
+ return "";
+ }
+
+ return _destination->name().c_str();
+}
+void FGRouteMgr::setDestinationICAO(const char* aIdent)
+{
+ if ((aIdent == NULL) || (strlen(aIdent) < 4)) {
+ _destination = NULL;
+ } else {
+ _destination = FGAirport::findByIdent(aIdent);
+ }
+}
+
#define _ROUTE_MGR_HXX 1
#include <simgear/props/props.hxx>
-#include <simgear/route/route.hxx>
+#include <simgear/route/waypoint.hxx>
#include <simgear/structure/subsystem_mgr.hxx>
+// forward decls
+class SGRoute;
+class SGPath;
+
+class FGAirport;
+typedef SGSharedPtr<FGAirport> FGAirportRef;
/**
* Top level route manager class
{
private:
-
- SGRoute *route;
-
+ SGRoute* _route;
+ time_t _takeoffTime;
+ time_t _touchdownTime;
+ FGAirportRef _departure;
+ FGAirportRef _destination;
+
// automatic inputs
SGPropertyNode_ptr lon;
SGPropertyNode_ptr lat;
SGPropertyNode_ptr alt;
-
- // automatic outputs
- SGPropertyNode_ptr true_hdg_deg;
- SGPropertyNode_ptr target_altitude_ft;
- SGPropertyNode_ptr altitude_lock;
-
- SGPropertyNode_ptr wp0_id;
- SGPropertyNode_ptr wp0_dist;
- SGPropertyNode_ptr wp0_eta;
-
- SGPropertyNode_ptr wp1_id;
- SGPropertyNode_ptr wp1_dist;
- SGPropertyNode_ptr wp1_eta;
-
- SGPropertyNode_ptr wpn_id;
- SGPropertyNode_ptr wpn_dist;
- SGPropertyNode_ptr wpn_eta;
-
-
- class Listener : public SGPropertyChangeListener {
+ SGPropertyNode_ptr magvar;
+
+ // automatic outputs
+ SGPropertyNode_ptr departure; ///< departure airport information
+ SGPropertyNode_ptr destination; ///< destination airport information
+ SGPropertyNode_ptr alternate; ///< alternate airport information
+ SGPropertyNode_ptr cruise; ///< cruise information
+
+ SGPropertyNode_ptr totalDistance;
+ SGPropertyNode_ptr ete;
+ SGPropertyNode_ptr elapsedFlightTime;
+
+ SGPropertyNode_ptr active;
+ SGPropertyNode_ptr airborne;
+
+ SGPropertyNode_ptr wp0;
+ SGPropertyNode_ptr wp1;
+ SGPropertyNode_ptr wpn;
+
+
+ SGPropertyNode_ptr _pathNode;
+ SGPropertyNode_ptr _currentWpt;
+
+
+ /**
+ * Signal property to notify people that the route was edited
+ */
+ SGPropertyNode_ptr _edited;
+
+ /**
+ * Signal property to notify when the last waypoint is reached
+ */
+ SGPropertyNode_ptr _finished;
+
+ void setETAPropertyFromDistance(SGPropertyNode_ptr aProp, double aDistance);
+
+ class InputListener : public SGPropertyChangeListener {
public:
- Listener(FGRouteMgr *m) : mgr(m) {}
+ InputListener(FGRouteMgr *m) : mgr(m) {}
virtual void valueChanged (SGPropertyNode * prop);
private:
FGRouteMgr *mgr;
};
SGPropertyNode_ptr input;
- Listener *listener;
+ SGPropertyNode_ptr weightOnWheels;
+
+ InputListener *listener;
SGPropertyNode_ptr mirror;
- bool altitude_set;
+ /**
+ * Create a SGWayPoint from a string in the following format:
+ * - simple identifier
+ * - decimal-lon,decimal-lat
+ * - airport-id/runway-id
+ * - navaid/radial-deg/offset-nm
+ */
SGWayPoint* make_waypoint(const string& target);
+
+
void update_mirror();
- bool near_ground();
-
+
+ void currentWaypointChanged();
+
/**
- * Helper to set a string property to the estimated arrival time (ETA),
- * formatted as either hours:minutes or minutes:seconds, based on a distance
- * and the current groundspeed.
+ * Parse a route/wp node (from a saved, property-lsit formatted route)
*/
- void setETAPropertyFromDistance(SGPropertyNode_ptr aProp, double aDistance);
+ void parseRouteWaypoint(SGPropertyNode* aWP);
/**
- * Helper to update the target_altitude_ft and altitude_set flag when wp0
- * changes
+ * Check if we've reached the final waypoint.
+ * Returns true if we have.
*/
- void updateTargetAltitude();
+ bool checkFinished();
+
+// tied getters and setters
+ const char* getDepartureICAO() const;
+ const char* getDepartureName() const;
+ void setDepartureICAO(const char* aIdent);
+
+ const char* getDestinationICAO() const;
+ const char* getDestinationName() const;
+ void setDestinationICAO(const char* aIdent);
+
public:
FGRouteMgr();
void add_waypoint( const SGWayPoint& wp, int n = -1 );
SGWayPoint pop_waypoint( int i = 0 );
- SGWayPoint get_waypoint( int i ) const {
- return route->get_waypoint(i);
- }
-
- int size() const {
- return route->size();
- }
+ SGWayPoint get_waypoint( int i ) const;
+ int size() const;
+
+ bool isRouteActive() const;
+
+ int currentWaypoint() const;
+
+ /**
+ * Find a waypoint in the route, by position, and return its index, or
+ * -1 if no matching waypoint was found in the route.
+ */
+ int findWaypoint(const SGGeod& aPos) const;
+
+ /**
+ * Activate a built route. This checks for various mandatory pieces of
+ * data, such as departure and destination airports, and creates waypoints
+ * for them on the route structure.
+ *
+ * returns true if the route was activated successfully, or false if the
+ * route could not be activated for some reason
+ */
+ bool activate();
+ /**
+ * Step to the next waypoint on the active route
+ */
+ void sequence();
+
+ /**
+ *
+ */
+ void jumpToIndex(int index);
+
+ void saveRoute();
+ void loadRoute();
};
using std::cout;
using std::endl;
+FGXMLAutoInput::FGXMLAutoInput( SGPropertyNode_ptr node, double value, double offset, double scale) :
+ value(0.0),
+ abs(false),
+ property(NULL),
+ offset(NULL),
+ scale(NULL),
+ min(NULL),
+ max(NULL),
+ _condition(NULL)
+{
+ parse( node, value, offset, scale );
+}
+
+
void FGXMLAutoInput::parse( SGPropertyNode_ptr node, double aValue, double aOffset, double aScale )
{
value = aValue;
return abs ? fabs(value) : value;
}
-FGXMLAutoComponent::FGXMLAutoComponent( SGPropertyNode * node ) :
+FGXMLAutoComponent::FGXMLAutoComponent() :
_condition( NULL ),
enable_prop( NULL ),
enable_value( NULL ),
debug(false),
enabled( false )
{
- int i;
- SGPropertyNode *prop;
-
- for ( i = 0; i < node->nChildren(); ++i ) {
- SGPropertyNode *child = node->getChild(i);
- string cname = child->getName();
- string cval = child->getStringValue();
- if ( cname == "name" ) {
- name = cval;
-
- } else if ( cname == "feedback-if-disabled" ) {
- feedback_if_disabled = child->getBoolValue();
-
- } else if ( cname == "debug" ) {
- debug = child->getBoolValue();
-
- } else if ( cname == "enable" ) {
- if( (prop = child->getChild("condition")) != NULL ) {
- _condition = sgReadCondition(child, prop);
- } else {
- if ( (prop = child->getChild( "prop" )) != NULL ) {
- enable_prop = fgGetNode( prop->getStringValue(), true );
- }
-
- if ( (prop = child->getChild( "value" )) != NULL ) {
- delete enable_value;
- enable_value = new string(prop->getStringValue());
- }
- }
- if ( (prop = child->getChild( "honor-passive" )) != NULL ) {
- honor_passive = prop->getBoolValue();
- }
-
- } else if ( cname == "input" ) {
-
- valueInput.push_back( new FGXMLAutoInput( child ) );
-
- } else if ( cname == "reference" ) {
+}
- referenceInput.push_back( new FGXMLAutoInput( child ) );
+FGXMLAutoComponent::~FGXMLAutoComponent()
+{
+ delete enable_value;
+}
- } else if ( cname == "output" ) {
- // grab all <prop> and <property> childs
- int found = 0;
- // backwards compatibility: allow <prop> elements
- for( int i = 0; (prop = child->getChild("prop", i)) != NULL; i++ ) {
- SGPropertyNode *tmp = fgGetNode( prop->getStringValue(), true );
- output_list.push_back( tmp );
- found++;
- }
- for( int i = 0; (prop = child->getChild("property", i)) != NULL; i++ ) {
- SGPropertyNode *tmp = fgGetNode( prop->getStringValue(), true );
- output_list.push_back( tmp );
- found++;
- }
+void FGXMLAutoComponent::parseNode(SGPropertyNode* aNode)
+{
+ SGPropertyNode *prop;
+ for (int i = 0; i < aNode->nChildren(); ++i ) {
+ SGPropertyNode *child = aNode->getChild(i);
+ string cname(child->getName());
+
+ if (parseNodeHook(cname, child)) {
+ // derived class handled it, fine
+ } else if ( cname == "name" ) {
+ name = child->getStringValue();
+ } else if ( cname == "feedback-if-disabled" ) {
+ feedback_if_disabled = child->getBoolValue();
+ } else if ( cname == "debug" ) {
+ debug = child->getBoolValue();
+ } else if ( cname == "enable" ) {
+ if( (prop = child->getChild("condition")) != NULL ) {
+ _condition = sgReadCondition(child, prop);
+ } else {
+ if ( (prop = child->getChild( "prop" )) != NULL ) {
+ enable_prop = fgGetNode( prop->getStringValue(), true );
+ }
+
+ if ( (prop = child->getChild( "value" )) != NULL ) {
+ delete enable_value;
+ enable_value = new string(prop->getStringValue());
+ }
+ }
+ if ( (prop = child->getChild( "honor-passive" )) != NULL ) {
+ honor_passive = prop->getBoolValue();
+ }
+ } else if ( cname == "input" ) {
+ valueInput.push_back( new FGXMLAutoInput( child ) );
+ } else if ( cname == "reference" ) {
+ referenceInput.push_back( new FGXMLAutoInput( child ) );
+ } else if ( cname == "output" ) {
+ // grab all <prop> and <property> childs
+ int found = 0;
+ // backwards compatibility: allow <prop> elements
+ for( int i = 0; (prop = child->getChild("prop", i)) != NULL; i++ ) {
+ SGPropertyNode *tmp = fgGetNode( prop->getStringValue(), true );
+ output_list.push_back( tmp );
+ found++;
+ }
+ for( int i = 0; (prop = child->getChild("property", i)) != NULL; i++ ) {
+ SGPropertyNode *tmp = fgGetNode( prop->getStringValue(), true );
+ output_list.push_back( tmp );
+ found++;
+ }
+
+ // no <prop> elements, text node of <output> is property name
+ if( found == 0 )
+ output_list.push_back( fgGetNode(child->getStringValue(), true ) );
+ } else if ( cname == "config" ) {
+ parseConfig(child);
+ } else if ( cname == "min" ) {
+ uminInput.push_back( new FGXMLAutoInput( child ) );
+ } else if ( cname == "u_min" ) {
+ uminInput.push_back( new FGXMLAutoInput( child ) );
+ } else if ( cname == "max" ) {
+ umaxInput.push_back( new FGXMLAutoInput( child ) );
+ } else if ( cname == "u_max" ) {
+ umaxInput.push_back( new FGXMLAutoInput( child ) );
+ } else {
+ SG_LOG(SG_AUTOPILOT, SG_ALERT, "malformed autopilot definition - unrecognized node:"
+ << cname << " in section " << name);
+ throw sg_io_exception("XMLAuto: unrecognized component node:" + cname, "Section=" + name);
+ }
+ } // of top-level iteration
+}
- // no <prop> elements, text node of <output> is property name
- if( found == 0 )
- output_list.push_back( fgGetNode(child->getStringValue(), true ) );
+void FGXMLAutoComponent::parseConfig(SGPropertyNode* aConfig)
+{
+ for (int i = 0; i < aConfig->nChildren(); ++i ) {
+ SGPropertyNode *child = aConfig->getChild(i);
+ string cname(child->getName());
+
+ if (parseConfigHook(cname, child)) {
+ // derived class handled it, fine
+ } else if ( cname == "min" ) {
+ uminInput.push_back( new FGXMLAutoInput( child ) );
+ } else if ( cname == "u_min" ) {
+ uminInput.push_back( new FGXMLAutoInput( child ) );
+ } else if ( cname == "max" ) {
+ umaxInput.push_back( new FGXMLAutoInput( child ) );
+ } else if ( cname == "u_max" ) {
+ umaxInput.push_back( new FGXMLAutoInput( child ) );
+ } else {
+ SG_LOG(SG_AUTOPILOT, SG_ALERT, "malformed autopilot definition - unrecognized config node:"
+ << cname << " in section " << name);
+ throw sg_io_exception("XMLAuto: unrecognized config node:" + cname, "Section=" + name);
+ }
+ } // of config iteration
+}
- } else if ( cname == "config" ) {
- if( (prop = child->getChild("min")) != NULL ) {
- uminInput.push_back( new FGXMLAutoInput( prop ) );
- }
- if( (prop = child->getChild("u_min")) != NULL ) {
- uminInput.push_back( new FGXMLAutoInput( prop ) );
- }
- if( (prop = child->getChild("max")) != NULL ) {
- umaxInput.push_back( new FGXMLAutoInput( prop ) );
- }
- if( (prop = child->getChild("u_max")) != NULL ) {
- umaxInput.push_back( new FGXMLAutoInput( prop ) );
- }
- } else if ( cname == "min" ) {
- uminInput.push_back( new FGXMLAutoInput( child ) );
- } else if ( cname == "u_min" ) {
- uminInput.push_back( new FGXMLAutoInput( child ) );
- } else if ( cname == "max" ) {
- umaxInput.push_back( new FGXMLAutoInput( child ) );
- } else if ( cname == "u_max" ) {
- umaxInput.push_back( new FGXMLAutoInput( child ) );
- }
- }
+bool FGXMLAutoComponent::parseNodeHook(const string& aName, SGPropertyNode* aNode)
+{
+ return false;
}
-FGXMLAutoComponent::~FGXMLAutoComponent()
+bool FGXMLAutoComponent::parseConfigHook(const string& aName, SGPropertyNode* aNode)
{
- delete enable_value;
+ return false;
}
bool FGXMLAutoComponent::isPropertyEnabled()
}
FGPIDController::FGPIDController( SGPropertyNode *node ):
- FGXMLAutoComponent( node ),
+ FGXMLAutoComponent(),
alpha( 0.1 ),
beta( 1.0 ),
gamma( 0.0 ),
desiredTs( 0.0 ),
elapsedTime( 0.0 )
{
- int i;
- for ( i = 0; i < node->nChildren(); ++i ) {
- SGPropertyNode *child = node->getChild(i);
- string cname = child->getName();
- string cval = child->getStringValue();
- if ( cname == "config" ) {
- SGPropertyNode *config;
-
- if ( (config = child->getChild( "Ts" )) != NULL ) {
- desiredTs = config->getDoubleValue();
- }
-
- Kp.push_back( new FGXMLAutoInput( child->getChild( "Kp" ) ) );
- Ti.push_back( new FGXMLAutoInput( child->getChild( "Ti" ) ) );
- Td.push_back( new FGXMLAutoInput( child->getChild( "Td" ) ) );
-
- config = child->getChild( "beta" );
- if ( config != NULL ) {
- beta = config->getDoubleValue();
- }
-
- config = child->getChild( "alpha" );
- if ( config != NULL ) {
- alpha = config->getDoubleValue();
- }
-
- config = child->getChild( "gamma" );
- if ( config != NULL ) {
- gamma = config->getDoubleValue();
- }
-
- } else {
- SG_LOG( SG_AUTOPILOT, SG_WARN, "Error in autopilot config logic" );
- if ( get_name().length() ) {
- SG_LOG( SG_AUTOPILOT, SG_WARN, "Section = " << get_name() );
- }
- }
- }
+ parseNode(node);
}
+bool FGPIDController::parseConfigHook(const string& aName, SGPropertyNode* aNode)
+{
+ if (aName == "Ts") {
+ desiredTs = aNode->getDoubleValue();
+ } else if (aName == "Kp") {
+ Kp.push_back( new FGXMLAutoInput(aNode) );
+ } else if (aName == "Ti") {
+ Ti.push_back( new FGXMLAutoInput(aNode) );
+ } else if (aName == "Td") {
+ Td.push_back( new FGXMLAutoInput(aNode) );
+ } else if (aName == "beta") {
+ beta = aNode->getDoubleValue();
+ } else if (aName == "alpha") {
+ alpha = aNode->getDoubleValue();
+ } else if (aName == "gamma") {
+ gamma = aNode->getDoubleValue();
+ } else {
+ // unhandled by us, let the base class try it
+ return false;
+ }
+
+ return true;
+}
/*
* Roy Vegard Ovesen:
FGPISimpleController::FGPISimpleController( SGPropertyNode *node ):
- FGXMLAutoComponent( node ),
+ FGXMLAutoComponent(),
int_sum( 0.0 )
{
- int i;
- for ( i = 0; i < node->nChildren(); ++i ) {
- SGPropertyNode *child = node->getChild(i);
- string cname = child->getName();
- string cval = child->getStringValue();
- if ( cname == "config" ) {
- Kp.push_back( new FGXMLAutoInput( child->getChild( "Kp" ) ) );
- Ki.push_back( new FGXMLAutoInput( child->getChild( "Ki" ) ) );
- } else {
- SG_LOG( SG_AUTOPILOT, SG_WARN, "Error in autopilot config logic" );
- if ( get_name().length() ) {
- SG_LOG( SG_AUTOPILOT, SG_WARN, "Section = " << get_name() );
- }
- }
- }
+ parseNode(node);
}
+bool FGPISimpleController::parseConfigHook(const string& aName, SGPropertyNode* aNode)
+{
+ if (aName == "Kp") {
+ Kp.push_back( new FGXMLAutoInput(aNode) );
+ } else if (aName == "Ki") {
+ Ki.push_back( new FGXMLAutoInput(aNode) );
+ } else {
+ // unhandled by us, let the base class try it
+ return false;
+ }
+
+ return true;
+}
void FGPISimpleController::update( double dt ) {
FGPredictor::FGPredictor ( SGPropertyNode *node ):
- FGXMLAutoComponent( node ),
+ FGXMLAutoComponent(),
average(0.0)
{
- int i;
- for ( i = 0; i < node->nChildren(); ++i ) {
- SGPropertyNode *child = node->getChild(i);
- string cname = child->getName();
- if ( cname == "seconds" ) {
- seconds.push_back( new FGXMLAutoInput( child, 0 ) );
- } else if ( cname == "filter-gain" ) {
- filter_gain.push_back( new FGXMLAutoInput( child, 0 ) );
- }
- }
+ parseNode(node);
+}
+
+bool FGPredictor::parseNodeHook(const string& aName, SGPropertyNode* aNode)
+{
+ if (aName == "seconds") {
+ seconds.push_back( new FGXMLAutoInput( aNode, 0 ) );
+ } else if (aName == "filter-gain") {
+ filter_gain.push_back( new FGXMLAutoInput( aNode, 0 ) );
+ } else {
+ return false;
+ }
+
+ return true;
}
void FGPredictor::update( double dt ) {
FGDigitalFilter::FGDigitalFilter(SGPropertyNode *node):
- FGXMLAutoComponent( node ),
+ FGXMLAutoComponent(),
filterType(none)
{
- int i;
- for ( i = 0; i < node->nChildren(); ++i ) {
- SGPropertyNode *child = node->getChild(i);
- string cname = child->getName();
- string cval = child->getStringValue();
- if ( cname == "type" ) {
- if ( cval == "exponential" ) {
- filterType = exponential;
- } else if (cval == "double-exponential") {
- filterType = doubleExponential;
- } else if (cval == "moving-average") {
- filterType = movingAverage;
- } else if (cval == "noise-spike") {
- filterType = noiseSpike;
- } else if (cval == "gain") {
- filterType = gain;
- } else if (cval == "reciprocal") {
- filterType = reciprocal;
- }
- } else if ( cname == "filter-time" ) {
- TfInput.push_back( new FGXMLAutoInput( child, 1.0 ) );
- if( filterType == none ) filterType = exponential;
- } else if ( cname == "samples" ) {
- samplesInput.push_back( new FGXMLAutoInput( child, 1 ) );
- if( filterType == none ) filterType = movingAverage;
- } else if ( cname == "max-rate-of-change" ) {
- rateOfChangeInput.push_back( new FGXMLAutoInput( child, 1 ) );
- if( filterType == none ) filterType = noiseSpike;
- } else if ( cname == "gain" ) {
- gainInput.push_back( new FGXMLAutoInput( child, 1 ) );
- if( filterType == none ) filterType = gain;
- }
- }
+ parseNode(node);
output.resize(2, 0.0);
input.resize(samplesInput.get_value() + 1, 0.0);
}
+
+bool FGDigitalFilter::parseNodeHook(const string& aName, SGPropertyNode* aNode)
+{
+ if (aName == "type" ) {
+ string val(aNode->getStringValue());
+ if ( val == "exponential" ) {
+ filterType = exponential;
+ } else if (val == "double-exponential") {
+ filterType = doubleExponential;
+ } else if (val == "moving-average") {
+ filterType = movingAverage;
+ } else if (val == "noise-spike") {
+ filterType = noiseSpike;
+ } else if (val == "gain") {
+ filterType = gain;
+ } else if (val == "reciprocal") {
+ filterType = reciprocal;
+ }
+ } else if (aName == "filter-time" ) {
+ TfInput.push_back( new FGXMLAutoInput( aNode, 1.0 ) );
+ if( filterType == none ) filterType = exponential;
+ } else if (aName == "samples" ) {
+ samplesInput.push_back( new FGXMLAutoInput( aNode, 1 ) );
+ if( filterType == none ) filterType = movingAverage;
+ } else if (aName == "max-rate-of-change" ) {
+ rateOfChangeInput.push_back( new FGXMLAutoInput( aNode, 1 ) );
+ if( filterType == none ) filterType = noiseSpike;
+ } else if (aName == "gain" ) {
+ gainInput.push_back( new FGXMLAutoInput( aNode, 1 ) );
+ if( filterType == none ) filterType = gain;
+ } else {
+ return false; // not handled by us, let the base class try
+ }
+
+ return true;
+}
+
void FGDigitalFilter::update(double dt)
{
if ( isPropertyEnabled() ) {
" details.");
exit(-1);
}
- } catch (const sg_exception&) {
+ } catch (const sg_exception& e) {
SG_LOG( SG_ALL, SG_ALERT, "Failed to load autopilot configuration: "
- << config.str() );
+ << config.str() << ":" << e.getMessage() );
}
} else {
#ifndef _XMLAUTO_HXX
#define _XMLAUTO_HXX 1
-#ifndef __cplusplus
-# error This library requires C++
-#endif
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
#include <simgear/compiler.h>
#include <string>
#include <vector>
#include <deque>
-using std::string;
-using std::vector;
-using std::deque;
-
#include <simgear/props/props.hxx>
#include <simgear/structure/subsystem_mgr.hxx>
#include <simgear/props/condition.hxx>
-#include <Main/fg_props.hxx>
-
class FGXMLAutoInput : public SGReferenced {
private:
SGSharedPtr<const SGCondition> _condition;
public:
- FGXMLAutoInput( SGPropertyNode_ptr node = NULL, double value = 0.0, double offset = 0.0, double scale = 1.0 ) :
- value(0.0),
- abs(false),
- property(NULL),
- offset(NULL),
- scale(NULL),
- min(NULL),
- max(NULL),
- _condition(NULL) {
- parse( node, value, offset, scale );
- }
-
+ FGXMLAutoInput( SGPropertyNode_ptr node = NULL, double value = 0.0, double offset = 0.0, double scale = 1.0 );
+
void parse( SGPropertyNode_ptr, double value = 0.0, double offset = 0.0, double scale = 1.0 );
/* get the value of this input, apply scale and offset and clipping */
};
-class FGXMLAutoInputList : public vector<SGSharedPtr<FGXMLAutoInput> > {
+class FGXMLAutoInputList : public std::vector<SGSharedPtr<FGXMLAutoInput> > {
public:
FGXMLAutoInput * get_active() {
for (iterator it = begin(); it != end(); ++it) {
class FGXMLAutoComponent : public SGReferenced {
private:
- vector <SGPropertyNode_ptr> output_list;
+ std::vector <SGPropertyNode_ptr> output_list;
SGSharedPtr<const SGCondition> _condition;
SGPropertyNode_ptr enable_prop;
- string * enable_value;
+ std::string * enable_value;
SGPropertyNode_ptr passive_mode;
bool honor_passive;
- string name;
+ std::string name;
/* Feed back output property to input property if
this filter is disabled. This is for multi-stage
void do_feedback_if_disabled();
protected:
+ FGXMLAutoComponent();
+
+ /*
+ * Parse a component specification read from a property-list.
+ * Calls the hook methods below to allow derived classes to
+ * specialise parsing bevaiour.
+ */
+ void parseNode(SGPropertyNode* aNode);
+
+ /**
+ * Helper to parse the config section
+ */
+ void parseConfig(SGPropertyNode* aConfig);
+
+ /*
+ * Over-rideable hook method to allow derived classes to refine top-level
+ * node parsing. Return true if the node was handled, false otherwise.
+ */
+ virtual bool parseNodeHook(const std::string& aName, SGPropertyNode* aNode);
+
+ /**
+ * Over-rideable hook method to allow derived classes to refine config
+ * node parsing. Return true if the node was handled, false otherwise.
+ */
+ virtual bool parseConfigHook(const std::string& aName, SGPropertyNode* aNode);
FGXMLAutoInputList valueInput;
FGXMLAutoInputList referenceInput;
}
public:
-
- FGXMLAutoComponent( SGPropertyNode *node);
+
virtual ~FGXMLAutoComponent();
virtual void update (double dt)=0;
- inline const string& get_name() { return name; }
+ inline const std::string& get_name() { return name; }
double clamp( double value );
// helpful for things like flight directors which position
// their vbars from the autopilot computations.
if ( honor_passive && passive_mode->getBoolValue() ) return;
- for( vector <SGPropertyNode_ptr>::iterator it = output_list.begin(); it != output_list.end(); ++it)
+ for( std::vector <SGPropertyNode_ptr>::iterator it = output_list.begin(); it != output_list.end(); ++it)
(*it)->setDoubleValue( clamp( value ) );
}
double desiredTs; // desired sampling interval (sec)
double elapsedTime; // elapsed time (sec)
-
+
+protected:
+ bool parseConfigHook(const std::string& aName, SGPropertyNode* aNode);
public:
FGXMLAutoInputList Ki;
double int_sum;
+protected:
+ bool parseConfigHook(const std::string& aName, SGPropertyNode* aNode);
public:
FGXMLAutoInputList seconds;
FGXMLAutoInputList filter_gain;
+protected:
+ bool parseNodeHook(const std::string& aName, SGPropertyNode* aNode);
+
public:
FGPredictor( SGPropertyNode *node );
~FGPredictor() {}
FGXMLAutoInputList gainInput; //
FGXMLAutoInputList TfInput; // Filter time [s]
- deque <double> output;
- deque <double> input;
+ std::deque <double> output;
+ std::deque <double> input;
enum filterTypes { exponential, doubleExponential, movingAverage,
noiseSpike, gain, reciprocal, none };
filterTypes filterType;
+protected:
+ bool parseNodeHook(const std::string& aName, SGPropertyNode* aNode);
+
public:
FGDigitalFilter(SGPropertyNode *node);
~FGDigitalFilter() {}
protected:
- typedef vector<SGSharedPtr<FGXMLAutoComponent> > comp_list;
+ typedef std::vector<SGSharedPtr<FGXMLAutoComponent> > comp_list;
private:
= fgGetNode("/autopilot/locks/altitude", true);
static char hud_hdg_text[256];
- static char hud_wp0_text[256];
- static char hud_wp1_text[256];
- static char hud_wp2_text[256];
+ static char hud_gps_text0[256];
+ static char hud_gps_text1[256];
+ static char hud_gps_text2[256];
static char hud_alt_text[256];
glEnable(GL_BLEND);
fgGetDouble("/autopilot/settings/true-heading-deg") );
HUD_TextList.add( fgText( 40, apY, hud_hdg_text ) );
apY -= 15;
-
- string wp0_id = fgGetString( "/autopilot/route-manager/wp[0]/id" );
- if ( wp0_id.length() > 0 ) {
- snprintf( hud_wp0_text, 256, "%5s %6.1fnm %s", wp0_id.c_str(),
- fgGetDouble( "/autopilot/route-manager/wp[0]/dist" ),
- fgGetString( "/autopilot/route-manager/wp[0]/eta" ) );
- HUD_TextList.add( fgText( 40, apY, hud_wp0_text ) );
- apY -= 15;
- }
- string wp1_id = fgGetString( "/autopilot/route-manager/wp[1]/id" );
- if ( wp1_id.length() > 0 ) {
- snprintf( hud_wp1_text, 256, "%5s %6.1fnm %s", wp1_id.c_str(),
- fgGetDouble( "/autopilot/route-manager/wp[1]/dist" ),
- fgGetString( "/autopilot/route-manager/wp[1]/eta" ) );
- HUD_TextList.add( fgText( 40, apY, hud_wp1_text ) );
- apY -= 15;
- }
- string wp2_id = fgGetString( "/autopilot/route-manager/wp-last/id" );
- if ( wp2_id.length() > 0 ) {
- snprintf( hud_wp2_text, 256, "%5s %6.1fnm %s", wp2_id.c_str(),
- fgGetDouble( "/autopilot/route-manager/wp-last/dist" ),
- fgGetString( "/autopilot/route-manager/wp-last/eta" ) );
- HUD_TextList.add( fgText( 40, apY, hud_wp2_text ) );
- apY -= 15;
- }
}
+
+ // GPS current waypoint information
+ SGPropertyNode_ptr gps = fgGetNode("/instrumentation/gps", true);
+ SGPropertyNode_ptr curWp = gps->getChild("wp")->getChild("wp",1);
+
+ if ((gps->getDoubleValue("raim") > 0.5) && curWp) {
+ // GPS is receiving a valid signal
+ snprintf(hud_gps_text0, 256, "WPT:%5s BRG:%03.0f %5.1fnm",
+ curWp->getStringValue("ID"),
+ curWp->getDoubleValue("bearing-mag-deg"),
+ curWp->getDoubleValue("distance-nm"));
+ HUD_TextList.add( fgText( 40, apY, hud_gps_text0 ) );
+ apY -= 15;
+
+ // curWp->getStringValue("TTW")
+ snprintf(hud_gps_text2, 256, "ETA %s", curWp->getStringValue("TTW"));
+ HUD_TextList.add( fgText( 40, apY, hud_gps_text2 ) );
+ apY -= 15;
+
+ double courseError = curWp->getDoubleValue("course-error-nm");
+ if (fabs(courseError) >= 0.01) {
+ // generate an arrow indicatinng if the pilot should turn left or right
+ char dir = (courseError < 0.0) ? '<' : '>';
+ snprintf(hud_gps_text1, 256, "GPS TRK:%03.0f XTRK:%c%4.2fnm",
+ gps->getDoubleValue("indicated-track-magnetic-deg"), dir, fabs(courseError));
+ } else { // on course, don't bother showing the XTRK error
+ snprintf(hud_gps_text1, 256, "GPS TRK:%03.0f",
+ gps->getDoubleValue("indicated-track-magnetic-deg"));
+ }
+
+ HUD_TextList.add( fgText( 40, apY, hud_gps_text1) );
+ apY -= 15;
+ } // of valid GPS output
+
+ ////////////////////
if ( strcmp( altitude_enabled->getStringValue(), "altitude-hold" ) == 0 ) {
snprintf( hud_alt_text, 256, "alt = %.0f\n",
SGPropertyNode * target = 0;
if (type.empty()) {
- SG_LOG( SG_COCKPIT, SG_INFO,
+ SG_LOG( SG_COCKPIT, SG_BULK,
"No type supplied for transformation " << name
<< " assuming \"rotation\"" );
type = "rotation";
// Check for an interpolation table
const SGPropertyNode * trans_table = node->getNode("interpolation");
if (trans_table != 0) {
- SG_LOG( SG_COCKPIT, SG_INFO, "Found interpolation table with "
+ SG_LOG( SG_COCKPIT, SG_DEBUG, "Found interpolation table with "
<< trans_table->nChildren() << " children" );
t->table = new SGInterpTable(trans_table);
} else {
if (type.empty()) {
- SG_LOG( SG_COCKPIT, SG_INFO,
+ SG_LOG( SG_COCKPIT, SG_BULK,
"No type supplied for layer " << name
<< " assuming \"texture\"" );
type = "texture";
}
readConditions(instrument, node);
- SG_LOG( SG_COCKPIT, SG_DEBUG, "Done reading instrument " << name );
return instrument;
}
h = real_h;
}
- SG_LOG( SG_COCKPIT, SG_DEBUG, "Reading instrument " << name );
+ SG_LOG( SG_COCKPIT, SG_BULK, "Reading instrument " << name );
// Warning - hardwired size!!!
RenderArea2D* instrument = new RenderArea2D(158, 40, 158, 40, x, y);
return rslt;
}
+// Invert the QNH calculation to get the field pressure from a metar
+// report.
+// field pressure _in pascals_
+// ... caller gets to convert to inHg or millibars
+// Field elevation in m
+// Altimeter setting (QNH) in pascals
+// Valid for fields within the troposphere only.
+double FGAtmo::fieldPressure(const double field_elev, const double qnh)
+{
+ using namespace atmodel;
+ static const double nn = ISA::lam0 * Rgas / g / mm;
+ const double pratio = pow(qnh / ISA::P0, nn);
+ return ISA::P0 * pow(pratio - field_elev * ISA::lam0 / ISA::T0, 1.0 / nn);
+}
+
void FGAltimeter::dump_stack1(const double Tref) {
using namespace atmodel;
const int bs(200);
// Field pressure in pascals
// Valid for fields within the troposphere only.
double QNH(const double field_elev, const double field_press);
+/**
+ * Invert the QNH calculation to get the field pressure from a metar
+ * report. Valid for fields within the troposphere only.
+ * @param field_elev field elevation in m
+ * @param qnh altimeter setting in pascals
+ * @return field pressure _in pascals_. Caller gets to convert to inHg
+ * or millibars
+ */
+ static double fieldPressure(const double field_elev, const double qnh);
};
#include <Main/fg_props.hxx>
#include <Main/util.hxx>
+#include "atmosphere.hxx"
#include "fgmetar.hxx"
#include "environment_ctrl.hxx"
virtual bool passAirport(FGAirport* aApt) const {
return aApt->getMetar();
}
+
+ // permit heliports and seaports too
+ virtual FGPositioned::Type maxType() const
+ { return FGPositioned::SEAPORT; }
};
static AirportWithMetar airportWithMetarFilter;
return d > 180.0 ? d - 360.0 : d;
}
+// Return the sea level pressure for a metar observation, in inHg.
+// This is different from QNH because it accounts for the current
+// temperature at the observation point.
+// metarPressure in inHg
+// fieldHt in ft
+// fieldTemp in C
+
+static double reducePressureSl(double metarPressure, double fieldHt,
+ double fieldTemp)
+{
+ double elev = fieldHt * SG_FEET_TO_METER;
+ double fieldPressure
+ = FGAtmo::fieldPressure(elev, metarPressure * atmodel::inHg);
+ double slPressure = P_layer(0, elev, fieldPressure,
+ fieldTemp + atmodel::freezing,
+ atmodel::ISA::lam0);
+ return slPressure / atmodel::inHg;
+}
+
void
FGMetarCtrl::update(double dt)
{
bool reinit_required = false;
bool layer_rebuild_required = false;
+ double station_elevation_ft = station_elevation_n->getDoubleValue();
if (first_update) {
double dir = base_wind_dir_n->getDoubleValue()+magnetic_variation_n->getDoubleValue();
fgDefaultWeatherValue("visibility-m", metarvis);
double metarpressure = pressure_n->getDoubleValue();
- fgDefaultWeatherValue("pressure-sea-level-inhg", metarpressure);
+ fgDefaultWeatherValue("pressure-sea-level-inhg",
+ reducePressureSl(metarpressure,
+ station_elevation_ft,
+ temperature_n->getDoubleValue()));
// We haven't already loaded a METAR, so apply it immediately.
vector<SGPropertyNode_ptr> layers = clouds_n->getChildren("layer");
double pressure = boundary_sea_level_pressure_n->getDoubleValue();
double metarpressure = pressure_n->getDoubleValue();
- if( pressure != metarpressure ) {
- pressure = interpolate_val( pressure, metarpressure, MaxPressureChangeInHgSec );
+ double newpressure = reducePressureSl(metarpressure,
+ station_elevation_ft,
+ temperature_n->getDoubleValue());
+ if( pressure != newpressure ) {
+ pressure = interpolate_val( pressure, newpressure, MaxPressureChangeInHgSec );
fgDefaultWeatherValue("pressure-sea-level-inhg", pressure);
reinit_required = true;
}
}
}
}
- {
- double station_elevation_ft = station_elevation_n->getDoubleValue();
- set_temp_at_altitude(temperature_n->getDoubleValue(), station_elevation_ft);
- set_dewpoint_at_altitude(dewpoint_n->getDoubleValue(), station_elevation_ft);
- }
+ set_temp_at_altitude(temperature_n->getDoubleValue(), station_elevation_ft);
+ set_dewpoint_at_altitude(dewpoint_n->getDoubleValue(), station_elevation_ft);
//TODO: check if temperature/dewpoint have changed. This requires reinit.
// Force an update of the 3D clouds
}
}
-void FGClouds::buildCloud(SGPropertyNode *cloud_def_root, SGPropertyNode *box_def_root, const string& name, sgVec3 pos, SGCloudField *layer) {
+// Build an invidual cloud. Returns the extents of the cloud for coverage calculations
+double FGClouds::buildCloud(SGPropertyNode *cloud_def_root, SGPropertyNode *box_def_root, const string& name, double grid_z_rand, SGCloudField *layer) {
SGPropertyNode *box_def=NULL;
SGPropertyNode *cld_def=NULL;
+ double extent = 0.0;
SGPath texture_root = globals->get_fg_root();
texture_root.append("Textures");
box_def = box_def_root->getChild(base_name.c_str());
}
if( !box_def )
- return;
+ return 0.0;
}
+
+ double x = sg_random() * SGCloudField::fieldSize - (SGCloudField::fieldSize / 2.0);
+ double y = sg_random() * SGCloudField::fieldSize - (SGCloudField::fieldSize / 2.0);
+ double z = grid_z_rand * (sg_random() - 0.5);
+
+ sgVec3 pos={x,y,z};
+
for(int i = 0; i < box_def->nChildren() ; i++) {
SGPropertyNode *abox = box_def->getChild(i);
if( strcmp(abox->getName(), "box") == 0) {
- double x = abox->getDoubleValue("x") + pos[0];
- double y = abox->getDoubleValue("y") + pos[1];
- double z = abox->getDoubleValue("z") + pos[2];
- SGVec3f newpos = SGVec3f(x, z, y);
-
+
string type = abox->getStringValue("type", "cu-small");
-
cld_def = cloud_def_root->getChild(type.c_str());
- if ( !cld_def ) return;
-
- double min_width = cld_def->getDoubleValue("min-cloud-width-m", 500.0);
- double max_width = cld_def->getDoubleValue("max-cloud-width-m", 1000.0);
- double min_height = cld_def->getDoubleValue("min-cloud-height-m", min_width);
- double max_height = cld_def->getDoubleValue("max-cloud-height-m", max_width);
- double min_sprite_width = cld_def->getDoubleValue("min-sprite-width-m", 200.0);
- double max_sprite_width = cld_def->getDoubleValue("max-sprite-width-m", min_sprite_width);
- double min_sprite_height = cld_def->getDoubleValue("min-sprite-height-m", min_sprite_width);
- double max_sprite_height = cld_def->getDoubleValue("max-sprite-height-m", max_sprite_width);
- int num_sprites = cld_def->getIntValue("num-sprites", 20);
- int num_textures_x = cld_def->getIntValue("num-textures-x", 1);
- int num_textures_y = cld_def->getIntValue("num-textures-y", 1);
- double bottom_shade = cld_def->getDoubleValue("bottom-shade", 1.0);
- string texture = cld_def->getStringValue("texture", "cl_cumulus.rgb");
-
- SGNewCloud *cld =
- new SGNewCloud(type,
- texture_root,
- texture,
- min_width,
- max_width,
- min_height,
- max_height,
- min_sprite_width,
- max_sprite_width,
- min_sprite_height,
- max_sprite_height,
- bottom_shade,
- num_sprites,
- num_textures_x,
- num_textures_y);
- layer->addCloud(newpos, cld);
+ if ( !cld_def ) return 0.0;
+
+ double w = abox->getDoubleValue("width", 1000.0);
+ double h = abox->getDoubleValue("height", 1000.0);
+ int hdist = abox->getIntValue("hdist", 1);
+ int vdist = abox->getIntValue("vdist", 1);
+
+ double c = abox->getDoubleValue("count", 5);
+ int count = (int) (c + (sg_random() - 0.5) * c);
+
+ extent = max(w*w, extent);
+
+ for (int j = 0; j < count; j++) {
+
+ // Locate the clouds randomly in the defined space. The hdist and
+ // vdist values control the horizontal and vertical distribution
+ // by simply summing random components.
+ double x = 0.0;
+ double y = 0.0;
+ double z = 0.0;
+
+ for (int k = 0; k < hdist; k++)
+ {
+ x += (sg_random() / hdist);
+ y += (sg_random() / hdist);
+ }
+
+ for (int k = 0; k < vdist; k++)
+ {
+ z += (sg_random() / vdist);
+ }
+
+ x = w * (x - 0.5) + pos[0]; // N/S
+ y = w * (y - 0.5) + pos[1]; // E/W
+ z = h * z + pos[2]; // Up/Down. pos[2] is the cloudbase
+
+ SGVec3f newpos = SGVec3f(x, y, z);
+
+ double min_width = cld_def->getDoubleValue("min-cloud-width-m", 500.0);
+ double max_width = cld_def->getDoubleValue("max-cloud-width-m", 1000.0);
+ double min_height = cld_def->getDoubleValue("min-cloud-height-m", min_width);
+ double max_height = cld_def->getDoubleValue("max-cloud-height-m", max_width);
+ double min_sprite_width = cld_def->getDoubleValue("min-sprite-width-m", 200.0);
+ double max_sprite_width = cld_def->getDoubleValue("max-sprite-width-m", min_sprite_width);
+ double min_sprite_height = cld_def->getDoubleValue("min-sprite-height-m", min_sprite_width);
+ double max_sprite_height = cld_def->getDoubleValue("max-sprite-height-m", max_sprite_width);
+ int num_sprites = cld_def->getIntValue("num-sprites", 20);
+ int num_textures_x = cld_def->getIntValue("num-textures-x", 1);
+ int num_textures_y = cld_def->getIntValue("num-textures-y", 1);
+ double bottom_shade = cld_def->getDoubleValue("bottom-shade", 1.0);
+ string texture = cld_def->getStringValue("texture", "cu.png");
+
+ SGNewCloud *cld =
+ new SGNewCloud(type,
+ texture_root,
+ texture,
+ min_width,
+ max_width,
+ min_height,
+ max_height,
+ min_sprite_width,
+ max_sprite_width,
+ min_sprite_height,
+ max_sprite_height,
+ bottom_shade,
+ num_sprites,
+ num_textures_x,
+ num_textures_y);
+ layer->addCloud(newpos, cld);
+ }
}
}
+
+ // Return the maximum extent of the cloud
+ return extent;
}
void FGClouds::buildLayer(int iLayer, const string& name, double alt, double coverage) {
return;
}
}
-
+
// At this point, we know we've got some 3D clouds to generate.
thesky->get_cloud_layer(iLayer)->set_enable3dClouds(true);
- double grid_x_size = layer_def->getDoubleValue("grid-x-size", 1000.0);
- double grid_y_size = layer_def->getDoubleValue("grid-y-size", 1000.0);
- double grid_x_rand = layer_def->getDoubleValue("grid-x-rand", grid_x_size);
- double grid_y_rand = layer_def->getDoubleValue("grid-y-rand", grid_y_size);
double grid_z_rand = layer_def->getDoubleValue("grid-z-rand");
for(int i = 0; i < layer_def->nChildren() ; i++) {
}
}
totalCount = 1.0 / totalCount;
-
- for(double px = 0.0; px < SGCloudField::fieldSize; px += grid_x_size) {
- for(double py = 0.0; py < SGCloudField::fieldSize; py += grid_y_size) {
- double x = px + grid_x_rand * (sg_random() - 0.5) - (SGCloudField::fieldSize / 2.0);
- double y = py + grid_y_rand * (sg_random() - 0.5) - (SGCloudField::fieldSize / 2.0);
- double z = grid_z_rand * (sg_random() - 0.5);
-
- if (sg_random() < coverage) {
- double choice = sg_random();
+
+ // Determine how much cloud coverage we need in m^2.
+ double cov = coverage * SGCloudField::fieldSize * SGCloudField::fieldSize;
+
+ while (cov > 0.0f) {
+ double choice = sg_random();
- for(int i = 0; i < CloudVarietyCount ; i ++) {
- choice -= tCloudVariety[i].count * totalCount;
- if( choice <= 0.0 ) {
- sgVec3 pos={x,z,y};
-
- buildCloud(cloud_def_root,
- box_def_root,
- tCloudVariety[i].name,
- pos,
- layer);
- break;
- }
- }
+ for(int i = 0; i < CloudVarietyCount ; i ++) {
+ choice -= tCloudVariety[i].count * totalCount;
+ if( choice <= 0.0 ) {
+ cov -= buildCloud(cloud_def_root,
+ box_def_root,
+ tCloudVariety[i].name,
+ grid_z_rand,
+ layer);
+ break;
}
}
- }
+
+ }
// Now we've built any clouds, enable them and set the density (coverage)
//layer->setCoverage(coverage);
class FGClouds {
private:
-void buildCloud(SGPropertyNode *cloud_def_root, SGPropertyNode *box_def_root, const string& name, sgVec3 pos, SGCloudField *layer);
+ double buildCloud(SGPropertyNode *cloud_def_root, SGPropertyNode *box_def_root, const string& name, double grid_z_rand, SGCloudField *layer);
void buildLayer(int iLayer, const string& name, double alt, double coverage);
void buildCloudLayers(void);
#include "FGFDMExec.h"
#include "FGState.h"
-#include <models/FGAtmosphere.h>
-#include <models/atmosphere/FGMSIS.h>
-#include <models/atmosphere/FGMars.h>
-#include <models/FGFCS.h>
-#include <models/FGPropulsion.h>
-#include <models/FGMassBalance.h>
-#include <models/FGGroundReactions.h>
-#include <models/FGExternalReactions.h>
-#include <models/FGBuoyantForces.h>
-#include <models/FGAerodynamics.h>
-#include <models/FGInertial.h>
-#include <models/FGAircraft.h>
-#include <models/FGPropagate.h>
-#include <models/FGAuxiliary.h>
-#include <models/FGInput.h>
-#include <models/FGOutput.h>
-#include <initialization/FGInitialCondition.h>
-//#include <initialization/FGTrimAnalysis.h> // Remove until later
-#include <input_output/FGPropertyManager.h>
-#include <input_output/FGScript.h>
+#include "models/FGAtmosphere.h"
+#include "models/atmosphere/FGMSIS.h"
+#include "models/atmosphere/FGMars.h"
+#include "models/FGFCS.h"
+#include "models/FGPropulsion.h"
+#include "models/FGMassBalance.h"
+#include "models/FGGroundReactions.h"
+#include "models/FGExternalReactions.h"
+#include "models/FGBuoyantForces.h"
+#include "models/FGAerodynamics.h"
+#include "models/FGInertial.h"
+#include "models/FGAircraft.h"
+#include "models/FGPropagate.h"
+#include "models/FGAuxiliary.h"
+#include "models/FGInput.h"
+#include "models/FGOutput.h"
+#include "initialization/FGInitialCondition.h"
+//#include "initialization/FGTrimAnalysis.h" // Remove until later
+#include "input_output/FGPropertyManager.h"
+#include "input_output/FGScript.h"
#include <iostream>
#include <iterator>
+#include <cstdlib>
+
+using namespace std;
namespace JSBSim {
for (int i=0; i<N; i++) {
if (node->getChild(i)->nChildren() ) {
checkTied( (FGPropertyManager*)node->getChild(i) );
- } else if ( node->getChild(i)->isTied() ) {
+ }
+ if ( node->getChild(i)->isTied() ) {
name = ((FGPropertyManager*)node->getChild(i))->GetFullyQualifiedName();
node->Untie(name);
}
{
Frame = 0;
- FirstModel = 0;
Error = 0;
GroundCallback = 0;
State = 0;
// class needs valid pointers to the above
// model classes
- // Initialize models so they can communicate with each other
-
- Atmosphere->InitModel();
- FCS->InitModel();
- Propulsion->InitModel();
- MassBalance->InitModel();
- Aerodynamics->InitModel();
- Inertial->InitModel();
- GroundReactions->InitModel();
- ExternalReactions->InitModel();
- BuoyantForces->InitModel();
- Aircraft->InitModel();
- Propagate->InitModel();
- Auxiliary->InitModel();
- Input->InitModel();
-
- IC = new FGInitialCondition(this);
-
// Schedule a model. The second arg (the integer) is the pass number. For
- // instance, the atmosphere model could get executed every fifth pass it is called
- // by the executive. IC and Trim objects are NOT scheduled.
-
+ // instance, the atmosphere model could get executed every fifth pass it is called.
+
Schedule(Input, 1);
- Schedule(Atmosphere, 1);
+ Schedule(Atmosphere, 30);
Schedule(FCS, 1);
Schedule(Propulsion, 1);
Schedule(MassBalance, 1);
Schedule(Propagate, 1);
Schedule(Auxiliary, 1);
+ // Initialize models so they can communicate with each other
+
+ vector <FGModel*>::iterator it;
+ for (it = Models.begin(); it != Models.end(); ++it) (*it)->InitModel();
+
+ IC = new FGInitialCondition(this);
+
modelLoaded = false;
return result;
delete GroundCallback;
- FirstModel = 0L;
Error = 0;
State = 0;
Auxiliary = 0;
Script = 0;
+ Models.clear();
+
modelLoaded = false;
return modelLoaded;
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-int FGFDMExec::Schedule(FGModel* model, int rate)
+void FGFDMExec::Schedule(FGModel* model, int rate)
{
- FGModel* model_iterator;
-
- model_iterator = FirstModel;
-
- if (model_iterator == 0L) { // this is the first model
-
- FirstModel = model;
- FirstModel->NextModel = 0L;
- FirstModel->SetRate(rate);
-
- } else { // subsequent model
-
- while (model_iterator->NextModel != 0L) {
- model_iterator = model_iterator->NextModel;
- }
- model_iterator->NextModel = model;
- model_iterator->NextModel->SetRate(rate);
-
- }
-
- return 0;
+ model->SetRate(rate);
+ Models.push_back(model);
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
bool FGFDMExec::Run(void)
{
bool success=true;
- FGModel* model_iterator;
-
- model_iterator = FirstModel;
- if (model_iterator == 0L) return false;
Debug(2);
ChildFDMList[i]->Run();
}
- // returns true if success
- // false if complete
+ // returns true if success, false if complete
if (Script != 0 && !State->IntegrationSuspended()) success = Script->RunScript();
- while (model_iterator != 0L) {
- model_iterator->Run();
- model_iterator = model_iterator->NextModel;
- }
+ vector <FGModel*>::iterator it;
+ for (it = Models.begin(); it != Models.end(); ++it) (*it)->Run();
Frame++;
if (!Holding()) State->IncrTime();
void FGFDMExec::ResetToInitialConditions(void)
{
- FGModel* model_iterator;
-
- model_iterator = FirstModel;
- if (model_iterator == 0L || Constructing) return;
+ if (Constructing) return;
- while (model_iterator != 0L) {
- model_iterator->InitModel();
- model_iterator = model_iterator->NextModel;
- }
+ vector <FGModel*>::iterator it;
+ for (it = Models.begin(); it != Models.end(); ++it) (*it)->InitModel();
RunIC();
if (Script) Script->ResetEvents();
{
struct PropertyCatalogStructure* pcsNew = new struct PropertyCatalogStructure;
int node_idx = 0;
- char int_buf[10];
- for (unsigned int i=0; i<pcs->node->nChildren(); i++) {
+ for (int i=0; i<pcs->node->nChildren(); i++) {
pcsNew->base_string = pcs->base_string + "/" + pcs->node->getChild(i)->getName();
node_idx = pcs->node->getChild(i)->getIndex();
- sprintf(int_buf, "[%d]", node_idx);
- if (node_idx != 0) pcsNew->base_string += string(int_buf);
+ if (node_idx != 0) {
+ pcsNew->base_string = CreateIndexedPropertyName(pcsNew->base_string, node_idx);
+ }
if (pcs->node->getChild(i)->nChildren() == 0) {
if (pcsNew->base_string.substr(0,11) == string("/fdm/jsbsim")) {
pcsNew->base_string = pcsNew->base_string.erase(0,12);
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <models/FGModel.h>
-#include <models/FGOutput.h>
-#include <models/FGInput.h>
-#include <initialization/FGTrim.h>
-#include <initialization/FGInitialCondition.h>
-#include <FGJSBBase.h>
-#include <input_output/FGPropertyManager.h>
-#include <input_output/FGGroundCallback.h>
-#include <input_output/FGXMLFileRead.h>
-#include <models/FGPropagate.h>
-#include <math/FGColumnVector3.h>
+#include "models/FGModel.h"
+#include "models/FGOutput.h"
+#include "models/FGInput.h"
+#include "initialization/FGTrim.h"
+#include "initialization/FGInitialCondition.h"
+#include "FGJSBBase.h"
+#include "input_output/FGPropertyManager.h"
+#include "input_output/FGGroundCallback.h"
+#include "input_output/FGXMLFileRead.h"
+#include "models/FGPropagate.h"
+#include "math/FGColumnVector3.h"
#include <vector>
#include <string>
@param model A pointer to the model being scheduled.
@param rate The rate at which to execute the model as described above.
@return Currently returns 0 always. */
- int Schedule(FGModel* model, int rate);
+ void Schedule(FGModel* model, int rate);
/** This function executes each scheduled model in succession.
@return true if successful, false if sim should be ended */
static FGPropertyManager *master;
- FGModel* FirstModel;
FGGroundCallback* GroundCallback;
FGState* State;
FGAtmosphere* Atmosphere;
vector <string> PropertyCatalog;
vector <FGOutput*> Outputs;
vector <childData*> ChildFDMList;
+ vector <FGModel*> Models;
bool ReadFileHeader(Element*);
bool ReadChild(Element*);
#include "FGJSBBase.h"
#include <iostream>
+#include <sstream>
+#include <cstdlib>
namespace JSBSim {
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+string FGJSBBase::CreateIndexedPropertyName(const string& Property, int index)
+{
+ std::ostringstream buf;
+ buf << Property << '[' << index << ']';
+ return buf.str();
+}
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+double FGJSBBase::GaussianRandomNumber(void)
+{
+ static double V1, V2, S;
+ static int phase = 0;
+ double X;
+
+ if (phase == 0) {
+ V1 = V2 = S = X = 0.0;
+
+ do {
+ double U1 = (double)rand() / RAND_MAX;
+ double U2 = (double)rand() / RAND_MAX;
+
+ V1 = 2 * U1 - 1;
+ V2 = 2 * U2 - 1;
+ S = V1 * V1 + V2 * V2;
+ } while(S >= 1 || S == 0);
+
+ X = V1 * sqrt(-2 * log(S) / S);
+ } else
+ X = V2 * sqrt(-2 * log(S) / S);
+
+ phase = 1 - phase;
+
+ return X;
+}
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
} // namespace JSBSim
#include <float.h>
#include <queue>
#include <string>
-#include <sstream>
#include <cmath>
-#include <cstdlib>
#include "input_output/string_utilities.h"
-using std::fabs;
-using std::string;
-
#ifndef M_PI
# define M_PI 3.14159265358979323846
#endif
-#if !defined(WIN32) || defined(__GNUC__) || (defined(_MSC_VER) && (_MSC_VER >= 1300))
- using std::max;
+#if defined(_MSC_VER) && (_MSC_VER < 1300)
+namespace std
+{
+ template <class T> inline T max(const T& a, const T& b)
+ {
+ return (a > b) ? a : b;
+ }
+}
#endif
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
public:
unsigned int fdmId;
unsigned int messageId;
- string text;
- string subsystem;
+ std::string text;
+ std::string subsystem;
enum mType {eText, eInteger, eDouble, eBool} type;
bool bVal;
int iVal;
/** Creates a message with the given text and places it on the queue.
@param text message text
@return pointer to a Message structure */
- void PutMessage(const string& text);
+ void PutMessage(const std::string& text);
/** Creates a message with the given text and boolean value and places it on the queue.
@param text message text
@param bVal boolean value associated with the message
@return pointer to a Message structure */
- void PutMessage(const string& text, bool bVal);
+ void PutMessage(const std::string& text, bool bVal);
/** Creates a message with the given text and integer value and places it on the queue.
@param text message text
@param iVal integer value associated with the message
@return pointer to a Message structure */
- void PutMessage(const string& text, int iVal);
+ void PutMessage(const std::string& text, int iVal);
/** Creates a message with the given text and double value and places it on the queue.
@param text message text
@param dVal double value associated with the message
@return pointer to a Message structure */
- void PutMessage(const string& text, double dVal);
+ void PutMessage(const std::string& text, double dVal);
/** Reads the message on the queue (but does not delete it).
@return 1 if some messages */
int SomeMessages(void);
/** Returns the version number of JSBSim.
* @return The version number of JSBSim. */
- string GetVersion(void) {return JSBSim_version;}
+ std::string GetVersion(void) {return JSBSim_version;}
/// Disables highlighting in the console output.
void disableHighLighting(void);
@return if the two values can be considered equal up to roundoff */
static bool EqualToRoundoff(double a, double b) {
double eps = 2.0*DBL_EPSILON;
- return fabs(a - b) <= eps*max(fabs(a), fabs(b));
+ return std::fabs(a - b) <= eps*std::max(std::fabs(a), std::fabs(b));
}
/** Finite precision comparison.
@return if the two values can be considered equal up to roundoff */
static bool EqualToRoundoff(float a, float b) {
float eps = 2.0*FLT_EPSILON;
- return fabs(a - b) <= eps*max(fabs(a), fabs(b));
+ return std::fabs(a - b) <= eps*std::max(std::fabs(a), std::fabs(b));
}
/** Finite precision comparison.
static const double slugtolb;
static const double kgtolb;
static const double kgtoslug;
- static const string needed_cfg_version;
- static const string JSBSim_version;
-
- static string CreateIndexedPropertyName(string Property, int index)
- {
- std::stringstream str;
- str << index;
- string tmp;
- str >> tmp;
- return Property + "[" + tmp + "]";
- }
+ static const std::string needed_cfg_version;
+ static const std::string JSBSim_version;
- static double GaussianRandomNumber(void)
- {
- static double V1, V2, S;
- static int phase = 0;
- double X;
-
- if (phase == 0) {
- V1 = V2 = S = X = 0.0;
-
- do {
- double U1 = (double)rand() / RAND_MAX;
- double U2 = (double)rand() / RAND_MAX;
-
- V1 = 2 * U1 - 1;
- V2 = 2 * U2 - 1;
- S = V1 * V1 + V2 * V2;
- } while(S >= 1 || S == 0);
+ static std::string CreateIndexedPropertyName(const std::string& Property, int index);
- X = V1 * sqrt(-2 * log(S) / S);
- } else
- X = V2 * sqrt(-2 * log(S) / S);
-
- phase = 1 - phase;
-
- return X;
- }
+ static double GaussianRandomNumber(void);
public:
/// Moments L, M, N
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include <cmath>
+#include <iostream>
#include "FGState.h"
+using namespace std;
+
namespace JSBSim {
static const char *IdSrc = "$Id$";
#include <string>
#include <map>
#include "FGJSBBase.h"
-#include <initialization/FGInitialCondition.h>
-#include <math/FGColumnVector3.h>
-#include <math/FGQuaternion.h>
+#include "initialization/FGInitialCondition.h"
+#include "math/FGColumnVector3.h"
+#include "math/FGQuaternion.h"
#include "FGFDMExec.h"
-#include <models/FGAtmosphere.h>
-#include <models/FGFCS.h>
-#include <models/FGPropagate.h>
-#include <models/FGAuxiliary.h>
-#include <models/FGAerodynamics.h>
-#include <models/FGAircraft.h>
-#include <models/FGGroundReactions.h>
-#include <models/FGPropulsion.h>
+#include "models/FGAtmosphere.h"
+#include "models/FGFCS.h"
+#include "models/FGPropagate.h"
+#include "models/FGAuxiliary.h"
+#include "models/FGAerodynamics.h"
+#include "models/FGAircraft.h"
+#include "models/FGGroundReactions.h"
+#include "models/FGPropulsion.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
speedbrake_pos_pct->setDoubleValue(0);
spoilers_pos_pct->setDoubleValue(0);
+ ab_brake_engaged = fgGetNode("/autopilot/autobrake/engaged", true);
+ ab_brake_left_pct = fgGetNode("/autopilot/autobrake/brake-left-output", true);
+ ab_brake_right_pct = fgGetNode("/autopilot/autobrake/brake-right-output", true);
+
temperature = fgGetNode("/environment/temperature-degc",true);
pressure = fgGetNode("/environment/pressure-inhg",true);
density = fgGetNode("/environment/density-slugft3",true);
// Parking brake sets minimum braking
// level for mains.
double parking_brake = globals->get_controls()->get_brake_parking();
- FCS->SetLBrake(FMAX(globals->get_controls()->get_brake_left(), parking_brake));
- FCS->SetRBrake(FMAX(globals->get_controls()->get_brake_right(), parking_brake));
+ double left_brake = globals->get_controls()->get_brake_left();
+ double right_brake = globals->get_controls()->get_brake_right();
+
+ if (ab_brake_engaged->getBoolValue()) {
+ left_brake = ab_brake_left_pct->getDoubleValue();
+ right_brake = ab_brake_right_pct->getDoubleValue();
+ }
+
+ FCS->SetLBrake(FMAX(left_brake, parking_brake));
+ FCS->SetRBrake(FMAX(right_brake, parking_brake));
+
+
FCS->SetCBrake( 0.0 );
// FCS->SetCBrake( globals->get_controls()->get_brake(2) );
// Copy the engine values from JSBSim.
for ( i=0; i < Propulsion->GetNumEngines(); i++ ) {
SGPropertyNode * node = fgGetNode("engines/engine", i, true);
- char buf[30];
- sprintf(buf, "engines/engine[%d]/thruster", i);
- SGPropertyNode * tnode = fgGetNode(buf, true);
+ SGPropertyNode * tnode = node->getChild("thruster", 0, true);
FGThruster * thruster = Propulsion->GetEngine(i)->GetThruster();
switch (Propulsion->GetEngine(i)->GetType()) {
SGPropertyNode_ptr speedbrake_pos_pct;
SGPropertyNode_ptr spoilers_pos_pct;
+ SGPropertyNode_ptr ab_brake_engaged;
+ SGPropertyNode_ptr ab_brake_left_pct;
+ SGPropertyNode_ptr ab_brake_right_pct;
+
SGPropertyNode_ptr gear_pos_pct;
SGPropertyNode_ptr wing_fold_pos_pct;
SGPropertyNode_ptr tailhook_pos_pct;
*******************************************************************************/
#include "FGInitialCondition.h"
-#include <FGFDMExec.h>
-#include <models/FGInertial.h>
-#include <models/FGAtmosphere.h>
-#include <models/FGAerodynamics.h>
-#include <models/FGPropagate.h>
-#include <input_output/FGPropertyManager.h>
-#include <models/FGPropulsion.h>
-#include <input_output/FGXMLParse.h>
-#include <math/FGQuaternion.h>
+#include "FGFDMExec.h"
+#include "models/FGInertial.h"
+#include "models/FGAtmosphere.h"
+#include "models/FGAerodynamics.h"
+#include "models/FGPropagate.h"
+#include "input_output/FGPropertyManager.h"
+#include "input_output/FGXMLElement.h"
+#include "models/FGPropulsion.h"
+#include "input_output/FGXMLParse.h"
+#include "math/FGQuaternion.h"
+#include <iostream>
#include <fstream>
+#include <cstdlib>
+
+using namespace std;
namespace JSBSim {
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <FGFDMExec.h>
-#include <FGJSBBase.h>
-#include <math/FGColumnVector3.h>
-#include <input_output/FGXMLFileRead.h>
+#include "FGFDMExec.h"
+#include "FGJSBBase.h"
+#include "math/FGColumnVector3.h"
+#include "input_output/FGXMLFileRead.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
#include <cstdlib>
#include <iomanip>
#include "FGTrim.h"
-#include <models/FGAtmosphere.h>
+#include "models/FGAtmosphere.h"
#include "FGInitialCondition.h"
-#include <models/FGAircraft.h>
-#include <models/FGMassBalance.h>
-#include <models/FGGroundReactions.h>
-#include <models/FGInertial.h>
-#include <models/FGAerodynamics.h>
-#include <math/FGColumnVector3.h>
+#include "models/FGAircraft.h"
+#include "models/FGMassBalance.h"
+#include "models/FGGroundReactions.h"
+#include "models/FGInertial.h"
+#include "models/FGAerodynamics.h"
+#include "math/FGColumnVector3.h"
#if _MSC_VER
#pragma warning (disable : 4786 4788)
#endif
+using namespace std;
+
namespace JSBSim {
static const char *IdSrc = "$Id$";
#include <string>
#include <cstdlib>
-#include <FGFDMExec.h>
-#include <models/FGAtmosphere.h>
+#include <iomanip>
+#include "FGFDMExec.h"
+#include "models/FGAtmosphere.h"
#include "FGInitialCondition.h"
#include "FGTrimAxis.h"
-#include <models/FGAircraft.h>
-#include <models/FGPropulsion.h>
-#include <models/FGAerodynamics.h>
+#include "models/FGAircraft.h"
+#include "models/FGPropulsion.h"
+#include "models/FGAerodynamics.h"
+#include "models/FGFCS.h"
+#include "models/propulsion/FGEngine.h"
+#include "models/FGAuxiliary.h"
+#include "models/FGGroundReactions.h"
+
+using namespace std;
namespace JSBSim {
/*****************************************************************************/
void FGTrimAxis::AxisReport(void) {
-
- char out[80];
-
- sprintf(out," %20s: %6.2f %5s: %9.2e Tolerance: %3.0e",
- GetControlName().c_str(), GetControl()*control_convert,
- GetStateName().c_str(), GetState()+state_target, GetTolerance());
- cout << out;
+ cout << " " << setw(20) << GetControlName() << ": ";
+ cout << setw(6) << setprecision(2) << GetControl()*control_convert << ' ';
+ cout << setw(5) << GetStateName() << ": ";
+ cout << setw(9) << setprecision(2) << scientific << GetState()+state_target;
+ cout << " Tolerance: " << setw(3) << setprecision(0) << scientific << GetTolerance();
if( fabs(GetState()+state_target) < fabs(GetTolerance()) )
cout << " Passed" << endl;
SENTRY
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <math/FGColumnVector3.h>
-#include <math/FGLocation.h>
+#include "math/FGColumnVector3.h"
+#include "math/FGLocation.h"
#include "FGGroundCallback.h"
namespace JSBSim {
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <math/FGColumnVector3.h>
-#include <math/FGLocation.h>
+#include "math/FGColumnVector3.h"
+#include "math/FGLocation.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
#endif
#include <string>
-#include <iostream>
-#include <simgear/props/props.hxx>
+#include "simgear/props/props.hxx"
#if !PROPS_STANDALONE
-# include <simgear/math/SGMath.hxx>
+# include "simgear/math/SGMath.hxx"
#endif
#include "FGJSBBase.h"
FORWARD DECLARATIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-using namespace std;
-
namespace JSBSim {
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
* NOTE: this function changes its argument and thus relies
* on pass by value
*/
- string mkPropertyName(string name, bool lowercase);
+ std::string mkPropertyName(std::string name, bool lowercase);
/**
* Get a property node.
* @return The node, or 0 if none exists and none was created.
*/
FGPropertyManager*
- GetNode (const string &path, bool create = false);
+ GetNode (const std::string &path, bool create = false);
FGPropertyManager*
- GetNode (const string &relpath, int index, bool create = false);
+ GetNode (const std::string &relpath, int index, bool create = false);
/**
* Test whether a given node exists.
* @param path The path of the node, relative to root.
* @return true if the node exists, false otherwise.
*/
- bool HasNode (const string &path);
+ bool HasNode (const std::string &path);
/**
* Get the name of a node
*/
- string GetName( void );
+ std::string GetName( void );
/**
* Get the name of a node without underscores, etc.
*/
- string GetPrintableName( void );
+ std::string GetPrintableName( void );
/**
* Get the fully qualified name of a node
* This function is very slow, so is probably useful for debugging only.
*/
- string GetFullyQualifiedName(void);
+ std::string GetFullyQualifiedName(void);
/**
* Get a bool value for a property.
* does not exist.
* @return The property's value as a bool, or the default value provided.
*/
- bool GetBool (const string &name, bool defaultValue = false);
+ bool GetBool (const std::string &name, bool defaultValue = false);
/**
* does not exist.
* @return The property's value as an int, or the default value provided.
*/
- int GetInt (const string &name, int defaultValue = 0);
+ int GetInt (const std::string &name, int defaultValue = 0);
/**
* does not exist.
* @return The property's value as a long, or the default value provided.
*/
- int GetLong (const string &name, long defaultValue = 0L);
+ int GetLong (const std::string &name, long defaultValue = 0L);
/**
* does not exist.
* @return The property's value as a float, or the default value provided.
*/
- float GetFloat (const string &name, float defaultValue = 0.0);
+ float GetFloat (const std::string &name, float defaultValue = 0.0);
/**
* does not exist.
* @return The property's value as a double, or the default value provided.
*/
- double GetDouble (const string &name, double defaultValue = 0.0);
+ double GetDouble (const std::string &name, double defaultValue = 0.0);
/**
* does not exist.
* @return The property's value as a string, or the default value provided.
*/
- string GetString (const string &name, string defaultValue = "");
+ std::string GetString (const std::string &name, std::string defaultValue = "");
/**
* @param val The new value for the property.
* @return true if the assignment succeeded, false otherwise.
*/
- bool SetBool (const string &name, bool val);
+ bool SetBool (const std::string &name, bool val);
/**
* @param val The new value for the property.
* @return true if the assignment succeeded, false otherwise.
*/
- bool SetInt (const string &name, int val);
+ bool SetInt (const std::string &name, int val);
/**
* @param val The new value for the property.
* @return true if the assignment succeeded, false otherwise.
*/
- bool SetLong (const string &name, long val);
+ bool SetLong (const std::string &name, long val);
/**
* @param val The new value for the property.
* @return true if the assignment succeeded, false otherwise.
*/
- bool SetFloat (const string &name, float val);
+ bool SetFloat (const std::string &name, float val);
/**
* @param val The new value for the property.
* @return true if the assignment succeeded, false otherwise.
*/
- bool SetDouble (const string &name, double val);
+ bool SetDouble (const std::string &name, double val);
/**
* @param val The new value for the property.
* @return true if the assignment succeeded, false otherwise.
*/
- bool SetString (const string &name, const string &val);
+ bool SetString (const std::string &name, const std::string &val);
////////////////////////////////////////////////////////////////////////
* @param name The property name.
* @param state The state of the archive attribute (defaults to true).
*/
- void SetArchivable (const string &name, bool state = true);
+ void SetArchivable (const std::string &name, bool state = true);
/**
* @param name The property name.
* @param state The state of the read attribute (defaults to true).
*/
- void SetReadable (const string &name, bool state = true);
+ void SetReadable (const std::string &name, bool state = true);
/**
* @param name The property name.
* @param state The state of the write attribute (defaults to true).
*/
- void SetWritable (const string &name, bool state = true);
+ void SetWritable (const std::string &name, bool state = true);
////////////////////////////////////////////////////////////////////////
* Classes should use this function to release control of any
* properties they are managing.
*/
- void Untie (const string &name);
+ void Untie (const std::string &name);
// Templates cause ambiguity here
* be modified; defaults to true.
*/
void
- Tie (const string &name, bool *pointer, bool useDefault = true);
+ Tie (const std::string &name, bool *pointer, bool useDefault = true);
/**
* be modified; defaults to true.
*/
void
- Tie (const string &name, int *pointer, bool useDefault = true);
+ Tie (const std::string &name, int *pointer, bool useDefault = true);
/**
* be modified; defaults to true.
*/
void
- Tie (const string &name, long *pointer, bool useDefault = true);
+ Tie (const std::string &name, long *pointer, bool useDefault = true);
/**
* be modified; defaults to true.
*/
void
- Tie (const string &name, float *pointer, bool useDefault = true);
+ Tie (const std::string &name, float *pointer, bool useDefault = true);
/**
* Tie a property to an external double variable.
* be modified; defaults to true.
*/
void
- Tie (const string &name, double *pointer, bool useDefault = true);
+ Tie (const std::string &name, double *pointer, bool useDefault = true);
//============================================================================
//
//============================================================================
/* template <class V> void
- Tie (const string &name, V (*getter)(), void (*setter)(V) = 0,
+ Tie (const std::string &name, V (*getter)(), void (*setter)(V) = 0,
bool useDefault = true);
template <class V> void
- Tie (const string &name, int index, V (*getter)(int),
+ Tie (const std::string &name, int index, V (*getter)(int),
void (*setter)(int, V) = 0, bool useDefault = true);
template <class T, class V> void
- Tie (const string &name, T * obj, V (T::*getter)() const,
+ Tie (const std::string &name, T * obj, V (T::*getter)() const,
void (T::*setter)(V) = 0, bool useDefault = true);
template <class T, class V> void
- Tie (const string &name, T * obj, int index,
+ Tie (const std::string &name, T * obj, int index,
V (T::*getter)(int) const, void (T::*setter)(int, V) = 0,
bool useDefault = true); */
*/
template <class V> inline void
- Tie (const string &name, V (*getter)(), void (*setter)(V) = 0, bool useDefault = true)
+ Tie (const std::string &name, V (*getter)(), void (*setter)(V) = 0, bool useDefault = true)
{
if (!tie(name.c_str(), SGRawValueFunctions<V>(getter, setter), useDefault))
- cout << "Failed to tie property " << name << " to functions" << endl;
+ std::cout << "Failed to tie property " << name << " to functions" << std::endl;
else if (debug_lvl & 0x20)
- cout << name << endl;
+ std::cout << name << std::endl;
}
* property value should there be one; false if the old value should be
* discarded; defaults to true.
*/
- template <class V> inline void Tie (const string &name, int index, V (*getter)(int),
+ template <class V> inline void Tie (const std::string &name, int index, V (*getter)(int),
void (*setter)(int, V) = 0, bool useDefault = true)
{
if (!tie(name.c_str(), SGRawValueFunctionsIndexed<V>(index, getter, setter), useDefault))
- cout << "Failed to tie property " << name << " to indexed functions" << endl;
+ std::cout << "Failed to tie property " << name << " to indexed functions" << std::endl;
else if (debug_lvl & 0x20)
- cout << name << endl;
+ std::cout << name << std::endl;
}
* discarded; defaults to true.
*/
template <class T, class V> inline void
- Tie (const string &name, T * obj, V (T::*getter)() const,
+ Tie (const std::string &name, T * obj, V (T::*getter)() const,
void (T::*setter)(V) = 0, bool useDefault = true)
{
if (!tie(name.c_str(), SGRawValueMethods<T,V>(*obj, getter, setter), useDefault))
- cout << "Failed to tie property " << name << " to object methods" << endl;
+ std::cout << "Failed to tie property " << name << " to object methods" << std::endl;
else if (debug_lvl & 0x20)
- cout << name << endl;
+ std::cout << name << std::endl;
}
/**
* discarded; defaults to true.
*/
template <class T, class V> inline void
- Tie (const string &name, T * obj, int index, V (T::*getter)(int) const,
+ Tie (const std::string &name, T * obj, int index, V (T::*getter)(int) const,
void (T::*setter)(int, V) = 0, bool useDefault = true)
{
if (!tie(name.c_str(), SGRawValueMethodsIndexed<T,V>(*obj, index, getter, setter), useDefault))
- cout << "Failed to tie property " << name << " to indexed object methods" << endl;
+ std::cout << "Failed to tie property " << name << " to indexed object methods" << std::endl;
else if (debug_lvl & 0x20)
- cout << name << endl;
+ std::cout << name << std::endl;
}
};
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGScript.h"
-#include <input_output/FGXMLParse.h>
-#include <initialization/FGTrim.h>
+#include "input_output/FGXMLParse.h"
+#include "initialization/FGTrim.h"
#include <iostream>
+#include <cstdlib>
+
+using namespace std;
namespace JSBSim {
#include "FGJSBBase.h"
#include "FGState.h"
#include "FGFDMExec.h"
-#include <math/FGFunction.h>
-#include <math/FGCondition.h>
+#include "math/FGFunction.h"
+#include "math/FGCondition.h"
#include <vector>
-#include <input_output/FGXMLFileRead.h>
+#include "input_output/FGXMLFileRead.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
#include <cmath>
#include <cstdlib>
+#include <iostream>
+
+using namespace std;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FORWARD DECLARATIONS
static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_XMLELEMENT;
+bool Element::converterIsInitialized = false;
+map <string, map <string, double> > Element::convert;
+
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS IMPLEMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-Element::Element(string nm)
+Element::Element(const string& nm)
{
name = nm;
parent = 0L;
element_index = 0;
- // convert ["from"]["to"] = factor, so: from * factor = to
- // Length
- convert["M"]["FT"] = 3.2808399;
- convert["FT"]["M"] = 1.0/convert["M"]["FT"];
- convert["FT"]["IN"] = 12.0;
- convert["IN"]["FT"] = 1.0/convert["FT"]["IN"];
- convert["IN"]["M"] = convert["IN"]["FT"] * convert["FT"]["M"];
- convert["M"]["IN"] = convert["M"]["FT"] * convert["FT"]["IN"];
- // Area
- convert["M2"]["FT2"] = convert["M"]["FT"]*convert["M"]["FT"];
- convert["FT2"]["M2"] = 1.0/convert["M2"]["FT2"];
- convert["M2"]["IN2"] = convert["M"]["IN"]*convert["M"]["IN"];
- convert["IN2"]["M2"] = 1.0/convert["M2"]["IN2"];
- convert["FT2"]["IN2"] = 144.0;
- convert["IN2"]["FT2"] = 1.0/convert["FT2"]["IN2"];
- // Volume
- convert["IN3"]["CC"] = 16.387064;
- convert["CC"]["IN3"] = 1.0/convert["IN3"]["CC"];
- convert["FT3"]["IN3"] = 1728.0;
- convert["IN3"]["FT3"] = 1.0/convert["FT3"]["IN3"];
- convert["M3"]["FT3"] = 35.3146667;
- convert["FT3"]["M3"] = 1.0/convert["M3"]["FT3"];
- convert["LTR"]["IN3"] = 61.0237441;
- convert["IN3"]["LTR"] = 1.0/convert["LTR"]["IN3"];
- // Mass & Weight
- convert["LBS"]["KG"] = 0.45359237;
- convert["KG"]["LBS"] = 1.0/convert["LBS"]["KG"];
- convert["SLUG"]["KG"] = 14.59390;
- convert["KG"]["SLUG"] = 1.0/convert["SLUG"]["KG"];
- // Moments of Inertia
- convert["SLUG*FT2"]["KG*M2"] = 1.35594;
- convert["KG*M2"]["SLUG*FT2"] = 1.0/convert["SLUG*FT2"]["KG*M2"];
- // Angles
- convert["RAD"]["DEG"] = 360.0/(2.0*3.1415926);
- convert["DEG"]["RAD"] = 1.0/convert["RAD"]["DEG"];
- // Spring force
- convert["LBS/FT"]["N/M"] = 14.5939;
- convert["N/M"]["LBS/FT"] = 1.0/convert["LBS/FT"]["N/M"];
- // Damping force
- convert["LBS/FT/SEC"]["N/M/SEC"] = 14.5939;
- convert["N/M/SEC"]["LBS/FT/SEC"] = 1.0/convert["LBS/FT/SEC"]["N/M/SEC"];
- // Damping force (Square Law)
- convert["LBS/FT2/SEC2"]["N/M2/SEC2"] = 47.880259;
- convert["N/M2/SEC2"]["LBS/FT2/SEC2"] = 1.0/convert["LBS/FT2/SEC2"]["N/M2/SEC2"];
- // Power
- convert["WATTS"]["HP"] = 0.001341022;
- convert["HP"]["WATTS"] = 1.0/convert["WATTS"]["HP"];
- // Force
- convert["N"]["LBS"] = 0.22482;
- convert["LBS"]["N"] = 1.0/convert["N"]["LBS"];
- // Velocity
- convert["KTS"]["FT/SEC"] = 1.68781;
- convert["FT/SEC"]["KTS"] = 1.0/convert["KTS"]["FT/SEC"];
- convert["M/S"]["FT/S"] = 3.2808399;
- convert["FT/S"]["M/S"] = 1.0/convert["M/S"]["FT/S"];
- // Torque
- convert["FT*LBS"]["N*M"] = 1.35581795;
- convert["N*M"]["FT*LBS"] = 1/convert["FT*LBS"]["N*M"];
- // Valve
- convert["M4*SEC/KG"]["FT4*SEC/SLUG"] = convert["M"]["FT"]*convert["M"]["FT"]*
- convert["M"]["FT"]*convert["M"]["FT"]/convert["KG"]["SLUG"];
- convert["FT4*SEC/SLUG"]["M4*SEC/KG"] =
- 1.0/convert["M4*SEC/KG"]["FT4*SEC/SLUG"];
- // Pressure
- convert["INHG"]["PSF"] = 70.7180803;
- convert["PSF"]["INHG"] = 1.0/convert["INHG"]["PSF"];
- convert["ATM"]["INHG"] = 29.9246899;
- convert["INHG"]["ATM"] = 1.0/convert["ATM"]["INHG"];
- convert["PSI"]["INHG"] = 2.03625437;
- convert["INHG"]["PSI"] = 1.0/convert["PSI"]["INHG"];
- convert["INHG"]["PA"] = 3386.0; // inches Mercury to pascals
- convert["PA"]["INHG"] = 1.0/convert["INHG"]["PA"];
- convert["LBS/FT2"]["N/M2"] = 14.5939/convert["FT"]["M"];
- convert["N/M2"]["LBS/FT2"] = 1.0/convert["LBS/FT2"]["N/M2"];
- convert["LBS/FT2"]["PA"] = convert["LBS/FT2"]["N/M2"];
- convert["PA"]["LBS/FT2"] = 1.0/convert["LBS/FT2"]["PA"];
- // Mass flow
- convert["KG/MIN"]["LBS/MIN"] = convert["KG"]["LBS"];
- // Fuel Consumption
- convert["LBS/HP*HR"]["KG/KW*HR"] = 0.6083;
- convert["KG/KW*HR"]["LBS/HP*HR"] = 1.0/convert["LBS/HP*HR"]["KG/KW*HR"];
-
- // Length
- convert["M"]["M"] = 1.00;
- convert["FT"]["FT"] = 1.00;
- convert["IN"]["IN"] = 1.00;
- // Area
- convert["M2"]["M2"] = 1.00;
- convert["FT2"]["FT2"] = 1.00;
- // Volume
- convert["IN3"]["IN3"] = 1.00;
- convert["CC"]["CC"] = 1.0;
- convert["M3"]["M3"] = 1.0;
- convert["FT3"]["FT3"] = 1.0;
- convert["LTR"]["LTR"] = 1.0;
- // Mass & Weight
- convert["KG"]["KG"] = 1.00;
- convert["LBS"]["LBS"] = 1.00;
- // Moments of Inertia
- convert["KG*M2"]["KG*M2"] = 1.00;
- convert["SLUG*FT2"]["SLUG*FT2"] = 1.00;
- // Angles
- convert["DEG"]["DEG"] = 1.00;
- convert["RAD"]["RAD"] = 1.00;
- // Spring force
- convert["LBS/FT"]["LBS/FT"] = 1.00;
- convert["N/M"]["N/M"] = 1.00;
- // Damping force
- convert["LBS/FT/SEC"]["LBS/FT/SEC"] = 1.00;
- convert["N/M/SEC"]["N/M/SEC"] = 1.00;
- // Damping force (Square law)
- convert["LBS/FT2/SEC2"]["LBS/FT2/SEC2"] = 1.00;
- convert["N/M2/SEC2"]["N/M2/SEC2"] = 1.00;
- // Power
- convert["HP"]["HP"] = 1.00;
- convert["WATTS"]["WATTS"] = 1.00;
- // Force
- convert["N"]["N"] = 1.00;
- // Velocity
- convert["FT/SEC"]["FT/SEC"] = 1.00;
- convert["KTS"]["KTS"] = 1.00;
- convert["M/S"]["M/S"] = 1.0;
- // Torque
- convert["FT*LBS"]["FT*LBS"] = 1.00;
- convert["N*M"]["N*M"] = 1.00;
- // Valve
- convert["M4*SEC/KG"]["M4*SEC/KG"] = 1.0;
- convert["FT4*SEC/SLUG"]["FT4*SEC/SLUG"] = 1.0;
- // Pressure
- convert["PSI"]["PSI"] = 1.00;
- convert["PSF"]["PSF"] = 1.00;
- convert["INHG"]["INHG"] = 1.00;
- convert["ATM"]["ATM"] = 1.0;
- convert["PA"]["PA"] = 1.0;
- convert["N/M2"]["N/M2"] = 1.00;
- convert["LBS/FT2"]["LBS/FT2"] = 1.00;
- // Mass flow
- convert["LBS/SEC"]["LBS/SEC"] = 1.00;
- convert["KG/MIN"]["KG/MIN"] = 1.0;
- convert["LBS/MIN"]["LBS/MIN"] = 1.0;
- // Fuel Consumption
- convert["LBS/HP*HR"]["LBS/HP*HR"] = 1.0;
- convert["KG/KW*HR"]["KG/KW*HR"] = 1.0;
+ if (!converterIsInitialized) {
+ converterIsInitialized = true;
+ // convert ["from"]["to"] = factor, so: from * factor = to
+ // Length
+ convert["M"]["FT"] = 3.2808399;
+ convert["FT"]["M"] = 1.0/convert["M"]["FT"];
+ convert["FT"]["IN"] = 12.0;
+ convert["IN"]["FT"] = 1.0/convert["FT"]["IN"];
+ convert["IN"]["M"] = convert["IN"]["FT"] * convert["FT"]["M"];
+ convert["M"]["IN"] = convert["M"]["FT"] * convert["FT"]["IN"];
+ // Area
+ convert["M2"]["FT2"] = convert["M"]["FT"]*convert["M"]["FT"];
+ convert["FT2"]["M2"] = 1.0/convert["M2"]["FT2"];
+ convert["M2"]["IN2"] = convert["M"]["IN"]*convert["M"]["IN"];
+ convert["IN2"]["M2"] = 1.0/convert["M2"]["IN2"];
+ convert["FT2"]["IN2"] = 144.0;
+ convert["IN2"]["FT2"] = 1.0/convert["FT2"]["IN2"];
+ // Volume
+ convert["IN3"]["CC"] = 16.387064;
+ convert["CC"]["IN3"] = 1.0/convert["IN3"]["CC"];
+ convert["FT3"]["IN3"] = 1728.0;
+ convert["IN3"]["FT3"] = 1.0/convert["FT3"]["IN3"];
+ convert["M3"]["FT3"] = 35.3146667;
+ convert["FT3"]["M3"] = 1.0/convert["M3"]["FT3"];
+ convert["LTR"]["IN3"] = 61.0237441;
+ convert["IN3"]["LTR"] = 1.0/convert["LTR"]["IN3"];
+ // Mass & Weight
+ convert["LBS"]["KG"] = 0.45359237;
+ convert["KG"]["LBS"] = 1.0/convert["LBS"]["KG"];
+ convert["SLUG"]["KG"] = 14.59390;
+ convert["KG"]["SLUG"] = 1.0/convert["SLUG"]["KG"];
+ // Moments of Inertia
+ convert["SLUG*FT2"]["KG*M2"] = 1.35594;
+ convert["KG*M2"]["SLUG*FT2"] = 1.0/convert["SLUG*FT2"]["KG*M2"];
+ // Angles
+ convert["RAD"]["DEG"] = 360.0/(2.0*3.1415926);
+ convert["DEG"]["RAD"] = 1.0/convert["RAD"]["DEG"];
+ // Spring force
+ convert["LBS/FT"]["N/M"] = 14.5939;
+ convert["N/M"]["LBS/FT"] = 1.0/convert["LBS/FT"]["N/M"];
+ // Damping force
+ convert["LBS/FT/SEC"]["N/M/SEC"] = 14.5939;
+ convert["N/M/SEC"]["LBS/FT/SEC"] = 1.0/convert["LBS/FT/SEC"]["N/M/SEC"];
+ // Damping force (Square Law)
+ convert["LBS/FT2/SEC2"]["N/M2/SEC2"] = 47.880259;
+ convert["N/M2/SEC2"]["LBS/FT2/SEC2"] = 1.0/convert["LBS/FT2/SEC2"]["N/M2/SEC2"];
+ // Power
+ convert["WATTS"]["HP"] = 0.001341022;
+ convert["HP"]["WATTS"] = 1.0/convert["WATTS"]["HP"];
+ // Force
+ convert["N"]["LBS"] = 0.22482;
+ convert["LBS"]["N"] = 1.0/convert["N"]["LBS"];
+ // Velocity
+ convert["KTS"]["FT/SEC"] = 1.68781;
+ convert["FT/SEC"]["KTS"] = 1.0/convert["KTS"]["FT/SEC"];
+ convert["M/S"]["FT/S"] = 3.2808399;
+ convert["FT/S"]["M/S"] = 1.0/convert["M/S"]["FT/S"];
+ // Torque
+ convert["FT*LBS"]["N*M"] = 1.35581795;
+ convert["N*M"]["FT*LBS"] = 1/convert["FT*LBS"]["N*M"];
+ // Valve
+ convert["M4*SEC/KG"]["FT4*SEC/SLUG"] = convert["M"]["FT"]*convert["M"]["FT"]*
+ convert["M"]["FT"]*convert["M"]["FT"]/convert["KG"]["SLUG"];
+ convert["FT4*SEC/SLUG"]["M4*SEC/KG"] =
+ 1.0/convert["M4*SEC/KG"]["FT4*SEC/SLUG"];
+ // Pressure
+ convert["INHG"]["PSF"] = 70.7180803;
+ convert["PSF"]["INHG"] = 1.0/convert["INHG"]["PSF"];
+ convert["ATM"]["INHG"] = 29.9246899;
+ convert["INHG"]["ATM"] = 1.0/convert["ATM"]["INHG"];
+ convert["PSI"]["INHG"] = 2.03625437;
+ convert["INHG"]["PSI"] = 1.0/convert["PSI"]["INHG"];
+ convert["INHG"]["PA"] = 3386.0; // inches Mercury to pascals
+ convert["PA"]["INHG"] = 1.0/convert["INHG"]["PA"];
+ convert["LBS/FT2"]["N/M2"] = 14.5939/convert["FT"]["M"];
+ convert["N/M2"]["LBS/FT2"] = 1.0/convert["LBS/FT2"]["N/M2"];
+ convert["LBS/FT2"]["PA"] = convert["LBS/FT2"]["N/M2"];
+ convert["PA"]["LBS/FT2"] = 1.0/convert["LBS/FT2"]["PA"];
+ // Mass flow
+ convert["KG/MIN"]["LBS/MIN"] = convert["KG"]["LBS"];
+ // Fuel Consumption
+ convert["LBS/HP*HR"]["KG/KW*HR"] = 0.6083;
+ convert["KG/KW*HR"]["LBS/HP*HR"] = 1.0/convert["LBS/HP*HR"]["KG/KW*HR"];
+ // Density
+ convert["KG/L"]["LBS/GAL"] = 8.3454045;
+ convert["LBS/GAL"]["KG/L"] = 1.0/convert["KG/L"]["LBS/GAL"];
+
+ // Length
+ convert["M"]["M"] = 1.00;
+ convert["FT"]["FT"] = 1.00;
+ convert["IN"]["IN"] = 1.00;
+ // Area
+ convert["M2"]["M2"] = 1.00;
+ convert["FT2"]["FT2"] = 1.00;
+ // Volume
+ convert["IN3"]["IN3"] = 1.00;
+ convert["CC"]["CC"] = 1.0;
+ convert["M3"]["M3"] = 1.0;
+ convert["FT3"]["FT3"] = 1.0;
+ convert["LTR"]["LTR"] = 1.0;
+ // Mass & Weight
+ convert["KG"]["KG"] = 1.00;
+ convert["LBS"]["LBS"] = 1.00;
+ // Moments of Inertia
+ convert["KG*M2"]["KG*M2"] = 1.00;
+ convert["SLUG*FT2"]["SLUG*FT2"] = 1.00;
+ // Angles
+ convert["DEG"]["DEG"] = 1.00;
+ convert["RAD"]["RAD"] = 1.00;
+ // Spring force
+ convert["LBS/FT"]["LBS/FT"] = 1.00;
+ convert["N/M"]["N/M"] = 1.00;
+ // Damping force
+ convert["LBS/FT/SEC"]["LBS/FT/SEC"] = 1.00;
+ convert["N/M/SEC"]["N/M/SEC"] = 1.00;
+ // Damping force (Square law)
+ convert["LBS/FT2/SEC2"]["LBS/FT2/SEC2"] = 1.00;
+ convert["N/M2/SEC2"]["N/M2/SEC2"] = 1.00;
+ // Power
+ convert["HP"]["HP"] = 1.00;
+ convert["WATTS"]["WATTS"] = 1.00;
+ // Force
+ convert["N"]["N"] = 1.00;
+ // Velocity
+ convert["FT/SEC"]["FT/SEC"] = 1.00;
+ convert["KTS"]["KTS"] = 1.00;
+ convert["M/S"]["M/S"] = 1.0;
+ // Torque
+ convert["FT*LBS"]["FT*LBS"] = 1.00;
+ convert["N*M"]["N*M"] = 1.00;
+ // Valve
+ convert["M4*SEC/KG"]["M4*SEC/KG"] = 1.0;
+ convert["FT4*SEC/SLUG"]["FT4*SEC/SLUG"] = 1.0;
+ // Pressure
+ convert["PSI"]["PSI"] = 1.00;
+ convert["PSF"]["PSF"] = 1.00;
+ convert["INHG"]["INHG"] = 1.00;
+ convert["ATM"]["ATM"] = 1.0;
+ convert["PA"]["PA"] = 1.0;
+ convert["N/M2"]["N/M2"] = 1.00;
+ convert["LBS/FT2"]["LBS/FT2"] = 1.00;
+ // Mass flow
+ convert["LBS/SEC"]["LBS/SEC"] = 1.00;
+ convert["KG/MIN"]["KG/MIN"] = 1.0;
+ convert["LBS/MIN"]["LBS/MIN"] = 1.0;
+ // Fuel Consumption
+ convert["LBS/HP*HR"]["LBS/HP*HR"] = 1.0;
+ convert["KG/KW*HR"]["KG/KW*HR"] = 1.0;
+ // Density
+ convert["KG/L"]["KG/L"] = 1.0;
+ convert["LBS/GAL"]["LBS/GAL"] = 1.0;
+ }
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string Element::GetAttributeValue(string attr)
+string Element::GetAttributeValue(const string& attr)
{
int select=-1;
for (unsigned int i=0; i<attribute_key.size(); i++) {
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-double Element::GetAttributeValueAsNumber(string attr)
+double Element::GetAttributeValueAsNumber(const string& attr)
{
string attribute = GetAttributeValue(attr);
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-unsigned int Element::GetNumElements(string element_name)
+unsigned int Element::GetNumElements(const string& element_name)
{
unsigned int number_of_elements=0;
Element* el=FindElement(element_name);
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-Element* Element::FindElement(string el)
+Element* Element::FindElement(const string& el)
{
if (el.empty() && children.size() >= 1) {
element_index = 1;
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-Element* Element::FindNextElement(string el)
+Element* Element::FindNextElement(const string& el)
{
if (el.empty()) {
if (element_index < children.size()) {
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-double Element::FindElementValueAsNumber(string el)
+double Element::FindElementValueAsNumber(const string& el)
{
Element* element = FindElement(el);
if (element) {
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string Element::FindElementValue(string el)
+string Element::FindElementValue(const string& el)
{
Element* element = FindElement(el);
if (element) {
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-double Element::FindElementValueAsNumberConvertTo(string el, string target_units)
+double Element::FindElementValueAsNumberConvertTo(const string& el, const string& target_units)
{
Element* element = FindElement(el);
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-double Element::FindElementValueAsNumberConvertFromTo( string el,
- string supplied_units,
- string target_units)
+double Element::FindElementValueAsNumberConvertFromTo( const string& el,
+ const string& supplied_units,
+ const string& target_units)
{
Element* element = FindElement(el);
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-FGColumnVector3 Element::FindElementTripletConvertTo( string target_units)
+FGColumnVector3 Element::FindElementTripletConvertTo( const string& target_units)
{
FGColumnVector3 triplet;
Element* item;
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-void Element::AddAttribute(string name, string value)
+void Element::AddAttribute(const string& name, const string& value)
{
attribute_key.push_back(name);
attributes[name] = value;
void Element::AddData(string d)
{
- unsigned int string_start = (unsigned int)d.find_first_not_of(" \t");
- if (string_start > 0) {
+ string::size_type string_start = d.find_first_not_of(" \t");
+ if (string_start != string::npos && string_start > 0) {
d.erase(0,string_start);
}
data_lines.push_back(d);
#include <string>
#include <map>
-#include <iostream>
#include <vector>
-using std::string;
-using std::map;
-using std::vector;
-using std::cout;
-using std::endl;
-
-#include <math/FGColumnVector3.h>
+#include "math/FGColumnVector3.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
- convert["KG/MIN"]["LBS/MIN"] = convert["KG"]["LBS"];
- convert["LBS/HP*HR"]["KG/KW*HR"] = 0.6083;
- convert["KG/KW*HR"]["LBS/HP*HR"] = 1/convert["LBS/HP*HR"]["KG/KW*HR"];
+ - convert["KG/L"]["LBS/GAL"] = 8.3454045;
- convert["M"]["M"] = 1.00;
- convert["FT"]["FT"] = 1.00;
- convert["LBS/MIN"]["LBS/MIN"] = 1.0;
- convert["LBS/HP*HR"]["LBS/HP*HR"] = 1.0;
- convert["KG/KW*HR"]["KG/KW*HR"] = 1.0;
+ - convert["KG/L"]["KG/L"] = 1.0;
+ - convert["LBS/GAL"]["LBS/GAL"] = 1.0;
Where:
- N = newtons
- WATTS = watts
- HP = horsepower
- HR = hour
+ - L = liter
+ - GAL = gallon (U.S. liquid)
@author Jon S. Berndt
@version $Id$
/** Constructor
@param nm the name of this element (if given)
*/
- Element(string nm);
+ Element(const std::string& nm);
/// Destructor
~Element(void);
@param key specifies the attribute key to retrieve the value of.
@return the key value (as a string), or the empty string if no such
attribute exists. */
- string GetAttributeValue(string key);
+ std::string GetAttributeValue(const std::string& key);
/** Retrieves an attribute value as a double precision real number.
@param key specifies the attribute key to retrieve the value of.
@return the key value (as a number), or the HUGE_VAL if no such
attribute exists. */
- double GetAttributeValueAsNumber(string key);
+ double GetAttributeValueAsNumber(const std::string& key);
/** Retrieves the element name.
@return the element name, or the empty string if no name has been set.*/
- string GetName(void) {return name;}
+ const std::string& GetName(void) const {return name;}
/** Gets a line of data belonging to an element.
@param i the index of the data line to return (0 by default).
@return a string representing the data line requested, or the empty string
if none exists.*/
- string GetDataLine(unsigned int i=0);
+ std::string GetDataLine(unsigned int i=0);
/// Returns the number of lines of data stored
unsigned int GetNumDataLines(void) {return (unsigned int)data_lines.size();}
unsigned int GetNumElements(void) {return (unsigned int)children.size();}
/// Returns the number of named child elements for this element.
- unsigned int GetNumElements(string);
+ unsigned int GetNumElements(const std::string& element_name);
/** Converts the element data to a number.
This function attempts to convert the first (and presumably only) line of
element counter to the first element.
@param el the search string (empty string by default).
@return a pointer to the first element that matches the supplied search string. */
- Element* FindElement(string el="");
+ Element* FindElement(const std::string& el="");
/** Searches for the next element as specified.
This function would be called after FindElement() is first called (in order to
@param el the name of the next element to find.
@return the pointer to the found element, or 0 if no appropriate element us
found.*/
- Element* FindNextElement(string el="");
+ Element* FindNextElement(const std::string& el="");
/** Searches for the named element and returns the string data belonging to it.
This function allows the data belonging to a named element to be returned
default)
@return the data value for the named element as a string, or the empty
string if the element cannot be found. */
- string FindElementValue(string el="");
+ std::string FindElementValue(const std::string& el="");
/** Searches for the named element and returns the data belonging to it as a number.
This function allows the data belonging to a named element to be returned
default)
@return the data value for the named element as a double, or HUGE_VAL if the
data is missing. */
- double FindElementValueAsNumber(string el="");
+ double FindElementValueAsNumber(const std::string& el="");
/** Searches for the named element and converts and returns the data belonging to it.
This function allows the data belonging to a named element to be returned
to which the value returned will be converted.
@return the unit-converted data value for the named element as a double,
or HUGE_VAL if the data is missing. */
- double FindElementValueAsNumberConvertTo(string el, string target_units);
+ double FindElementValueAsNumberConvertTo(const std::string& el, const std::string& target_units);
/** Searches for the named element and converts and returns the data belonging to it.
This function allows the data belonging to a named element to be returned
to which the value returned will be converted.
@return the unit-converted data value for the named element as a double,
or HUGE_VAL if the data is missing. */
- double FindElementValueAsNumberConvertFromTo( string el,
- string supplied_units,
- string target_units);
+ double FindElementValueAsNumberConvertFromTo( const std::string& el,
+ const std::string& supplied_units,
+ const std::string& target_units);
/** Composes a 3-element column vector for the supplied location or orientation.
This function processes a LOCATION or ORIENTATION construct, returning a
@param target_units the string representing the native units used by JSBSim
to which the value returned will be converted.
@return a column vector object built from the LOCATION or ORIENT components. */
- FGColumnVector3 FindElementTripletConvertTo( string target_units);
+ FGColumnVector3 FindElementTripletConvertTo( const std::string& target_units);
/** This function sets the value of the parent class attribute to the supplied
Element pointer.
/** Stores an attribute belonging to this element.
* @param name The string name of the attribute.
* @param value The string value of the attribute. */
- void AddAttribute(string name, string value);
+ void AddAttribute(const std::string& name, const std::string& value);
/** Stores data belonging to this element.
* @param d the data to store. */
- void AddData(string d);
+ void AddData(std::string d);
/** Prints the element.
* Prints this element and calls the Print routine for child elements.
void Print(unsigned int level=0);
private:
- string name;
- map <string, string> attributes;
- vector <string> data_lines;
- vector <Element*> children;
- vector <string> attribute_key;
+ std::string name;
+ std::map <std::string, std::string> attributes;
+ std::vector <std::string> data_lines;
+ std::vector <Element*> children;
+ std::vector <std::string> attribute_key;
Element *parent;
unsigned int element_index;
- typedef map <string, map <string, double> > tMapConvert;
- tMapConvert convert;
+ typedef std::map <std::string, std::map <std::string, double> > tMapConvert;
+ static tMapConvert convert;
+ static bool converterIsInitialized;
};
} // namespace JSBSim
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <input_output/FGXMLParse.h>
+#include "input_output/FGXMLParse.h"
+#include <iostream>
+#include <fstream>
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
protected:
Element* document;
- Element* LoadXMLDocument(string XML_filename)
+ Element* LoadXMLDocument(std::string XML_filename)
{
- ifstream infile;
+ std::ifstream infile;
if ( !XML_filename.empty() ) {
- if (XML_filename.find(".xml") == string::npos) XML_filename += ".xml";
+ if (XML_filename.find(".xml") == std::string::npos) XML_filename += ".xml";
infile.open(XML_filename.c_str());
if ( !infile.is_open()) {
- cerr << "Could not open file: " << XML_filename << endl;
+ std::cerr << "Could not open file: " << XML_filename << std::endl;
return 0L;
}
} else {
- cerr << "No filename given." << endl;
+ std::cerr << "No filename given." << std::endl;
return 0L;
}
- readXML(infile, file_parser);
+ readXML(infile, file_parser, XML_filename);
document = file_parser.GetDocument();
infile.close();
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGXMLParse.h"
+#include "FGXMLElement.h"
+#include <string>
+#include <iostream>
#include <cstdlib>
#include "input_output/string_utilities.h"
+using namespace std;
+
namespace JSBSim {
static const char *IdSrc = "$Id$";
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <string>
-#include <iostream>
-
-using std::string;
-using std::cout;
-using std::cerr;
-using std::endl;
-
-#include "FGXMLElement.h"
#include "simgear/xml/easyxml.hxx"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
namespace JSBSim {
+class Element;
+
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DOCUMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include "FGfdmSocket.h"
+#include <iostream>
+#include <iomanip>
#include <cstring>
+#include <cstdio>
+#include "FGfdmSocket.h"
+#include "string_utilities.h"
+
+using std::cout;
+using std::cerr;
+using std::endl;
+using std::string;
namespace JSBSim {
CLASS IMPLEMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-FGfdmSocket::FGfdmSocket(string address, int port, int protocol)
+FGfdmSocket::FGfdmSocket(const string& address, int port, int protocol)
{
- sckt = sckt_in = size = 0;
+ sckt = sckt_in = 0;
connected = false;
#if defined(_MSC_VER) || defined(__MINGW32__)
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-FGfdmSocket::FGfdmSocket(string address, int port)
+FGfdmSocket::FGfdmSocket(const string& address, int port)
{
- sckt = sckt_in = size = 0;
+ sckt = sckt_in = 0;
connected = false;
#if defined(_MSC_VER) || defined(__MINGW32__)
FGfdmSocket::FGfdmSocket(int port)
{
- size = 0;
connected = false;
unsigned long NoBlock = true;
char buf[1024];
int len = sizeof(struct sockaddr_in);
int num_chars=0;
- int total_chars = 0;
unsigned long NoBlock = true;
- string data = ""; // todo: should allocate this with a standard size as a
+ string data; // todo: should allocate this with a standard size as a
// class attribute and pass as a reference?
if (sckt_in <= 0) {
}
if (sckt_in > 0) {
- while ((num_chars = recv(sckt_in, buf, 1024, 0)) > 0) {
- data += string(buf).substr(0,num_chars);
- total_chars += num_chars;
+ while ((num_chars = recv(sckt_in, buf, sizeof buf, 0)) > 0) {
+ data.append(buf, num_chars);
}
#if defined(_MSC_VER)
#endif
}
- return data.substr(0, total_chars);
+ return data;
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-int FGfdmSocket::Reply(string text)
+int FGfdmSocket::Reply(const string& text)
{
int num_chars_sent=0;
void FGfdmSocket::Clear(void)
{
- buffer = "";
- size = 0;
+ buffer.str(string());
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-void FGfdmSocket::Clear(string s)
+void FGfdmSocket::Clear(const string& s)
{
- buffer = s + " ";
- size = buffer.size();
+ Clear();
+ buffer << s << ' ';
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void FGfdmSocket::Append(const char* item)
{
- if (size == 0) buffer += string(item);
- else buffer += string(",") + string(item);
- size++;
+ if (buffer.tellp() > 0) buffer << ',';
+ buffer << item;
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void FGfdmSocket::Append(double item)
{
- char s[25];
-
- sprintf(s,"%12.7f",item);
-
- if (size == 0) buffer += string(s);
- else buffer += string(",") + string(s);
- size++;
+ if (buffer.tellp() > 0) buffer << ',';
+ buffer << std::setw(12) << std::setprecision(7) << item;
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void FGfdmSocket::Append(long item)
{
- char s[25];
-
- sprintf(s,"%12ld",item);
-
- if (size == 0) buffer += string(s);
- else buffer += string(",") + string(s);
- size++;
+ if (buffer.tellp() > 0) buffer << ',';
+ buffer << std::setw(12) << item;
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void FGfdmSocket::Send(void)
{
- buffer += string("\n");
- if ((send(sckt,buffer.c_str(),buffer.size(),0)) <= 0) {
+ buffer << '\n';
+ string str = buffer.str();
+ if ((send(sckt,str.c_str(),str.size(),0)) <= 0) {
perror("send");
- } else {
}
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-void FGfdmSocket::Send(char *data, int length)
+void FGfdmSocket::Send(const char *data, int length)
{
if ((send(sckt,data,length,0)) <= 0) {
perror("send");
- } else {
}
}
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <cstdio>
#include <string>
-#include <iostream>
-#include <fstream>
+#include <sstream>
#include <sys/types.h>
#include "FGJSBBase.h"
-using std::cout;
-using std::endl;
-
#if defined(_MSC_VER) || defined(__MINGW32__)
#include <winsock.h>
#include <io.h>
CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-using std::string;
-using std::cerr;
-
class FGfdmSocket : public FGJSBBase
{
public:
- FGfdmSocket(string, int);
- FGfdmSocket(string, int, int);
+ FGfdmSocket(const std::string&, int);
+ FGfdmSocket(const std::string&, int, int);
FGfdmSocket(int);
~FGfdmSocket();
void Send(void);
- void Send(char *data, int length);
+ void Send(const char *data, int length);
- string Receive(void);
- int Reply(string text);
- void Append(const string s) {Append(s.c_str());}
+ std::string Receive(void);
+ int Reply(const std::string& text);
+ void Append(const std::string& s) {Append(s.c_str());}
void Append(const char*);
void Append(double);
void Append(long);
void Clear(void);
- void Clear(string s);
+ void Clear(const std::string& s);
void Close(void);
bool GetConnectStatus(void) {return connected;}
private:
int sckt;
int sckt_in;
- int size;
struct sockaddr_in scktName;
struct hostent *host;
- string buffer;
+ std::ostringstream buffer;
bool connected;
void Debug(int from);
};
#include <time.h> // time_t
-#ifdef _MSC_VER
-typedef unsigned long uint32_t;
-typedef long int32_t;
-#endif
-
-//--->>>#include <simgear/misc/stdint.hxx> //not required for JSBSim
+#include <simgear/misc/stdint.hxx> //not required for JSBSim
// NOTE: this file defines an external interface structure. Due to
Author: Jon S. Berndt
Date started: 06/01/09
- ------------- Copyright (C) 2009 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 2009 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+#include <string>
#include <vector>
-#include <ctype.h>
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
FORWARD DECLARATIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-using namespace std;
-
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DOCUMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#if !defined(BASE)
- extern string& trim_left(string& str);
- extern string& trim_right(string& str);
- extern string& trim(string& str);
- extern string& to_upper(string& str);
- extern string& to_lower(string& str);
- extern bool is_number(string& str);
- vector <string> split(string str, char d);
+ extern std::string& trim_left(std::string& str);
+ extern std::string& trim_right(std::string& str);
+ extern std::string& trim(std::string& str);
+ extern std::string& to_upper(std::string& str);
+ extern std::string& to_lower(std::string& str);
+ extern bool is_number(const std::string& str);
+ std::vector <std::string> split(std::string str, char d);
#else
+ #include <ctype.h>
+
+ using namespace std;
string& trim_left(string& str)
{
- while ( !isgraph(str[0]) ) {
+ while (str.size() && !isgraph(str[0])) {
str = str.erase(0,1);
- if (str.size() == 0) break;
}
return str;
}
string& trim_right(string& str)
{
- while (!isgraph(str[str.size()-1])) {
+ while (str.size() && !isgraph(str[str.size()-1])) {
str = str.erase(str.size()-1,1);
- if (str.size() == 0) break;
}
return str;
}
string& to_upper(string& str)
{
- for (int i=0; i<str.size(); i++) str[i] = toupper(str[i]);
+ for (size_t i=0; i<str.size(); i++) str[i] = toupper(str[i]);
return str;
}
string& to_lower(string& str)
{
- for (int i=0; i<str.size(); i++) str[i] = tolower(str[i]);
+ for (size_t i=0; i<str.size(); i++) str[i] = tolower(str[i]);
return str;
}
- bool is_number(string& str)
+ bool is_number(const string& str)
{
return (str.find_first_not_of("+-.0123456789Ee") == string::npos);
}
vector <string> split(string str, char d)
{
vector <string> str_array;
- int index=0;
+ size_t index=0;
string temp = "";
trim(str);
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGColumnVector3.h"
-#include <cstdio>
+#include <iostream>
+#include <sstream>
+#include <iomanip>
+#include <cmath>
+
+using namespace std;
namespace JSBSim {
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string FGColumnVector3::Dump(string delimeter) const
+string FGColumnVector3::Dump(const string& delimiter) const
{
- char buffer[256];
- sprintf(buffer, "%18.16f%s%18.16f%s%18.16f", Entry(1), delimeter.c_str(), Entry(2), delimeter.c_str(), Entry(3));
- return string(buffer);
+ ostringstream buffer;
+ buffer << std::setw(18) << std::setprecision(16) << Entry(1) << delimiter;
+ buffer << std::setw(18) << std::setprecision(16) << Entry(2) << delimiter;
+ buffer << std::setw(18) << std::setprecision(16) << Entry(3);
+ return buffer.str();
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <cstdlib>
+#include <iosfwd>
#include <string>
-#include <fstream>
-#include <iostream>
-#include <cmath>
-
-using std::ostream;
-using std::istream;
-using std::cerr;
-using std::cout;
-using std::endl;
-using std::sqrt;
-using std::string;
-
#include "FGJSBBase.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/** Prints the contents of the vector
@param delimeter the item separator (tab or comma)
@return a string with the delimeter-separated contents of the vector */
- string Dump(string delimeter) const;
+ std::string Dump(const std::string& delimeter) const;
/** Assignment operator.
@param b source vector.
@param os Stream to write to.
@param M Matrix to write.
Write the matrix to a stream.*/
-ostream& operator<<(ostream& os, const FGColumnVector3& col);
+std::ostream& operator<<(std::ostream& os, const FGColumnVector3& col);
} // namespace JSBSim
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGCondition.h"
-#include <vector>
+#include "input_output/FGXMLElement.h"
+#include "input_output/FGPropertyManager.h"
+#include <iostream>
+#include <cstdlib>
+
+using namespace std;
namespace JSBSim {
// This constructor is called when there are no nested test groups inside the
// condition
-FGCondition::FGCondition(string test, FGPropertyManager* PropertyManager) :
+FGCondition::FGCondition(const string& test, FGPropertyManager* PropertyManager) :
PropertyManager(PropertyManager), isGroup(false)
{
string property1, property2, compare_string;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include <map>
-#include <FGJSBBase.h>
-#include <input_output/FGXMLElement.h>
-#include <input_output/FGPropertyManager.h>
+#include "FGJSBBase.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
namespace JSBSim {
+class FGPropertyManager;
+class Element;
+
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DOCUMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
{
public:
FGCondition(Element* element, FGPropertyManager* PropertyManager);
- FGCondition(string test, FGPropertyManager* PropertyManager);
+ FGCondition(const std::string& test, FGPropertyManager* PropertyManager);
~FGCondition(void);
bool Evaluate(void);
private:
enum eComparison {ecUndef=0, eEQ, eNE, eGT, eGE, eLT, eLE};
enum eLogic {elUndef=0, eAND, eOR};
- map <string, eComparison> mComparison;
+ std::map <std::string, eComparison> mComparison;
eLogic Logic;
FGPropertyManager *TestParam1, *TestParam2, *PropertyManager;
double TestValue;
eComparison Comparison;
bool isGroup;
- string conditional;
+ std::string conditional;
- static string indent;
+ static std::string indent;
- vector <FGCondition*> conditions;
+ std::vector <FGCondition*> conditions;
void InitializeConditionals(void);
void Debug(int from);
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <stdio.h>
-
+#include <sstream>
+#include <iomanip>
+#include <cstdlib>
+#include <cmath>
#include "FGFunction.h"
#include "FGTable.h"
#include "FGPropertyValue.h"
#include "FGRealValue.h"
+#include "input_output/FGXMLElement.h"
+#include "input_output/FGPropertyManager.h"
+
+using namespace std;
namespace JSBSim {
CLASS IMPLEMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-FGFunction::FGFunction(FGPropertyManager* propMan, Element* el, string prefix)
+FGFunction::FGFunction(FGPropertyManager* propMan, Element* el, const string& prefix)
: PropertyManager(propMan), Prefix(prefix)
{
Element* element;
string operation, property_name;
- int size = el->GetNumElements();
cached = false;
cachedValue = -HUGE_VAL;
+ invlog2val = 1.0/log10(2.0);
property_string = "property";
value_string = "value";
quotient_string = "quotient";
pow_string = "pow";
exp_string = "exp";
+ log2_string = "log2";
+ ln_string = "ln";
+ log10_string = "log10";
abs_string = "abs";
sin_string = "sin";
cos_string = "cos";
Type = eQuotient;
} else if (operation == pow_string) {
Type = ePow;
+ } else if (operation == log2_string) {
+ Type = eLog2;
+ } else if (operation == ln_string) {
+ Type = eLn;
+ } else if (operation == log10_string) {
+ Type = eLog10;
} else if (operation == abs_string) {
Type = eAbs;
} else if (operation == sin_string) {
operation == quotient_string ||
operation == pow_string ||
operation == exp_string ||
+ operation == log2_string ||
+ operation == ln_string ||
+ operation == log10_string ||
operation == abs_string ||
operation == sin_string ||
operation == cos_string ||
case eExp:
temp = exp(temp);
break;
+ case eLog2:
+ if (temp > 0.00) temp = log10(temp)*invlog2val;
+ else temp = -HUGE_VAL;
+ break;
+ case eLn:
+ if (temp > 0.00) temp = log(temp);
+ else temp = -HUGE_VAL;
+ break;
+ case eLog10:
+ if (temp > 0.00) temp = log10(temp);
+ else temp = -HUGE_VAL;
+ break;
case eAbs:
temp = fabs(temp);
break;
string FGFunction::GetValueAsString(void) const
{
- char buffer[20];
- string value;
+ ostringstream buffer;
- sprintf(buffer,"%9.6f",GetValue());
- value = string(buffer);
- return value;
+ buffer << setw(9) << setprecision(6) << GetValue();
+ return buffer.str();
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void FGFunction::bind(void)
{
if ( !Name.empty() ) {
- string tmp = PropertyManager->mkPropertyName(Prefix + Name, false); // Allow upper case
+ string tmp;
+ if (Prefix.empty())
+ tmp = PropertyManager->mkPropertyName(Name, false); // Allow upper case
+ else
+ tmp = PropertyManager->mkPropertyName(Prefix + "/" + Name, false); // Allow upper case
+
PropertyManager->Tie( tmp, this, &FGFunction::GetValue);
}
}
#include <vector>
#include <string>
#include "FGParameter.h"
-#include <input_output/FGXMLElement.h>
-#include <input_output/FGPropertyManager.h>
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
namespace JSBSim {
+class FGPropertyManager;
+class Element;
+
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DOCUMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
- quotient (takes 2 args)
- pow (takes 2 args)
- exp (takes 2 args)
+- log2 (takes 1 arg)
+- ln (takes 1 arg)
+- log10 (takes 1 arg)
- abs (takes n args)
- sin (takes 1 arg)
- cos (takes 1 arg)
@param prefix an optional prefix to prepend to the name given to the property
that represents this function (if given).
*/
- FGFunction(FGPropertyManager* PropertyManager, Element* element, string prefix="");
+ FGFunction(FGPropertyManager* PropertyManager, Element* element, const std::string& prefix="");
/// Destructor.
virtual ~FGFunction();
/** The value that the function evaluates to, as a string.
@return the value of the function as a string. */
- string GetValueAsString(void) const;
+ std::string GetValueAsString(void) const;
/// Retrieves the name of the function.
- string GetName(void) const {return Name;}
+ std::string GetName(void) const {return Name;}
/** Specifies whether to cache the value of the function, so it is calculated only
once per frame.
void cacheValue(bool shouldCache);
private:
- vector <FGParameter*> Parameters;
+ std::vector <FGParameter*> Parameters;
FGPropertyManager* const PropertyManager;
bool cached;
- string Prefix;
- string description_string;
- string property_string;
- string value_string;
- string table_string;
- string p_string;
- string v_string;
- string t_string;
- string function_string;
- string sum_string;
- string difference_string;
- string product_string;
- string quotient_string;
- string pow_string;
- string exp_string;
- string abs_string;
- string sin_string;
- string cos_string;
- string tan_string;
- string asin_string;
- string acos_string;
- string atan_string;
- string atan2_string;
- string min_string;
- string max_string;
- string avg_string;
- string fraction_string;
- string mod_string;
- string random_string;
- string integer_string;
+ double invlog2val;
+ std::string Prefix;
+ std::string description_string;
+ std::string property_string;
+ std::string value_string;
+ std::string table_string;
+ std::string p_string;
+ std::string v_string;
+ std::string t_string;
+ std::string function_string;
+ std::string sum_string;
+ std::string difference_string;
+ std::string product_string;
+ std::string quotient_string;
+ std::string pow_string;
+ std::string exp_string;
+ std::string log2_string;
+ std::string ln_string;
+ std::string log10_string;
+ std::string abs_string;
+ std::string sin_string;
+ std::string cos_string;
+ std::string tan_string;
+ std::string asin_string;
+ std::string acos_string;
+ std::string atan_string;
+ std::string atan2_string;
+ std::string min_string;
+ std::string max_string;
+ std::string avg_string;
+ std::string fraction_string;
+ std::string mod_string;
+ std::string random_string;
+ std::string integer_string;
double cachedValue;
enum functionType {eTopLevel=0, eProduct, eDifference, eSum, eQuotient, ePow,
eExp, eAbs, eSin, eCos, eTan, eASin, eACos, eATan, eATan2,
- eMin, eMax, eAvg, eFrac, eInteger, eMod, eRandom} Type;
- string Name;
+ eMin, eMax, eAvg, eFrac, eInteger, eMod, eRandom, eLog2, eLn, eLog10} Type;
+ std::string Name;
void bind(void);
void Debug(int from);
};
#include <cmath>
#include "FGLocation.h"
-#include <input_output/FGPropertyManager.h>
+#include "input_output/FGPropertyManager.h"
namespace JSBSim {
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <FGJSBBase.h>
-#include <input_output/FGPropertyManager.h>
+#include "FGJSBBase.h"
+#include "input_output/FGPropertyManager.h"
#include "FGColumnVector3.h"
#include "FGMatrix33.h"
#include "FGMatrix33.h"
#include "FGColumnVector3.h"
+#include <sstream>
+#include <iomanip>
+
+#include <iostream>
+
+using namespace std;
namespace JSBSim {
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+string FGMatrix33::Dump(const string& delimiter) const
+{
+ ostringstream buffer;
+ buffer << std::setw(18) << std::setprecision(16) << Entry(1,1) << delimiter;
+ buffer << std::setw(18) << std::setprecision(16) << Entry(1,2) << delimiter;
+ buffer << std::setw(18) << std::setprecision(16) << Entry(1,3) << delimiter;
+ buffer << std::setw(18) << std::setprecision(16) << Entry(2,1) << delimiter;
+ buffer << std::setw(18) << std::setprecision(16) << Entry(2,2) << delimiter;
+ buffer << std::setw(18) << std::setprecision(16) << Entry(2,3) << delimiter;
+ buffer << std::setw(18) << std::setprecision(16) << Entry(3,1) << delimiter;
+ buffer << std::setw(18) << std::setprecision(16) << Entry(3,2) << delimiter;
+ buffer << std::setw(18) << std::setprecision(16) << Entry(3,3);
+ return buffer.str();
+}
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
ostream& operator<<(ostream& os, const FGMatrix33& M)
{
for (unsigned int i=1; i<=M.Rows(); i++) {
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <cstdlib>
#include <string>
-#include <fstream>
-#include <iostream>
-#include <cmath>
-
-using std::ostream;
-using std::istream;
-using std::cerr;
-using std::cout;
-using std::endl;
-using std::string;
+#include <iosfwd>
#include "FGColumnVector3.h"
#include "FGJSBBase.h"
class MatrixException : public FGJSBBase
{
public:
- string Message;
+ std::string Message;
};
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/
~FGMatrix33(void) { Debug(1); }
+ /** Prints the contents of the matrix.
+ @param delimeter the item separator (tab or comma)
+ @return a string with the delimeter-separated contents of the matrix */
+ std::string Dump(const std::string& delimeter) const;
+
/** Read access the entries of the matrix.
@param row Row index.
@param col Column index.
Write the matrix to a stream.
*/
-ostream& operator<<(ostream& os, const FGMatrix33& M);
+std::ostream& operator<<(std::ostream& os, const FGMatrix33& M);
/** Read matrix from a stream.
Read matrix from a stream.
*/
-istream& operator>>(istream& is, FGMatrix33& M);
+std::istream& operator>>(std::istream& is, FGMatrix33& M);
} // namespace JSBSim
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGParameter.h"
-#include <input_output/FGPropertyManager.h>
+#include "input_output/FGPropertyManager.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <FGJSBBase.h>
+#include "FGJSBBase.h"
#include "FGMatrix33.h"
#include "FGColumnVector3.h"
-#include <input_output/FGPropertyManager.h>
+#include "input_output/FGPropertyManager.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGTable.h"
-#include <iomanip>
+#include "input_output/FGXMLElement.h"
+#include "input_output/FGPropertyManager.h"
+#include <iostream>
+#include <sstream>
+#include <cstdlib>
using namespace std;
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-unsigned int FGTable::FindNumColumns(string test_line)
+unsigned int FGTable::FindNumColumns(const string& test_line)
{
// determine number of data columns in table (first column is row lookup - don't count)
size_t position=0;
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-void FGTable::operator<<(stringstream& in_stream)
+void FGTable::operator<<(istream& in_stream)
{
int startRow=0;
int startCol=0;
FGTable& FGTable::operator<<(const double n)
{
Data[rowCounter][colCounter] = n;
- if (colCounter == nCols) {
+ if (colCounter == (int)nCols) {
colCounter = 0;
rowCounter++;
} else {
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <input_output/FGXMLElement.h>
#include "FGParameter.h"
-#include <input_output/FGPropertyManager.h>
-#include <sstream>
+#include <iosfwd>
#include <vector>
+#include <string>
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
FORWARD DECLARATIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-using std::vector;
-using std::stringstream;
-
namespace JSBSim {
+class FGPropertyManager;
+class Element;
+
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DOCUMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
</pre>
*/
- void operator<<(stringstream&);
+ void operator<<(std::istream&);
FGTable& operator<<(const double n);
FGTable& operator<<(const int n);
bool internal;
FGPropertyManager *lookupProperty[3];
double** Data;
- vector <FGTable*> Tables;
- unsigned int FindNumColumns(string);
+ std::vector <FGTable*> Tables;
unsigned int nRows, nCols, nTables, dimension;
int colCounter, rowCounter, tableCounter;
mutable int lastRowIndex, lastColumnIndex, lastTableIndex;
double** Allocate(void);
FGPropertyManager* const PropertyManager;
- string Name;
+ std::string Name;
void bind(void);
+ unsigned int FindNumColumns(const std::string&);
void Debug(int from);
};
}
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+#include <iostream>
+#include <sstream>
+#include <iomanip>
+#include <cstdlib>
#include <FGFDMExec.h>
#include "FGAerodynamics.h"
#include "FGPropagate.h"
#include "FGAircraft.h"
#include "FGAuxiliary.h"
#include "FGMassBalance.h"
-#include <input_output/FGPropertyManager.h>
+#include "input_output/FGPropertyManager.h"
+
+using namespace std;
namespace JSBSim {
delete[] Coeff;
- for (i=0; i<variables.size(); i++)
- delete variables[i];
-
delete AeroRPShift;
Debug(1);
bool FGAerodynamics::Run(void)
{
- unsigned int axis_ctr, ctr, i;
+ unsigned int axis_ctr, ctr;
double alpha, twovel;
if (FGModel::Run()) return true;
if (FDMExec->Holding()) return false; // if paused don't execute
+ RunPreFunctions();
+
// calculate some oft-used quantities for speed
twovel = 2*Auxiliary->GetVt();
vFw.InitMatrix();
vFnative.InitMatrix();
- // Tell the variable functions to cache their values, so while the aerodynamic
- // functions are being calculated for each axis, these functions do not get
- // calculated each time, but instead use the values that have already
- // been calculated for this frame.
-
- for (i=0; i<variables.size(); i++) variables[i]->cacheValue(true);
-
for (axis_ctr = 0; axis_ctr < 3; axis_ctr++) {
for (ctr=0; ctr < Coeff[axis_ctr].size(); ctr++) {
vFnative(axis_ctr+1) += Coeff[axis_ctr][ctr]->GetValue();
}
}
+ RunPostFunctions();
+
return false;
}
document = element;
}
- FGModel::Load(element); // Perform base class Load
+ FGModel::Load(document); // Perform base class Pre-Load
DetermineAxisSystem(); // Detemine if Lift/Side/Drag, etc. is used.
Debug(2);
- if (temp_element = document->FindElement("alphalimits")) {
+ if ((temp_element = document->FindElement("alphalimits"))) {
scratch_unit = temp_element->GetAttributeValue("unit");
if (scratch_unit.empty()) scratch_unit = "RAD";
alphaclmin = temp_element->FindElementValueAsNumberConvertFromTo("min", scratch_unit, "RAD");
alphaclmax = temp_element->FindElementValueAsNumberConvertFromTo("max", scratch_unit, "RAD");
}
- if (temp_element = document->FindElement("hysteresis_limits")) {
+ if ((temp_element = document->FindElement("hysteresis_limits"))) {
scratch_unit = temp_element->GetAttributeValue("unit");
if (scratch_unit.empty()) scratch_unit = "RAD";
alphahystmin = temp_element->FindElementValueAsNumberConvertFromTo("min", scratch_unit, "RAD");
alphahystmax = temp_element->FindElementValueAsNumberConvertFromTo("max", scratch_unit, "RAD");
}
- if (temp_element = document->FindElement("aero_ref_pt_shift_x")) {
+ if ((temp_element = document->FindElement("aero_ref_pt_shift_x"))) {
function_element = temp_element->FindElement("function");
AeroRPShift = new FGFunction(PropertyManager, function_element);
}
- function_element = document->FindElement("function");
- while (function_element) {
- variables.push_back( new FGFunction(PropertyManager, function_element) );
- function_element = document->FindNextElement("function");
- }
-
axis_element = document->FindElement("axis");
while (axis_element) {
CoeffArray ca;
axis_element = document->FindNextElement("axis");
}
+ FGModel::PostLoad(document); // Perform base class Post-Load
+
return true;
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string FGAerodynamics::GetCoefficientStrings(string delimeter)
+string FGAerodynamics::GetCoefficientStrings(const string& delimeter) const
{
string CoeffStrings = "";
bool firstime = true;
unsigned int axis, sd;
- for (sd = 0; sd < variables.size(); sd++) {
- if (firstime) {
- firstime = false;
- } else {
- CoeffStrings += delimeter;
- }
- CoeffStrings += variables[sd]->GetName();
- }
-
for (axis = 0; axis < 6; axis++) {
for (sd = 0; sd < Coeff[axis].size(); sd++) {
if (firstime) {
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string FGAerodynamics::GetCoefficientValues(string delimeter)
+string FGAerodynamics::GetCoefficientValues(const string& delimeter) const
{
- string SDValues = "";
- bool firstime = true;
- unsigned int sd;
-
- for (sd = 0; sd < variables.size(); sd++) {
- if (firstime) {
- firstime = false;
- } else {
- SDValues += delimeter;
- }
- SDValues += variables[sd]->GetValueAsString();
- }
+ ostringstream buf;
for (unsigned int axis = 0; axis < 6; axis++) {
for (unsigned int sd = 0; sd < Coeff[axis].size(); sd++) {
- if (firstime) {
- firstime = false;
- } else {
- SDValues += delimeter;
- }
- SDValues += Coeff[axis][sd]->GetValueAsString();
+ if (buf.tellp() > 0) buf << delimeter;
+ buf << setw(9) << Coeff[axis][sd]->GetValue();
}
}
- return SDValues;
+ return buf.str();
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
case (atBodyXYZ):
cout << endl << " Aerodynamics (X|Y|Z axes):" << endl << endl;
break;
+ case (atNone):
+ cout << endl << " Aerodynamics (undefined axes):" << endl << endl;
+ break;
}
}
}
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+#include <string>
#include <vector>
#include <map>
#include "FGModel.h"
-#include <math/FGFunction.h>
-#include <math/FGColumnVector3.h>
-#include <math/FGMatrix33.h>
-#include <input_output/FGXMLFileRead.h>
+#include "math/FGFunction.h"
+#include "math/FGColumnVector3.h"
+#include "math/FGMatrix33.h"
+#include "input_output/FGXMLFileRead.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
/** Gets the strings for the current set of coefficients.
@param delimeter either a tab or comma string depending on output type
@return a string containing the descriptive names for all coefficients */
- string GetCoefficientStrings(string delimeter);
+ std::string GetCoefficientStrings(const std::string& delimeter) const;
/** Gets the coefficient values.
@param delimeter either a tab or comma string depending on output type
@return a string containing the numeric values for the current set of
coefficients */
- string GetCoefficientValues(string delimeter);
+ std::string GetCoefficientValues(const std::string& delimeter) const;
/** Calculates and returns the wind-to-body axis transformation matrix.
@return a reference to the wind-to-body transformation matrix.
*/
FGMatrix33& GetTb2w(void);
- vector <FGFunction*> * GetCoeff(void) const { return Coeff; }
+ std::vector <FGFunction*> * GetCoeff(void) const { return Coeff; }
private:
enum eAxisType {atNone, atLiftDrag, atAxialNormal, atBodyXYZ} axisType;
- typedef map<string,int> AxisIndex;
+ typedef std::map<std::string,int> AxisIndex;
AxisIndex AxisIdx;
FGFunction* AeroRPShift;
- vector <FGFunction*> variables;
+ std::vector <FGFunction*> variables;
typedef vector <FGFunction*> CoeffArray;
CoeffArray* Coeff;
FGColumnVector3 vFnative;
#include "FGExternalReactions.h"
#include "FGBuoyantForces.h"
#include "FGAerodynamics.h"
-#include <FGFDMExec.h>
+#include "FGFDMExec.h"
#include "FGPropagate.h"
-#include <input_output/FGPropertyManager.h>
+#include "FGPropulsion.h"
+#include "input_output/FGPropertyManager.h"
+#include <iostream>
+
+using namespace std;
namespace JSBSim {
if (FGModel::Run()) return true;
if (FDMExec->Holding()) return false;
+ RunPreFunctions();
+
vForces.InitMatrix();
if (!HoldDown) {
vForces += Aerodynamics->GetForces();
vNwcg = Aerodynamics->GetTb2w() * vNcg;
vNwcg(3) = -1*vNwcg(3) + 1;
+ RunPostFunctions();
+
return false;
}
}
}
+ FGModel::PostLoad(el);
+
Debug(2);
return true;
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+#include <string>
#include <vector>
#include "FGModel.h"
-#include <input_output/FGXMLElement.h>
-#include <math/FGColumnVector3.h>
+#include "input_output/FGXMLElement.h"
+#include "math/FGColumnVector3.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
/** Gets the aircraft name
@return the name of the aircraft as a string type */
- inline string GetAircraftName(void) { return AircraftName; }
+ const std::string& GetAircraftName(void) const { return AircraftName; }
/// Gets the wing area
double GetWingArea(void) const { return WingArea; }
inline double GetXYZrp(int idx) const { return vXYZrp(idx); }
inline double GetXYZvrp(int idx) const { return vXYZvrp(idx); }
inline double GetXYZep(int idx) const { return vXYZep(idx); }
- inline void SetAircraftName(string name) {AircraftName = name;}
+ inline void SetAircraftName(const std::string& name) {AircraftName = name;}
inline void SetHoldDown(int hd) {HoldDown = hd;}
inline int GetHoldDown(void) const {return HoldDown;}
double HTailArea, VTailArea, HTailArm, VTailArm;
double lbarh,lbarv,vbarh,vbarv;
int HoldDown;
- string AircraftName;
+ std::string AircraftName;
void Debug(int from);
};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGAtmosphere.h"
-#include <FGState.h>
-#include <FGFDMExec.h>
+#include "FGState.h"
+#include "FGFDMExec.h"
#include "FGAircraft.h"
#include "FGPropagate.h"
#include "FGInertial.h"
-#include <input_output/FGPropertyManager.h>
+#include "input_output/FGPropertyManager.h"
+#include <iostream>
+#include <cstdlib>
+
+using namespace std;
namespace JSBSim {
if (FGModel::Run()) return true;
if (FDMExec->Holding()) return false;
+ RunPreFunctions();
+
T_dev = 0.0;
h = Propagate->GetAltitudeASL();
CalculateDerived();
}
+ RunPostFunctions();
+
Debug(2);
return false;
}
vDirectiondAccelDt(eX) = GaussianRandomNumber();
vDirectiondAccelDt(eY) = GaussianRandomNumber();
vDirectiondAccelDt(eZ) = GaussianRandomNumber();
-
+/*
MagnitudedAccelDt = GaussianRandomNumber();
MagnitudeAccel += MagnitudedAccelDt * DeltaT;
Magnitude += MagnitudeAccel * DeltaT;
+*/
+ Magnitude += GaussianRandomNumber() * DeltaT;
vDirectiondAccelDt.Normalize();
vDirectionAccel += TurbRate * vDirectiondAccelDt * DeltaT;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGModel.h"
-#include <math/FGColumnVector3.h>
+#include "math/FGColumnVector3.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
#include "FGAerodynamics.h"
#include "FGPropagate.h"
#include "FGAtmosphere.h"
-#include <FGFDMExec.h>
+#include "FGFDMExec.h"
#include "FGAircraft.h"
#include "FGInertial.h"
#include "FGExternalReactions.h"
#include "FGBuoyantForces.h"
#include "FGGroundReactions.h"
#include "FGPropulsion.h"
-#include <input_output/FGPropertyManager.h>
+#include "FGMassBalance.h"
+#include "input_output/FGPropertyManager.h"
+#include <iostream>
+
+using namespace std;
namespace JSBSim {
if (FGModel::Run()) return true; // return true if error returned from base class
if (FDMExec->Holding()) return false;
+ RunPreFunctions();
+
const FGColumnVector3& vPQR = Propagate->GetPQR();
const FGColumnVector3& vUVW = Propagate->GetUVW();
const FGColumnVector3& vUVWdot = Propagate->GetUVWdot();
CalculateRelativePosition();
+ RunPostFunctions();
+
return false;
}
relative_position = sqrt(lat_relative_position*lat_relative_position + lon_relative_position*lon_relative_position);
};
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+double FGAuxiliary::BadUnits(void) const
+{
+ cerr << "Bad units" << endl; return 0.0;
+}
+
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// The bitmasked value choices are as follows:
// unset: In this case (the default) JSBSim would only print
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGModel.h"
-#include <FGFDMExec.h>
-#include <math/FGColumnVector3.h>
-#include <math/FGLocation.h>
+#include "math/FGColumnVector3.h"
+#include "math/FGLocation.h"
#include "FGPropagate.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
double GetMagBeta (void) const { return fabs(beta); }
double Getalpha (int unit) const { if (unit == inDegrees) return alpha*radtodeg;
- else cerr << "Bad units" << endl; return 0.0;}
+ else return BadUnits(); }
double Getbeta (int unit) const { if (unit == inDegrees) return beta*radtodeg;
- else cerr << "Bad units" << endl; return 0.0;}
+ else return BadUnits(); }
double Getadot (int unit) const { if (unit == inDegrees) return adot*radtodeg;
- else cerr << "Bad units" << endl; return 0.0;}
+ else return BadUnits(); }
double Getbdot (int unit) const { if (unit == inDegrees) return bdot*radtodeg;
- else cerr << "Bad units" << endl; return 0.0;}
+ else return BadUnits(); }
double GetMagBeta (int unit) const { if (unit == inDegrees) return fabs(beta)*radtodeg;
- else cerr << "Bad units" << endl; return 0.0;}
+ else return BadUnits(); }
double Getqbar (void) const { return qbar; }
double GetqbarUW (void) const { return qbarUW; }
void CalculateRelativePosition(void);
void bind(void);
+ double BadUnits(void) const;
void Debug(int from);
};
#include "FGBuoyantForces.h"
#include "FGMassBalance.h"
-#include <input_output/FGPropertyManager.h> // Need?
+#include "input_output/FGPropertyManager.h" // Need?
+#include <iostream>
+
+using namespace std;
namespace JSBSim {
if (FDMExec->Holding()) return false; // if paused don't execute
if (NoneDefined) return true;
+ RunPreFunctions();
+
vTotalForces.InitMatrix();
vTotalMoments.InitMatrix();
vTotalMoments += Cells[i]->GetMoments();
}
+ RunPostFunctions();
+
return false;
}
gas_cell_element = document->FindNextElement("gas_cell");
}
+ FGModel::PostLoad(element);
+
return true;
}
#include "FGModel.h"
#include "FGGasCell.h"
-#include <math/FGColumnVector3.h>
-#include <input_output/FGXMLFileRead.h>
+#include "math/FGColumnVector3.h"
+#include "input_output/FGXMLFileRead.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
*/
#include "FGExternalForce.h"
+#include "input_output/FGXMLElement.h"
+#include <iostream>
+
+using namespace std;
namespace JSBSim {
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <FGFDMExec.h>
-#include <FGJSBBase.h>
-#include <models/propulsion/FGForce.h>
+#include "FGFDMExec.h"
+#include "FGJSBBase.h"
+#include "models/propulsion/FGForce.h"
#include <string>
-#include <input_output/FGPropertyManager.h>
-#include <math/FGColumnVector3.h>
-#include <math/FGFunction.h>
+#include "input_output/FGPropertyManager.h"
+#include "math/FGColumnVector3.h"
+#include "math/FGFunction.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGExternalReactions.h"
+#include "input_output/FGXMLElement.h"
+#include <iostream>
#include <string>
+using namespace std;
+
namespace JSBSim {
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
force_element = el->FindNextElement("force");
}
+ FGModel::PostLoad(el);
+
return true;
}
if (FDMExec->Holding()) return false; // if paused don't execute
if (NoneDefined) return true;
+ RunPreFunctions();
+
vTotalForces.InitMatrix();
vTotalMoments.InitMatrix();
vTotalMoments += Forces[i]->GetMoments();
}
+ RunPostFunctions();
+
return false;
}
#include "FGModel.h"
#include "FGExternalForce.h"
-#include <input_output/FGXMLElement.h>
+#include <vector>
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
namespace JSBSim {
+class Element;
+
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DOCUMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
private:
- vector <FGExternalForce*> Forces;
+ std::vector <FGExternalForce*> Forces;
unsigned int numForces;
FGColumnVector3 vTotalForces;
FGColumnVector3 vTotalMoments;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGFCS.h"
-#include <FGFDMExec.h>
-#include <input_output/FGPropertyManager.h>
+#include "FGFDMExec.h"
+#include "FGGroundReactions.h"
+#include "input_output/FGPropertyManager.h"
#include <fstream>
#include <sstream>
#include <iomanip>
-#include <models/flight_control/FGFilter.h>
-#include <models/flight_control/FGDeadBand.h>
-#include <models/flight_control/FGGain.h>
-#include <models/flight_control/FGPID.h>
-#include <models/flight_control/FGSwitch.h>
-#include <models/flight_control/FGSummer.h>
-#include <models/flight_control/FGKinemat.h>
-#include <models/flight_control/FGFCSFunction.h>
-#include <models/flight_control/FGSensor.h>
-#include <models/flight_control/FGActuator.h>
-#include <models/flight_control/FGAccelerometer.h>
-#include <models/flight_control/FGGyro.h>
+#include "models/flight_control/FGFilter.h"
+#include "models/flight_control/FGDeadBand.h"
+#include "models/flight_control/FGGain.h"
+#include "models/flight_control/FGPID.h"
+#include "models/flight_control/FGSwitch.h"
+#include "models/flight_control/FGSummer.h"
+#include "models/flight_control/FGKinemat.h"
+#include "models/flight_control/FGFCSFunction.h"
+#include "models/flight_control/FGSensor.h"
+#include "models/flight_control/FGActuator.h"
+#include "models/flight_control/FGAccelerometer.h"
+#include "models/flight_control/FGMagnetometer.h"
+#include "models/flight_control/FGGyro.h"
+
+using namespace std;
namespace JSBSim {
if (FGModel::Run()) return true; // fast exit if nothing to do
if (FDMExec->Holding()) return false;
+ RunPreFunctions();
+
for (i=0; i<ThrottlePos.size(); i++) ThrottlePos[i] = ThrottleCmd[i];
for (i=0; i<MixturePos.size(); i++) MixturePos[i] = MixtureCmd[i];
for (i=0; i<PropAdvance.size(); i++) PropAdvance[i] = PropAdvanceCmd[i];
// Execute Flight Control System
for (i=0; i<FCSComponents.size(); i++) FCSComponents[i]->Run();
+ RunPostFunctions();
+
return false;
}
Components->push_back(new FGSensor(this, component_element));
} else if (component_element->GetName() == string("accelerometer")) {
Components->push_back(new FGAccelerometer(this, component_element));
+ } else if (component_element->GetName() == string("magnetometer")) {
+ Components->push_back(new FGMagnetometer(this, component_element));
} else if (component_element->GetName() == string("gyro")) {
Components->push_back(new FGGyro(this, component_element));
} else {
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string FGFCS::FindSystemFullPathname(string system_filename)
+string FGFCS::FindSystemFullPathname(const string& system_filename)
{
string fullpath, localpath;
string systemPath = FDMExec->GetSystemsPath();
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-ifstream* FGFCS::FindSystemFile(string system_filename)
+ifstream* FGFCS::FindSystemFile(const string& system_filename)
{
string fullpath, localpath;
string systemPath = FDMExec->GetSystemsPath();
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string FGFCS::GetComponentStrings(string delimeter)
+string FGFCS::GetComponentStrings(const string& delimiter)
{
unsigned int comp;
string CompStrings = "";
for (unsigned int i=0; i<Systems.size(); i++) {
if (firstime) firstime = false;
- else CompStrings += delimeter;
+ else CompStrings += delimiter;
CompStrings += Systems[i]->GetName();
total_count++;
for (comp = 0; comp < APComponents.size(); comp++)
{
if (firstime) firstime = false;
- else CompStrings += delimeter;
+ else CompStrings += delimiter;
CompStrings += APComponents[comp]->GetName();
total_count++;
for (comp = 0; comp < FCSComponents.size(); comp++) {
if (firstime) firstime = false;
- else CompStrings += delimeter;
+ else CompStrings += delimiter;
CompStrings += FCSComponents[comp]->GetName();
total_count++;
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string FGFCS::GetComponentValues(string delimeter)
+string FGFCS::GetComponentValues(const string& delimiter)
{
std::ostringstream buf;
for (unsigned int i=0; i<Systems.size(); i++) {
if (firstime) firstime = false;
- else buf << delimeter;
+ else buf << delimiter;
buf << setprecision(9) << Systems[i]->GetOutput();
total_count++;
for (comp = 0; comp < APComponents.size(); comp++) {
if (firstime) firstime = false;
- else buf << delimeter;
+ else buf << delimiter;
buf << setprecision(9) << APComponents[comp]->GetOutput();
total_count++;
for (comp = 0; comp < FCSComponents.size(); comp++) {
if (firstime) firstime = false;
- else buf << delimeter;
+ else buf << delimiter;
buf << setprecision(9) << FCSComponents[comp]->GetOutput();
total_count++;
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+#include <iosfwd>
#include <vector>
#include <string>
-#include <models/flight_control/FGFCSComponent.h>
-#include <models/FGModel.h>
-#include <models/FGLGear.h>
-#include <input_output/FGXMLFileRead.h>
+#include "models/flight_control/FGFCSComponent.h"
+#include "models/FGModel.h"
+#include "models/FGLGear.h"
+#include "input_output/FGXMLFileRead.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
FGState* GetState(void) { return State; }
/** Retrieves all component names for inclusion in output stream
- @param delimeter either a tab or comma string depending on output type
+ @param delimiter either a tab or comma string depending on output type
@return a string containing the descriptive names for all components */
- string GetComponentStrings(string delimeter);
+ std::string GetComponentStrings(const std::string& delimiter);
/** Retrieves all component outputs for inclusion in output stream
- @param delimeter either a tab or comma string depending on output type
+ @param delimiter either a tab or comma string depending on output type
@return a string containing the numeric values for the current set of
component outputs */
- string GetComponentValues(string delimeter);
+ std::string GetComponentValues(const std::string& delimiter);
/// @name Pilot input command setting
//@{
@return true if succesful */
bool Load(Element* el, SystemType systype);
- ifstream* FindSystemFile(string system_filename);
- string FindSystemFullPathname(string system_filename);
+ std::ifstream* FindSystemFile(const std::string& system_filename);
+ std::string FindSystemFullPathname(const std::string& system_filename);
void AddThrottle(void);
void AddGear(void);
double DePos[NForms], DaLPos[NForms], DaRPos[NForms], DrPos[NForms];
double DfPos[NForms], DsbPos[NForms], DspPos[NForms];
double PTrimCmd, YTrimCmd, RTrimCmd;
- vector <double> ThrottleCmd;
- vector <double> ThrottlePos;
- vector <double> MixtureCmd;
- vector <double> MixturePos;
- vector <double> PropAdvanceCmd;
- vector <double> PropAdvance;
- vector <bool> PropFeatherCmd;
- vector <bool> PropFeather;
- vector <double> SteerPosDeg;
+ std::vector <double> ThrottleCmd;
+ std::vector <double> ThrottlePos;
+ std::vector <double> MixtureCmd;
+ std::vector <double> MixturePos;
+ std::vector <double> PropAdvanceCmd;
+ std::vector <double> PropAdvance;
+ std::vector <bool> PropFeatherCmd;
+ std::vector <bool> PropFeather;
+ std::vector <double> SteerPosDeg;
double LeftBrake, RightBrake, CenterBrake; // Brake settings
double GearCmd,GearPos;
double TailhookPos, WingFoldPos;
- typedef vector <FGFCSComponent*> FCSCompVec;
+ typedef std::vector <FGFCSComponent*> FCSCompVec;
FCSCompVec Systems;
FCSCompVec FCSComponents;
FCSCompVec APComponents;
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <FGFDMExec.h>
-#include <models/FGAuxiliary.h>
-#include <models/FGAtmosphere.h>
-#include <models/FGInertial.h>
-#include <models/FGMassBalance.h>
+#include "FGFDMExec.h"
+#include "models/FGAuxiliary.h"
+#include "models/FGAtmosphere.h"
+#include "models/FGInertial.h"
+#include "models/FGMassBalance.h"
#include "FGGasCell.h"
+#include "input_output/FGXMLElement.h"
+#include <iostream>
+#include <cstdlib>
using std::cerr;
using std::endl;
using std::cout;
+using std::string;
+using std::max;
namespace JSBSim {
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <FGJSBBase.h>
-#include <input_output/FGXMLElement.h>
-#include <math/FGColumnVector3.h>
-#include <models/propulsion/FGForce.h>
-#include <math/FGFunction.h>
+#include "FGJSBBase.h"
+#include "math/FGColumnVector3.h"
+#include "models/propulsion/FGForce.h"
+#include "math/FGFunction.h"
#include <string>
-using std::string;
-using std::cerr;
-using std::endl;
-using std::cout;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
namespace JSBSim {
class FGBallonet;
+class Element;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DOCUMENTATION
enum GasType {ttUNKNOWN, ttHYDROGEN, ttHELIUM, ttAIR};
GasType Type;
- string type;
+ std::string type;
int CellNum;
// Structural constants
double MaxVolume; // [ft�]
#include <iomanip>
#include "FGGroundReactions.h"
-#include <input_output/FGPropertyManager.h>
+#include "FGFCS.h"
+#include "input_output/FGPropertyManager.h"
+
+using namespace std;
namespace JSBSim {
if (FGModel::Run()) return true;
if (FDMExec->Holding()) return false;
+ RunPreFunctions();
+
vForces.InitMatrix();
vMoments.InitMatrix();
// Perhaps there is some commonality for things which only need to be
// calculated once.
for (unsigned int i=0; i<lGear.size(); i++) {
- vForces += lGear[i]->Force();
- vMoments += lGear[i]->Moment();
+ vForces += lGear[i]->GetBodyForces();
+ vMoments += lGear[i]->GetMoments();
}
+ RunPostFunctions();
+
return false;
}
for (unsigned int i=0; i<lGear.size();i++) lGear[i]->bind();
+ FGModel::PostLoad(el);
+
return true;
}
for (unsigned int i=0;i<lGear.size();i++) {
if (lGear[i]->IsBogey()) {
FGLGear *gear = lGear[i];
- buf << (gear->GetWOW() ? "1, " : "0, ")
+ buf << (gear->GetWOW() ? "1" : "0") << delimeter
<< setprecision(5) << gear->GetCompLen() << delimeter
<< setprecision(6) << gear->GetCompVel() << delimeter
<< setprecision(10) << gear->GetCompForce() << delimeter
#include "FGModel.h"
#include "FGLGear.h"
-#include <math/FGColumnVector3.h>
-#include <input_output/FGXMLElement.h>
+#include "math/FGColumnVector3.h"
+#include "input_output/FGXMLElement.h"
#define ID_GROUNDREACTIONS "$Id$"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGInertial.h"
-#include <FGFDMExec.h>
+#include "FGFDMExec.h"
#include "FGPropagate.h"
#include "FGState.h"
#include "FGMassBalance.h"
+#include <iostream>
+
+using namespace std;
namespace JSBSim {
if (FGModel::Run()) return true;
if (FDMExec->Holding()) return false;
+ RunPreFunctions();
+
// Gravitation accel
double r = Propagate->GetRadius();
gAccel = GetGAccel(r);
earthPosAngle += State->Getdt()*RotationRate;
+ RunPostFunctions();
+
return false;
}
#include <vector>
#include "FGModel.h"
-#include <math/FGColumnVector3.h>
+#include "math/FGColumnVector3.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
#include "FGState.h"
#include "FGFDMExec.h"
-#include <fstream>
+#include "input_output/FGfdmSocket.h"
+#include "input_output/FGXMLElement.h"
+
+#include <sstream>
#include <iomanip>
+#include <cstdlib>
+
+using namespace std;
namespace JSBSim {
bool FGInput::Run(void)
{
- string line, token, info_string;
- int start=0, string_start=0, string_end=0;
- int token_start=0, token_end=0;
- char buf[100];
+ string line, token;
+ size_t start=0, string_start=0, string_end=0;
double value=0;
FGPropertyManager* node=0;
// return false if no error
// This model DOES execute if "Exec->Holding"
+ RunPreFunctions();
+
data = socket->Receive(); // get socket transmission if present
if (data.size() > 0) {
socket->Reply("Must be in HOLD to search properties\n");
}
} else if (node > 0) {
- sprintf(buf, "%s = %12.6f\n", argument.c_str(), node->getDoubleValue());
- socket->Reply(buf);
+ ostringstream buf;
+ buf << argument << " = " << setw(12) << setprecision(6) << node->getDoubleValue() << endl;
+ socket->Reply(buf.str());
}
} else if (command == "hold") { // PAUSE
} else if (command == "info") { // INFO
// get info about the sim run and/or aircraft, etc.
- sprintf(buf, "%8.3f\0", State->Getsim_time());
- info_string = "JSBSim version: " + JSBSim_version + "\n";
- info_string += "Config File version: " + needed_cfg_version + "\n";
- info_string += "Aircraft simulated: " + Aircraft->GetAircraftName() + "\n";
- info_string += "Simulation time: " + string(buf) + "\n";
- socket->Reply(info_string);
+ ostringstream info;
+ info << "JSBSim version: " << JSBSim_version << endl;
+ info << "Config File version: " << needed_cfg_version << endl;
+ info << "Aircraft simulated: " << Aircraft->GetAircraftName() << endl;
+ info << "Simulation time: " << setw(8) << setprecision(3) << State->Getsim_time() << endl;
+ socket->Reply(info.str());
} else if (command == "help") { // HELP
}
}
+ RunPostFunctions();
+
return false;
}
#include "FGModel.h"
-#include <iostream>
-#include <fstream>
-
-#include <input_output/FGfdmSocket.h>
-#include <input_output/FGXMLElement.h>
+#include <string>
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
namespace JSBSim {
+class FGFDMExec;
+class Element;
+class FGfdmSocket;
+
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DOCUMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
bool InitModel(void);
bool Run(void);
- void SetType(string);
inline void Enable(void) { enabled = true; }
inline void Disable(void) { enabled = false; }
inline bool Toggle(void) {enabled = !enabled; return enabled;}
bool sFirstPass, dFirstPass, enabled;
unsigned int port;
FGfdmSocket* socket;
- string data;
+ std::string data;
void Debug(int from);
};
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGLGear.h"
+#include "FGState.h"
+#include "FGGroundReactions.h"
+#include "FGFCS.h"
+#include "FGAuxiliary.h"
+#include "FGAtmosphere.h"
+#include "FGMassBalance.h"
+#include "math/FGTable.h"
+#include <cstdlib>
+
+using namespace std;
namespace JSBSim {
static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_LGEAR;
+// Body To Structural (body frame is rotated 180 deg about Y and lengths are given in
+// ft instead of inches)
+const FGMatrix33 FGLGear::Tb2s(-1./inchtoft, 0., 0., 0., 1./inchtoft, 0., 0., 0., -1./inchtoft);
+
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS IMPLEMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
FGLGear::FGLGear(Element* el, FGFDMExec* fdmex, int number) :
+ FGForce(fdmex),
GearNumber(number),
- Exec(fdmex)
+ SteerAngle(0.0)
{
Element *force_table=0;
Element *dampCoeff=0;
} else if (sContactType == "STRUCTURE") {
eContactType = ctSTRUCTURE;
} else {
- eContactType = ctUNKNOWN;
+ // Unknown contact point types will be treated as STRUCTURE.
+ eContactType = ctSTRUCTURE;
}
if (el->FindElement("spring_coeff"))
while (force_table) {
force_type = force_table->GetAttributeValue("type");
if (force_type == "CORNERING_COEFF") {
- ForceY_Table = new FGTable(Exec->GetPropertyManager(), force_table);
+ ForceY_Table = new FGTable(fdmex->GetPropertyManager(), force_table);
} else {
cerr << "Undefined force table for " << name << " contact point" << endl;
}
else sSteerType = "STEERABLE";
Element* element = el->FindElement("location");
- if (element) vXYZ = element->FindElementTripletConvertTo("IN");
+ if (element) vXYZn = element->FindElementTripletConvertTo("IN");
else {cerr << "No location given for contact " << name << endl; exit(-1);}
+ SetTransformType(FGForce::tCustom);
+
+ element = el->FindElement("orientation");
+ if (element && (eContactType == ctBOGEY)) {
+ vGearOrient = element->FindElementTripletConvertTo("RAD");
+
+ double cp,sp,cr,sr,cy,sy;
+
+ cp=cos(vGearOrient(ePitch)); sp=sin(vGearOrient(ePitch));
+ cr=cos(vGearOrient(eRoll)); sr=sin(vGearOrient(eRoll));
+ cy=cos(vGearOrient(eYaw)); sy=sin(vGearOrient(eYaw));
+
+ mTGear(1,1) = cp*cy;
+ mTGear(2,1) = cp*sy;
+ mTGear(3,1) = -sp;
+
+ mTGear(1,2) = sr*sp*cy - cr*sy;
+ mTGear(2,2) = sr*sp*sy + cr*cy;
+ mTGear(3,2) = sr*cp;
+
+ mTGear(1,3) = cr*sp*cy + sr*sy;
+ mTGear(2,3) = cr*sp*sy - sr*cy;
+ mTGear(3,3) = cr*cp;
+ }
+ else {
+ mTGear(1,1) = 1.;
+ mTGear(2,2) = 1.;
+ mTGear(3,3) = 1.;
+ }
if (sBrakeGroup == "LEFT" ) eBrakeGrp = bgLeft;
else if (sBrakeGroup == "RIGHT" ) eBrakeGrp = bgRight;
}
}
- State = Exec->GetState();
+ State = fdmex->GetState();
+ Aircraft = fdmex->GetAircraft();
+ Propagate = fdmex->GetPropagate();
+ Auxiliary = fdmex->GetAuxiliary();
+ FCS = fdmex->GetFCS();
+ MassBalance = fdmex->GetMassBalance();
+
LongForceLagFilterCoeff = 1/State->Getdt(); // default longitudinal force filter coefficient
LatForceLagFilterCoeff = 1/State->Getdt(); // default lateral force filter coefficient
// Add some AI here to determine if gear is located properly according to its
// brake group type ??
- State = Exec->GetState();
- Aircraft = Exec->GetAircraft();
- Propagate = Exec->GetPropagate();
- Auxiliary = Exec->GetAuxiliary();
- FCS = Exec->GetFCS();
- MassBalance = Exec->GetMassBalance();
-
WOW = lastWOW = false;
ReportEnable = true;
FirstContact = false;
MaximumStrutForce = MaximumStrutTravel = 0.0;
SinkRate = GroundSpeed = 0.0;
- vWhlBodyVec = MassBalance->StructuralToBody(vXYZ);
-
+ vWhlBodyVec = MassBalance->StructuralToBody(vXYZn);
vLocalGear = Propagate->GetTb2l() * vWhlBodyVec;
-
- vLocalWhlVel.InitMatrix();
+ vWhlVelVec.InitMatrix();
compressLength = 0.0;
compressSpeed = 0.0;
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-FGColumnVector3& FGLGear::Force(void)
+FGColumnVector3& FGLGear::GetBodyForces(void)
{
- double t = Exec->GetState()->Getsim_time();
- dT = State->Getdt()*Exec->GetGroundReactions()->GetRate();
+ double t = fdmex->GetState()->Getsim_time();
+ dT = State->Getdt()*fdmex->GetGroundReactions()->GetRate();
- vForce.InitMatrix();
- vLocalForce.InitMatrix();
- vMoment.InitMatrix();
+ vFn.InitMatrix();
if (isRetractable) ComputeRetractionState();
if (GearDown) {
+ double verticalZProj = 0.;
- vWhlBodyVec = MassBalance->StructuralToBody(vXYZ); // Get wheel in body frame
+ vWhlBodyVec = MassBalance->StructuralToBody(vXYZn); // Get wheel in body frame
vLocalGear = Propagate->GetTb2l() * vWhlBodyVec; // Get local frame wheel location
gearLoc = Propagate->GetLocation().LocalToLocation(vLocalGear);
// Compute the height of the theoretical location of the wheel (if strut is not compressed) with
// respect to the ground level
- double height = Exec->GetGroundCallback()->GetAGLevel(t, gearLoc, contact, normal, cvel);
+ double height = fdmex->GetGroundCallback()->GetAGLevel(t, gearLoc, contact, normal, cvel);
vGroundNormal = -1. * Propagate->GetTec2b() * normal;
+ // The height returned above is the AGL and is expressed in the Z direction of the local
+ // coordinate frame. We now need to transform this height in actual compression of the strut (BOGEY)
+ // of in the normal direction to the ground (STRUCTURE)
switch (eContactType) {
case ctBOGEY:
- // Project the height in the local coordinate frame of the strut to compute the actual compression
- // length. The strut is assumed to be parallel to Z in the body frame.
- compressLength = vGroundNormal(eZ) < 0.0 ? height / vGroundNormal(eZ) : 0.0;
+ verticalZProj = (Propagate->GetTb2l()*mTGear*FGColumnVector3(0.,0.,1.))(eZ);
+ compressLength = verticalZProj > 0.0 ? -height / verticalZProj : 0.0;
break;
case ctSTRUCTURE:
- compressLength = -height;
+ verticalZProj = (Propagate->GetTec2l()*normal)(eZ);
+ compressLength = fabs(verticalZProj) > 0.0 ? -height / verticalZProj : 0.0;
break;
}
// [The next equation should really use the vector to the contact patch of
// the tire including the strut compression and not the original vWhlBodyVec.]
- FGColumnVector3 vWhlContactVec = vWhlBodyVec - FGColumnVector3(0., 0., compressLength);
- vWhlVelVec = Propagate->GetPQR() * vWhlContactVec;
- vWhlVelVec += Propagate->GetUVW() - Propagate->GetTec2b() * cvel;
+ FGColumnVector3 vWhlDisplVec = mTGear * FGColumnVector3(0., 0., compressLength);
+ FGColumnVector3 vWhlContactVec = vWhlBodyVec - vWhlDisplVec;
+ vActingXYZn = vXYZn - Tb2s * vWhlDisplVec;
+ FGColumnVector3 vBodyWhlVel = Propagate->GetPQR() * vWhlContactVec;
+ vBodyWhlVel += Propagate->GetUVW() - Propagate->GetTec2b() * cvel;
+
+ vWhlVelVec = mTGear.Transposed() * vBodyWhlVel;
InitializeReporting();
ComputeSteeringAngle();
ComputeGroundCoordSys();
- vLocalWhlVel = Tb2g * vWhlVelVec;
+ vLocalWhlVel = Transform().Transposed() * vBodyWhlVel;
- compressSpeed = -vLocalWhlVel(eZ);
- if (eContactType == ctBOGEY)
- // Project the compression speed in the local coordinate frame of the strut
- compressSpeed /= -vGroundNormal(eZ);
+ switch (eContactType) {
+ case ctBOGEY:
+ // Compression speed along the strut
+ compressSpeed = -vWhlVelVec(eZ);
+ case ctSTRUCTURE:
+ // Compression speed along the ground normal
+ compressSpeed = -vLocalWhlVel(eX);
+ }
ComputeVerticalStrutForce();
ComputeSlipAngle();
ComputeBrakeForceCoefficient();
ComputeSideForceCoefficient();
- double sign = vLocalWhlVel(eX)>0?1.0:(vLocalWhlVel(eX)<0?-1.0:0.0);
- vLocalForce(eX) = - ((1.0 - TirePressureNorm) * 30 + vLocalForce(eZ) * BrakeFCoeff) * sign;
- vLocalForce(eY) = vLocalForce(eZ) * FCoeff;
+ double sign = vLocalWhlVel(eY)>0?1.0:(vLocalWhlVel(eY)<0?-1.0:0.0);
+ vFn(eY) = - ((1.0 - TirePressureNorm) * 30 + vFn(eX) * BrakeFCoeff) * sign;
+ vFn(eZ) = vFn(eX) * FCoeff;
}
else if (eContactType == ctSTRUCTURE) {
FGColumnVector3 vSlipVec = vLocalWhlVel;
- vSlipVec(eZ) = 0.;
+ vSlipVec(eX) = 0.;
vSlipVec.Normalize();
- vLocalForce -= staticFCoeff * vLocalForce(eZ) * vSlipVec;
+ vFn -= staticFCoeff * vFn(eX) * vSlipVec;
}
// Lag and attenuate the XY-plane forces dependent on velocity. This code
// If a coefficient is set to something equal to or less than zero, the
// filter is bypassed.
- if (LongForceLagFilterCoeff > 0) vLocalForce(eX) = LongForceFilter.execute(vLocalForce(eX));
- if (LatForceLagFilterCoeff > 0) vLocalForce(eY) = LatForceFilter.execute(vLocalForce(eY));
+ if (LongForceLagFilterCoeff > 0) vFn(eY) = LongForceFilter.execute(vFn(eY));
+ if (LatForceLagFilterCoeff > 0) vFn(eZ) = LatForceFilter.execute(vFn(eZ));
- if ((fabs(vLocalWhlVel(eX)) <= RFRV) && RFRV > 0) vLocalForce(eX) *= fabs(vLocalWhlVel(eX))/RFRV;
- if ((fabs(vLocalWhlVel(eY)) <= SFRV) && SFRV > 0) vLocalForce(eY) *= fabs(vLocalWhlVel(eY))/SFRV;
+ if ((fabs(vLocalWhlVel(eY)) <= RFRV) && RFRV > 0) vFn(eY) *= fabs(vLocalWhlVel(eY))/RFRV;
+ if ((fabs(vLocalWhlVel(eZ)) <= SFRV) && SFRV > 0) vFn(eZ) *= fabs(vLocalWhlVel(eZ))/SFRV;
// End section for attenuating gear jitter
- // Transform the forces back to the body frame and compute the moment.
-
- vForce = Tg2b * vLocalForce;
- vMoment = vWhlContactVec * vForce;
-
} else { // Gear is NOT compressed
WOW = false;
compressLength = 0.0;
compressSpeed = 0.0;
+ WheelSlip = 0.0;
+ StrutForce = 0.0;
// Let wheel spin down slowly
- vLocalWhlVel(eX) -= 13.0*dT;
- if (vLocalWhlVel(eX) < 0.0) vLocalWhlVel(eX) = 0.0;
+ vWhlVelVec(eX) -= 13.0*dT;
+ if (vWhlVelVec(eX) < 0.0) vWhlVelVec(eX) = 0.0;
// Return to neutral position between 1.0 and 0.8 gear pos.
SteerAngle *= max(GetGearUnitPos()-0.8, 0.0)/0.2;
lastWOW = WOW;
- return vForce;
+ return FGForce::GetBodyForces();
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// Build a local "ground" coordinate system defined by
-// eX : projection of the rolling direction on the ground
-// eY : projection of the sliping direction on the ground
-// eZ : normal to the ground
+// eX : normal to the ground
+// eY : projection of the rolling direction on the ground
+// eZ : projection of the sliping direction on the ground
void FGLGear::ComputeGroundCoordSys(void)
{
- FGColumnVector3 vRollingGroundVec;
+ // Euler angles are built up to create a local frame to describe the forces
+ // applied to the gear by the ground. Here pitch, yaw and roll do not have
+ // any physical meaning. It is just a convenient notation.
+ // First, "pitch" and "yaw" are determined in order to align eX with the
+ // ground normal.
+ if (vGroundNormal(eZ) < -1.0)
+ vOrient(ePitch) = 0.5*M_PI;
+ else if (1.0 < vGroundNormal(eZ))
+ vOrient(ePitch) = -0.5*M_PI;
+ else
+ vOrient(ePitch) = asin(-vGroundNormal(eZ));
+
+ if (fabs(vOrient(ePitch)) == 0.5*M_PI)
+ vOrient(eYaw) = 0.;
+ else
+ vOrient(eYaw) = atan2(vGroundNormal(eY), vGroundNormal(eX));
+
+ vOrient(eRoll) = 0.;
+ UpdateCustomTransformMatrix();
if (eContactType == ctBOGEY) {
- // Compute the rolling direction projected on the ground
- // It consists in finding a vector 'r' such that 'r' lies in the plane (w,z) and r.n = 0 (scalar
- // product) where:
- // 'n' is the normal to the ground,
- // (x,y,z) are the directions defined in the body coord system
- // and 'w' is 'x' rotated by the steering angle (SteerAngle) in the plane (x,y).
- // r = u * w + v * z and r.n = 0 => v/u = -w.n/z.n = a
- // We also want u**2+v**2=1 and u > 0 (i.e. r orientated in the same 'direction' than w)
- // after some arithmetic, one finds that :
- double a = -(vGroundNormal(eX)*cos(SteerAngle)+vGroundNormal(eY)*sin(SteerAngle)) / vGroundNormal(eZ);
- double u = 1. / sqrt(1. + a*a);
- double v = a * u;
- vRollingGroundVec = FGColumnVector3(u * cos(SteerAngle), u * sin(SteerAngle), v);
- }
- else {
- // Here the only significant direction is the normal to the ground "vGroundNormal". Since there is
- // no wheel the 2 other vectors of the orthonormal basis are not meaningful and are only used to
- // create the transformation matrix Tg2b. So we are building vRollingGroundVec as an arbitrary
- // vector normal to vGroundNormal
- if (fabs(vGroundNormal(eX)) > 0.)
- vRollingGroundVec = FGColumnVector3(-vGroundNormal(eZ)/vGroundNormal(eX), 0., 1.);
- else if (fabs(vGroundNormal(eY)) > 0.)
- vRollingGroundVec = FGColumnVector3(0., -vGroundNormal(eZ)/vGroundNormal(eY), 1.);
- else
- vRollingGroundVec = FGColumnVector3(1., 0., -vGroundNormal(eX)/vGroundNormal(eZ));
+ // In the case of a bogey, the third angle "roll" is used to align the axis eY and eZ
+ // to the rolling and sliping direction respectively.
+ FGColumnVector3 updatedRollingAxis = Transform().Transposed() * mTGear
+ * FGColumnVector3(-sin(SteerAngle), cos(SteerAngle), 0.);
- vRollingGroundVec.Normalize();
+ vOrient(eRoll) = atan2(updatedRollingAxis(eY), -updatedRollingAxis(eZ));
+ UpdateCustomTransformMatrix();
}
-
- // The sliping direction is the cross product multiplication of the ground normal and rolling
- // directions
- FGColumnVector3 vSlipGroundVec = vGroundNormal * vRollingGroundVec;
-
- Tg2b(1,1) = vRollingGroundVec(eX);
- Tg2b(2,1) = vRollingGroundVec(eY);
- Tg2b(3,1) = vRollingGroundVec(eZ);
- Tg2b(1,2) = vSlipGroundVec(eX);
- Tg2b(2,2) = vSlipGroundVec(eY);
- Tg2b(3,2) = vSlipGroundVec(eZ);
- Tg2b(1,3) = vGroundNormal(eX);
- Tg2b(2,3) = vGroundNormal(eY);
- Tg2b(3,3) = vGroundNormal(eZ);
-
- Tb2g = Tg2b.Transposed();
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GearUp = true;
WOW = false;
GearDown = false;
- vLocalWhlVel.InitMatrix();
+ vWhlVelVec.InitMatrix();
} else if (gearPos > 0.99) {
GearDown = true;
GearUp = false;
void FGLGear::ComputeSlipAngle(void)
{
// Calculate tire slip angle.
- WheelSlip = -atan2(vLocalWhlVel(eY), fabs(vLocalWhlVel(eX)))*radtodeg;
+ WheelSlip = -atan2(vLocalWhlVel(eZ), fabs(vLocalWhlVel(eY)))*radtodeg;
// Filter the wheel slip angle
if (WheelSlipLagFilterCoeff > 0) WheelSlip = WheelSlipFilter.execute(WheelSlip);
SteerAngle = 0.0;
break;
case stCaster:
- SteerAngle = atan2(fabs(vWhlVelVec(eX)), vWhlVelVec(eY));
+ SteerAngle = atan2(vWhlVelVec(eY), fabs(vWhlVelVec(eX)));
break;
default:
cerr << "Improper steering type membership detected for this gear." << endl;
void FGLGear::ReportTakeoffOrLanding(void)
{
- double deltaT = State->Getdt()*Exec->GetGroundReactions()->GetRate();
+ double deltaT = State->Getdt()*fdmex->GetGroundReactions()->GetRate();
if (FirstContact)
LandingDistanceTraveled += Auxiliary->GetVground()*deltaT;
if ( ReportEnable
&& Auxiliary->GetVground() <= 0.05
&& !LandingReported
- && Exec->GetGroundReactions()->GetWOW())
+ && fdmex->GetGroundReactions()->GetWOW())
{
if (debug_lvl > 0) Report(erLand);
}
if ( ReportEnable
&& !TakeoffReported
&& (Propagate->GetDistanceAGL() - vLocalGear(eZ)) > 50.0
- && !Exec->GetGroundReactions()->GetWOW())
+ && !fdmex->GetGroundReactions()->GetWOW())
{
if (debug_lvl > 0) Report(erTakeoff);
}
void FGLGear::CrashDetect(void)
{
if ( (compressLength > 500.0 ||
- vForce.Magnitude() > 100000000.0 ||
- vMoment.Magnitude() > 5000000000.0 ||
+ vFn.Magnitude() > 100000000.0 ||
+ GetMoments().Magnitude() > 5000000000.0 ||
SinkRate > 1.4666*30 ) && !State->IntegrationSuspended())
{
PutMessage("Crash Detected: Simulation FREEZE.");
switch (eContactType) {
case ctBOGEY:
// Project back the strut force in the local coordinate frame of the ground
- vLocalForce(eZ) = StrutForce / vGroundNormal(eZ);
+ vFn(eX) = StrutForce / (mTGear.Transposed()*vGroundNormal)(eZ);
break;
case ctSTRUCTURE:
- vLocalForce(eZ) = -StrutForce;
+ vFn(eX) = -StrutForce;
break;
}
base_property_name = CreateIndexedPropertyName("gear/unit", GearNumber);
if (eContactType == ctBOGEY) {
property_name = base_property_name + "/slip-angle-deg";
- Exec->GetPropertyManager()->Tie( property_name.c_str(), &WheelSlip );
+ fdmex->GetPropertyManager()->Tie( property_name.c_str(), &WheelSlip );
property_name = base_property_name + "/WOW";
- Exec->GetPropertyManager()->Tie( property_name.c_str(), &WOW );
+ fdmex->GetPropertyManager()->Tie( property_name.c_str(), &WOW );
property_name = base_property_name + "/wheel-speed-fps";
- Exec->GetPropertyManager()->Tie( property_name.c_str(), (FGLGear*)this,
+ fdmex->GetPropertyManager()->Tie( property_name.c_str(), (FGLGear*)this,
&FGLGear::GetWheelRollVel);
property_name = base_property_name + "/z-position";
- Exec->GetPropertyManager()->Tie( property_name.c_str(), (FGLGear*)this,
- &FGLGear::GetZPosition, &FGLGear::SetZPosition);
+ fdmex->GetPropertyManager()->Tie( property_name.c_str(), (FGForce*)this,
+ &FGForce::GetLocationZ, &FGForce::SetLocationZ);
property_name = base_property_name + "/compression-ft";
- Exec->GetPropertyManager()->Tie( property_name.c_str(), &compressLength );
+ fdmex->GetPropertyManager()->Tie( property_name.c_str(), &compressLength );
property_name = base_property_name + "/side_friction_coeff";
- Exec->GetPropertyManager()->Tie( property_name.c_str(), &FCoeff );
+ fdmex->GetPropertyManager()->Tie( property_name.c_str(), &FCoeff );
property_name = base_property_name + "/static_friction_coeff";
- Exec->GetPropertyManager()->Tie( property_name.c_str(), &staticFCoeff );
+ fdmex->GetPropertyManager()->Tie( property_name.c_str(), &staticFCoeff );
+ if (eSteerType == stCaster) {
+ property_name = base_property_name + "/steering-angle-rad";
+ fdmex->GetPropertyManager()->Tie( property_name.c_str(), &SteerAngle );
+ }
}
if( isRetractable ) {
property_name = base_property_name + "/pos-norm";
- Exec->GetPropertyManager()->Tie( property_name.c_str(), &GearPos );
+ fdmex->GetPropertyManager()->Tie( property_name.c_str(), &GearPos );
}
-
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
switch(repType) {
case erLand:
cout << endl << "Touchdown report for " << name << " (WOW at time: "
- << Exec->GetState()->Getsim_time() << " seconds)" << endl;
+ << fdmex->GetState()->Getsim_time() << " seconds)" << endl;
cout << " Sink rate at contact: " << SinkRate << " fps, "
<< SinkRate*0.3048 << " mps" << endl;
cout << " Contact ground speed: " << GroundSpeed*.5925 << " knots, "
break;
case erTakeoff:
cout << endl << "Takeoff report for " << name << " (Liftoff at time: "
- << Exec->GetState()->Getsim_time() << " seconds)" << endl;
+ << fdmex->GetState()->Getsim_time() << " seconds)" << endl;
cout << " Distance traveled: " << TakeoffDistanceTraveled
<< " ft, " << TakeoffDistanceTraveled*0.3048 << " meters" << endl;
cout << " Distance traveled (over 50'): " << TakeoffDistanceTraveled50ft
<< " ft, " << TakeoffDistanceTraveled50ft*0.3048 << " meters" << endl;
- cout << " [Altitude (ASL): " << Exec->GetPropagate()->GetAltitudeASL() << " ft. / "
- << Exec->GetPropagate()->GetAltitudeASLmeters() << " m | Temperature: "
- << Exec->GetAtmosphere()->GetTemperature() - 459.67 << " F / "
- << RankineToCelsius(Exec->GetAtmosphere()->GetTemperature()) << " C]" << endl;
- cout << " [Velocity (KCAS): " << Exec->GetAuxiliary()->GetVcalibratedKTS() << "]" << endl;
+ cout << " [Altitude (ASL): " << fdmex->GetPropagate()->GetAltitudeASL() << " ft. / "
+ << fdmex->GetPropagate()->GetAltitudeASLmeters() << " m | Temperature: "
+ << fdmex->GetAtmosphere()->GetTemperature() - 459.67 << " F / "
+ << RankineToCelsius(fdmex->GetAtmosphere()->GetTemperature()) << " C]" << endl;
+ cout << " [Velocity (KCAS): " << fdmex->GetAuxiliary()->GetVcalibratedKTS() << "]" << endl;
TakeoffReported = true;
break;
+ case erNone:
+ break;
}
}
if (debug_lvl & 1) { // Standard console startup message output
if (from == 0) { // Constructor - loading and initialization
cout << " " << sContactType << " " << name << endl;
- cout << " Location: " << vXYZ << endl;
+ cout << " Location: " << vXYZn << endl;
cout << " Spring Constant: " << kSpring << endl;
if (eDampType == dtLinear)
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <FGJSBBase.h>
-#include <FGFDMExec.h>
-#include <input_output/FGXMLElement.h>
-#include <math/FGColumnVector3.h>
-#include <math/FGTable.h>
+#include "models/propulsion/FGForce.h"
+#include "math/FGColumnVector3.h"
#include <string>
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
class FGState;
class FGMassBalance;
class FGAuxiliary;
+class FGTable;
+class Element;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DOCUMENTATION
<y> {number} </y>
<z> {number} </z>
</location>
+ <orientation unit="{RAD | DEG}">
+ <pitch> {number} </pitch>
+ <roll> {number} </roll>
+ <yaw> {number} </yaw>
+ </orientation>
<static_friction> {number} </static_friction>
<dynamic_friction> {number} </dynamic_friction>
<rolling_friction> {number} </rolling_friction>
<spring_coeff unit="{LBS/FT | N/M}"> {number} </spring_coeff>
- <damping_coeff unit="{LBS/FT/SEC | N/M/SEC}"> {number} </damping_coeff>
- <damping_coeff_rebound unit="{LBS/FT/SEC | N/M/SEC}"> {number} </damping_coeff_rebound>
+ <damping_coeff [type="SQUARE"] unit="{LBS/FT/SEC | N/M/SEC}"> {number} </damping_coeff>
+ <damping_coeff_rebound [type="SQUARE"] unit="{LBS/FT/SEC | N/M/SEC}"> {number} </damping_coeff_rebound>
<max_steer unit="DEG"> {number | 0 | 360} </max_steer>
<brake_group> {NONE | LEFT | RIGHT | CENTER | NOSE | TAIL} </brake_group>
<retractable>{0 | 1}</retractable>
CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-class FGLGear : public FGJSBBase
+class FGLGear : public FGForce
{
public:
/// Brake grouping enumerators
/// Steering group membership enumerators
enum SteerType {stSteer, stFixed, stCaster};
/// Contact point type
- enum ContactType {ctBOGEY, ctSTRUCTURE, ctUNKNOWN};
+ enum ContactType {ctBOGEY, ctSTRUCTURE};
/// Report type enumerators
enum ReportType {erNone=0, erTakeoff, erLand};
/// Damping types
~FGLGear();
/// The Force vector for this gear
- FGColumnVector3& Force(void);
- /// The Moment vector for this gear
- FGColumnVector3& Moment(void) {return vMoment;}
+ FGColumnVector3& GetBodyForces(void);
/// Gets the location of the gear in Body axes
FGColumnVector3& GetBodyLocation(void) { return vWhlBodyVec; }
int GetBrakeGroup(void) const { return (int)eBrakeGrp; }
int GetSteerType(void) const { return (int)eSteerType; }
- double GetZPosition(void) const { return vXYZ(3); }
- void SetZPosition(double z) { vXYZ(3) = z; }
-
- bool GetSteerable(void) const { return eSteerType != stFixed; }
+ bool GetSteerable(void) const { return eSteerType != stFixed; }
bool GetRetractable(void) const { return isRetractable; }
bool GetGearUnitUp(void) const { return GearUp; }
bool GetGearUnitDown(void) const { return GearDown; }
- double GetWheelSideForce(void) const { return vLocalForce(eY); }
- double GetWheelRollForce(void) const { return vLocalForce(eX); }
- double GetWheelSideVel(void) const { return vWhlVelVec(eY); }
- double GetWheelRollVel(void) const { return vWhlVelVec(eX); }
- double GetBodyXForce(void) const { return vForce(eX); }
- double GetBodyYForce(void) const { return vForce(eY); }
+ double GetWheelRollForce(void) {
+ FGColumnVector3 vForce = mTGear.Transposed() * FGForce::GetBodyForces();
+ return vForce(eX)*cos(SteerAngle) + vForce(eY)*sin(SteerAngle); }
+ double GetWheelSideForce(void) {
+ FGColumnVector3 vForce = mTGear.Transposed() * FGForce::GetBodyForces();
+ return vForce(eY)*cos(SteerAngle) - vForce(eX)*sin(SteerAngle); }
+ double GetWheelRollVel(void) const { return vWhlVelVec(eX)*cos(SteerAngle)
+ + vWhlVelVec(eY)*sin(SteerAngle); }
+ double GetWheelSideVel(void) const { return vWhlVelVec(eY)*cos(SteerAngle)
+ - vWhlVelVec(eX)*sin(SteerAngle); }
double GetWheelSlipAngle(void) const { return WheelSlip; }
- double GetWheelVel(int axis) const { return vWhlVelVec(axis);}
- bool IsBogey(void) const { return (eContactType == ctBOGEY);}
+ double GetWheelVel(int axis) const { return vWhlVelVec(axis);}
+ bool IsBogey(void) const { return (eContactType == ctBOGEY);}
double GetGearUnitPos(void);
void bind(void);
private:
int GearNumber;
- FGMatrix33 Tg2b, Tb2g;
- FGColumnVector3 vXYZ;
- FGColumnVector3 vMoment;
+ static const FGMatrix33 Tb2s;
+ FGMatrix33 mTGear;
+ FGColumnVector3 vGearOrient;
FGColumnVector3 vWhlBodyVec;
FGColumnVector3 vLocalGear;
- FGColumnVector3 vForce;
- FGColumnVector3 vLocalForce;
FGColumnVector3 vWhlVelVec, vLocalWhlVel; // Velocity of this wheel
FGColumnVector3 normal, cvel, vGroundNormal;
FGLocation contact, gearLoc;
bool isRetractable;
bool GearUp, GearDown;
bool Servicable;
- string name;
- string sSteerType;
- string sBrakeGroup;
- string sRetractable;
- string sContactType;
+ std::string name;
+ std::string sSteerType;
+ std::string sBrakeGroup;
+ std::string sRetractable;
+ std::string sContactType;
BrakeGroup eBrakeGrp;
ContactType eContactType;
Filter LatForceFilter;
Filter WheelSlipFilter;
- FGFDMExec* Exec;
FGState* State;
FGAircraft* Aircraft;
FGPropagate* Propagate;
void Debug(int from);
};
}
-#include "FGAircraft.h"
-#include "FGPropagate.h"
-#include "FGAuxiliary.h"
-#include "FGFCS.h"
-#include "FGMassBalance.h"
-#include "FGState.h"
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#include "FGMassBalance.h"
#include "FGPropulsion.h"
#include "FGBuoyantForces.h"
-#include <input_output/FGPropertyManager.h>
+#include "input_output/FGPropertyManager.h"
+#include <iostream>
+#include <cstdlib>
+
+using namespace std;
namespace JSBSim {
Mass = lbtoslug*Weight;
+ FGModel::PostLoad(el);
+
Debug(2);
return true;
}
if (FGModel::Run()) return true;
if (FDMExec->Holding()) return false;
+ RunPreFunctions();
+
double ChildFDMWeight = 0.0;
for (int fdm=0; fdm<FDMExec->GetFDMCount(); fdm++) {
if (FDMExec->GetChildFDM(fdm)->mated) ChildFDMWeight += FDMExec->GetChildFDM(fdm)->exec->GetMassBalance()->GetWeight();
k2, k4, k5,
k3, k5, k6 );
+ RunPostFunctions();
+
Debug(0);
return false;
(PMF)&FGMassBalance::GetXYZcg);
}
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+void FGMassBalance::PointMass::bind(FGPropertyManager* PropertyManager, int num) {
+ string tmp = CreateIndexedPropertyName("inertia/pointmass-weight-lbs", num);
+ PropertyManager->Tie( tmp.c_str(), this, &PointMass::GetPointMassWeight,
+ &PointMass::SetPointMassWeight);
+
+ tmp = CreateIndexedPropertyName("inertia/pointmass-location-X-inches", num);
+ PropertyManager->Tie( tmp.c_str(), this, eX, &PointMass::GetPointMassLocation,
+ &PointMass::SetPointMassLocation);
+ tmp = CreateIndexedPropertyName("inertia/pointmass-location-Y-inches", num);
+ PropertyManager->Tie( tmp.c_str(), this, eY, &PointMass::GetPointMassLocation,
+ &PointMass::SetPointMassLocation);
+ tmp = CreateIndexedPropertyName("inertia/pointmass-location-Z-inches", num);
+ PropertyManager->Tie( tmp.c_str(), this, eZ, &PointMass::GetPointMassLocation,
+ &PointMass::SetPointMassLocation);
+}
+
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// The bitmasked value choices are as follows:
// unset: In this case (the default) JSBSim would only print
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGModel.h"
-#include <math/FGColumnVector3.h>
-#include <math/FGMatrix33.h>
-#include <input_output/FGXMLElement.h>
+#include "math/FGColumnVector3.h"
+#include "math/FGMatrix33.h"
+#include "input_output/FGXMLElement.h"
#include <vector>
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void SetPointMassWeight(double wt) {Weight = wt;}
double GetPointMassWeight(void) const {return Weight;}
- void bind(FGPropertyManager* PropertyManager, int num) {
- string tmp = CreateIndexedPropertyName("inertia/pointmass-weight-lbs", num);
- PropertyManager->Tie( tmp.c_str(), this, &PointMass::GetPointMassWeight,
- &PointMass::SetPointMassWeight);
-
- tmp = CreateIndexedPropertyName("inertia/pointmass-location-X-inches", num);
- PropertyManager->Tie( tmp.c_str(), this, eX, &PointMass::GetPointMassLocation,
- &PointMass::SetPointMassLocation);
- tmp = CreateIndexedPropertyName("inertia/pointmass-location-Y-inches", num);
- PropertyManager->Tie( tmp.c_str(), this, eY, &PointMass::GetPointMassLocation,
- &PointMass::SetPointMassLocation);
- tmp = CreateIndexedPropertyName("inertia/pointmass-location-Z-inches", num);
- PropertyManager->Tie( tmp.c_str(), this, eZ, &PointMass::GetPointMassLocation,
- &PointMass::SetPointMassLocation);
- }
+ void bind(FGPropertyManager* PropertyManager, int num);
};
- vector <struct PointMass*> PointMasses;
+ std::vector <struct PointMass*> PointMasses;
void bind(void);
void Debug(int from);
#include "FGAircraft.h"
#include "FGPropagate.h"
#include "FGAuxiliary.h"
+#include <iostream>
+
+using namespace std;
namespace JSBSim {
for (unsigned int i=0; i<interface_properties.size(); i++) delete interface_properties[i];
interface_properties.clear();
+ for (unsigned int i=0; i<PreFunctions.size(); i++) delete PreFunctions[i];
+ for (unsigned int i=0; i<PostFunctions.size(); i++) delete PostFunctions[i];
+
if (debug_lvl & 2) cout << "Destroyed: FGModel" << endl;
}
bool FGModel::Load(Element* el)
{
// Interface properties are all stored in the interface properties array.
-
string interface_property_string = "";
Element *property_element = el->FindElement("property");
- if (property_element && debug_lvl > 0) cout << endl << " Declared properties" << endl << endl;
+ if (property_element && debug_lvl > 0) cout << endl << " Declared properties"
+ << endl << endl;
while (property_element) {
interface_property_string = property_element->GetDataLine();
if (PropertyManager->HasNode(interface_property_string)) {
- cerr << " Property " << interface_property_string << " is already defined." << endl;
+ cerr << " Property " << interface_property_string
+ << " is already defined." << endl;
} else {
double value=0.0;
if ( ! property_element->GetAttributeValue("value").empty())
interface_properties.push_back(new double(value));
PropertyManager->Tie(interface_property_string, interface_properties.back());
if (debug_lvl > 0)
- cout << " " << interface_property_string << " (initial value: " << value << ")" << endl;
+ cout << " " << interface_property_string << " (initial value: "
+ << value << ")" << endl << endl;
}
property_element = el->FindNextElement("property");
}
+ // End of interface property loading logic
+
+ // Load model pre-functions, if any
+
+ Element *function = el->FindElement("function");
+ while (function) {
+ if (function->GetAttributeValue("type") == "pre") {
+ PreFunctions.push_back(new FGFunction(PropertyManager, function));
+ } else if (function->GetAttributeValue("type").empty()) { // Assume pre-function
+ string funcname = function->GetAttributeValue("name");
+ PreFunctions.push_back(new FGFunction(PropertyManager, function));
+ }
+ function = el->FindNextElement("function");
+ }
+
return true;
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+void FGModel::PostLoad(Element* el)
+{
+ // Load model post-functions, if any
+
+ Element *function = el->FindElement("function");
+ while (function) {
+ if (function->GetAttributeValue("type") == "post") {
+ PostFunctions.push_back(new FGFunction(PropertyManager, function));
+ }
+ function = el->FindNextElement("function");
+ }
+}
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+// Tell the Functions to cache values, so when the function values
+// are being used in the model, the functions do not get
+// calculated each time, but instead use the values that have already
+// been calculated for this frame.
+
+void FGModel::RunPreFunctions(void)
+{
+ vector <FGFunction*>::iterator it;
+ for (it = PreFunctions.begin(); it != PreFunctions.end(); it++)
+ (*it)->GetValue();
+}
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+// Tell the Functions to cache values, so when the function values
+// are being used in the model, the functions do not get
+// calculated each time, but instead use the values that have already
+// been calculated for this frame.
+
+void FGModel::RunPostFunctions(void)
+{
+ vector <FGFunction*>::iterator it;
+ for (it = PostFunctions.begin(); it != PostFunctions.end(); it++)
+ (*it)->GetValue();
+}
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
bool FGModel::Run()
{
if (debug_lvl & 4) cout << "Entering Run() for model " << Name << endl;
- if (exe_ctr++ >= rate) exe_ctr = 1;
+ if (rate == 1) return false; // Fast exit if nothing to do
+
+ if (exe_ctr >= rate) exe_ctr = 1;
- if (exe_ctr == 1) return false;
+ if (exe_ctr++ == 1) return false;
else return true;
}
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <FGJSBBase.h>
-#include <input_output/FGPropertyManager.h>
-#include <input_output/FGXMLElement.h>
+#include "FGJSBBase.h"
+#include "math/FGFunction.h"
-#include <iostream>
#include <string>
#include <vector>
#define ID_MODEL "$Id$"
-using namespace std;
-
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FORWARD DECLARATIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
class FGAircraft;
class FGPropagate;
class FGAuxiliary;
+class Element;
+class FGPropertyManager;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DOCUMENTATION
/// Destructor
~FGModel();
- /** Loads this model.
- @param el a pointer to the element
- @return true if model is successfully loaded*/
- virtual bool Load(Element* el);
-
FGModel* NextModel;
- string Name;
+ std::string Name;
/** Runs the model; called by the Executive
@see JSBSim.cpp documentation
int exe_ctr;
int rate;
+ void RunPreFunctions(void);
+ void RunPostFunctions(void);
+
+ /** Loads this model.
+ @param el a pointer to the element
+ @return true if model is successfully loaded*/
+ virtual bool Load(Element* el);
+
+ void PostLoad(Element* el);
+
virtual void Debug(int from);
FGFDMExec* FDMExec;
FGPropagate* Propagate;
FGAuxiliary* Auxiliary;
FGPropertyManager* PropertyManager;
+ std::vector <FGFunction*> PreFunctions;
+ std::vector <FGFunction*> PostFunctions;
- vector <double*> interface_properties;
+ std::vector <double*> interface_properties;
};
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#include "FGPropagate.h"
#include "FGAuxiliary.h"
#include "FGInertial.h"
-#include "FGPropulsion.h" //access to FGEngine, FGTank
+#include "models/propulsion/FGEngine.h"
+#include "models/propulsion/FGTank.h"
#include "models/propulsion/FGPiston.h"
-#include <fstream>
+#include <sstream>
#include <iomanip>
#include <cstring>
+#include <cstdlib>
#include "input_output/net_fdm.hxx"
+#include "input_output/FGfdmSocket.h"
#if defined(WIN32) && !defined(__CYGWIN__)
# include <windows.h>
static const int endianTest = 1;
#define isLittleEndian (*((char *) &endianTest ) != 0)
+using namespace std;
+
namespace JSBSim {
static const char *IdSrc = "$Id$";
bool FGOutput::InitModel(void)
{
- char fname[1000] = "";
-
if (!FGModel::InitModel()) return false;
if (Filename.size() > 0 && StartNewFile) {
- int idx = BaseFilename.find_last_of(".");
- int len = BaseFilename.length();
- string extension = "";
- if (idx != string::npos) {
- extension = BaseFilename.substr(idx, len-idx);
- len -= extension.length();
+ ostringstream buf;
+ string::size_type dot = BaseFilename.find_last_of('.');
+ if (dot != string::npos) {
+ buf << BaseFilename.substr(0, dot) << '_' << runID_postfix++ << BaseFilename.substr(dot);
+ } else {
+ buf << BaseFilename << '_' << runID_postfix++;
}
- sprintf(fname, "%s_%d%s", BaseFilename.substr(0,len).c_str(), runID_postfix++, extension.c_str());
- Filename = string(fname);
+ Filename = buf.str();
datafile.close();
StartNewFile = false;
dFirstPass = true;
if (FGModel::Run()) return true;
if (enabled && !State->IntegrationSuspended()&& !FDMExec->Holding()) {
+ RunPreFunctions();
if (Type == otSocket) {
SocketOutput();
} else if (Type == otFlightGear) {
} else {
// Not a valid type of output
}
+ RunPostFunctions();
}
return false;
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-void FGOutput::SetType(string type)
+void FGOutput::SetType(const string& type)
{
if (type == "CSV") {
Type = otCSV;
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-void FGOutput::DelimitedOutput(string fname)
+void FGOutput::DelimitedOutput(const string& fname)
{
streambuf* buffer;
string scratch = "";
}
if (SubSystems & ssForces) {
outstream << delimeter;
- outstream << Aerodynamics->GetvFw() << delimeter;
+ outstream << Aerodynamics->GetvFw().Dump(delimeter) << delimeter;
outstream << Aerodynamics->GetLoD() << delimeter;
- outstream << Aerodynamics->GetForces() << delimeter;
- outstream << Propulsion->GetForces() << delimeter;
- outstream << GroundReactions->GetForces() << delimeter;
- outstream << ExternalReactions->GetForces() << delimeter;
- outstream << BuoyantForces->GetForces() << delimeter;
+ outstream << Aerodynamics->GetForces().Dump(delimeter) << delimeter;
+ outstream << Propulsion->GetForces().Dump(delimeter) << delimeter;
+ outstream << GroundReactions->GetForces().Dump(delimeter) << delimeter;
+ outstream << ExternalReactions->GetForces().Dump(delimeter) << delimeter;
+ outstream << BuoyantForces->GetForces().Dump(delimeter) << delimeter;
outstream << Aircraft->GetForces().Dump(delimeter);
}
if (SubSystems & ssMoments) {
outstream << delimeter;
- outstream << Aerodynamics->GetMoments() << delimeter;
- outstream << Propulsion->GetMoments() << delimeter;
- outstream << GroundReactions->GetMoments() << delimeter;
- outstream << ExternalReactions->GetMoments() << delimeter;
- outstream << BuoyantForces->GetMoments() << delimeter;
+ outstream << Aerodynamics->GetMoments().Dump(delimeter) << delimeter;
+ outstream << Propulsion->GetMoments().Dump(delimeter) << delimeter;
+ outstream << GroundReactions->GetMoments().Dump(delimeter) << delimeter;
+ outstream << ExternalReactions->GetMoments().Dump(delimeter) << delimeter;
+ outstream << BuoyantForces->GetMoments().Dump(delimeter) << delimeter;
outstream << Aircraft->GetMoments().Dump(delimeter);
}
if (SubSystems & ssAtmosphere) {
}
if (SubSystems & ssMassProps) {
outstream << delimeter;
- outstream << MassBalance->GetJ() << delimeter;
+ outstream << MassBalance->GetJ().Dump(delimeter) << delimeter;
outstream << MassBalance->GetMass() << delimeter;
- outstream << MassBalance->GetXYZcg();
+ outstream << MassBalance->GetXYZcg().Dump(delimeter);
}
if (SubSystems & ssPropagate) {
outstream.precision(14);
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-void FGOutput::SocketStatusOutput(string out_str)
+void FGOutput::SocketStatusOutput(const string& out_str)
{
string asciiData;
cout << scratch << " in CSV format output at rate " << 1/(State->Getdt()*rate) << " Hz" << endl;
break;
case otNone:
+ default:
cout << " No log output" << endl;
break;
}
#include "FGModel.h"
-#include <iostream>
#include <fstream>
-#include "input_output/FGfdmSocket.h"
#include "input_output/FGXMLFileRead.h"
#include "input_output/net_fdm.hxx"
-
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
+class FGfdmSocket;
+
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DOCUMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
bool InitModel(void);
bool Run(void);
- void DelimitedOutput(string);
+ void DelimitedOutput(const std::string&);
void SocketOutput(void);
void FlightGearSocketOutput(void);
- void SocketStatusOutput(string);
+ void SocketStatusOutput(const std::string&);
void SocketDataFill(FGNetFDM* net);
- void SetType(string);
+ void SetType(const std::string& type);
void SetStartNewFile(bool tt) {StartNewFile = tt;}
void SetSubsystems(int tt) {SubSystems = tt;}
void Enable(void) { enabled = true; }
void Disable(void) { enabled = false; }
bool Toggle(void) {enabled = !enabled; return enabled;}
bool Load(Element* el);
- void SetOutputFileName(string fname) {Filename = fname;}
- void SetDirectivesFile(string fname) {DirectivesFile = fname;}
+ void SetOutputFileName(const std::string& fname) {Filename = fname;}
+ void SetDirectivesFile(const std::string& fname) {DirectivesFile = fname;}
void SetRate(int rt);
string GetOutputFileName(void) const {return Filename;}
int SubSystems;
int runID_postfix;
bool StartNewFile;
- string output_file_name, delimeter, BaseFilename, Filename, DirectivesFile;
- ofstream datafile;
+ std::string output_file_name, delimeter, BaseFilename, Filename, DirectivesFile;
+ std::ofstream datafile;
FGfdmSocket* socket;
FGfdmSocket* flightGearSocket;
- vector <FGPropertyManager*> OutputProperties;
+ std::vector <FGPropertyManager*> OutputProperties;
void Debug(int from);
};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include <cmath>
-#include <iomanip>
+#include <cstdlib>
+#include <iostream>
#include "FGPropagate.h"
-#include <FGFDMExec.h>
-#include <FGState.h>
+#include "FGFDMExec.h"
+#include "FGState.h"
#include "FGAircraft.h"
#include "FGMassBalance.h"
#include "FGInertial.h"
-#include <input_output/FGPropertyManager.h>
+#include "input_output/FGPropertyManager.h"
+
+using namespace std;
namespace JSBSim {
if (FGModel::Run()) return true; // Fast return if we have nothing to do ...
if (FDMExec->Holding()) return false;
+ RunPreFunctions();
+
RecomputeLocalTerrainRadius();
// Calculate current aircraft radius from center of planet
last2_vLocationDot = last_vLocationDot;
last_vLocationDot = vLocationDot;
+ RunPreFunctions();
+
Debug(2);
return false;
}
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <models/FGModel.h>
-#include <math/FGColumnVector3.h>
-#include <math/FGLocation.h>
-#include <math/FGQuaternion.h>
-#include <math/FGMatrix33.h>
+#include "models/FGModel.h"
+#include "math/FGColumnVector3.h"
+#include "math/FGLocation.h"
+#include "math/FGQuaternion.h"
+#include "math/FGMatrix33.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-#include <initialization/FGInitialCondition.h>
+#include "initialization/FGInitialCondition.h"
#endif
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGPropulsion.h"
-#include <models/propulsion/FGRocket.h>
-#include <models/propulsion/FGTurbine.h>
-#include <models/propulsion/FGPiston.h>
-#include <models/propulsion/FGElectric.h>
-#include <models/propulsion/FGTurboProp.h>
-#include <input_output/FGPropertyManager.h>
-#include <input_output/FGXMLParse.h>
-#include <math/FGColumnVector3.h>
+#include "FGState.h"
+#include "models/FGFCS.h"
+#include "models/FGMassBalance.h"
+#include "models/propulsion/FGThruster.h"
+#include "models/propulsion/FGRocket.h"
+#include "models/propulsion/FGTurbine.h"
+#include "models/propulsion/FGPiston.h"
+#include "models/propulsion/FGElectric.h"
+#include "models/propulsion/FGTurboProp.h"
+#include "models/propulsion/FGTank.h"
+#include "input_output/FGPropertyManager.h"
+#include "input_output/FGXMLParse.h"
+#include "math/FGColumnVector3.h"
+#include <iostream>
#include <sstream>
+#include <cstdlib>
+
+using namespace std;
namespace JSBSim {
if (FGModel::Run()) return true;
if (FDMExec->Holding()) return false;
+ RunPreFunctions();
+
double dt = State->Getdt();
vForces.InitMatrix();
if (refuel) DoRefuel( dt * rate );
if (dump) DumpFuel( dt * rate );
+ RunPostFunctions();
+
return false;
}
FGModel::Load(el); // Perform base class Load.
+ // Process tank definitions first to establish the number of fuel tanks
+
+ Element* tank_element = el->FindElement("tank");
+ while (tank_element) {
+ Tanks.push_back(new FGTank(FDMExec, tank_element, numTanks));
+ if (Tanks.back()->GetType() == FGTank::ttFUEL) numFuelTanks++;
+ else if (Tanks.back()->GetType() == FGTank::ttOXIDIZER) numOxiTanks++;
+ else {cerr << "Unknown tank type specified." << endl; return false;}
+ numTanks++;
+ tank_element = el->FindNextElement("tank");
+ }
+ numSelectedFuelTanks = numFuelTanks;
+ numSelectedOxiTanks = numOxiTanks;
+
Element* engine_element = el->FindElement("engine");
while (engine_element) {
engine_filename = engine_element->GetAttributeValue("file");
ResetParser();
}
- // Process tank definitions
-
- Element* tank_element = el->FindElement("tank");
- while (tank_element) {
- Tanks.push_back(new FGTank(FDMExec, tank_element, numTanks));
- if (Tanks.back()->GetType() == FGTank::ttFUEL) numFuelTanks++;
- else if (Tanks.back()->GetType() == FGTank::ttOXIDIZER) numOxiTanks++;
- else {cerr << "Unknown tank type specified." << endl; return false;}
- numTanks++;
- tank_element = el->FindNextElement("tank");
- }
- numSelectedFuelTanks = numFuelTanks;
- numSelectedOxiTanks = numOxiTanks;
-
CalculateTankInertias();
if (!ThrottleAdded) FCS->AddThrottle(); // need to have at least one throttle
if (el->FindElement("dump-rate"))
DumpRate = el->FindElementValueAsNumberConvertTo("dump-rate", "LBS/MIN");
+ FGModel::PostLoad(el);
return true;
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string FGPropulsion::FindEngineFullPathname(string engine_filename)
+string FGPropulsion::FindEngineFullPathname(const string& engine_filename)
{
string fullpath, localpath;
string enginePath = FDMExec->GetEnginePath();
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-ifstream* FGPropulsion::FindEngineFile(string engine_filename)
+ifstream* FGPropulsion::FindEngineFile(const string& engine_filename)
{
string fullpath, localpath;
string enginePath = FDMExec->GetEnginePath();
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string FGPropulsion::GetPropulsionStrings(string delimeter)
+string FGPropulsion::GetPropulsionStrings(const string& delimiter)
{
unsigned int i;
for (i=0; i<Engines.size(); i++) {
if (firstime) firstime = false;
- else PropulsionStrings += delimeter;
+ else PropulsionStrings += delimiter;
- PropulsionStrings += Engines[i]->GetEngineLabels(delimeter);
+ PropulsionStrings += Engines[i]->GetEngineLabels(delimiter);
}
for (i=0; i<Tanks.size(); i++) {
- if (Tanks[i]->GetType() == FGTank::ttFUEL) buf << delimeter << "Fuel Tank " << i;
- else if (Tanks[i]->GetType() == FGTank::ttOXIDIZER) buf << delimeter << "Oxidizer Tank " << i;
+ if (Tanks[i]->GetType() == FGTank::ttFUEL) buf << delimiter << "Fuel Tank " << i;
+ else if (Tanks[i]->GetType() == FGTank::ttOXIDIZER) buf << delimiter << "Oxidizer Tank " << i;
}
return PropulsionStrings;
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string FGPropulsion::GetPropulsionValues(string delimeter)
+string FGPropulsion::GetPropulsionValues(const string& delimiter)
{
unsigned int i;
for (i=0; i<Engines.size(); i++) {
if (firstime) firstime = false;
- else PropulsionValues += delimeter;
+ else PropulsionValues += delimiter;
- PropulsionValues += Engines[i]->GetEngineValues(delimeter);
+ PropulsionValues += Engines[i]->GetEngineValues(delimiter);
}
for (i=0; i<Tanks.size(); i++) {
- buf << delimeter;
+ buf << delimiter;
buf << Tanks[i]->GetContents();
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include <vector>
-#include <fstream>
+#include <iosfwd>
#include "FGModel.h"
-#include <models/propulsion/FGEngine.h>
-#include <models/propulsion/FGTank.h>
-#include <math/FGMatrix33.h>
-#include <input_output/FGXMLFileRead.h>
+#include "math/FGMatrix33.h"
+#include "input_output/FGXMLFileRead.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
namespace JSBSim {
+class FGTank;
+class FGEngine;
+
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DOCUMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
/** Sets up the engines as running */
void InitRunning(int n);
- string GetPropulsionStrings(string delimeter);
- string GetPropulsionValues(string delimeter);
+ std::string GetPropulsionStrings(const std::string& delimiter);
+ std::string GetPropulsionValues(const std::string& delimiter);
inline FGColumnVector3& GetForces(void) {return vForces; }
inline double GetForces(int n) const { return vForces(n);}
FGColumnVector3& GetTanksMoment(void);
double GetTanksWeight(void);
- ifstream* FindEngineFile(string filename);
- string FindEngineFullPathname(string engine_filename);
+ std::ifstream* FindEngineFile(const std::string& filename);
+ std::string FindEngineFullPathname(const std::string& engine_filename);
inline int GetActiveEngine(void) const {return ActiveEngine;}
inline bool GetFuelFreeze(void) {return fuel_freeze;}
double GetTotalFuelQuantity(void) const {return TotalFuelQuantity;}
FGMatrix33& CalculateTankInertias(void);
private:
- vector <FGEngine*> Engines;
- vector <FGTank*> Tanks;
+ std::vector <FGEngine*> Engines;
+ std::vector <FGTank*> Tanks;
unsigned int numSelectedFuelTanks;
unsigned int numSelectedOxiTanks;
unsigned int numFuelTanks;
#include "FGMSIS.h"
#include "FGState.h"
-#include <math.h> /* maths functions */
-#include <stdlib.h> /* for malloc/free */
-#include <stdio.h> /* for printf */
+#include <cmath> /* maths functions */
#include <iostream> // for cout, endl
+using namespace std;
+
namespace JSBSim {
static const char *IdSrc = "$Id$";
if (FGModel::Run()) return true;
if (FDMExec->Holding()) return false;
+ RunPreFunctions();
+
//do temp, pressure, and density first
if (!useExternal) {
// get sea-level values
CalculateDerived();
+ RunPostFunctions();
+
Debug(2);
return false;
double ylog;
a = zhm / (xmm-xm);
if (!((dm>0) && (dd>0))) {
- printf("dnet log error %e %e %e\n",dm,dd,xm);
+ cerr << "dnet log error " << dm << ' ' << dd << ' ' << xm << ' ' << endl;
if ((dd==0) && (dm==0))
dd=1;
if (dm==0)
}
h = xa[khi] - xa[klo];
if (h==0.0)
- printf("bad XA input to splint");
+ cerr << "bad XA input to splint" << endl;
a = (xa[khi] - x)/h;
b = (x - xa[klo])/h;
yi = a * ya[klo] + b * ya[khi] + ((a*a*a - a) * y2a[klo] + (b*b*b - b) * y2a[khi]) * h * h/6.0;
double *u;
double sig, p, qn, un;
int i, k;
- u=(double*)malloc(sizeof(double)*n);
+ u=new double[n];
if (u==NULL) {
- printf("Out Of Memory in spline - ERROR");
+ cerr << "Out Of Memory in spline - ERROR" << endl;
return;
}
if (yp1>0.99E30) {
for (k=n-2;k>=0;k--)
y2[k] = y2[k] * y2[k+1] + u[k];
- free(u);
+ delete u;
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if (p[99]==0)
p[99]=pset;
if (p[99]!=pset) {
- printf("Wrong parameter set for glob7s\n");
+ cerr << "Wrong parameter set for glob7s" << endl;
return -1;
}
for (j=0;j<14;j++)
if (sqrt(diff*diff)<test)
return;
if (l==ltest) {
- printf("ERROR: ghp7 not converging for press %e, diff %e",press,diff);
+ cerr << "ERROR: ghp7 not converging for press " << press << ", diff " << diff << endl;
return;
}
xm = output->d[5] / xn / 1.66E-24;
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <models/FGAtmosphere.h>
+#include "models/FGAtmosphere.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
#include "FGMars.h"
#include "FGState.h"
+#include <iostream>
+
+using namespace std;
namespace JSBSim {
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <models/FGAtmosphere.h>
+#include "models/FGAtmosphere.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGAccelerometer.h"
+#include <iostream>
+#include <cstdlib>
+
+using namespace std;
namespace JSBSim {
CLASS IMPLEMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-FGAccelerometer::FGAccelerometer(FGFCS* fcs, Element* element) : FGSensor(fcs, element)
+FGAccelerometer::FGAccelerometer(FGFCS* fcs, Element* element)
+ : FGSensor(fcs, element),
+ FGSensorOrientation(element)
{
Propagate = fcs->GetExec()->GetPropagate();
MassBalance = fcs->GetExec()->GetMassBalance();
vRadius = MassBalance->StructuralToBody(vLocation);
- Element* orient_element = element->FindElement("orientation");
- if (orient_element) vOrient = orient_element->FindElementTripletConvertTo("RAD");
- else {cerr << "No orientation given for accelerometer. " << endl;}
-
- Element* axis_element = element->FindElement("axis");
- if (axis_element) {
- string sAxis = element->FindElementValue("axis");
- if (sAxis == "X" || sAxis == "x") {
- axis = 1;
- } else if (sAxis == "Y" || sAxis == "y") {
- axis = 2;
- } else if (sAxis == "Z" || sAxis == "z") {
- axis = 3;
- } else {
- cerr << " Incorrect/no axis specified for accelerometer; assuming X axis" << endl;
- axis = 1;
- }
- }
-
- CalculateTransformMatrix();
-
Debug(0);
}
bool FGAccelerometer::Run(void )
{
// There is no input assumed. This is a dedicated acceleration sensor.
-
+
vRadius = MassBalance->StructuralToBody(vLocation);
//gravitational forces
Input = vAccel(axis);
- Output = Input; // perfect accelerometer
-
- // Degrade signal as specified
-
- if (fail_stuck) {
- Output = PreviousOutput;
- return true;
- }
-
- if (lag != 0.0) Lag(); // models accelerometer lag
- if (noise_variance != 0.0) Noise(); // models noise
- if (drift_rate != 0.0) Drift(); // models drift over time
- if (bias != 0.0) Bias(); // models a finite bias
- if (gain != 0.0) Gain(); // models a gain
-
- if (fail_low) Output = -HUGE_VAL;
- if (fail_high) Output = HUGE_VAL;
+ ProcessSensorSignal();
- if (bits != 0) Quantize(); // models quantization degradation
-// if (delay != 0.0) Delay(); // models system signal transport latencies
-
- Clip(); // Is it right to clip an accelerometer?
return true;
}
-//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-void FGAccelerometer::CalculateTransformMatrix(void)
-{
- double cp,sp,cr,sr,cy,sy;
-
- cp=cos(vOrient(ePitch)); sp=sin(vOrient(ePitch));
- cr=cos(vOrient(eRoll)); sr=sin(vOrient(eRoll));
- cy=cos(vOrient(eYaw)); sy=sin(vOrient(eYaw));
-
- mT(1,1) = cp*cy;
- mT(1,2) = cp*sy;
- mT(1,3) = -sp;
-
- mT(2,1) = sr*sp*cy - cr*sy;
- mT(2,2) = sr*sp*sy + cr*cy;
- mT(2,3) = sr*cp;
-
- mT(3,1) = cr*sp*cy + sr*sy;
- mT(3,2) = cr*sp*sy - sr*cy;
- mT(3,3) = cr*cp;
-
- // This transform is different than for FGForce, where we want a native nozzle
- // force in body frame. Here we calculate the body frame accel and want it in
- // the transformed accelerometer frame. So, the next line is commented out.
- // mT = mT.Inverse();
-}
-
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// The bitmasked value choices are as follows:
// unset: In this case (the default) JSBSim would only print
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGSensor.h"
-#include <input_output/FGXMLElement.h>
+#include "input_output/FGXMLElement.h"
#include "models/FGPropagate.h"
#include "models/FGMassBalance.h"
#include "models/FGInertial.h"
#include "math/FGColumnVector3.h"
#include "math/FGMatrix33.h"
+#include "FGSensorOrientation.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-class FGAccelerometer : public FGSensor
+class FGAccelerometer : public FGSensor, public FGSensorOrientation
{
public:
FGAccelerometer(FGFCS* fcs, Element* element);
FGMassBalance* MassBalance;
FGInertial* Inertial;
FGColumnVector3 vLocation;
- FGColumnVector3 vOrient;
FGColumnVector3 vRadius;
FGColumnVector3 vAccel;
- FGMatrix33 mT;
- void CalculateTransformMatrix(void);
- int axis;
void Debug(int from);
};
#include "FGActuator.h"
+using namespace std;
+
namespace JSBSim {
static const char *IdSrc = "$Id$";
FGActuator::FGActuator(FGFCS* fcs, Element* element) : FGFCSComponent(fcs, element)
{
double denom;
- dt = fcs->GetDt();
// inputs are read from the base class constructor
bool FGActuator::Run(void )
{
- dt = fcs->GetDt();
-
Input = InputNodes[0]->getDoubleValue() * InputSigns[0];
if (fail_zero) Input = 0;
else
cout << " INPUT: " << InputNodes[0]->getName() << endl;
- if (IsOutput) cout << " OUTPUT: " << OutputNode->getName() << endl;
+ if (IsOutput) {
+ for (unsigned int i=0; i<OutputNodes.size(); i++)
+ cout << " OUTPUT: " << OutputNodes[i]->getName() << endl;
+ }
if (bias != 0.0) cout << " Bias: " << bias << endl;
if (rate_limit != 0) cout << " Rate limit: " << rate_limit << endl;
if (lag != 0) cout << " Actuator lag: " << lag << endl;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGFCSComponent.h"
-#include <input_output/FGXMLElement.h>
+#include "input_output/FGXMLElement.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
inline bool GetFailStuck(void) const {return fail_stuck;}
private:
- double dt;
double span;
double bias;
double rate_limit;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGDeadBand.h"
+#include "input_output/FGXMLElement.h"
+#include "input_output/FGPropertyManager.h"
+#include <iostream>
+
+using namespace std;
namespace JSBSim {
cout << " DEADBAND WIDTH: " << width << endl;
}
cout << " GAIN: " << gain << endl;
- if (IsOutput) cout << " OUTPUT: " << OutputNode->getName() << endl;
+ if (IsOutput) {
+ for (unsigned int i=0; i<OutputNodes.size(); i++)
+ cout << " OUTPUT: " << OutputNodes[i]->getName() << endl;
+ }
}
}
if (debug_lvl & 2 ) { // Instantiation/Destruction notification
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGFCSComponent.h"
-#include <input_output/FGXMLElement.h>
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
namespace JSBSim {
class FGFCS;
+class Element;
+class FGPropertyManager;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DOCUMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGFCSComponent.h"
+#include "input_output/FGPropertyManager.h"
+#include "input_output/FGXMLElement.h"
+#include <iostream>
+#include <cstdlib>
+
+using namespace std;
namespace JSBSim {
{
Element *input_element, *clip_el;
Input = Output = clipmin = clipmax = 0.0;
- OutputNode = treenode = 0;
+ treenode = 0;
+ delay = index = 0;
ClipMinPropertyNode = ClipMaxPropertyNode = 0;
clipMinSign = clipMaxSign = 1.0;
IsOutput = clip = false;
string input, clip_string;
+ dt = fcs->GetDt();
PropertyManager = fcs->GetPropertyManager();
if (element->GetName() == string("lag_filter")) {
Type = "SENSOR";
} else if (element->GetName() == string("accelerometer")) {
Type = "ACCELEROMETER";
+ } else if (element->GetName() == string("magnetometer")) {
+ Type = "MAGNETOMETER";
} else if (element->GetName() == string("gyro")) {
Type = "GYRO";
} else if (element->GetName() == string("actuator")) {
input_element = element->FindNextElement("input");
}
- if (element->FindElement("output")) {
+ Element *out_elem = element->FindElement("output");
+ while (out_elem) {
IsOutput = true;
- OutputNode = PropertyManager->GetNode( element->FindElementValue("output"), true );
+ string output_node_name = out_elem->GetDataLine();
+ FGPropertyManager* OutputNode = PropertyManager->GetNode( output_node_name, true );
+ OutputNodes.push_back(OutputNode);
if (!OutputNode) {
- cerr << endl << " Unable to process property: " << element->FindElementValue("output") << endl;
+ cerr << endl << " Unable to process property: " << output_node_name << endl;
throw(string("Invalid output property name in flight control definition"));
}
+ out_elem = element->FindNextElement("output");
+ }
+
+ Element* delay_elem = element->FindElement("delay");
+ if ( delay_elem ) {
+ delay = (unsigned int)delay_elem->GetDataAsNumber();
+ string delayType = delay_elem->GetAttributeValue("type");
+ if (delayType.length() > 0) {
+ if (delayType == "time") {
+ delay = (int)(delay / dt);
+ } else if (delayType == "frames") {
+ // no op. the delay type of "frames" is assumed and is the default.
+ } else {
+ cerr << "Unallowed delay type" << endl;
+ }
+ } else {
+ delay = (int)(delay / dt);
+ }
+ output_array.resize(delay);
+ for (int i=0; i<delay; i++) output_array[i] = 0.0;
}
clip_el = element->FindElement("clipto");
void FGFCSComponent::SetOutput(void)
{
- OutputNode->setDoubleValue(Output);
+ for (unsigned int i=0; i<OutputNodes.size(); i++) OutputNodes[i]->setDoubleValue(Output);
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+void FGFCSComponent::Delay(void)
+{
+ output_array[index] = Output;
+ if (index == delay-1) index = 0;
+ else index++;
+ Output = output_array[index];
+}
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
void FGFCSComponent::Clip(void)
{
if (clip) {
cout << " Maximum limit: " << clipmax << endl;
}
}
+ if (delay > 0) cout <<" Frame delay: " << delay
+ << " frames (" << delay*dt << " sec)" << endl;
}
}
if (debug_lvl & 2 ) { // Instantiation/Destruction notification
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <FGJSBBase.h>
-#include <input_output/FGPropertyManager.h>
-#include <input_output/FGXMLElement.h>
+#include "FGJSBBase.h"
#include <string>
#include <vector>
#define ID_FCSCOMPONENT "$Id$"
-using std::string;
-using std::vector;
-
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FORWARD DECLARATIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGFCS;
+class FGPropertyManager;
+class Element;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DOCUMENTATION
virtual bool Run(void);
virtual void SetOutput(void);
- inline double GetOutput (void) const {return Output;}
- inline FGPropertyManager* GetOutputNode(void) { return OutputNode; }
- inline string GetName(void) const {return Name;}
- inline string GetType(void) const { return Type; }
+ double GetOutput (void) const {return Output;}
+ std::string GetName(void) const {return Name;}
+ std::string GetType(void) const { return Type; }
virtual double GetOutputPct(void) const { return 0; }
protected:
FGFCS* fcs;
FGPropertyManager* PropertyManager;
FGPropertyManager* treenode;
- FGPropertyManager* OutputNode;
+ std::vector <FGPropertyManager*> OutputNodes;
FGPropertyManager* ClipMinPropertyNode;
FGPropertyManager* ClipMaxPropertyNode;
- vector <FGPropertyManager*> InputNodes;
- vector <float> InputSigns;
- string Type;
- string Name;
+ std::vector <FGPropertyManager*> InputNodes;
+ std::vector <float> InputSigns;
+ std::vector <double> output_array;
+ std::string Type;
+ std::string Name;
double Input;
double Output;
double clipmax, clipmin;
+ int delay;
+ int index;
float clipMinSign, clipMaxSign;
+ double dt;
bool IsOutput;
bool clip;
+ void Delay(void);
void Clip(void);
virtual void bind();
virtual void Debug(int from);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGFCSFunction.h"
+#include <cstdlib>
+#include <iostream>
+
+using namespace std;
namespace JSBSim {
if (InputNodes.size()>0)
cout << " INPUT: " << InputNodes[0]->getName() << endl;
// cout << " Function: " << endl;
- if (IsOutput) cout << " OUTPUT: " << OutputNode->getName() << endl;
+ if (IsOutput) {
+ for (unsigned int i=0; i<OutputNodes.size(); i++)
+ cout << " OUTPUT: " << OutputNodes[i]->getName() << endl;
+ }
}
}
if (debug_lvl & 2 ) { // Instantiation/Destruction notification
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGFCSComponent.h"
-#include <input_output/FGXMLElement.h>
-#include <math/FGFunction.h>
+#include "input_output/FGXMLElement.h"
+#include "math/FGFunction.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGFilter.h"
+#include "input_output/FGXMLElement.h"
+#include "input_output/FGPropertyManager.h"
+
+#include <iostream>
+#include <string>
+
+using namespace std;
namespace JSBSim {
FGFilter::FGFilter(FGFCS* fcs, Element* element) : FGFCSComponent(fcs, element)
{
- dt = fcs->GetState()->Getdt();
Trigger = 0;
DynamicFilter = false;
C[1] = C[2] = C[3] = C[4] = C[5] = C[6] = 0.0;
- for (int i=0; i<7; i++) {
+ for (int i=1; i<7; i++) {
PropertySign[i] = 1.0;
PropertyNode[i] = 0L;
+ ReadFilterCoefficients(element, i);
}
if (Type == "LAG_FILTER") FilterType = eLag ;
else if (Type == "INTEGRATOR") FilterType = eIntegrator ;
else FilterType = eUnknown ;
- ReadFilterCoefficients(element, 1);
- ReadFilterCoefficients(element, 2);
- ReadFilterCoefficients(element, 3);
- ReadFilterCoefficients(element, 4);
- ReadFilterCoefficients(element, 5);
- ReadFilterCoefficients(element, 6);
-
if (element->FindElement("trigger")) {
Trigger = PropertyManager->GetNode(element->FindElementValue("trigger"));
}
void FGFilter::ReadFilterCoefficients(Element* element, int index)
{
- char buf[3];
- sprintf(buf, "c%d", index);
- string coefficient = string(buf);
- string property_string="";
-
+ // index is known to be 1-7.
+ // A stringstream would be overkill, but also trying to avoid sprintf
+ string coefficient = "c0";
+ coefficient[1] += index;
+
if ( element->FindElement(coefficient) ) {
- property_string = element->FindElementValue(coefficient);
+ string property_string = element->FindElementValue(coefficient);
if (!is_number(property_string)) { // property
if (property_string[0] == '-') {
PropertySign[index] = -1.0;
if (PropertyNode[1] == 0L) cout << " C[1]: " << C[1] << endl;
else cout << " C[1] is the value of property: " << sgn << PropertyNode[1]->GetName() << endl;
break;
+ case eUnknown:
+ break;
}
- if (IsOutput) cout << " OUTPUT: " << OutputNode->getName() << endl;
+ if (IsOutput) {
+ for (unsigned int i=0; i<OutputNodes.size(); i++)
+ cout << " OUTPUT: " << OutputNodes[i]->getName() << endl;
+ }
}
}
if (debug_lvl & 2 ) { // Instantiation/Destruction notification
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGFCSComponent.h"
-#include <input_output/FGXMLElement.h>
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
namespace JSBSim {
+class Element;
+class FGPropertyManager;
+class FGFCS;
+
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DOCUMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
enum {eLag, eLeadLag, eOrder2, eWashout, eIntegrator, eUnknown} FilterType;
private:
- double dt;
double ca;
double cb;
double cc;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGGain.h"
+#include "input_output/FGXMLElement.h"
+#include <iostream>
+#include <string>
+#include <cstdlib>
+
+using namespace std;
namespace JSBSim {
} else {
cout << " GAIN: " << Gain << endl;
}
- if (IsOutput) cout << " OUTPUT: " << OutputNode->getName() << endl;
+ if (IsOutput) {
+ for (unsigned int i=0; i<OutputNodes.size(); i++)
+ cout << " OUTPUT: " << OutputNodes[i]->getName() << endl;
+ }
if (Type == "AEROSURFACE_SCALE") {
cout << " In/Out Mapping:" << endl;
cout << " Input MIN: " << InMin << endl;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGFCSComponent.h"
-#include <string>
-#include <input_output/FGXMLElement.h>
-#include <math/FGTable.h>
-
-using std::string;
+#include "math/FGTable.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
namespace JSBSim {
class FGFCS;
+class Element;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DOCUMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGGradient.h"
+#include <iostream>
+
+using namespace std;
namespace JSBSim {
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGFCSComponent.h"
-#include <input_output/FGXMLElement.h>
+#include "input_output/FGXMLElement.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGGyro.h"
+#include <iostream>
+
+using namespace std;
namespace JSBSim {
CLASS IMPLEMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-FGGyro::FGGyro(FGFCS* fcs, Element* element) : FGSensor(fcs, element)
+FGGyro::FGGyro(FGFCS* fcs, Element* element) : FGSensor(fcs, element),
+ FGSensorOrientation(element)
{
Propagate = fcs->GetExec()->GetPropagate();
- Element* orient_element = element->FindElement("orientation");
- if (orient_element) vOrient = orient_element->FindElementTripletConvertTo("RAD");
- else {cerr << "No orientation given for gyro. " << endl;}
-
- Element* axis_element = element->FindElement("axis");
- if (axis_element) {
- string sAxis = element->FindElementValue("axis");
- if (sAxis == "ROLL" || sAxis == "roll") {
- axis = 1;
- } else if (sAxis == "PITCH" || sAxis == "pitch") {
- axis = 2;
- } else if (sAxis == "YAW" || sAxis == "yaw") {
- axis = 3;
- } else {
- cerr << " Incorrect/no axis specified for gyro; assuming Roll axis" << endl;
- axis = 1;
- }
- }
-
- CalculateTransformMatrix();
-
Debug(0);
}
Input = vAccel(axis);
- Output = Input; // perfect gyro
-
- // Degrade signal as specified
-
- if (fail_stuck) {
- Output = PreviousOutput;
- return true;
- }
-
- if (lag != 0.0) Lag(); // models gyro lag
- if (noise_variance != 0.0) Noise(); // models noise
- if (drift_rate != 0.0) Drift(); // models drift over time
- if (bias != 0.0) Bias(); // models a finite bias
- if (gain != 0.0) Gain(); // models a gain
-
- if (fail_low) Output = -HUGE_VAL;
- if (fail_high) Output = HUGE_VAL;
-
- if (bits != 0) Quantize(); // models quantization degradation
-// if (delay != 0.0) Delay(); // models system signal transport latencies
+ ProcessSensorSignal();
- Clip(); // Is it right to clip a gyro?
return true;
}
-//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-void FGGyro::CalculateTransformMatrix(void)
-{
- double cp,sp,cr,sr,cy,sy;
-
- cp=cos(vOrient(ePitch)); sp=sin(vOrient(ePitch));
- cr=cos(vOrient(eRoll)); sr=sin(vOrient(eRoll));
- cy=cos(vOrient(eYaw)); sy=sin(vOrient(eYaw));
-
- mT(1,1) = cp*cy;
- mT(1,2) = cp*sy;
- mT(1,3) = -sp;
-
- mT(2,1) = sr*sp*cy - cr*sy;
- mT(2,2) = sr*sp*sy + cr*cy;
- mT(2,3) = sr*cp;
-
- mT(3,1) = cr*sp*cy + sr*sy;
- mT(3,2) = cr*sp*sy - sr*cy;
- mT(3,3) = cr*cp;
-
- // This transform is different than for FGForce, where we want a native nozzle
- // force in body frame. Here we calculate the body frame accel and want it in
- // the transformed gyro frame. So, the next line is commented out.
- // mT = mT.Inverse();
-}
-
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// The bitmasked value choices are as follows:
// unset: In this case (the default) JSBSim would only print
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGSensor.h"
-#include <input_output/FGXMLElement.h>
+#include "input_output/FGXMLElement.h"
#include "models/FGPropagate.h"
#include "models/FGMassBalance.h"
#include "models/FGInertial.h"
#include "math/FGColumnVector3.h"
#include "math/FGMatrix33.h"
+#include "FGSensorOrientation.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-class FGGyro : public FGSensor
+class FGGyro : public FGSensor, public FGSensorOrientation
{
public:
FGGyro(FGFCS* fcs, Element* element);
private:
FGPropagate* Propagate;
- FGColumnVector3 vOrient;
FGColumnVector3 vAccel;
- FGMatrix33 mT;
void CalculateTransformMatrix(void);
- int axis;
void Debug(int from);
};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGKinemat.h"
-#include <math.h>
-#include <float.h>
+#include "input_output/FGXMLElement.h"
+#include <iostream>
+#include <cstdlib>
+
+using namespace std;
namespace JSBSim {
bool FGKinemat::Run(void )
{
- double dt = fcs->GetState()->Getdt();
+ double dt0 = dt;
Input = InputNodes[0]->getDoubleValue() * InputSigns[0];
if (DoScale) Input *= Detents[NumDetents-1];
- if (IsOutput) Output = OutputNode->getDoubleValue();
+ if (IsOutput) Output = OutputNodes[0]->getDoubleValue();
if (Input < Detents[0])
Input = Detents[0];
// Process all detent intervals the movement traverses until either the
// final value is reached or the time interval has finished.
- while ( 0.0 < dt && !EqualToRoundoff(Input, Output) ) {
+ while ( dt0 > 0.0 && !EqualToRoundoff(Input, Output) ) {
// Find the area where Output is in
int ind;
double ThisDt = fabs((ThisInput-Output)/Rate);
// and clip to the timestep size
- if (dt < ThisDt) {
- ThisDt = dt;
+ if (dt0 < ThisDt) {
+ ThisDt = dt0;
if (Output < Input)
Output += ThisDt*Rate;
else
// is met even in inexact arithmetics ...
Output = ThisInput;
- dt -= ThisDt;
+ dt0 -= ThisDt;
}
}
for (int i=0;i<NumDetents;i++) {
cout << " " << Detents[i] << " " << TransitionTimes[i] << endl;
}
- if (IsOutput) cout << " OUTPUT: " << OutputNode->getName() << endl;
+ if (IsOutput) {
+ for (unsigned int i=0; i<OutputNodes.size(); i++)
+ cout << " OUTPUT: " << OutputNodes[i]->getName() << endl;
+ }
if (!DoScale) cout << " NOSCALE" << endl;
}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGFCSComponent.h"
-#include <input_output/FGXMLElement.h>
#include <vector>
-#include <string>
-
-using std::vector;
-using std::string;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
bool Run (void);
private:
- vector<double> Detents;
- vector<double> TransitionTimes;
+ std::vector<double> Detents;
+ std::vector<double> TransitionTimes;
int NumDetents;
double OutputPct;
bool DoScale;
#include "FGMagnetometer.h"
#include "simgear/magvar/coremag.hxx"
#include <ctime>
+#include <cstdlib>
+#include <iostream>
+
+using namespace std;
namespace JSBSim {
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-FGMagnetometer::FGMagnetometer(FGFCS* fcs, Element* element) : FGSensor(fcs, element),\
+FGMagnetometer::FGMagnetometer(FGFCS* fcs, Element* element) : FGSensor(fcs, element),
+ FGSensorOrientation(element),
counter(0),
INERTIAL_UPDATE_RATE(1000)
{
vRadius = MassBalance->StructuralToBody(vLocation);
- Element* orient_element = element->FindElement("orientation");
- if (orient_element) vOrient = orient_element->FindElementTripletConvertTo("RAD");
- else {cerr << "No orientation given for magnetometer. " << endl;}
-
- Element* axis_element = element->FindElement("axis");
- if (axis_element) {
- string sAxis = element->FindElementValue("axis");
- if (sAxis == "X" || sAxis == "x") {
- axis = 1;
- } else if (sAxis == "Y" || sAxis == "y") {
- axis = 2;
- } else if (sAxis == "Z" || sAxis == "z") {
- axis = 3;
- } else {
- cerr << " Incorrect/no axis specified for magnetometer; assuming X axis" << endl;
- axis = 1;
- }
- }
-
- CalculateTransformMatrix();
-
//assuming date wont significantly change over a flight to affect mag field
//would be better to get the date from the sim if its simulated...
time_t rawtime;
void FGMagnetometer::updateInertialMag(void)
{
counter++;
- if(counter > INERTIAL_UPDATE_RATE)//dont need to update every iteration
+ if (counter > INERTIAL_UPDATE_RATE)//dont need to update every iteration
{
counter = 0;
usedAlt = (Propagate->GetGeodeticAltitude()*fttom*0.001);//km
//this should be done whenever the position changes significantly (in nTesla)
- double magvar = calc_magvar( usedLat,
- usedLon,
- usedAlt,
- date,
- field );
+ calc_magvar( usedLat,
+ usedLon,
+ usedAlt,
+ date,
+ field );
}
}
bool FGMagnetometer::Run(void )
{
- // There is no input assumed. This is a dedicated acceleration sensor.
+ // There is no input assumed. This is a dedicated magnetic field sensor.
vRadius = MassBalance->StructuralToBody(vLocation);
-
updateInertialMag();
- //Inertial magnetic field rotated to the body frame
+
+ // Inertial magnetic field rotated to the body frame
vMag = Propagate->GetTl2b() * FGColumnVector3(field[3], field[4], field[5]);
- //allow for sensor orientation
+ // Allow for sensor orientation
vMag = mT * vMag;
Input = vMag(axis);
- Output = Input; // perfect magnetometer
-
- // Degrade signal as specified
-
- if (fail_stuck) {
- Output = PreviousOutput;
- return true;
- }
-
- if (lag != 0.0) Lag(); // models magnetometer lag
- if (noise_variance != 0.0) Noise(); // models noise
- if (drift_rate != 0.0) Drift(); // models drift over time
- if (bias != 0.0) Bias(); // models a finite bias
- if (gain != 0.0) Gain(); // models a gain
-
- if (fail_low) Output = -HUGE_VAL;
- if (fail_high) Output = HUGE_VAL;
-
- if (bits != 0) Quantize(); // models quantization degradation
-// if (delay != 0.0) Delay(); // models system signal transport latencies
+ ProcessSensorSignal();
- Clip(); // Is it right to clip an magnetometer?
return true;
}
-//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-void FGMagnetometer::CalculateTransformMatrix(void)
-{
- double cp,sp,cr,sr,cy,sy;
-
- cp=cos(vOrient(ePitch)); sp=sin(vOrient(ePitch));
- cr=cos(vOrient(eRoll)); sr=sin(vOrient(eRoll));
- cy=cos(vOrient(eYaw)); sy=sin(vOrient(eYaw));
-
-
- mT(1,1) = cp*cy;
- mT(1,2) = cp*sy;
- mT(1,3) = -sp;
-
- mT(2,1) = sr*sp*cy - cr*sy;
- mT(2,2) = sr*sp*sy + cr*cy;
- mT(2,3) = sr*cp;
-
- mT(3,1) = cr*sp*cy + sr*sy;
- mT(3,2) = cr*sp*sy - sr*cy;
- mT(3,3) = cr*cp;
-
-
- // This transform is different than for FGForce, where we want a native nozzle
- // force in body frame. Here we calculate the body frame accel and want it in
- // the transformed magnetometer frame. So, the next line is commented out.
- // mT = mT.Inverse();
-}
-
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// The bitmasked value choices are as follows:
// unset: In this case (the default) JSBSim would only print
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGSensor.h"
-#include <input_output/FGXMLElement.h>
+#include "input_output/FGXMLElement.h"
#include "models/FGPropagate.h"
#include "models/FGMassBalance.h"
#include "models/FGInertial.h"
#include "math/FGColumnVector3.h"
#include "math/FGMatrix33.h"
+#include "FGSensorOrientation.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-class FGMagnetometer : public FGSensor
+class FGMagnetometer : public FGSensor, public FGSensorOrientation
{
public:
FGMagnetometer(FGFCS* fcs, Element* element);
FGMassBalance* MassBalance;
FGInertial* Inertial;
FGColumnVector3 vLocation;
- FGColumnVector3 vOrient;
FGColumnVector3 vRadius;
FGColumnVector3 vMag;
- FGMatrix33 mT;
- void CalculateTransformMatrix(void);
void updateInertialMag(void);
- int axis;
double field[6];
double usedLat;
double usedLon;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGPID.h"
+#include "input_output/FGXMLElement.h"
+#include <string>
+#include <iostream>
+
+using namespace std;
namespace JSBSim {
FGPID::FGPID(FGFCS* fcs, Element* element) : FGFCSComponent(fcs, element)
{
string kp_string, ki_string, kd_string;
- dt = fcs->GetState()->Getdt();
Kp = Ki = Kd = 0.0;
KpPropertyNode = 0;
else
cout << " INPUT: " << InputNodes[0]->getName() << endl;
- if (IsOutput) cout << " OUTPUT: " << OutputNode->getName() << endl;
+ if (IsOutput) {
+ for (unsigned int i=0; i<OutputNodes.size(); i++)
+ cout << " OUTPUT: " << OutputNodes[i]->getName() << endl;
+ }
}
}
if (debug_lvl & 2 ) { // Instantiation/Destruction notification
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGFCSComponent.h"
-#include <input_output/FGXMLElement.h>
-#include <string>
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
#define ID_PID "$Id$"
-using std::string;
-
-using std::string;
-
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FORWARD DECLARATIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGFCS;
+class Element;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DOCUMENTATION
void ResetPastStates(void) {Input_prev = Input_prev2 = Output = I_out_total = 0.0;}
private:
- double dt;
FGPropertyManager *Trigger;
double Kp, Ki, Kd;
double I_out_total;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGSensor.h"
+#include "input_output/FGXMLElement.h"
+#include <iostream>
+#include <cstdlib>
+
+using namespace std;
namespace JSBSim {
FGSensor::FGSensor(FGFCS* fcs, Element* element) : FGFCSComponent(fcs, element)
{
double denom;
- dt = fcs->GetDt();
// inputs are read from the base class constructor
- bits = quantized = divisions = index = delay = 0;
+ bits = quantized = divisions = 0;
PreviousInput = PreviousOutput = 0.0;
min = max = bias = gain = noise_variance = lag = drift_rate = drift = span = 0.0;
granularity = 0.0;
cerr << " defaulting to UNIFORM." << endl;
}
}
- if ( element->FindElement("delay") ) {
- delay = (unsigned int)element->FindElementValueAsNumber("delay");
- output_array.resize(delay);
- for (unsigned int i=0; i<delay; i++) output_array[i] = 0.0;
- }
FGFCSComponent::bind();
bind();
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-bool FGSensor::Run(void )
+bool FGSensor::Run(void)
{
Input = InputNodes[0]->getDoubleValue() * InputSigns[0];
+ ProcessSensorSignal();
+
+ return true;
+}
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+void FGSensor::ProcessSensorSignal(void)
+{
Output = Input; // perfect sensor
// Degrade signal as specified
if (fail_stuck) {
Output = PreviousOutput;
- return true;
- }
-
- if (lag != 0.0) Lag(); // models sensor lag and filter
- if (noise_variance != 0.0) Noise(); // models noise
- if (drift_rate != 0.0) Drift(); // models drift over time
- if (bias != 0.0) Bias(); // models a finite bias
- if (gain != 0.0) Gain(); // models a finite gain
+ } else {
+ if (lag != 0.0) Lag(); // models sensor lag and filter
+ if (noise_variance != 0.0) Noise(); // models noise
+ if (drift_rate != 0.0) Drift(); // models drift over time
+ if (gain != 0.0) Gain(); // models a finite gain
+ if (bias != 0.0) Bias(); // models a finite bias
- if (delay != 0.0) Delay(); // models system signal transport latencies
+ if (delay != 0) Delay(); // models system signal transport latencies
- if (fail_low) Output = -HUGE_VAL;
- if (fail_high) Output = HUGE_VAL;
+ if (fail_low) Output = -HUGE_VAL;
+ if (fail_high) Output = HUGE_VAL;
- if (bits != 0) Quantize(); // models quantization degradation
+ if (bits != 0) Quantize(); // models quantization degradation
- Clip(); // Is it right to clip a sensor?
- return true;
+ Clip();
+ }
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-void FGSensor::Delay(void)
-{
- output_array[index] = Output;
- if (index == delay-1) index = 0;
- else index++;
- Output = output_array[index];
-}
-
-//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
void FGSensor::bind(void)
{
string tmp = Name;
else
cout << " INPUT: " << InputNodes[0]->getName() << endl;
}
- if (delay > 0) cout <<" Frame delay: " << delay
- << " frames (" << delay*dt << " sec)" << endl;
if (bits != 0) {
if (quant_property.empty())
cout << " Quantized output" << endl;
cout << " Random noise is gaussian distributed." << endl;
}
}
- if (IsOutput) cout << " OUTPUT: " << OutputNode->getName() << endl;
+ if (IsOutput) {
+ for (unsigned int i=0; i<OutputNodes.size(); i++)
+ cout << " OUTPUT: " << OutputNodes[i]->getName() << endl;
+ }
}
}
if (debug_lvl & 2 ) { // Instantiation/Destruction notification
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGFCSComponent.h"
-#include <input_output/FGXMLElement.h>
-#include <vector>
+#include <string>
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
namespace JSBSim {
-using std::vector;
class FGFCS;
+class Element;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DOCUMENTATION
protected:
enum eNoiseType {ePercent=0, eAbsolute} NoiseType;
enum eDistributionType {eUniform=0, eGaussian} DistributionType;
- double dt;
double min, max;
double span;
double bias;
int bits;
int quantized;
int divisions;
- int delay;
- int index;
bool fail_low;
bool fail_high;
bool fail_stuck;
- string quant_property;
- vector <double> output_array;
+ std::string quant_property;
+ void ProcessSensorSignal(void);
void Noise(void);
void Bias(void);
void Drift(void);
void Quantize(void);
void Lag(void);
- void Delay(void);
void Gain(void);
void bind(void);
--- /dev/null
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+ Header: FGSensorOrientation.h
+ Author: Jon Berndt
+ Date started: September 2009
+
+ ------------- Copyright (C) 2009 -------------
+
+ This program is free software; you can redistribute it and/or modify it under
+ the terms of the GNU Lesser General Public License as published by the Free Software
+ Foundation; either version 2 of the License, or (at your option) any later
+ version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ details.
+
+ You should have received a copy of the GNU Lesser General Public License along with
+ this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Further information about the GNU Lesser General Public License can also be found on
+ the world wide web at http://www.gnu.org.
+
+HISTORY
+--------------------------------------------------------------------------------
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+SENTRY
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+#ifndef FGSENSORORIENTATION_H
+#define FGSENSORORIENTATION_H
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+INCLUDES
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+#include "FGSensor.h"
+#include "input_output/FGXMLElement.h"
+#include "math/FGColumnVector3.h"
+#include "math/FGMatrix33.h"
+
+#include <iostream>
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+DEFINITIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+#define ID_SensorOrientation "$Id$"
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+FORWARD DECLARATIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+namespace JSBSim {
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS DOCUMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/** Encapsulates a SensorOrientation capability for a sensor.
+
+Syntax:
+
+@author Jon S. Berndt
+@version $Revision$
+*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS DECLARATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+class FGSensorOrientation : public FGJSBBase
+{
+public:
+ FGSensorOrientation(Element* element)
+ {
+ Element* orient_element = element->FindElement("orientation");
+ if (orient_element) vOrient = orient_element->FindElementTripletConvertTo("RAD");
+ else { std::cerr << "No orientation given for this sensor. " << std::endl;}
+
+ Element* axis_element = element->FindElement("axis");
+ if (axis_element) {
+ string sAxis = element->FindElementValue("axis");
+ if (sAxis == "X" || sAxis == "x") {
+ axis = 1;
+ } else if (sAxis == "Y" || sAxis == "y") {
+ axis = 2;
+ } else if (sAxis == "Z" || sAxis == "z") {
+ axis = 3;
+ } else {
+ std::cerr << " Incorrect/no axis specified for this sensor; assuming X axis" << std::endl;
+ axis = 1;
+ }
+ }
+
+ CalculateTransformMatrix();
+ }
+
+// ~FGSensorOrientation();
+
+protected:
+ FGColumnVector3 vOrient;
+ FGMatrix33 mT;
+ int axis;
+ void CalculateTransformMatrix(void)
+ {
+ double cp,sp,cr,sr,cy,sy;
+
+ cp=cos(vOrient(ePitch)); sp=sin(vOrient(ePitch));
+ cr=cos(vOrient(eRoll)); sr=sin(vOrient(eRoll));
+ cy=cos(vOrient(eYaw)); sy=sin(vOrient(eYaw));
+
+ mT(1,1) = cp*cy;
+ mT(1,2) = cp*sy;
+ mT(1,3) = -sp;
+
+ mT(2,1) = sr*sp*cy - cr*sy;
+ mT(2,2) = sr*sp*sy + cr*cy;
+ mT(2,3) = sr*cp;
+
+ mT(3,1) = cr*sp*cy + sr*sy;
+ mT(3,2) = cr*sp*sy - sr*cy;
+ mT(3,3) = cr*cp;
+
+ // This transform is different than for FGForce, where we want a native nozzle
+ // force in body frame. Here we calculate the body frame accel and want it in
+ // the transformed accelerometer frame. So, the next line is commented out.
+ // mT = mT.Inverse();
+ }
+
+private:
+ void Debug(int from);
+};
+}
+#endif
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGSummer.h"
+#include "input_output/FGXMLElement.h"
+#include <iostream>
+
+using namespace std;
namespace JSBSim {
cout << " " << InputNodes[i]->getName() << endl;
}
if (Bias != 0.0) cout << " Bias: " << Bias << endl;
- if (IsOutput) cout << " OUTPUT: " <<OutputNode->getName() << endl;
+ if (IsOutput) {
+ for (unsigned int i=0; i<OutputNodes.size(); i++)
+ cout << " OUTPUT: " << OutputNodes[i]->getName() << endl;
+ }
}
}
if (debug_lvl & 2 ) { // Instantiation/Destruction notification
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGFCSComponent.h"
-#include <input_output/FGXMLElement.h>
-#include <vector>
-#include <string>
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
#define ID_SUMMER "$Id$"
-using std::vector;
-using std::string;
-
-using std::vector;
-using std::string;
-
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FORWARD DECLARATIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
+class Element;
+
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DOCUMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGSwitch.h"
+#include <iostream>
+#include <cstdlib>
+
+using namespace std;
namespace JSBSim {
}
cout << endl;
}
- if (IsOutput) cout << " OUTPUT: " << OutputNode->getName() << endl;
+ if (IsOutput) {
+ for (unsigned int i=0; i<OutputNodes.size(); i++)
+ cout << " OUTPUT: " << OutputNodes[i]->getName() << endl;
+ }
}
}
if (debug_lvl & 2 ) { // Instantiation/Destruction notification
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGFCSComponent.h"
-#include <input_output/FGXMLElement.h>
-#include <math/FGCondition.h>
+#include "input_output/FGXMLElement.h"
+#include "math/FGCondition.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
noinst_HEADERS = \
FGPID.h FGDeadBand.h FGFCSComponent.h FGFilter.h \
FGGain.h FGGradient.h FGKinemat.h FGSummer.h FGSwitch.h FGFCSFunction.h\
- FGSensor.h FGActuator.h FGAccelerometer.h FGGyro.h FGMagnetometer.h
+ FGSensor.h FGActuator.h FGAccelerometer.h FGGyro.h FGMagnetometer.h \
+ FGSensorOrientation.h
INCLUDES = -I$(top_srcdir)/src/FDM/JSBSim
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGElectric.h"
-#include <models/FGPropulsion.h>
+#include "FGState.h"
+#include "models/FGPropulsion.h"
+#include "models/propulsion/FGThruster.h"
+
+#include <iostream>
+#include <sstream>
+
+using namespace std;
namespace JSBSim {
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string FGElectric::GetEngineLabels(string delimeter)
+string FGElectric::GetEngineLabels(const string& delimiter)
{
std::ostringstream buf;
- buf << Name << " HP (engine " << EngineNumber << ")" << delimeter
- << Thruster->GetThrusterLabels(EngineNumber, delimeter);
+ buf << Name << " HP (engine " << EngineNumber << ")" << delimiter
+ << Thruster->GetThrusterLabels(EngineNumber, delimiter);
return buf.str();
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string FGElectric::GetEngineValues(string delimeter)
+string FGElectric::GetEngineValues(const string& delimiter)
{
std::ostringstream buf;
- buf << HP << delimeter
- << Thruster->GetThrusterValues(EngineNumber, delimeter);
+ buf << HP << delimiter
+ << Thruster->GetThrusterValues(EngineNumber, delimiter);
return buf.str();
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGEngine.h"
-#include <input_output/FGXMLElement.h>
+#include "input_output/FGXMLElement.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
double Calculate(void);
double GetPowerAvailable(void) {return PowerAvailable;}
double getRPM(void) {return RPM;}
- string GetEngineLabels(string delimeter);
- string GetEngineValues(string delimeter);
+ std::string GetEngineLabels(const std::string& delimiter);
+ std::string GetEngineValues(const std::string& delimiter);
private:
#include "FGTank.h"
#include "FGPropeller.h"
#include "FGNozzle.h"
-#include <input_output/FGXMLParse.h>
-#include <math/FGColumnVector3.h>
+#include "FGState.h"
+#include "models/FGPropulsion.h"
+#include "input_output/FGXMLParse.h"
+#include "math/FGColumnVector3.h"
+
+#include <iostream>
#include <fstream>
+#include <cstdlib>
+
+using namespace std;
namespace JSBSim {
SLFuelFlowMax = 0.0;
MaxThrottle = 1.0;
MinThrottle = 0.0;
+ FuelDensity = 6.0;
+ unsigned int i;
ResetToIC(); // initialize dynamic terms
cerr << "No thruster definition supplied with engine definition." << endl;
}
+ // Build and initialize the feed tank vector.
+ for (i=0; i<(Propulsion->GetNumTanks()); i++) {
+ SourceTanks.push_back(0);
+ }
+
// Load feed tank[s] references
local_element = engine_element->GetParent()->FindElement("feed");
if (local_element) {
while (local_element) {
- AddFeedTank((int)local_element->GetDataAsNumber());
+ int tankID = (int)local_element->GetDataAsNumber();
+ FGTank* tank = Propulsion->GetTank(tankID);
+ AddFeedTank( tankID , tank->GetPriority());
+ FuelDensity = tank->GetDensity();
local_element = engine_element->GetParent()->FindNextElement("feed");
}
} else {
property_name = base_property_name + "/fuel-flow-rate-pps";
PropertyManager->Tie( property_name.c_str(), this, &FGEngine::GetFuelFlowRate);
+ //cout << "Engine[" << EngineNumber << "] using fuel density: " << FuelDensity << endl;
+
Debug(0);
}
if (TrimMode) return;
unsigned int i;
- double Fshortage, TanksWithFuel;
+ double Fshortage, FuelNeeded;
FGTank* Tank;
- Fshortage = TanksWithFuel = 0.0;
-
- // count how many assigned tanks have fuel
- for (i=0; i<SourceTanks.size(); i++) {
- Tank = Propulsion->GetTank(SourceTanks[i]);
- if (Tank->GetType() == FGTank::ttFUEL){
- if (Tank->GetContents() > 0.0) ++TanksWithFuel;
- } else {
- cerr << "No oxidizer tanks should be used for this engine type." << endl;
+ unsigned int TanksWithFuel = 0;
+ Fshortage = FuelNeeded = 0.0;
+ double FuelToBurn;
+ unsigned int CurrentPriority = 1;
+ vector <int> FeedList;
+ Starved = false;
+
+ FuelToBurn = CalcFuelNeed();
+ if (FuelToBurn == 0.0) return;
+
+ // Count how many fuel tanks with the current priority level have fuel.
+ // If none, then try next lower priority. Build the feed list.
+ while ((TanksWithFuel == 0) && (CurrentPriority <= Propulsion->GetNumTanks())) {
+ for (i=0; i<Propulsion->GetNumTanks(); i++) {
+ if (SourceTanks[i] != 0) {
+ Tank = Propulsion->GetTank(i);
+ if (Tank->GetType() == FGTank::ttFUEL) {
+ if ((Tank->GetContents() > 0.0) && ((unsigned int)Tank->GetPriority() == CurrentPriority)) {
+ ++TanksWithFuel;
+ FeedList.push_back(i);
+ }
+ } else {
+ cerr << "No oxidizer tanks should be used for this engine type." << endl;
+ }
+ }
}
+ if (TanksWithFuel == 0) CurrentPriority++;
}
- if (TanksWithFuel==0) {
+
+ // No fuel found at any priority!
+ if (TanksWithFuel == 0) {
Starved = true;
return;
}
- for (i=0; i<SourceTanks.size(); i++) {
- Tank = Propulsion->GetTank(SourceTanks[i]);
- if (Tank->GetType() == FGTank::ttFUEL) {
- Fshortage += Tank->Drain(CalcFuelNeed()/TanksWithFuel);
- } else {
- cerr << "No oxidizer tanks should be used for this engine type." << endl;
- }
+ // Remove equal amount of fuel from each feed tank.
+ FuelNeeded = FuelToBurn/TanksWithFuel;
+ for (i=0; i<FeedList.size(); i++) {
+ Tank = Propulsion->GetTank(FeedList[i]);
+ Tank->Drain(FuelNeeded);
}
- if (Fshortage < 0.00) Starved = true;
- else Starved = false;
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-void FGEngine::AddFeedTank(int tkID)
+void FGEngine::AddFeedTank(int tkID, int priority)
{
- SourceTanks.push_back(tkID);
+ SourceTanks[tkID] = priority;
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{
string token, fullpath, localpath;
string thruster_filename, thruster_fullpathname, thrType;
- double P_Factor = 0, Sense = 0.0;
string enginePath = FDMExec->GetEnginePath();
string aircraftPath = FDMExec->GetFullAircraftPath();
ifstream thruster_file;
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <FGJSBBase.h>
-#include "FGThruster.h"
-#include <input_output/FGPropertyManager.h>
-#include <input_output/FGXMLFileRead.h>
+#include "FGJSBBase.h"
+#include "input_output/FGXMLFileRead.h"
+#include "math/FGColumnVector3.h"
#include <vector>
#include <string>
#define ID_ENGINE "$Id$"
-using std::string;
-using std::vector;
-
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FORWARD DECLARATIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
class FGAuxiliary;
class FGThruster;
class Element;
+class FGPropertyManager;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DOCUMENTATION
@endcode
<pre>
NOTES:
- Engines feed from all tanks equally.
-
+
Not all thruster types can be matched with a given engine type. See the class
documentation for engine and thruster classes.
</pre>
virtual void SetRunning(bool bb) { Running=bb; }
virtual void SetName(string name) { Name = name; }
- virtual void AddFeedTank(int tkID);
+ virtual void AddFeedTank(int tkID, int priority);
virtual void SetFuelFreeze(bool f) { FuelFreeze = f; }
virtual void SetStarter(bool s) { Starter = s; }
bool LoadThruster(Element *el);
FGThruster* GetThruster(void) {return Thruster;}
- virtual string GetEngineLabels(string delimeter) = 0;
- virtual string GetEngineValues(string delimeter) = 0;
+ virtual std::string GetEngineLabels(const std::string& delimiter) = 0;
+ virtual std::string GetEngineValues(const std::string& delimiter) = 0;
protected:
/** Reduces the fuel in the active tanks by the amount required.
virtual double CalcFuelNeed(void);
FGPropertyManager* PropertyManager;
- string Name;
+ std::string Name;
const int EngineNumber;
EngineType Type;
double X, Y, Z;
double FuelFlow_gph;
double FuelFlow_pph;
+ double FuelDensity;
FGFDMExec* FDMExec;
FGState* State;
FGAuxiliary* Auxiliary;
FGThruster* Thruster;
- vector <int> SourceTanks;
+ std::vector <int> SourceTanks;
void Debug(int from);
};
}
-#include <FGState.h>
-#include <FGFDMExec.h>
-#include <models/FGAtmosphere.h>
-#include <models/FGFCS.h>
-#include <models/FGAircraft.h>
-#include <models/FGPropagate.h>
-#include <models/FGPropulsion.h>
-#include <models/FGAuxiliary.h>
-#include <models/propulsion/FGThruster.h>
-#include <input_output/FGXMLElement.h>
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif
*/
#include "FGForce.h"
-#include <FGFDMExec.h>
-#include <models/FGAircraft.h>
-#include <models/FGPropagate.h>
-#include <models/FGMassBalance.h>
-#include <models/FGAerodynamics.h>
+#include "FGFDMExec.h"
+#include "models/FGAircraft.h"
+#include "models/FGPropagate.h"
+#include "models/FGMassBalance.h"
+#include "models/FGAerodynamics.h"
+#include <iostream>
+#include <cstdlib>
+
+using namespace std;
namespace JSBSim {
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FGForce::FGForce(FGFDMExec *FDMExec) :
- ttype(tNone),
- fdmex(FDMExec)
+ fdmex(FDMExec),
+ ttype(tNone)
{
mT(1,1) = 1; //identity matrix
mT(2,2) = 1;
void FGForce::UpdateCustomTransformMatrix(void)
{
double cp,sp,cr,sr,cy,sy;
+ double srsp, crcy, crsy;
cp=cos(vOrient(ePitch)); sp=sin(vOrient(ePitch));
cr=cos(vOrient(eRoll)); sr=sin(vOrient(eRoll));
cy=cos(vOrient(eYaw)); sy=sin(vOrient(eYaw));
+ srsp = sr*sp;
+ crcy = cr*cy;
+ crsy = cr*sy;
+
mT(1,1) = cp*cy;
- mT(1,2) = cp*sy;
- mT(1,3) = -sp;
+ mT(2,1) = cp*sy;
+ mT(3,1) = -sp;
- mT(2,1) = sr*sp*cy - cr*sy;
- mT(2,2) = sr*sp*sy + cr*cy;
- mT(2,3) = sr*cp;
+ mT(1,2) = srsp*cy - crsy;
+ mT(2,2) = srsp*sy + crcy;
+ mT(3,2) = sr*cp;
- mT(3,1) = cr*sp*cy + sr*sy;
- mT(3,2) = cr*sp*sy - sr*cy;
+ mT(1,3) = crcy*sp + sr*sy;
+ mT(2,3) = crsy*sp - sr*cy;
mT(3,3) = cr*cp;
- mT = mT.Inverse();
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <FGFDMExec.h>
-#include <FGJSBBase.h>
-#include <math/FGMatrix33.h>
-#include <math/FGColumnVector3.h>
+#include "FGFDMExec.h"
+#include "FGJSBBase.h"
+#include "math/FGMatrix33.h"
+#include "math/FGColumnVector3.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
virtual FGColumnVector3& GetBodyForces(void);
+ inline double GetBodyXForce(void) const { return vFb(eX); }
+ inline double GetBodyYForce(void) const { return vFb(eY); }
+ inline double GetBodyZForce(void) const { return vFb(eZ); }
inline FGColumnVector3& GetMoments(void) { return vM; }
// Normal point of application, JSBsim structural coords
inline void SetLocation(FGColumnVector3 vv) { vXYZn = vv; SetActingLocation(vv);}
inline void SetActingLocation(FGColumnVector3 vv) { vActingXYZn = vv; }
- inline double GetLocationX( void ) { return vXYZn(eX);}
- inline double GetLocationY( void ) { return vXYZn(eY);}
- inline double GetLocationZ( void ) { return vXYZn(eZ);}
- inline double GetActingLocationX( void ) { return vActingXYZn(eX);}
- inline double GetActingLocationY( void ) { return vActingXYZn(eY);}
- inline double GetActingLocationZ( void ) { return vActingXYZn(eZ);}
+ inline double GetLocationX( void ) const { return vXYZn(eX);}
+ inline double GetLocationY( void ) const { return vXYZn(eY);}
+ inline double GetLocationZ( void ) const { return vXYZn(eZ);}
+ inline double GetActingLocationX( void ) const { return vActingXYZn(eX);}
+ inline double GetActingLocationY( void ) const { return vActingXYZn(eY);}
+ inline double GetActingLocationZ( void ) const { return vActingXYZn(eZ);}
FGColumnVector3& GetLocation(void) { return vXYZn; }
FGColumnVector3& GetActingLocation(void) { return vActingXYZn; }
double GetYaw(void) const {return vOrient(eYaw);}
inline FGColumnVector3& GetAnglesToBody(void) {return vOrient;}
- inline double GetAnglesToBody(int axis) {return vOrient(axis);}
+ inline double GetAnglesToBody(int axis) const {return vOrient(axis);}
inline void SetTransformType(TransformType ii) { ttype=ii; }
- inline TransformType GetTransformType(void) { return ttype; }
+ inline TransformType GetTransformType(void) const { return ttype; }
FGMatrix33 Transform(void);
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+#include <iostream>
#include <sstream>
+#include <cstdlib>
#include "FGNozzle.h"
-#include <models/FGAtmosphere.h>
+#include "models/FGAtmosphere.h"
+#include "input_output/FGXMLElement.h"
+
+using namespace std;
namespace JSBSim {
cerr << "Fatal Error: Nozzle exit area must be given in nozzle config file." << endl;
exit(-1);
}
-
+/*
if (nozzle_element->FindElement("pe"))
PE = nozzle_element->FindElementValueAsNumberConvertTo("pe", "PSF");
else {
cerr << "Fatal Error: Nozzle exit pressure must be given in nozzle config file." << endl;
exit(-1);
}
-
+*/
Thrust = 0;
Type = ttNozzle;
string GetThrusterValues(int id, string delimeter);
private:
- double PE;
+// double PE;
double Area;
void Debug(int from);
};
#include <sstream>
#include "FGPiston.h"
-#include <models/FGPropulsion.h>
+#include "FGState.h"
+#include "models/FGAtmosphere.h"
+#include "models/FGPropulsion.h"
#include "FGPropeller.h"
+#include <iostream>
+
+using namespace std;
namespace JSBSim {
rho_fuel(800), // estimate
calorific_value_fuel(47.3e6),
Cp_air(1005), // Specific heat (constant pressure) J/Kg/K
- Cp_fuel(1700)
+ Cp_fuel(1700),
+ standard_pressure(101320.73)
{
string token;
MinManifoldPressure_inHg = 6.5;
MaxManifoldPressure_inHg = 28.5;
ISFC = -1;
- volumetric_efficiency = -0.1;
+ volumetric_efficiency = 0.85;
Bore = 5.125;
Stroke = 4.375;
Cylinders = 4;
CompressionRatio = 8.5;
+ Z_airbox = -999;
+ Ram_Air_Factor = 1;
+ PeakMeanPistonSpeed_fps = 100;
// These are internal program variables
BoostSpeed = 0;
Boosted = false;
BoostOverride = 0;
+ BoostManual = 0;
bBoostOverride = false;
bTakeoffBoost = false;
TakeoffBoost = 0.0; // Default to no extra takeoff-boost
Stroke = el->FindElementValueAsNumberConvertTo("stroke","IN");
if (el->FindElement("cylinders"))
Cylinders = el->FindElementValueAsNumber("cylinders");
+ if (el->FindElement("air-intake-impedance-factor"))
+ Z_airbox = el->FindElementValueAsNumber("air-intake-impedance-factor");
+ if (el->FindElement("ram-air-factor"))
+ Ram_Air_Factor = el->FindElementValueAsNumber("ram-air-factor");
+ if (el->FindElement("peak-piston-speed"))
+ PeakMeanPistonSpeed_fps = el->FindElementValueAsNumber("peak-piston-speed");
if (el->FindElement("numboostspeeds")) { // Turbo- and super-charging parameters
BoostSpeeds = (int)el->FindElementValueAsNumber("numboostspeeds");
if (el->FindElement("boostoverride"))
BoostOverride = (int)el->FindElementValueAsNumber("boostoverride");
+ if (el->FindElement("boostmanual"))
+ BoostManual = (int)el->FindElementValueAsNumber("boostmanual");
if (el->FindElement("takeoffboost"))
TakeoffBoost = el->FindElementValueAsNumberConvertTo("takeoffboost", "PSI");
if (el->FindElement("ratedboost1"))
StarterHP = sqrt(MaxHP) * 0.4;
displacement_SI = Displacement * in3tom3;
+ RatedMeanPistonSpeed_fps = ( MaxRPM * Stroke) / (360); // AKA 2 * (RPM/60) * ( Stroke / 12) or 2NS
- // Create IFSC and VE to match the engine if not provided
- int calculated_ve=0;
- if (volumetric_efficiency < 0) {
- volumetric_efficiency = MaxManifoldPressure_inHg / 29.92;
- calculated_ve=1;
- }
+ // Create IFSC to match the engine if not provided
if (ISFC < 0) {
- double pmep = MaxManifoldPressure_inHg > 29.92 ? 0 : 29.92 - MaxManifoldPressure_inHg;
+ double pmep = 29.92 - MaxManifoldPressure_inHg;
pmep *= inhgtopa;
- double fmep = (18400 * (2*(Stroke/12)*(MaxRPM/60)) * fttom + 46500)/2;
+ double fmep = (18400 * RatedMeanPistonSpeed_fps * fttom + 46500);
double hp_loss = ((pmep + fmep) * displacement_SI * MaxRPM)/(Cycles*22371);
- ISFC = ( Displacement * MaxRPM * volumetric_efficiency ) / (9411 * (MaxHP+hp_loss));
+ ISFC = ( 1.1*Displacement * MaxRPM * volumetric_efficiency *(MaxManifoldPressure_inHg / 29.92) ) / (9411 * (MaxHP+hp_loss));
// cout <<"FMEP: "<< fmep <<" PMEP: "<< pmep << " hp_loss: " <<hp_loss <<endl;
}
if ( MaxManifoldPressure_inHg > 29.9 ) { // Don't allow boosting with a bogus number
MaxManifoldPressure_inHg = 29.9;
- if (calculated_ve) volumetric_efficiency = 1.0;
}
minMAP = MinManifoldPressure_inHg * inhgtopa; // inHg to Pa
maxMAP = MaxManifoldPressure_inHg * inhgtopa;
+// For throttle
+/*
+ * Pm = ( Ze / ( Ze + Zi + Zt ) ) * Pa
+ * Where:
+ * Pm = Manifold Pressure
+ * Pa = Ambient Pressre
+ * Ze = engine impedance, Ze is effectively 1 / Mean Piston Speed
+ * Zi = airbox impedance
+ * Zt = throttle impedance
+ *
+ * For the calculation below throttle is fully open or Zt = 0
+ *
+ *
+ *
+ */
+
+ if(Z_airbox < 0.0){
+ double Ze=PeakMeanPistonSpeed_fps/RatedMeanPistonSpeed_fps; // engine impedence
+ Z_airbox = (standard_pressure *Ze / maxMAP) - Ze; // impedence of airbox
+ }
+ Z_throttle=(((MaxRPM * Stroke) / 360)/((IdleRPM * Stroke) / 360))*(standard_pressure/minMAP - 1) - Z_airbox; // Constant for Throttle impedence
+
string property_name, base_property_name;
base_property_name = CreateIndexedPropertyName("propulsion/engine", EngineNumber);
property_name = base_property_name + "/power-hp";
PropertyManager->Tie(property_name, &MAP);
property_name = base_property_name + "/map-inhg";
PropertyManager->Tie(property_name, &ManifoldPressure_inHg);
+ property_name = base_property_name + "/air-intake-impedance-factor";
+ PropertyManager->Tie(property_name, &Z_airbox);
+ property_name = base_property_name + "/ram-air-factor";
+ PropertyManager->Tie(property_name, &Ram_Air_Factor);
+ property_name = base_property_name + "/boost-speed";
+ PropertyManager->Tie(property_name, &BoostSpeed);
// Set up and sanity-check the turbo/supercharging configuration based on the input values.
if (TakeoffBoost > RatedBoost[0]) bTakeoffBoost = true;
BoostSpeed = 0;
}
bBoostOverride = (BoostOverride == 1 ? true : false);
+ bBoostManual = (BoostManual == 1 ? true : false);
Debug(0); // Call Debug() routine from constructor if needed
}
//
p_amb = Atmosphere->GetPressure() * psftopa;
+ double p = Auxiliary->GetTotalPressure() * psftopa;
+ p_ram = (p - p_amb) * Ram_Air_Factor + p_amb;
T_amb = RankineToKelvin(Atmosphere->GetTemperature());
RPM = Thruster->GetRPM() * Thruster->GetGearRatio();
void FGPiston::doBoostControl(void)
{
- if(BoostSpeed < BoostSpeeds - 1) {
- // Check if we need to change to a higher boost speed
- if(p_amb < BoostSwitchPressure[BoostSpeed] - BoostSwitchHysteresis) {
- BoostSpeed++;
- }
- } else if(BoostSpeed > 0) {
- // Check if we need to change to a lower boost speed
- if(p_amb > BoostSwitchPressure[BoostSpeed - 1] + BoostSwitchHysteresis) {
- BoostSpeed--;
+ if(BoostManual) {
+ if(BoostSpeed > BoostSpeeds-1) BoostSpeed = BoostSpeeds-1;
+ if(BoostSpeed < 0) BoostSpeed = 0;
+ } else {
+ if(BoostSpeed < BoostSpeeds - 1) {
+ // Check if we need to change to a higher boost speed
+ if(p_amb < BoostSwitchPressure[BoostSpeed] - BoostSwitchHysteresis) {
+ BoostSpeed++;
+ }
+ } else if(BoostSpeed > 0) {
+ // Check if we need to change to a lower boost speed
+ if(p_amb > BoostSwitchPressure[BoostSpeed - 1] + BoostSwitchHysteresis) {
+ BoostSpeed--;
+ }
}
}
}
void FGPiston::doMAP(void)
{
- // estimate throttle plate area.
- double throttle_area = ThrottleAngle*ThrottleAngle;
- // Internal Combustion Engine in Theory and Practice, Volume 2. Charles Fayette Taylor. Revised Edition, 1985 fig 6-13
- double map_coefficient = 1-((MeanPistonSpeed_fps*MeanPistonSpeed_fps)/(24978*throttle_area));
+ double Zt =(1-Throttle)*(1-Throttle)*Z_throttle; // throttle impedence
+ double Ze= MeanPistonSpeed_fps > 0 ? PeakMeanPistonSpeed_fps/MeanPistonSpeed_fps : 999999; // engine impedence
- if ( map_coefficient < 0.1 ) map_coefficient = 0.1;
+ double map_coefficient = Ze/(Ze+Z_airbox+Zt);
// Add a one second lag to manifold pressure changes
- double dMAP = (TMAP - p_amb * map_coefficient) * dt;
+ double dMAP = (TMAP - p_ram * map_coefficient) * dt;
TMAP -=dMAP;
// Find the mean effective pressure required to achieve this manifold pressure
}
}
// Boost the manifold pressure.
- double boost_factor = BoostMul[BoostSpeed] * RPM/RatedRPM[BoostSpeed];
- if (boost_factor < 1.0) boost_factor = 1.0; // boost will never reduce the MAP
+ double boost_factor = (( BoostMul[BoostSpeed] - 1 ) / RatedRPM[BoostSpeed] ) * RPM + 1;
MAP = TMAP * boost_factor;
// Now clip the manifold pressure to BCV or Wastegate setting.
if (bTakeoffPos) {
void FGPiston::doAirFlow(void)
{
- double gamma = 1.4; // specific heat constants
+ double gamma = 1.1; // specific heat constants
// loss of volumentric efficiency due to difference between MAP and exhaust pressure
double ve =((gamma-1)/gamma)+( CompressionRatio -(p_amb/MAP))/(gamma*( CompressionRatio - 1));
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string FGPiston::GetEngineLabels(string delimeter)
+string FGPiston::GetEngineLabels(const string& delimiter)
{
std::ostringstream buf;
- buf << Name << " Power Available (engine " << EngineNumber << " in HP)" << delimeter
- << Name << " HP (engine " << EngineNumber << ")" << delimeter
- << Name << " equivalent ratio (engine " << EngineNumber << ")" << delimeter
- << Name << " MAP (engine " << EngineNumber << " in inHg)" << delimeter
- << Thruster->GetThrusterLabels(EngineNumber, delimeter);
+ buf << Name << " Power Available (engine " << EngineNumber << " in HP)" << delimiter
+ << Name << " HP (engine " << EngineNumber << ")" << delimiter
+ << Name << " equivalent ratio (engine " << EngineNumber << ")" << delimiter
+ << Name << " MAP (engine " << EngineNumber << " in inHg)" << delimiter
+ << Thruster->GetThrusterLabels(EngineNumber, delimiter);
return buf.str();
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string FGPiston::GetEngineValues(string delimeter)
+string FGPiston::GetEngineValues(const string& delimiter)
{
std::ostringstream buf;
- buf << PowerAvailable << delimeter << HP << delimeter
- << equivalence_ratio << delimeter << ManifoldPressure_inHg << delimeter
- << Thruster->GetThrusterValues(EngineNumber, delimeter);
+ buf << PowerAvailable << delimiter << HP << delimiter
+ << equivalence_ratio << delimiter << ManifoldPressure_inHg << delimiter
+ << Thruster->GetThrusterValues(EngineNumber, delimiter);
return buf.str();
}
cout << " MaxHP: " << MaxHP << endl;
cout << " Cycles: " << Cycles << endl;
cout << " IdleRPM: " << IdleRPM << endl;
+ cout << " MaxRPM: " << MaxRPM << endl;
cout << " MaxThrottle: " << MaxThrottle << endl;
cout << " MinThrottle: " << MinThrottle << endl;
cout << " ISFC: " << ISFC << endl;
- cout << " Volumentric Efficiency: " << volumetric_efficiency << endl;
+ cout << " Volumetric Efficiency: " << volumetric_efficiency << endl;
+ cout << " PeakMeanPistonSpeed_fps: " << PeakMeanPistonSpeed_fps << endl;
+ cout << " Intake Impedance Factor: " << Z_airbox << endl;
cout << endl;
cout << " Combustion Efficiency table:" << endl;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGEngine.h"
-#include <math/FGTable.h>
-#include <input_output/FGXMLElement.h>
+#include "math/FGTable.h"
+#include "input_output/FGXMLElement.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
<maxthrottle> {number} </maxthrottle>
<minthrottle> {number} </minthrottle>
<bsfc unit="{LBS/HP*HR | "KG/KW*HR"}"> {number} </bsfc>
- <volumetric_efficiency> {number} </volumetric_efficiency>
+ <volumetric-efficiency> {number} </volumetric-efficiency>
<numboostspeeds> {number} </numboostspeeds>
<boostoverride> {0 | 1} </boostoverride>
+ <boostmanual> {0 | 1} </boostmanual>
<ratedboost1 unit="{INHG | PA | ATM}"> {number} </ratedboost1>
<ratedpower1 unit="{HP | WATTS}"> {number} </ratedpower1>
<ratedrpm1> {number} </ratedrpm1>
<ratedrpm3> {number} </ratedrpm3>
<ratedaltitude3 unit="{FT | M}"> {number} </ratedaltitude3>
<takeoffboost unit="{INHG | PA | ATM}"> {number} </takeoffboost>
+ <air-intake-impedance-factor> {number} </air-intake-impedance-factor>
+ <ram-air-factor> {number} </ram-air-factor>
</piston_engine>
@endcode
some way of getting the boost control cutout lever position (on or off)
from FlightGear first.
+ - BOOSTMANUAL - whether a multispeed supercharger will manually or
+ automatically shift boost speeds. On manual shifting the boost speeds
+ is accomplished by controling propulsion/engine/boostspeed
+
- The next items are all appended with either 1, 2 or 3 depending on which
boost speed they refer to, eg RATEDBOOST1. The rated values seems to have
been a common convention at the time to express the maximum continuously
/// Destructor
~FGPiston();
- string GetEngineLabels(string delimeter);
- string GetEngineValues(string delimeter);
+ std::string GetEngineLabels(const std::string& delimiter);
+ std::string GetEngineValues(const std::string& delimiter);
double Calculate(void);
double GetPowerAvailable(void) {return PowerAvailable;}
const double calorific_value_fuel; // W/Kg (approximate)
const double Cp_air; // J/KgK
const double Cp_fuel; // J/KgK
+ const double standard_pressure; //Pa
+
FGTable *Lookup_Combustion_Efficiency;
FGTable *Mixture_Efficiency_Correlation;
double Bore; // inches
double Stroke; // inches
double Cylinders; // number
- double CompressionRatio; // number
+ double CompressionRatio; // number
+ double Z_airbox; // number representing intake impediance before the throttle
+ double Z_throttle; // number representing slope of throttle impediance
+ double PeakMeanPistonSpeed_fps; // ft/sec speed where intake valves begin to choke. Typically 33-50 fps
+ double RatedMeanPistonSpeed_fps; // ft/sec derived from MaxRPM and stroke.
+ double Ram_Air_Factor; // number
double StarterHP; // initial horsepower of starter motor
int BoostSpeeds; // Number of super/turbocharger boost speeds - zero implies no turbo/supercharging.
int BoostSpeed; // The current boost-speed (zero-based).
bool Boosted; // Set true for boosted engine.
+ int BoostManual; // The raw value read in from the config file - should be 1 or 0 - see description below.
+ bool bBoostManual; // Set true if pilot must manually control the boost speed.
int BoostOverride; // The raw value read in from the config file - should be 1 or 0 - see description below.
bool bBoostOverride; // Set true if pilot override of the boost regulator was fitted.
// (Typically called 'war emergency power').
// Inputs (in addition to those in FGEngine).
//
double p_amb; // Pascals
+ double p_ram; // Pascals
double T_amb; // degrees Kelvin
double RPM; // revolutions per minute
double IAS; // knots
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+#include <iostream>
#include <sstream>
#include "FGPropeller.h"
-#include <models/FGPropagate.h>
-#include <models/FGAtmosphere.h>
-#include <models/FGAuxiliary.h>
+#include "models/FGPropagate.h"
+#include "models/FGAtmosphere.h"
+#include "models/FGAuxiliary.h"
+#include "input_output/FGXMLElement.h"
+
+using namespace std;
namespace JSBSim {
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGThruster.h"
-#include <math/FGTable.h>
+#include "math/FGTable.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+#include <iostream>
#include <sstream>
-
#include "FGRocket.h"
+#include "FGState.h"
+#include "models/FGPropulsion.h"
+#include "FGThruster.h"
+#include "FGTank.h"
+
+using namespace std;
namespace JSBSim {
FuelFlowRate = 0.0;
OxidizerFlowRate = 0.0;
SLOxiFlowMax = 0.0;
+ BuildupTime = 0.0;
It = 0.0;
+ ThrustVariation = 0.0;
+ TotalIspVariation = 0.0;
// Defaults
MinThrottle = 0.0;
if (el->FindElement("isp"))
Isp = el->FindElementValueAsNumber("isp");
+ if (el->FindElement("builduptime"))
+ BuildupTime = el->FindElementValueAsNumber("builduptime");
if (el->FindElement("maxthrottle"))
MaxThrottle = el->FindElementValueAsNumber("maxthrottle");
if (el->FindElement("minthrottle"))
if (el->FindElement("sloxiflowmax"))
SLOxiFlowMax = el->FindElementValueAsNumberConvertTo("sloxiflowmax", "LBS/SEC");
+ // If there is a thrust table element, this is a solid propellant engine.
thrust_table_element = el->FindElement("thrust_table");
if (thrust_table_element) {
ThrustTable = new FGTable(PropertyManager, thrust_table_element);
+ Element* variation_element = el->FindElement("variation");
+ if (variation_element) {
+ if (variation_element->FindElement("thrust")) {
+ ThrustVariation = variation_element->FindElementValueAsNumber("thrust");
+ }
+ if (variation_element->FindElement("total_isp")) {
+ TotalIspVariation = variation_element->FindElementValueAsNumber("total_isp");
+ }
+ }
}
bindmodel();
PropellantFlowRate = (FuelExpended + OxidizerExpended)/dT;
Throttle = FCS->GetThrottlePos(EngineNumber);
- // If there is a thrust table, it is a function of propellant remaining. The
+ // If there is a thrust table, it is a function of propellant burned. The
// engine is started when the throttle is advanced to 1.0. After that, it
- // burns without regard to throttle setting. The table returns a value between
- // zero and one, representing the percentage of maximum vacuum thrust being
- // applied.
+ // burns without regard to throttle setting.
if (ThrustTable != 0L) { // Thrust table given -> Solid fuel used
if ((Throttle == 1 || BurnTime > 0.0 ) && !Starved) {
- BurnTime += State->Getdt();
- double TotalEngineFuelAvailable=0.0;
- for (int i=0; i<(int)SourceTanks.size(); i++)
- TotalEngineFuelAvailable += Propulsion->GetTank(SourceTanks[i])->GetContents();
-
- VacThrust = ThrustTable->GetValue(TotalEngineFuelAvailable);
+ double TotalEngineFuelBurned=0.0;
+ for (int i=0; i<(int)SourceTanks.size(); i++) {
+ FGTank* tank = Propulsion->GetTank(i);
+ if (SourceTanks[i] == 1) {
+ TotalEngineFuelBurned += tank->GetCapacity() - tank->GetContents();
+ }
+ }
+
+ VacThrust = ThrustTable->GetValue(TotalEngineFuelBurned)
+ * (ThrustVariation + 1)
+ * (TotalIspVariation + 1);
+ if (BurnTime <= BuildupTime && BuildupTime > 0.0) {
+ VacThrust *= sin((BurnTime/BuildupTime)*M_PI/2.0);
+ // VacThrust *= (1-cos((BurnTime/BuildupTime)*M_PI))/2.0; // 1 - cos approach
+ }
+ BurnTime += State->Getdt(); // Increment burn time
} else {
VacThrust = 0.0;
}
} else { // Calculate thrust
- PctPower = Throttle / MaxThrottle; // Min and MaxThrottle range from 0.0 to 1.0, normally.
+ // This is nonsensical. Max throttle should be assumed to be 1.0. One might
+ // conceivably have a throttle setting > 1.0 for some rocket engines. But, 1.0
+ // should always be the default.
+ // PctPower = Throttle / MaxThrottle; // Min and MaxThrottle range from 0.0 to 1.0, normally.
+
+ PctPower = Throttle;
Flameout = false;
VacThrust = Isp * PropellantFlowRate;
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+//
+// The FuelFlowRate can be affected by the TotalIspVariation value (settable
+// in a config file or via properties). The TotalIspVariation parameter affects
+// thrust, but the thrust determines fuel flow rate, so it must be adjusted
+// for Total Isp Variation.
double FGRocket::CalcFuelNeed(void)
{
if (ThrustTable != 0L) { // Thrust table given - infers solid fuel
FuelFlowRate = VacThrust/Isp; // This calculates wdot (weight flow rate in lbs/sec)
+ FuelFlowRate /= (1 + TotalIspVariation);
} else {
FuelFlowRate = SLFuelFlowMax*PctPower;
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string FGRocket::GetEngineLabels(string delimeter)
+string FGRocket::GetEngineLabels(const string& delimiter)
{
std::ostringstream buf;
- buf << Name << " Total Impulse (engine " << EngineNumber << " in psf)" << delimeter
- << Thruster->GetThrusterLabels(EngineNumber, delimeter);
+ buf << Name << " Total Impulse (engine " << EngineNumber << " in psf)" << delimiter
+ << Thruster->GetThrusterLabels(EngineNumber, delimiter);
return buf.str();
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string FGRocket::GetEngineValues(string delimeter)
+string FGRocket::GetEngineValues(const string& delimiter)
{
std::ostringstream buf;
- buf << It << delimeter << Thruster->GetThrusterValues(EngineNumber, delimeter);
+ buf << It << delimiter << Thruster->GetThrusterValues(EngineNumber, delimiter);
return buf.str();
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-// This funciton should tie properties to rocket engine specific properties
+// This function should tie properties to rocket engine specific properties
// that are not bound in the base class (FGEngine) code.
//
void FGRocket::bindmodel()
property_name = base_property_name + "/total-impulse";
PropertyManager->Tie( property_name.c_str(), this, &FGRocket::GetTotalImpulse);
- property_name = base_property_name + "/oxi-flow-rate-pps";
- PropertyManager->Tie( property_name.c_str(), this, &FGRocket::GetOxiFlowRate);
property_name = base_property_name + "/vacuum-thrust_lbs";
PropertyManager->Tie( property_name.c_str(), this, &FGRocket::GetVacThrust);
+
+ if (ThrustTable) { // Solid rocket motor
+ property_name = base_property_name + "/thrust-variation_pct";
+ PropertyManager->Tie( property_name.c_str(), this, &FGRocket::GetThrustVariation,
+ &FGRocket::SetThrustVariation);
+ property_name = base_property_name + "/total-isp-variation_pct";
+ PropertyManager->Tie( property_name.c_str(), this, &FGRocket::GetTotalIspVariation,
+ &FGRocket::SetTotalIspVariation);
+ } else { // Liquid rocket motor
+ property_name = base_property_name + "/oxi-flow-rate-pps";
+ PropertyManager->Tie( property_name.c_str(), this, &FGRocket::GetOxiFlowRate);
+ }
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGEngine.h"
-#include <math/FGTable.h>
-#include <input_output/FGXMLElement.h>
+#include "math/FGTable.h"
+#include "input_output/FGXMLElement.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
double GetOxiFlowRate(void) const {return OxidizerFlowRate;}
- string GetEngineLabels(string delimeter);
- string GetEngineValues(string delimeter);
+ std::string GetEngineLabels(const std::string& delimiter);
+ std::string GetEngineValues(const std::string& delimiter);
+
+ /** Sets the thrust variation for a solid rocket engine.
+ Solid propellant rocket motor thrust characteristics are typically
+ defined at 70 degrees F temperature. At any other temperature,
+ performance will be different. Warmer propellant grain will
+ burn quicker and at higher thrust. Total motor impulse is
+ not changed for change in thrust.
+ @param var the variation in percent. That is, a 2 percent
+ variation would be specified as 0.02. A positive 2% variation
+ in thrust would increase the thrust by 2%, and shorten the burn time. */
+ void SetThrustVariation(double var) {ThrustVariation = var;}
+
+ /** Sets the variation in total motor energy.
+ The total energy present in a solid rocket motor can be modified
+ (such as might happen with manufacturing variations) by setting
+ the total Isp variation.
+ @param var the variation in percent. That is, a 2 percent
+ variation would be specified as 0.02. This variation will
+ affect the total thrust, but not the burn time.*/
+ void SetTotalIspVariation(double var) {TotalIspVariation = var;}
+
+ /** Returns the thrust variation, if any. */
+ double GetThrustVariation(void) const {return ThrustVariation;}
+
+ /** Returns the Total Isp variation, if any. */
+ double GetTotalIspVariation(void) const {return TotalIspVariation;}
private:
/** Reduces the fuel in the active tanks by the amount required.
double It;
double MxR; // Mixture Ratio
double BurnTime;
+ double ThrustVariation;
+ double TotalIspVariation;
double VacThrust;
double previousFuelNeedPerTank;
double previousOxiNeedPerTank;
double OxidizerFlowRate;
double PropellantFlowRate;
bool Flameout;
+ double BuildupTime;
FGTable* ThrustTable;
void Debug(int from);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGRotor.h"
+#include <iostream>
+
+using namespace std;
namespace JSBSim {
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGTank.h"
-#include <models/FGAuxiliary.h>
+#include "FGFDMExec.h"
+#include "models/FGAuxiliary.h"
+#include "input_output/FGXMLElement.h"
+#include "input_output/FGPropertyManager.h"
+#include <iostream>
+#include <cstdlib>
-using std::cerr;
-using std::endl;
-using std::cout;
+using namespace std;
namespace JSBSim {
FGTank::FGTank(FGFDMExec* exec, Element* el, int tank_number)
: TankNumber(tank_number), Exec(exec)
{
- string token;
+ string token, strFuelName;
Element* element;
Element* element_Grain;
Area = 1.0;
- Temperature = -9999.0;
+ Density = 6.6;
+ InitialTemperature = Temperature = -9999.0;
Ixx = Iyy = Izz = 0.0;
- Radius = Capacity = Contents = Standpipe = Length = InnerRadius = 0.0;
+ Radius = Contents = Standpipe = Length = InnerRadius = 0.0;
+ Capacity = 0.00001;
+ Priority = InitialPriority = 1;
PropertyManager = Exec->GetPropertyManager();
vXYZ.InitMatrix();
vXYZ_drain.InitMatrix();
InitialTemperature = Temperature = el->FindElementValueAsNumber("temperature");
if (el->FindElement("standpipe"))
InitialStandpipe = Standpipe = el->FindElementValueAsNumberConvertTo("standpipe", "LBS");
+ if (el->FindElement("priority"))
+ InitialPriority = Priority = el->FindElementValueAsNumber("priority");
+ if (el->FindElement("density"))
+ Density = el->FindElementValueAsNumberConvertTo("density", "LBS/GAL");
+ if (el->FindElement("type"))
+ strFuelName = el->FindElementValue("type");
- Selected = true;
- if (Capacity != 0) {
- PctFull = 100.0*Contents/Capacity; // percent full; 0 to 100.0
- } else {
- Contents = 0;
- PctFull = 0;
+ SetPriority( InitialPriority ); // this will also set the Selected flag
+
+ if (Capacity == 0) {
+ cerr << "Tank capacity must not be zero. Reset to 0.00001 lbs!" << endl;
+ Capacity = 0.00001;
+ Contents = 0.0;
}
+ PctFull = 100.0*Contents/Capacity; // percent full; 0 to 100.0
// Check whether this is a solid propellant "tank". Initialize it if true.
property_name = base_property_name + "/contents-lbs";
PropertyManager->Tie( property_name.c_str(), (FGTank*)this, &FGTank::GetContents,
&FGTank::SetContents );
+ property_name = base_property_name + "/priority";
+ PropertyManager->Tie( property_name.c_str(), (FGTank*)this, &FGTank::GetPriority,
+ &FGTank::SetPriority );
if (Temperature != -9999.0) InitialTemperature = Temperature = FahrenheitToCelsius(Temperature);
Area = 40.0 * pow(Capacity/1975, 0.666666667);
+ // A named fuel type will override a previous density value
+ if (!strFuelName.empty()) Density = ProcessFuelName(strFuelName);
+
Debug(0);
}
void FGTank::ResetToIC(void)
{
- Temperature = InitialTemperature;
- Standpipe = InitialStandpipe;
- Contents = InitialContents;
+ SetTemperature( InitialTemperature );
+ SetStandpipe ( InitialStandpipe );
+ SetContents ( InitialContents );
PctFull = 100.0*Contents/Capacity;
- Selected = true;
+ SetPriority( InitialPriority );
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Contents = 0.0;
PctFull = 0.0;
- Selected = false;
}
if (grainType != gtUNKNOWN) CalculateInertias();
}
}
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+void FGTank::SetContentsGallons(double gallons)
+{
+ SetContents(gallons * Density);
+}
+
+
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
double FGTank::Calculate(double dt)
Ixx = 0.5*Mass*Rad2/144.0;
Iyy = Mass*(3.0*Rad2 + Length*Length)/(144.0*12.0);
break;
+ case gtUNKNOWN:
+ cerr << "Unknown grain type found." << endl;
+ exit(-1);
+ break;
}
Izz = Iyy;
}
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+double FGTank::ProcessFuelName(std::string const& name)
+{
+ if (name == "AVGAS") return 6.02;
+ else if (name == "JET-A") return 6.74;
+ else if (name == "JET-A1") return 6.74;
+ else if (name == "JET-B") return 6.48;
+ else if (name == "JP-1") return 6.76;
+ else if (name == "JP-2") return 6.38;
+ else if (name == "JP-3") return 6.34;
+ else if (name == "JP-4") return 6.48;
+ else if (name == "JP-5") return 6.81;
+ else if (name == "JP-6") return 6.55;
+ else if (name == "JP-7") return 6.61;
+ else if (name == "JP-8") return 6.66;
+ else if (name == "JP-8+100") return 6.66;
+ //else if (name == "JP-9") return 6.74;
+ //else if (name == "JPTS") return 6.74;
+ else if (name == "RP-1") return 6.73;
+ else if (name == "T-1") return 6.88;
+ else if (name == "ETHANOL") return 6.58;
+ else if (name == "HYDRAZINE")return 8.61;
+ else if (name == "F-34") return 6.66;
+ else if (name == "F-35") return 6.74;
+ else if (name == "F-40") return 6.48;
+ else if (name == "F-44") return 6.81;
+ else if (name == "AVTAG") return 6.48;
+ else if (name == "AVCAT") return 6.81;
+ else {
+ cerr << "Unknown fuel type specified: "<< name << endl;
+ }
+
+ return 6.6;
+}
+
+
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// The bitmasked value choices are as follows:
// unset: In this case (the default) JSBSim would only print
cout << " Tank location (X, Y, Z): " << vXYZ(eX) << ", " << vXYZ(eY) << ", " << vXYZ(eZ) << endl;
cout << " Effective radius: " << Radius << " inches" << endl;
cout << " Initial temperature: " << Temperature << " Fahrenheit" << endl;
+ cout << " Priority: " << Priority << endl;
}
}
if (debug_lvl & 2 ) { // Instantiation/Destruction notification
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include "FGFDMExec.h"
-#include <FGJSBBase.h>
-#include <input_output/FGXMLElement.h>
-#include <math/FGColumnVector3.h>
+#include "FGJSBBase.h"
+#include "math/FGColumnVector3.h"
#include <string>
-using std::string;
-using std::cerr;
-using std::endl;
-using std::cout;
-
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
+class Element;
+class FGPropertyManager;
+class FGFDMExec;
+
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DOCUMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
<contents unit="{LBS | KG}"> {number} </contents>
<temperature> {number} </temperature> <!-- must be degrees fahrenheit -->
<standpipe unit="{LBS | KG"}> {number} </standpipe>
+ <priority> {integer} </priority>
+ <density unit="{KG/L | LBS/GAL}"> {number} </density>
+ <type> {string} </type> <!-- will override previous density setting -->
</tank>
@endcode
- \b contents - Initial contents, defaults to pounds.
- \b temperature - Initial temperature, defaults to degrees Fahrenheit.
- \b standpipe - Minimum contents to which tank can dump, defaults to pounds.
+- \b priority - Establishes feed sequence of tank. "1" is the highest priority.
+- \b density - Density of liquid tank contents.
+- \b type - Named fuel type. One of AVGAS, JET-A, JET-A1, JET-B, JP-1, JP-2, JP-3,
+- \b JP-4, JP-5, JP-6, JP-7, JP-8, JP-8+100, RP-1, T-1, ETHANOL, HYDRAZINE,
+- \b F-34, F-35, F-40, F-44, AVTAG, AVCAT
location:
- \b x - Location of tank on aircraft's x-axis, defaults to inches.
- \b y - 0.0 (both full and drained CG locations)
- \b z - 0.0 (both full and drained CG locations)
- \b radius - 0.0
-- \b capacity - 0.0
+- \b capacity - 0.00001 (tank capacity must not be zero)
- \b contents - 0.0
-- \b temperature - -9999.0
-- \b standpipe - 0.0
+- \b temperature - -9999.0 (flag which indicates no temperature is set)
+- \b standpipe - 0.0 (all contents may be dumped)
+- \b priority - 1 (highest feed sequence priority)
+- \b density - 6.6
@author Jon Berndt, Dave Culp
@see Akbar, Raza et al. "A Simple Analysis of Fuel Addition to the CWT of
/** Resets the tank parameters to the initial conditions */
void ResetToIC(void);
- /** If the tank is supplying fuel, this function returns true.
- @return true if this tank is feeding an engine.*/
+ /** If the tank is set to supply fuel, this function returns true.
+ @return true if this tank is set to a non-zero priority.*/
bool GetSelected(void) {return Selected;}
/** Gets the tank fill level.
@return the capacity of the tank in pounds. */
double GetCapacity(void) {return Capacity;}
+ /** Gets the capacity of the tank.
+ @return the capacity of the tank in gallons. */
+ double GetCapacityGallons(void) {return Capacity/Density;}
+
/** Gets the contents of the tank.
@return the contents of the tank in pounds. */
double GetContents(void) const {return Contents;}
+ /** Gets the contents of the tank.
+ @return the contents of the tank in gallons. */
+ double GetContentsGallons(void) const {return Contents/Density;}
+
/** Gets the temperature of the fuel.
The temperature of the fuel is calculated if an initial tempearture is
given in the configuration file.
is given, otherwise 32 degrees F is returned. */
double GetTemperature(void) {return CelsiusToFahrenheit(Temperature);}
+ /** Returns the density of a named fuel type.
+ @return the density, in lbs/gal, or 6.6 if name cannot be resolved. */
+ double ProcessFuelName(std::string const& name);
+
double GetIxx(void) {return Ixx;}
double GetIyy(void) {return Iyy;}
double GetIzz(void) {return Izz;}
double GetStandpipe(void) {return Standpipe;}
+ int GetPriority(void) const {return Priority;}
+ void SetPriority(int p) { Priority = p; Selected = p>0 ? true:false; }
+
+ double GetDensity(void) const {return Density;}
+ void SetDensity(double d) { Density = d; }
+
const FGColumnVector3 GetXYZ(void);
const double GetXYZ(int idx);
double Fill(double amount);
void SetContents(double amount);
+ void SetContentsGallons(double gallons);
void SetTemperature(double temp) { Temperature = temp; }
void SetStandpipe(double amount) { Standpipe = amount; }
+ void SetSelected(bool sel) { sel==true ? SetPriority(1):SetPriority(0); }
enum TankType {ttUNKNOWN, ttFUEL, ttOXIDIZER};
enum GrainType {gtUNKNOWN, gtCYLINDRICAL, gtENDBURNING};
TankType Type;
GrainType grainType;
int TankNumber;
- string type;
- string strGType;
+ std::string type;
+ std::string strGType;
FGColumnVector3 vXYZ;
FGColumnVector3 vXYZ_drain;
double Capacity;
double Temperature, InitialTemperature;
double Standpipe, InitialStandpipe;
bool Selected;
+ int Priority, InitialPriority;
FGFDMExec* Exec;
FGPropertyManager* PropertyManager;
void CalculateInertias(void);
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+#include <iostream>
#include <sstream>
#include "FGThruster.h"
+#include "input_output/FGXMLElement.h"
+
+using namespace std;
namespace JSBSim {
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGForce.h"
-#include <input_output/FGXMLElement.h>
-#include <input_output/FGPropertyManager.h>
-#include <math/FGColumnVector3.h>
+#include "math/FGColumnVector3.h"
#include <string>
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
namespace JSBSim {
+class Element;
+class FGPropertyManager;
+
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DOCUMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <vector>
+#include <iostream>
#include <sstream>
-
#include "FGTurbine.h"
+#include "FGState.h"
+#include "models/FGPropulsion.h"
+#include "FGThruster.h"
+
+using namespace std;
namespace JSBSim {
Stalled = Seized = Overtemp = Fire = Augmentation = Injection = Reversed = false;
Cutoff = true;
phase = tpOff;
- EGT_degC = 0.0;
- OilTemp_degK = (Auxiliary->GetTotalTemperature() - 491.69) * 0.5555556 + 273.0;
+ TAT = (Auxiliary->GetTotalTemperature() - 491.69) * 0.5555556;
+ EGT_degC = TAT;
+ OilTemp_degK = TAT + 273.0;
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
double thrust;
TAT = (Auxiliary->GetTotalTemperature() - 491.69) * 0.5555556;
+ double qbar = Auxiliary->Getqbar();
dt = State->Getdt() * Propulsion->GetRate();
ThrottlePos = FCS->GetThrottlePos(EngineNumber);
if (ThrottlePos > 1.0) {
if (!Running && Cutoff && Starter) {
if (phase == tpOff) phase = tpSpinUp;
}
- if (!Running && !Cutoff && (N2 > 15.0)) phase = tpStart;
+
+ // start
+ if ((Starter == true) || (qbar > 30.0)) {
+ if (!Running && !Cutoff && (N2 > 15.0)) phase = tpStart;
+ }
+
if (Cutoff && (phase != tpSpinUp)) phase = tpOff;
if (dt == 0) phase = tpTrim;
if (Starved) phase = tpOff;
OilTemp_degK = Seek(&OilTemp_degK, TAT + 273.0, 0.2, 0.2);
EPR = 1.0;
NozzlePosition = 1.0;
+ if (Starter == false) phase = tpOff;
return 0.0;
}
double FGTurbine::Start(void)
{
+ double qbar = Auxiliary->Getqbar();
if ((N2 > 15.0) && !Starved) { // minimum 15% N2 needed for start
Cranking = true; // provided for sound effects signal
if (N2 < IdleN2) {
N2 = Seek(&N2, IdleN2, 2.0, N2/2.0);
N1 = Seek(&N1, IdleN1, 1.4, N1/2.0);
EGT_degC = Seek(&EGT_degC, TAT + 363.1, 21.3, 7.3);
- FuelFlow_pph = Seek(&FuelFlow_pph, IdleFF, 103.7, 103.7);
+ FuelFlow_pph = IdleFF * N2 / IdleN2;
OilPressure_psi = N2 * 0.62;
ConsumeFuel();
+ if ((Starter == false) && (qbar < 30.0)) phase = tpOff; // aborted start
}
else {
phase = tpRun;
N1 = Seek(&N1, qbar/10.0, 0, N1/10.0);
N2 = Seek(&N2, qbar/15.0, 0, N2/10.0);
ConsumeFuel();
- if (ThrottlePos < 0.01) phase = tpRun; // clear the stall with throttle
-
+ if (ThrottlePos < 0.01) {
+ phase = tpRun; // clear the stall with throttle to idle
+ Stalled = false;
+ }
return 0.0;
}
double qbar = Auxiliary->Getqbar();
N2 = 0.0;
N1 = Seek(&N1, qbar/20.0, 0, N1/15.0);
- FuelFlow_pph = IdleFF;
+ FuelFlow_pph = Cutoff ? 0.0 : IdleFF;
ConsumeFuel();
OilPressure_psi = 0.0;
OilTemp_degK = Seek(&OilTemp_degK, TAT + 273.0, 0, 0.2);
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string FGTurbine::GetEngineLabels(string delimeter)
+string FGTurbine::GetEngineLabels(const string& delimiter)
{
std::ostringstream buf;
- buf << Name << "_N1[" << EngineNumber << "]" << delimeter
- << Name << "_N2[" << EngineNumber << "]" << delimeter
- << Thruster->GetThrusterLabels(EngineNumber, delimeter);
+ buf << Name << "_N1[" << EngineNumber << "]" << delimiter
+ << Name << "_N2[" << EngineNumber << "]" << delimiter
+ << Thruster->GetThrusterLabels(EngineNumber, delimiter);
return buf.str();
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string FGTurbine::GetEngineValues(string delimeter)
+string FGTurbine::GetEngineValues(const string& delimiter)
{
std::ostringstream buf;
- buf << N1 << delimeter
- << N2 << delimeter
- << Thruster->GetThrusterValues(EngineNumber, delimeter);
+ buf << N1 << delimiter
+ << N2 << delimiter
+ << Thruster->GetThrusterValues(EngineNumber, delimiter);
return buf.str();
}
property_name = base_property_name + "/injection_cmd";
PropertyManager->Tie( property_name.c_str(), (FGTurbine*)this,
&FGTurbine::GetInjection, &FGTurbine::SetInjection);
+ property_name = base_property_name + "/seized";
+ PropertyManager->Tie( property_name.c_str(), &Seized);
+ property_name = base_property_name + "/stalled";
+ PropertyManager->Tie( property_name.c_str(), &Stalled);
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
State->SuspendIntegration();
Cutoff=false;
Running=true;
- N2=16.0;
+ N2=IdleN2;
Calculate();
State->ResumeIntegration();
return phase==tpRun;
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <vector>
#include "FGEngine.h"
-#include <input_output/FGXMLElement.h>
-#include <math/FGFunction.h>
#define ID_TURBINE "$Id$"
namespace JSBSim {
+class Element;
+class FGFunction;
+
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DOCUMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
int InitRunning(void);
void ResetToIC(void);
- string GetEngineLabels(string delimeter);
- string GetEngineValues(string delimeter);
+ std::string GetEngineLabels(const std::string& delimiter);
+ std::string GetEngineValues(const std::string& delimiter);
private:
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#include <vector>
+#include <iostream>
#include <sstream>
#include "FGTurboProp.h"
#include "FGPropeller.h"
+#include "FGState.h"
+#include "models/FGAuxiliary.h"
+
+using namespace std;
namespace JSBSim {
}
//printf ("EngHP: %lf / Requi: %lf\n",Eng_HP,Prop_Required_Power);
- return Thruster->Calculate((Eng_HP * hptoftlbssec)-Thruster->GetPowerRequired());
+ PowerAvailable = (Eng_HP * hptoftlbssec) - Thruster->GetPowerRequired();
+
+ return Thruster->Calculate(PowerAvailable);
+
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void FGTurboProp::SetDefaults(void)
{
- Name = "Not defined";
+// Name = "Not defined";
N1 = N2 = 0.0;
Type = etTurboprop;
MilThrust = 10000.0;
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string FGTurboProp::GetEngineLabels(string delimeter)
+string FGTurboProp::GetEngineLabels(const string& delimiter)
{
std::ostringstream buf;
- buf << Name << "_N1[" << EngineNumber << "]" << delimeter
- << Name << "_N2[" << EngineNumber << "]" << delimeter
- << Name << "__PwrAvailJVK[" << EngineNumber << "]" << delimeter
- << Thruster->GetThrusterLabels(EngineNumber, delimeter);
+ buf << Name << "_N1[" << EngineNumber << "]" << delimiter
+ << Name << "_N2[" << EngineNumber << "]" << delimiter
+ << Name << "_PwrAvail[" << EngineNumber << "]" << delimiter
+ << Thruster->GetThrusterLabels(EngineNumber, delimiter);
return buf.str();
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string FGTurboProp::GetEngineValues(string delimeter)
+string FGTurboProp::GetEngineValues(const string& delimiter)
{
std::ostringstream buf;
- buf << N1 << delimeter
- << N2 << delimeter
- << Thruster->GetThrusterValues(EngineNumber,delimeter);
+ buf << PowerAvailable << delimiter
+ << N1 << delimiter
+ << N2 << delimiter
+ << Thruster->GetThrusterValues(EngineNumber,delimiter);
return buf.str();
}
#include <vector>
#include "FGEngine.h"
-#include <input_output/FGXMLElement.h>
-#include <math/FGTable.h>
+#include "input_output/FGXMLElement.h"
+#include "math/FGTable.h"
#define ID_TURBOPROP "$Id$"
inline void SetGeneratorPower(bool gp) { GeneratorPower=gp; }
inline void SetCondition(bool c) { Condition=c; }
int InitRunning(void);
- string GetEngineLabels(string delimeter); // added from Turbine 0.9.6
- string GetEngineValues(string delimeter); // added from Turbine 0.9.6
+ std::string GetEngineLabels(const std::string& delimiter);
+ std::string GetEngineValues(const std::string& delimiter);
private:
double N2_factor; ///< factor to tie N2 and throttle
double ThrottleCmd; ///< FCS-supplied throttle position
double TAT; ///< total air temperature (deg C)
+ double PowerAvailable;
bool Stalled; ///< true if engine is compressor-stalled
bool Seized; ///< true if inner spool is seized
bool Overtemp; ///< true if EGT exceeds limits
/* Get wind vector */
double windmag = 0; //Wind magnitude
double a = 0; //Parabola: Altitude = a*windmag^2 + zoff
+ double x = pow(uref,2.);
- a = zref/pow(uref,2.);
- if (Altitude >= zoff)
+ if (x) {
+ a = zref/x;
+ }
+ if ((Altitude >= zoff) && (a > 0))
windmag = sqrt(Altitude/a);
else
windmag = 0.;
_liftRatio = 1;
_cruiseAoA = 0;
_tailIncidence = 0;
+
+ _failureMsg = 0;
}
Airplane::~Airplane()
float fwd[3];
Math::sub3(f->front, f->back, fwd);
float len = Math::mag3(fwd);
+ if (len == 0) {
+ _failureMsg = "Zero length fuselage";
+ return 0;
+ }
float wid = f->width;
int segs = (int)Math::ceil(len/wid);
float segWgt = len*wid/segs;
_model.setGroundEffect(gepos, gespan, 0.15f);
}
+ // solve function below resets failure message
+ // so check if we have any problems and abort here
+ if (_failureMsg) return;
+
solveGear();
if(_wing && _tail) solve();
else
object->setSize(w, h);
}
-\f
////////////////////////////////////////////////////////////////////////
+
+void FGDialog::ConditionalObject::update(FGDialog* aDlg)
+{
+ if (_name == "visible") {
+ bool wasVis = _pu->isVisible();
+ bool newVis = test();
+
+ if (newVis == wasVis) {
+ return;
+ }
+
+ if (newVis) { // puObject needs a setVisible. Oh well.
+ _pu->reveal();
+ } else {
+ _pu->hide();
+ }
+ } else if (_name == "enable") {
+ bool wasEnabled = _pu->isActive();
+ bool newEnable = test();
+
+ if (wasEnabled == newEnable) {
+ return;
+ }
+
+ if (newEnable) {
+ _pu->activate();
+ } else {
+ _pu->greyOut();
+ }
+ }
+
+ aDlg->setNeedsLayout();
+}
+\f////////////////////////////////////////////////////////////////////////
// Callbacks.
////////////////////////////////////////////////////////////////////////
FGDialog::FGDialog (SGPropertyNode *props) :
_object(0),
_gui((NewGUI *)globals->get_subsystem("gui")),
- _props(props)
+ _props(props),
+ _needsRelayout(false)
{
_module = string("__dlg:") + props->getStringValue("name", "[unnamed]");
+
SGPropertyNode *nasal = props->getNode("nasal");
if (nasal) {
_nasal_close = nasal->getNode("close");
if (objectName && !objectName[0])
objectName = 0;
- for (unsigned int i = 0; i < _propertyObjects.size(); i++) {
- const string &name = _propertyObjects[i]->name;
- if (objectName && name != objectName)
- continue;
-
- puObject *obj = _propertyObjects[i]->object;
- if ((obj->getType() & PUCLASS_LIST) && (dynamic_cast<GUI_ID *>(obj)->id & FGCLASS_LIST)) {
- fgList *pl = static_cast<fgList *>(obj);
- pl->update();
- } else
- copy_to_pui(_propertyObjects[i]->node, obj);
+ for (unsigned int i = 0; i < _propertyObjects.size(); i++) {
+ const string &name = _propertyObjects[i]->name;
+ if (objectName && name != objectName) {
+ continue;
+ }
+
+ puObject *widget = _propertyObjects[i]->object;
+ int widgetType = widget->getType();
+ if ((widgetType & PUCLASS_LIST) && (dynamic_cast<GUI_ID *>(widget)->id & FGCLASS_LIST)) {
+ fgList *pl = static_cast<fgList*>(widget);
+ pl->update();
+ } else if (widgetType & PUCLASS_COMBOBOX) {
+ fgComboBox* combo = static_cast<fgComboBox*>(widget);
+ combo->update();
+ } else {
+ copy_to_pui(_propertyObjects[i]->node, widget);
}
+ } // of property objects iteration
}
void
copy_to_pui(_liveObjects[i]->node, obj);
}
+
+ for (unsigned int j=0; j < _conditionalObjects.size(); ++j) {
+ _conditionalObjects[j]->update(this);
+ }
+
+ if (_needsRelayout) {
+ relayout();
+ }
}
void
object->setLabelFont(*_font);
}
+ if (props->hasChild("visible")) {
+ ConditionalObject* cnd = new ConditionalObject("visible", object);
+ cnd->setCondition(sgReadCondition(globals->get_props(), props->getChild("visible")));
+ _conditionalObjects.push_back(cnd);
+ }
+
+ if (props->hasChild("enable")) {
+ ConditionalObject* cnd = new ConditionalObject("enable", object);
+ cnd->setCondition(sgReadCondition(globals->get_props(), props->getChild("enable")));
+ _conditionalObjects.push_back(cnd);
+ }
+
string type = props->getName();
if (type == "input" && props->getBoolValue("live"))
object->setDownCallback(action_callback);
return key;
}
+void\fFGDialog::relayout()
+{
+ _needsRelayout = false;
+
+ int screenw = globals->get_props()->getIntValue("/sim/startup/xsize");
+ int screenh = globals->get_props()->getIntValue("/sim/startup/ysize");
+
+ bool userx = _props->hasValue("x");
+ bool usery = _props->hasValue("y");
+ bool userw = _props->hasValue("width");
+ bool userh = _props->hasValue("height");
+
+ // Let the layout widget work in the same property subtree.
+ LayoutWidget wid(_props);
+ wid.setDefaultFont(_font, int(_font->getPointSize()));
+
+ int pw = 0, ph = 0;
+ int px, py, savex, savey;
+ if (!userw || !userh) {
+ wid.calcPrefSize(&pw, &ph);
+ }
+
+ pw = _props->getIntValue("width", pw);
+ ph = _props->getIntValue("height", ph);
+ px = savex = _props->getIntValue("x", (screenw - pw) / 2);
+ py = savey = _props->getIntValue("y", (screenh - ph) / 2);
+
+ // Negative x/y coordinates are interpreted as distance from the top/right
+ // corner rather than bottom/left.
+ if (userx && px < 0)
+ px = screenw - pw + px;
+ if (usery && py < 0)
+ py = screenh - ph + py;
+
+ // Define "x", "y", "width" and/or "height" in the property tree if they
+ // are not specified in the configuration file.
+ wid.layout(px, py, pw, ph);
+
+ applySize(_object);
+
+ // Remove automatically generated properties, so the layout looks
+ // the same next time around, or restore x and y to preserve negative coords.
+ if (userx)
+ _props->setIntValue("x", savex);
+ else
+ _props->removeChild("x");
+
+ if (usery)
+ _props->setIntValue("y", savey);
+ else
+ _props->removeChild("y");
+
+ if (!userw) _props->removeChild("width");
+ if (!userh) _props->removeChild("height");
+}
+
+void
+FGDialog::applySize(puObject *object)
+{
+ // compound plib widgets use setUserData() for internal purposes, so refuse
+ // to descend into anything that has other bits set than the following
+ const int validUserData = PUCLASS_VALUE|PUCLASS_OBJECT|PUCLASS_GROUP|PUCLASS_INTERFACE
+ |PUCLASS_FRAME|PUCLASS_TEXT|PUCLASS_BUTTON|PUCLASS_ONESHOT|PUCLASS_INPUT
+ |PUCLASS_ARROW|PUCLASS_DIAL|PUCLASS_POPUP;
+
+ int type = object->getType();
+ if ((type & PUCLASS_GROUP) && !(type & ~validUserData)) {
+ puObject* c = ((puGroup *)object)->getFirstChild();
+ for (; c != NULL; c = c->getNextObject()) {
+ applySize(c);
+ } // of child iteration
+ } // of group object case
+
+ GUIInfo *info = (GUIInfo *)object->getUserData();
+ if (!info)
+ return;
+
+ SGPropertyNode *n = info->node;
+ if (!n) {
+ SG_LOG(SG_GENERAL, SG_ALERT, "FGDialog::applySize: no props");
+ return;
+ }
+
+ int x = n->getIntValue("x");
+ int y = n->getIntValue("y");
+ int w = n->getIntValue("width", 4);
+ int h = n->getIntValue("height", 4);
+ object->setPosition(x, y);
+ object->setSize(w, h);
+}
-\f
////////////////////////////////////////////////////////////////////////
// Implementation of FGDialog::PropertyObject.
////////////////////////////////////////////////////////////////////////
void
fgValueList::make_list()
{
- vector<SGPropertyNode_ptr> value_nodes = _props->getChildren("value");
- _list = new char *[value_nodes.size() + 1];
- unsigned int i;
- for (i = 0; i < value_nodes.size(); i++)
- _list[i] = strdup((char *)value_nodes[i]->getStringValue());
- _list[i] = 0;
+ SGPropertyNode_ptr values = _props;
+ const char* vname = "value";
+
+ if (_props->hasChild("properties")) {
+ // dynamic values, read from a property's children
+ const char* path = _props->getStringValue("properties");
+ values = fgGetNode(path, true);
+ }
+
+ if (_props->hasChild("property-name")) {
+ vname = _props->getStringValue("property-name");
+ }
+
+ vector<SGPropertyNode_ptr> value_nodes = values->getChildren(vname);
+ _list = new char *[value_nodes.size() + 1];
+ unsigned int i;
+ for (i = 0; i < value_nodes.size(); i++) {
+ _list[i] = strdup((char *)value_nodes[i]->getStringValue());
+ }
+ _list[i] = 0;
}
void
setTopItem(top);
}
+void fgComboBox::update()
+{
+ fgValueList::update();
+ newList(_list);
+}
+
// end of dialog.cxx
#include <simgear/compiler.h> // for SG_USING_STD
#include <simgear/props/props.hxx>
#include <simgear/misc/sg_path.hxx>
+#include <simgear/props/condition.hxx>
#include <vector>
using std::vector;
*/
virtual void update ();
+ /**
+ * Recompute the dialog's layout
+ */
+ void relayout();
+
+
+ void setNeedsLayout() {
+ _needsRelayout = true;
+ }
private:
enum {
// return key code number for keystring
int getKeyCode(const char *keystring);
+ /**
+ * Apply layout sizes to a tree of puObjects
+ */
+ void applySize(puObject *object);
+
// The top-level PUI object.
puObject * _object;
// last position.
SGPropertyNode_ptr _props;
+ bool _needsRelayout;
+
// Nasal module.
string _module;
SGPropertyNode_ptr _nasal_close;
};
vector<PropertyObject *> _propertyObjects;
vector<PropertyObject *> _liveObjects;
+
+ class ConditionalObject : public SGConditional
+ {
+ public:
+ ConditionalObject(const std::string& aName, puObject* aPu) :
+ _name(aName),
+ _pu(aPu)
+ { ; }
+
+ void update(FGDialog* aDlg);
+
+ private:
+ const std::string _name;
+ puObject* _pu;
+ };
+
+ typedef SGSharedPtr<ConditionalObject> ConditionalObjectRef;
+ vector<ConditionalObjectRef> _conditionalObjects;
};
//
public:
fgComboBox(int x1, int y1, int x2, int y2, SGPropertyNode *p, bool editable) :
fgValueList(p), puaComboBox(x1, y1, x2, y2, _list, editable) {}
+
+ void update();
};
class fgSelectBox : public fgValueList, public puaSelectBox {
char filename[24];
static int count = 1;
while (count < 1000) {
- snprintf(filename, 24, "fgfs-screen-%03d.ppm", count++);
+ snprintf(filename, 24, "fgfs-screen-%03d.png", count++);
SGPath p(dir);
p.append(filename);
#define PACKAGE "FlightGear"
/* Define to package version - use in main.cxx */
-#define FLIGHTGEAR_VERSION "MSVC6-WIN32-1.9.0"
+#define FLIGHTGEAR_VERSION "MSVC6-WIN32-1.9.1"
/* Define as the return type of signal handlers (int or void). */
#define RETSIGTYPE void
#define TM_IN_SYS_TIME 1
/* Define to version number */
-#define VERSION "1.9.0"
+#define VERSION "1.9.1"
/* Define if compiling on a Winbloze (95, NT, etc.) platform */
#define WIN32 1
#define PACKAGE "FlightGear"
/* Define to package version - use in main.cxx */
-#define FLIGHTGEAR_VERSION "MSVC7.1-WIN32-1.9.0"
+#define FLIGHTGEAR_VERSION "MSVC7.1-WIN32-1.9.1"
/* Define as the return type of signal handlers (int or void). */
#define RETSIGTYPE void
#define TM_IN_SYS_TIME 1
/* Define to version number */
-#define VERSION "1.9.0"
+#define VERSION "1.9.1"
#ifndef FG_VERSION /* allow override */
#define FG_VERSION 7
#endif /* FG_VERSION */
#define PACKAGE "FlightGear"
/* Define to package version - use in main.cxx */
-#define FLIGHTGEAR_VERSION "MSVC8-WIN32-1.9.0"
+#define FLIGHTGEAR_VERSION "MSVC8-WIN32-1.9.1"
/* Define as the return type of signal handlers (int or void). */
#define RETSIGTYPE void
#define TM_IN_SYS_TIME 1
/* Define to version number */
-#define VERSION "1.9.0"
+#define VERSION "1.9.1"
/* Define if compiling on a Winbloze (95, NT, etc.) platform */
#define WIN32 1
# include <config.h>
#endif
+#include <simgear/math/SGMath.hxx>
+
#include "FGDeviceConfigurationMap.hxx"
+
+#include <plib/ul.h>
+
#include <simgear/props/props_io.hxx>
#include <Main/globals.hxx>
return new FGButtonEvent( device, node );
if( StartsWith( name, "rel-" ) )
- return new FGAxisEvent( device, node );
+ return new FGRelAxisEvent( device, node );
if( StartsWith( name, "abs-" ) )
- return new FGAxisEvent( device, node );
+ return new FGAbsAxisEvent( device, node );
return new FGInputEvent( device, node );
}
if( lastDt >= intervalSec ) {
for( binding_list_t::iterator it = bindings[eventData.modifiers].begin(); it != bindings[eventData.modifiers].end(); it++ )
- (*it)->fire( eventData.value, 1.0 );
+ fire( *it, eventData );
lastDt -= intervalSec;
}
}
+void FGInputEvent::fire( SGBinding * binding, FGEventData & eventData )
+{
+ binding->fire();
+}
+
+
+
FGAxisEvent::FGAxisEvent( FGInputDevice * device, SGPropertyNode_ptr node ) :
FGInputEvent( device, node )
{
tolerance = node->getDoubleValue("tolerance", 0.002);
- minRange = node->getDoubleValue("min-range", -1024.0);
- maxRange = node->getDoubleValue("max-range", 1024.0);
+ minRange = node->getDoubleValue("min-range", 0.0 );
+ maxRange = node->getDoubleValue("max-range", 0.0 );
center = node->getDoubleValue("center", 0.0);
deadband = node->getDoubleValue("dead-band", 0.0);
lowThreshold = node->getDoubleValue("low-threshold", -0.9);
if (fabs( eventData.value - lastValue) < tolerance)
return;
lastValue = eventData.value;
- FGInputEvent::fire( eventData );
+
+ // We need a copy of the FGEventData struct to set the new value and to avoid side effects
+ FGEventData ed = eventData;
+
+ if( fabs(ed.value) < deadband )
+ ed.value = 0.0;
+
+ if( minRange != maxRange )
+ ed.value = 2.0*(eventData.value-minRange)/(maxRange-minRange)-1.0;
+
+ FGInputEvent::fire( ed );
+}
+
+void FGAbsAxisEvent::fire( SGBinding * binding, FGEventData & eventData )
+{
+ // sets the "setting" node
+ binding->fire( eventData.value );
+}
+
+FGRelAxisEvent::FGRelAxisEvent( FGInputDevice * device, SGPropertyNode_ptr node ) :
+ FGAxisEvent( device, node )
+{
+ // relative axes can't use tolerance
+ tolerance = 0.0;
+}
+
+void FGRelAxisEvent::fire( SGBinding * binding, FGEventData & eventData )
+{
+ // sets the "offset" node
+ binding->fire( eventData.value, 1.0 );
}
FGButtonEvent::FGButtonEvent( FGInputDevice * device, SGPropertyNode_ptr node ) :
class FGInputDevice;
class FGInputEvent : public SGReferenced,FGCommonInput {
public:
+
/*
* Constructor for the class. The arg node shall point
* to the property corresponding to the <event> node
static FGInputEvent * NewObject( FGInputDevice * device, SGPropertyNode_ptr node );
protected:
+ virtual void fire( SGBinding * binding, FGEventData & eventData );
/* A more or less meaningfull description of the event */
string desc;
class FGAxisEvent : public FGInputEvent {
public:
FGAxisEvent( FGInputDevice * device, SGPropertyNode_ptr node );
+ void SetMaxRange( double value ) { maxRange = value; }
+ void SetMinRange( double value ) { minRange = value; }
+ void SetRange( double min, double max ) { minRange = min; maxRange = max; }
protected:
virtual void fire( FGEventData & eventData );
double tolerance;
double lastValue;
};
+class FGRelAxisEvent : public FGAxisEvent {
+public:
+ FGRelAxisEvent( FGInputDevice * device, SGPropertyNode_ptr node );
+protected:
+ virtual void fire( SGBinding * binding, FGEventData & eventData );
+};
+
+class FGAbsAxisEvent : public FGAxisEvent {
+public:
+ FGAbsAxisEvent( FGInputDevice * device, SGPropertyNode_ptr node ) : FGAxisEvent( device, node ) {}
+protected:
+ virtual void fire( SGBinding * binding, FGEventData & eventData );
+};
+
typedef class SGSharedPtr<FGInputEvent> FGInputEvent_ptr;
/*
{
}
+static inline bool bitSet( unsigned char * buf, unsigned char bit )
+{
+ return (buf[bit/sizeof(bit)/8] >> (bit%(sizeof(bit)*8))) & 1;
+}
+
void FGLinuxInputDevice::Open()
{
if( fd != -1 ) return;
throw exception();
}
- if( GetGrab() && ioctl( fd, EVIOCGRAB, 2 ) != 0 ) {
+ if( GetGrab() && ioctl( fd, EVIOCGRAB, 2 ) == -1 ) {
SG_LOG( SG_INPUT, SG_WARN, "Can't grab " << devname << " for exclusive access" );
}
+
+ unsigned char buf[ABS_CNT/sizeof(unsigned char)/8];
+ // get axes maximums
+ if( ioctl( fd, EVIOCGBIT(EV_ABS,ABS_MAX), buf ) == -1 ) {
+ SG_LOG( SG_INPUT, SG_WARN, "Can't get abs-axes for " << devname );
+ } else {
+ for( unsigned i = 0; i < ABS_MAX; i++ ) {
+ if( bitSet( buf, i ) ) {
+ struct input_absinfo ai;
+ if( ioctl(fd, EVIOCGABS(i), &ai) == -1 ) {
+ SG_LOG( SG_INPUT, SG_WARN, "Can't get abs-axes maximums for " << devname );
+ continue;
+ }
+ absinfo[i] = ai;
+ }
+ }
+ }
+}
+
+double FGLinuxInputDevice::Normalize( struct input_event & event )
+{
+ if( absinfo.count(event.code) > 0 ) {
+ const struct input_absinfo & ai = absinfo[(unsigned int)event.code];
+ if( ai.maximum == ai.minimum )
+ return 0.0;
+ return ((double)event.value-(double)ai.minimum)/((double)ai.maximum-(double)ai.minimum);
+ } else {
+ return (double)event.value;
+ }
}
void FGLinuxInputDevice::Close()
void FGLinuxEventInput::update( double dt )
{
FGEventInput::update( dt );
-
// index the input devices by the associated fd and prepare
// the pollfd array by filling in the file descriptor
struct pollfd fds[input_devices.size()];
FGLinuxEventData eventData( event, dt, modifiers );
+ if( event.type == EV_ABS )
+ eventData.value = devicesByFd[fds[i].fd]->Normalize( event );
+
// let the FGInputDevice handle the data
devicesByFd[fds[i].fd]->HandleEvent( eventData );
}
int GetFd() { return fd; }
+ double Normalize( struct input_event & event );
private:
string devname;
int fd;
+
+ map<unsigned int,input_absinfo> absinfo;
};
class FGLinuxEventInput : public FGEventInput {
void AddHalDevice( const char * udi );
protected:
LibHalContext *halcontext;
+
};
#endif
#include <ATCDCL/ATCProjection.hxx>
#include <Main/fg_props.hxx>
#include <simgear/math/SGMath.hxx>
+#include <simgear/structure/commands.hxx>
#include <Airports/simple.hxx>
using std::cout;
+// Command callbacks for FlightGear
+
+static bool do_kln89_msg_pressed(const SGPropertyNode* arg) {
+ //cout << "do_kln89_msg_pressed called!\n";
+ KLN89* gps = (KLN89*)globals->get_subsystem("kln89");
+ gps->MsgPressed();
+ return(true);
+}
+
+static bool do_kln89_obs_pressed(const SGPropertyNode* arg) {
+ //cout << "do_kln89_obs_pressed called!\n";
+ KLN89* gps = (KLN89*)globals->get_subsystem("kln89");
+ gps->OBSPressed();
+ return(true);
+}
+
+static bool do_kln89_alt_pressed(const SGPropertyNode* arg) {
+ //cout << "do_kln89_alt_pressed called!\n";
+ KLN89* gps = (KLN89*)globals->get_subsystem("kln89");
+ gps->AltPressed();
+ return(true);
+}
+
+static bool do_kln89_nrst_pressed(const SGPropertyNode* arg) {
+ KLN89* gps = (KLN89*)globals->get_subsystem("kln89");
+ gps->NrstPressed();
+ return(true);
+}
+
+static bool do_kln89_dto_pressed(const SGPropertyNode* arg) {
+ KLN89* gps = (KLN89*)globals->get_subsystem("kln89");
+ gps->DtoPressed();
+ return(true);
+}
+
+static bool do_kln89_clr_pressed(const SGPropertyNode* arg) {
+ KLN89* gps = (KLN89*)globals->get_subsystem("kln89");
+ gps->ClrPressed();
+ return(true);
+}
+
+static bool do_kln89_ent_pressed(const SGPropertyNode* arg) {
+ KLN89* gps = (KLN89*)globals->get_subsystem("kln89");
+ gps->EntPressed();
+ return(true);
+}
+
+static bool do_kln89_crsr_pressed(const SGPropertyNode* arg) {
+ KLN89* gps = (KLN89*)globals->get_subsystem("kln89");
+ gps->CrsrPressed();
+ return(true);
+}
+
+static bool do_kln89_knob1left1(const SGPropertyNode* arg) {
+ KLN89* gps = (KLN89*)globals->get_subsystem("kln89");
+ gps->Knob1Left1();
+ return(true);
+}
+
+static bool do_kln89_knob1right1(const SGPropertyNode* arg) {
+ KLN89* gps = (KLN89*)globals->get_subsystem("kln89");
+ gps->Knob1Right1();
+ return(true);
+}
+
+static bool do_kln89_knob2left1(const SGPropertyNode* arg) {
+ KLN89* gps = (KLN89*)globals->get_subsystem("kln89");
+ gps->Knob2Left1();
+ return(true);
+}
+
+static bool do_kln89_knob2right1(const SGPropertyNode* arg) {
+ KLN89* gps = (KLN89*)globals->get_subsystem("kln89");
+ gps->Knob2Right1();
+ return(true);
+}
+
+// End command callbacks
+
KLN89::KLN89(RenderArea2D* instrument)
: DCLGPS(instrument) {
_mode = KLN89_MODE_DISP;
_pixelated = false;
// Cyclic pages
- GPSPage* apt_page = new KLN89AptPage(this);
+ _pages.clear();
+ KLN89Page* apt_page = new KLN89AptPage(this);
_pages.push_back(apt_page);
- GPSPage* vor_page = new KLN89VorPage(this);
+ KLN89Page* vor_page = new KLN89VorPage(this);
_pages.push_back(vor_page);
- GPSPage* ndb_page = new KLN89NDBPage(this);
+ KLN89Page* ndb_page = new KLN89NDBPage(this);
_pages.push_back(ndb_page);
- GPSPage* int_page = new KLN89IntPage(this);
+ KLN89Page* int_page = new KLN89IntPage(this);
_pages.push_back(int_page);
- GPSPage* usr_page = new KLN89UsrPage(this);
+ KLN89Page* usr_page = new KLN89UsrPage(this);
_pages.push_back(usr_page);
- GPSPage* act_page = new KLN89ActPage(this);
+ KLN89Page* act_page = new KLN89ActPage(this);
_pages.push_back(act_page);
- GPSPage* nav_page = new KLN89NavPage(this);
+ KLN89Page* nav_page = new KLN89NavPage(this);
_pages.push_back(nav_page);
- GPSPage* fpl_page = new KLN89FplPage(this);
+ KLN89Page* fpl_page = new KLN89FplPage(this);
_pages.push_back(fpl_page);
- GPSPage* cal_page = new KLN89CalPage(this);
+ KLN89Page* cal_page = new KLN89CalPage(this);
_pages.push_back(cal_page);
- GPSPage* set_page = new KLN89SetPage(this);
+ KLN89Page* set_page = new KLN89SetPage(this);
_pages.push_back(set_page);
- GPSPage* oth_page = new KLN89OthPage(this);
+ KLN89Page* oth_page = new KLN89OthPage(this);
_pages.push_back(oth_page);
_nPages = _pages.size();
_curPage = 0;
_entRestoreCrsr = false;
_dispMsg = false;
+
+ _dtoReview = false;
// Moving map stuff
_mapOrientation = 0;
DCLGPS::unbind();
}
+void KLN89::init() {
+ globals->get_commands()->addCommand("kln89_msg_pressed", do_kln89_msg_pressed);
+ globals->get_commands()->addCommand("kln89_obs_pressed", do_kln89_obs_pressed);
+ globals->get_commands()->addCommand("kln89_alt_pressed", do_kln89_alt_pressed);
+ globals->get_commands()->addCommand("kln89_nrst_pressed", do_kln89_nrst_pressed);
+ globals->get_commands()->addCommand("kln89_dto_pressed", do_kln89_dto_pressed);
+ globals->get_commands()->addCommand("kln89_clr_pressed", do_kln89_clr_pressed);
+ globals->get_commands()->addCommand("kln89_ent_pressed", do_kln89_ent_pressed);
+ globals->get_commands()->addCommand("kln89_crsr_pressed", do_kln89_crsr_pressed);
+ globals->get_commands()->addCommand("kln89_knob1left1", do_kln89_knob1left1);
+ globals->get_commands()->addCommand("kln89_knob1right1", do_kln89_knob1right1);
+ globals->get_commands()->addCommand("kln89_knob2left1", do_kln89_knob2left1);
+ globals->get_commands()->addCommand("kln89_knob2right1", do_kln89_knob2right1);
+
+ DCLGPS::init();
+}
+
void KLN89::update(double dt) {
// Run any positional calc's required first
DCLGPS::update(dt);
wps.clear();
ids.push_back("KCCR");
wps.push_back(GPS_WP_APT);
- ids.push_back("SUZYE");
- wps.push_back(GPS_WP_INT);
- ids.push_back("ALTAM");
- wps.push_back(GPS_WP_INT);
- ids.push_back("C83");
+ ids.push_back("KHAF");
wps.push_back(GPS_WP_APT);
CreateFlightPlan(_flightPlans[4], ids, wps);
void KLN89::DtoPressed() {
if(_activePage != _dir_page) {
- // Figure out which waypoint the dir page should display
+ // Figure out which waypoint the dir page should display, according to the following rules:
+ // 1. If the FPL 0 page is displayed AND the cursor is over one of the waypoints, display that waypoint.
+ // 2. If the NAV 4 page is displayed with the inner knob pulled out, display the waypoint highlighted in the lower RH corner of the nav page.
+ // 3. If any of APT, VOR, NDB, INT, USR or ACT pages is displayed then display the waypoint being viewed.
+ // 4. If none of the above, display the active waypoint, unless the active waypoint is the MAP of an approach and it has been flown past
+ // (no waypoint sequence past the MAP), in which case display the first waypoint of the missed approach procedure.
+ // 5. If none of the above (i.e. no active waypoint) then display blanks.
if(_curPage <= 5) {
- // Apt, Vor, Ndb, Int, Usr or Act
+ // APT, VOR, NDB, INT, USR or ACT
if(!_activePage->GetId().empty()) { // Guard against no user waypoints defined
_dir_page->SetId(_activePage->GetId());
} else {
// NAV 4
_dir_page->SetId(((KLN89NavPage*)_activePage)->GetNav4WpId());
} else if(_curPage == 7 && _activePage->GetSubPage() == 0 && _mode == KLN89_MODE_CRSR) {
- //cout << "Checking the fpl page!\n";
// FPL 0
if(!_activePage->GetId().empty()) {
//cout << "Not empty!!!\n";
void KLN89::AltPressed() {}
void KLN89::OBSPressed() {
- DCLGPS::OBSPressed();
+ ToggleOBSMode();
if(_obsMode) {
// if(ORS 02)
_mode = KLN89_MODE_CRSR;
_dispMsg = !_dispMsg;
}
+void KLN89::ToggleOBSMode() {
+ DCLGPS::ToggleOBSMode();
+}
+
+void KLN89::DtoInitiate(const string& id) {
+ _dtoReview = false;
+ // Set the current page to NAV1
+ _curPage = 6;
+ _activePage = _pages[_curPage];
+ _activePage->SetSubPage(0);
+ // TODO - need to output a scratchpad message with the new course, but we don't know it yet!
+ // Call the base class to actually initiate the DTO.
+ DCLGPS::DtoInitiate(id);
+}
+
void KLN89::DrawBar(int page) {
int px = 1 + (page * 15);
int py = 1;
#include <Instrumentation/dclgps.hxx>
#include "kln89_page.hxx"
+class KLN89Page;
+
const int KLN89MapScales[2][21] = {{1, 2, 3, 5, 7, 10, 12, 15, 17, 20, 25, 30, 40, 60, 80, 100, 120, 160, 240, 320, 500},
{2, 4, 6, 9, 13, 18, 22, 28, 32, 37, 46, 55, 75, 110, 150, 185, 220, 300, 440, 600, 925}};
typedef map<string, string> airport_id_str_map_type;
typedef airport_id_str_map_type::iterator airport_id_str_map_iterator;
+typedef vector<KLN89Page*> kln89_page_list_type;
+typedef kln89_page_list_type::iterator kln89_page_list_itr;
+
class KLN89 : public DCLGPS {
friend class KLN89Page;
void bind();
void unbind();
+ void init();
void update(double dt);
inline void SetTurnAnticipation(bool b) { _turnAnticipationEnabled = b; }
void CreateDefaultFlightPlans();
private:
+ void ToggleOBSMode();
+
+ // Initiate Direct To operation to the supplied ID.
+ void DtoInitiate(const string& id);
+
//----------------------- Drawing functions which take CHARACTER units -------------------------
// Render string s in display field field at position x, y
// WHERE POSITION IS IN CHARACTER UNITS!
// Set gap to true to get a space between A and 9 when wrapping, set wrap to false to disable wrap.
char IncChar(char c, bool gap = false, bool wrap = true);
char DecChar(char c, bool gap = false, bool wrap = true);
+
+ // ==================== Page organisation stuff =============
+ // The list of cyclical pages that the user can cycle through
+ kln89_page_list_type _pages;
+
+ // The currently active page
+ KLN89Page* _activePage;
+ // And a facility to save the immediately preceeding active page
+ KLN89Page* _lastActivePage;
// Hackish
int _entJump; // The page to jump back to if ent is pressed. -1 indicates no jump
bool _entRestoreCrsr; // Indicates that pressing ENT at this point should restore cursor mode
- // Misc pages
+ // Misc pages that aren't in the cyclic list.
// Direct To
- GPSPage* _dir_page;
+ KLN89Page* _dir_page;
// Nearest
- GPSPage* _nrst_page;
+ KLN89Page* _nrst_page;
+ // ====================== end of page stuff ===================
// Moving-map display stuff
int _mapOrientation; // 0 => North (true) up, 1 => DTK up, 2 => TK up, 3 => heading up (only when connected to external heading source).
// since button events get directed to the page that was active before the
// message was displayed, not the message page itself.
bool _dispMsg; // Set true while the message page is being displayed
+
+ // Sometimes the datapages can be used to review a waypoint whilst the user makes a decision,
+ // and we need to remember why.
+ bool _dtoReview; // Set true when we a reviewing a waypoint for DTO operation.
};
#endif // _KLN89_HXX
#include "kln89_page.hxx"
#include <Main/fg_props.hxx>
-KLN89Page::KLN89Page(KLN89* parent)
-: GPSPage(parent) {
- _kln89 = (KLN89*)parent;
+KLN89Page::KLN89Page(KLN89* parent) {
+ _kln89 = parent;
_entInvert = false;
_to_flag = true;
+ _subPage = 0;
}
KLN89Page::~KLN89Page() {
}
}
_kln89->DrawText((_kln89->GetDistVelUnitsSI() ? "km" : "nm"), 1, 4, 3);
- GPSWaypoint* awp = _parent->GetActiveWaypoint();
+ GPSWaypoint* awp = _kln89->GetActiveWaypoint();
if(_kln89->_navFlagged) {
_kln89->DrawText("--.-", 1, 0 ,3);
// Only nav1 still gets speed drawn if nav is flagged - not ACT
if(!nav1) _kln89->DrawText("------", 1, 0, 2);
} else {
char buf[8];
- float f = _parent->GetDistToActiveWaypoint() * (_kln89->GetDistVelUnitsSI() ? 0.001 : SG_METER_TO_NM);
+ float f = _kln89->GetDistToActiveWaypoint() * (_kln89->GetDistVelUnitsSI() ? 0.001 : SG_METER_TO_NM);
snprintf(buf, 5, (f >= 100.0 ? "%4.0f" : "%4.1f"), f);
string s = buf;
_kln89->DrawText(s, 1, 4 - s.size(), 3, true);
void KLN89Page::Knob2Left1() {
if(_kln89->_mode != KLN89_MODE_CRSR && !fgGetBool("/instrumentation/kln89/scan-pull")) {
- GPSPage::Knob2Left1();
+ _kln89->_activePage->LooseFocus();
+ _subPage--;
+ if(_subPage < 0) _subPage = _nSubPages - 1;
} else {
if(_uLinePos == 0 && _kln89->_obsMode) {
_kln89->_obsHeading--;
void KLN89Page::Knob2Right1() {
if(_kln89->_mode != KLN89_MODE_CRSR && !fgGetBool("/instrumentation/kln89/scan-pull")) {
- GPSPage::Knob2Right1();
+ _kln89->_activePage->LooseFocus();
+ _subPage++;
+ if(_subPage >= _nSubPages) _subPage = 0;
} else {
if(_uLinePos == 0 && _kln89->_obsMode) {
_kln89->_obsHeading++;
_id = s;
}
+void KLN89Page::SetSubPage(int n) {
+ if(n < 0) n = 0;
+ if(n >= _nSubPages) n = _nSubPages-1;
+ _subPage = n;
+}
+
const string& KLN89Page::GetId() {
return(_id);
}
+
+// TODO - this function probably shouldn't be here - FG almost certainly has better handling
+// of this somewhere already.
+string KLN89Page::GPSitoa(int n) {
+ char buf[6];
+ snprintf(buf, 6, "%i", n);
+ string s = buf;
+ return(s);
+}
class KLN89;
-class KLN89Page : public GPSPage {
+class KLN89Page {
public:
KLN89Page(KLN89* parent);
virtual void OBSPressed();
virtual void MsgPressed();
- // See base class comments for this.
+ // Sometimes a page needs to maintain state for some return paths,
+ // but change it for others. The CleanUp function can be used for
+ // changing state for non-ENT return paths in conjunction with
+ // GPS::_cleanUpPage
virtual void CleanUp();
- // ditto
+ // The LooseFocus function is called when a page or subpage looses focus
+ // and allows pages to clean up state that is maintained whilst focus is
+ // retained, but lost on return.
virtual void LooseFocus();
inline void SetEntInvert(bool b) { _entInvert = b; }
virtual void SetId(const string& s);
virtual const string& GetId();
+ inline int GetSubPage() { return(_subPage); }
+ void SetSubPage(int n);
+
+ inline int GetNSubPages() { return(_nSubPages); }
+
+ inline const string& GetName() { return(_name); }
+
protected:
+
KLN89* _kln89;
+ string _name; // eg. "APT", "NAV" etc
+ int _nSubPages;
+ // _subpage is zero based
+ int _subPage; // The subpage gets remembered when other pages are displayed
+
// Underline position in cursor mode is not persistant when subpage is changed - hence we only need one variable per page for it.
// Note that pos 0 is special - this is the leg pos in field 1, so pos will normally be set to 1 when crsr is pressed.
// Also note that in general it doesn't seem to wrap.
double _scratchpadTimer; // Used for displaying the scratchpad messages for the right amount of time.
string _scratchpadLine1;
string _scratchpadLine2;
+
+ // TODO - remove this function from this class and use a built in method instead.
+ string GPSitoa(int n);
};
#endif // _KLN89_PAGE_HXX
GPSWaypoint* _actWp;
// The actual ACT page that gets displayed...
- GPSPage* _actPage;
+ KLN89Page* _actPage;
// ...which points to one of the below.
- GPSPage* _aptPage;
- GPSPage* _vorPage;
- GPSPage* _ndbPage;
- GPSPage* _intPage;
- GPSPage* _usrPage;
+ KLN89Page* _aptPage;
+ KLN89Page* _vorPage;
+ KLN89Page* _ndbPage;
+ KLN89Page* _intPage;
+ KLN89Page* _usrPage;
};
#endif // _KLN89_PAGE_ACT_HXX
_kln89->DrawText("For This Airport", 2, 0, 0);
} else {
if(_iafDialog) {
- _kln89->DrawText(_iaps[_curIap]->_abbrev, 2, 1, 3);
+ _kln89->DrawText(_iaps[_curIap]->_ident, 2, 1, 3);
_kln89->DrawText(_iaps[_curIap]->_rwyStr, 2, 7, 3);
- _kln89->DrawText(_iaps[_curIap]->_id, 2, 12, 3);
+ _kln89->DrawText(_iaps[_curIap]->_aptIdent, 2, 12, 3);
_kln89->DrawText("IAF", 2, 2, 2);
unsigned int line = 0;
- for(unsigned int i=_iafStart; i<_IAF.size(); ++i) {
+ for(unsigned int i=_iafStart; i<_approachRoutes.size(); ++i) {
if(line == 2) {
- i = _IAF.size() - 1;
+ i = _approachRoutes.size() - 1;
}
// Assume that the IAF number is always single digit!
_kln89->DrawText(GPSitoa(i+1), 2, 6, 2-line);
if(!(_kln89->_mode == KLN89_MODE_CRSR && _kln89->_blink && _uLinePos == (line + 1))) {
- _kln89->DrawText(_IAF[i]->id, 2, 8, 2-line);
+ _kln89->DrawText(_approachRoutes[i]->waypoints[0]->id, 2, 8, 2-line);
}
if(_kln89->_mode == KLN89_MODE_CRSR && _uLinePos == (line + 1) && !(_kln89->_blink )) {
_kln89->Underline(2, 8, 2-line, 5);
_kln89->DrawEnt();
}
} else if(_addDialog) {
- _kln89->DrawText(_iaps[_curIap]->_abbrev, 2, 1, 3);
+ _kln89->DrawText(_iaps[_curIap]->_ident, 2, 1, 3);
_kln89->DrawText(_iaps[_curIap]->_rwyStr, 2, 7, 3);
- _kln89->DrawText(_iaps[_curIap]->_id, 2, 12, 3);
+ _kln89->DrawText(_iaps[_curIap]->_aptIdent, 2, 12, 3);
string s = GPSitoa(_fStart + 1);
_kln89->DrawText(s, 2, 2-s.size(), 2);
s = GPSitoa(_kln89->_approachFP->waypoints.size());
}
}
} else if(_replaceDialog) {
- _kln89->DrawText(_iaps[_curIap]->_abbrev, 2, 1, 3);
+ _kln89->DrawText(_iaps[_curIap]->_ident, 2, 1, 3);
_kln89->DrawText(_iaps[_curIap]->_rwyStr, 2, 7, 3);
- _kln89->DrawText(_iaps[_curIap]->_id, 2, 12, 3);
+ _kln89->DrawText(_iaps[_curIap]->_aptIdent, 2, 12, 3);
_kln89->DrawText("Replace Existing", 2, 0, 2);
_kln89->DrawText("Approach", 2, 4, 1);
if(_uLinePos > 0 && !(_kln89->_blink)) {
}
} else {
_kln89->DrawText("IAP", 2, 11, 3);
- int check = 0;
bool selApp = false;
if(_kln89->_mode == KLN89_MODE_CRSR && _uLinePos > 4) {
selApp = true;
if(!_kln89->_blink) _kln89->DrawEnt();
}
- for(unsigned int i=0; i<_iaps.size(); ++i) { // TODO - do this properly when > 3 IAPs
- string s = GPSitoa(i+1);
- _kln89->DrawText(s, 2, 2 - s.size(), 2-i);
- if(!(selApp && _uLinePos == 5+i && _kln89->_blink)) {
- _kln89->DrawText(_iaps[i]->_abbrev, 2, 3, 2-i);
- _kln89->DrawText(_iaps[i]->_rwyStr, 2, 9, 2-i);
- }
- if(selApp && _uLinePos == 5+i && !_kln89->_blink) {
- _kln89->Underline(2, 3, 2-i, 9);
+ // _maxULine pos should be 4 + iaps.size() at this point.
+ // Draw a maximum of 3 IAPs.
+ // If there are more than 3 IAPs for this airport, then we need to offset the start
+ // of the list if _uLinePos is pointing at the 4th or later IAP.
+ unsigned int offset = 0;
+ unsigned int index;
+ if(_uLinePos > 7) {
+ offset = _uLinePos - 7;
+ }
+ for(unsigned int i=0; i<3; ++i) {
+ index = offset + i;
+ if(index < _iaps.size()) {
+ string s = GPSitoa(index+1);
+ _kln89->DrawText(s, 2, 2 - s.size(), 2-i);
+ if(!(selApp && _uLinePos == index+5 && _kln89->_blink)) {
+ _kln89->DrawText(_iaps[index]->_ident, 2, 3, 2-i);
+ _kln89->DrawText(_iaps[index]->_rwyStr, 2, 9, 2-i);
+ }
+ if(selApp && _uLinePos == index+5 && !_kln89->_blink) {
+ _kln89->Underline(2, 3, 2-i, 9);
+ }
+ } else {
+ break;
}
- check++;
- if(check > 2) break;
}
}
}
} else if(_subPage == 7) {
// Don't *think* we need some of this since some of it we can only get to by pressing ENT, not CRSR.
if(_iafDialog) {
- _maxULinePos = _IAF.size();
+ _maxULinePos = _approachRoutes.size();
_uLinePos = 1;
} else if(_addDialog) {
_maxULinePos = 1;
}
} else if(_addDialog) {
_addDialog = false;
- if(_IAF.size() > 1) {
+ if(_approachRoutes.size() > 1) {
_iafDialog = true;
_maxULinePos = 1;
// Don't reset _curIaf since it is remembed.
void KLN89AptPage::EntPressed() {
if(_entInvert) {
_entInvert = false;
- _last_apt_id = _apt_id;
- _apt_id = _save_apt_id;
+ if(_kln89->_dtoReview) {
+ _kln89->DtoInitiate(_apt_id);
+ } else {
+ _last_apt_id = _apt_id;
+ _apt_id = _save_apt_id;
+ }
} else if(_subPage == 7 && _kln89->_mode == KLN89_MODE_CRSR && _uLinePos > 0) {
// We are selecting an approach
if(_iafDialog) {
if(_uLinePos > 0) {
// Record the IAF that was picked
if(_uLinePos == 3) {
- _curIaf = _IAF.size() - 1;
+ _curIaf = _approachRoutes.size() - 1;
} else {
_curIaf = _uLinePos - 1 + _iafStart;
}
// TODO - delete the waypoints inside _approachFP before clearing them!!!!!!!
_kln89->_approachFP->waypoints.clear();
GPSWaypoint* wp = new GPSWaypoint;
- *wp = *_IAF[_curIaf]; // Need to make copies here since we're going to alter ID and type sometimes
+ *wp = *(_approachRoutes[_curIaf]->waypoints[0]); // Need to make copies here since we're going to alter ID and type sometimes
string iafid = wp->id;
- //wp->id += 'i';
_kln89->_approachFP->waypoints.push_back(wp);
for(unsigned int i=0; i<_IAP.size(); ++i) {
if(_IAP[i]->id != iafid) { // Don't duplicate waypoints that are part of the initial fix list and the approach procedure list.
_kln89->_approachFP->waypoints.push_back(wp);
}
}
- // Only add 1 missed approach procedure waypoint for now. I think this might be standard always anyway.
- wp = new GPSWaypoint;
- *wp = *_MAP[0];
- //wp->id += 'h';
- _kln89->_approachFP->waypoints.push_back(wp);
_iafDialog = false;
_addDialog = true;
_maxULinePos = _kln89->_approachFP->waypoints.size() + 1;
_kln89->_activeFP->waypoints.insert(_kln89->_activeFP->waypoints.end(), _kln89->_approachFP->waypoints.begin(), _kln89->_approachFP->waypoints.end());
}
_kln89->_approachID = _apt_id;
- _kln89->_approachAbbrev = _iaps[_curIap]->_abbrev;
+ _kln89->_approachAbbrev = _iaps[_curIap]->_ident;
_kln89->_approachRwyStr = _iaps[_curIap]->_rwyStr;
_kln89->_approachLoaded = true;
//_kln89->_messageStack.push_back("*Press ALT To Set Baro");
} else if(_replaceDialog) {
// TODO - load the approach!
} else if(_uLinePos > 4) {
- _IAF.clear();
+ _approachRoutes.clear();
_IAP.clear();
- _MAP.clear();
_curIaf = 0;
- _IAF = ((FGNPIAP*)(_iaps[_uLinePos-5]))->_IAF;
+ _approachRoutes = ((FGNPIAP*)(_iaps[_uLinePos-5]))->_approachRoutes;
_IAP = ((FGNPIAP*)(_iaps[_uLinePos-5]))->_IAP;
- _MAP = ((FGNPIAP*)(_iaps[_uLinePos-5]))->_MAP;
_curIap = _uLinePos - 5; // TODO - handle the start of list ! no. 1, and the end of list not sequential!
_uLinePos = 1;
- if(_IAF.size() > 1) {
+ if(_approachRoutes.size() > 1) {
// More than 1 IAF - display the selection dialog
_iafDialog = true;
- _maxULinePos = _IAF.size();
+ _maxULinePos = _approachRoutes.size();
} else {
+ // There is only 1 IAF, so load the waypoints into the approach flightplan here.
+ // TODO - there is nasty code duplication loading the approach FP between the case here where we have only one
+ // IAF and the case where we must choose the IAF from a list. Try to tidy this after it is all working properly.
+ _kln89->_approachFP->waypoints.clear();
+ GPSWaypoint* wp = new GPSWaypoint;
+ *wp = *(_approachRoutes[0]->waypoints[0]); // Need to make copies here since we're going to alter ID and type sometimes
+ string iafid = wp->id;
+ _kln89->_approachFP->waypoints.push_back(wp);
+ for(unsigned int i=0; i<_IAP.size(); ++i) {
+ if(_IAP[i]->id != iafid) { // Don't duplicate waypoints that are part of the initial fix list and the approach procedure list.
+ // FIXME - allow the same waypoint to be both the IAF and the FAF in some
+ // approaches that have a procedure turn eg. KDLL
+ // Also allow MAF to be the same as IAF!
+ wp = new GPSWaypoint;
+ *wp = *_IAP[i];
+ _kln89->_approachFP->waypoints.push_back(wp);
+ }
+ }
_addDialog = true;
_maxULinePos = 1;
}
} else {
_curRwyPage--;
}
+ } else if(_subPage == 0) {
+ _subPage = 7;
+ // We have to set _uLinePos here even though the cursor isn't pressed, to
+ // ensure that the list displays properly.
+ if(_iaps.empty()) {
+ _uLinePos = 1;
+ } else {
+ _uLinePos = 5;
+ }
} else {
KLN89Page::Knob2Left1();
}
} else {
_curFreqPage++;
}
+ } else if(_subPage == 6) {
+ _subPage = 7;
+ // We have to set _uLinePos here even though the cursor isn't pressed, to
+ // ensure that the list displays properly.
+ if(_iaps.empty()) {
+ _uLinePos = 1;
+ } else {
+ _uLinePos = 5;
+ }
} else {
KLN89Page::Knob2Right1();
}
iap_list_type _iaps;
unsigned int _curIap; // The index into _iaps of the IAP we are currently selecting
- vector<GPSWaypoint*> _IAF; // The initial approach fix(es)
+ vector<GPSFlightPlan*> _approachRoutes; // The approach route(s) from the IAF(s) to the IF.
vector<GPSWaypoint*> _IAP; // The compulsory waypoints of the approach procedure (may duplicate one of the above).
// _IAP includes the FAF and MAF.
vector<GPSWaypoint*> _MAP; // The missed approach procedure (doesn't include the MAF).
- unsigned int _curIaf; // The index into _IAF of the IAF we are currently selecting, and then remembered as the one we selected
+ unsigned int _curIaf; // The index into _approachRoutes of the IAF we are currently selecting, and then remembered as the one we selected
// Position in rwy pages
unsigned int _curRwyPage;
#endif
#include "kln89_page_dir.hxx"
+#include <Main/fg_props.hxx>
KLN89DirPage::KLN89DirPage(KLN89* parent)
: KLN89Page(parent) {
_nSubPages = 1;
_subPage = 0;
_name = "DIR";
+ _maxULinePos = 4;
_DToWpDispMode = 2;
}
_kln89->DrawText("DIRECT TO:", 2, 2, 3);
if(_kln89->_mode == KLN89_MODE_CRSR) {
+ string s = _id;
+ while(s.size() < 5) s += ' ';
if(_DToWpDispMode == 0) {
- string s = _id;
- while(s.size() < 5) s += ' ';
if(!_kln89->_blink) {
_kln89->DrawText(s, 2, 4, 1, false, 99);
_kln89->DrawEnt(1, 0, 1);
}
} else if(_DToWpDispMode == 1) {
if(!_kln89->_blink) {
- // TODO
+ _kln89->DrawText(s, 2, 4, 1, false, _uLinePos);
_kln89->DrawEnt(1, 0, 1);
}
_kln89->Underline(2, 4, 1, 5);
KLN89Page::Update(dt);
}
+// This can only be called from the KLN89 when DTO is pressed from outside of the DIR page.
+// DO NOT USE IT to set _id internally from the DIR page, since it initialises various state
+// based on the assumption that the DIR page is being first entered.
void KLN89DirPage::SetId(const string& s) {
if(s.size()) {
_id = s;
- // TODO - fill in lat, lon, type
- // or just pass in waypoints (probably better!)
_DToWpDispMode = 0;
- // TODO - this (above) should probably be dependent on whether s is a *valid* waypoint!
+ if(!_kln89->_activeFP->IsEmpty()) {
+ _DToWpDispIndex = (int)_kln89->_activeFP->waypoints.size() - 1;
+ }
} else {
_DToWpDispMode = 2;
}
_uLinePos = 1; // Needed to stop Leg flashing
}
+void KLN89DirPage::CrsrPressed() {
+ // Pressing CRSR clears the ID field (from sim).
+ _DToWpDispMode = 2;
+}
+
void KLN89DirPage::ClrPressed() {
if(_kln89->_mode == KLN89_MODE_CRSR) {
if(_DToWpDispMode <= 1) {
}
void KLN89DirPage::EntPressed() {
- //cout << "DTO ENT Pressed()\n";
- if(_id.empty()) {
+ // Trim any RH whitespace from _id
+ while(!_id.empty()) {
+ if(_id[_id.size()-1] == ' ') {
+ _id = _id.substr(0, _id.size()-1);
+ } else {
+ // Important to break, since usr waypoint names may contain space.
+ break;
+ }
+ }
+ if(_DToWpDispMode == 2 || _id.empty()) {
_kln89->DtoCancel();
} else {
- _kln89->DtoInitiate(_id);
+ if(_DToWpDispMode == 0) {
+ // It's a waypoint from the active flightplan - these get processed without data page review.
+ _kln89->DtoInitiate(_id);
+ } else {
+ // Display the appropriate data page for review (USR page if the ident is not currently valid)
+ _kln89->_dtoReview = true;
+ GPSWaypoint* wp = _kln89->FindFirstByExactId(_id);
+ if(wp) {
+ // Set the current page to be the appropriate data page
+ _kln89->_curPage = wp->type;
+ delete wp;
+ } else {
+ // Set the current page to be the user page
+ _kln89->_curPage = 4;
+ }
+ // set the page ID and entInvert, and activate the current page.
+ _kln89->_activePage = _kln89->_pages[_kln89->_curPage];
+ _kln89->_activePage->SetId(_id);
+ _kln89->_activePage->SetEntInvert(true);
+ }
+ }
+}
+
+void KLN89DirPage::Knob2Left1() {
+ if(_kln89->_mode == KLN89_MODE_CRSR) {
+ if(fgGetBool("/instrumentation/kln89/scan-pull")) {
+ if(_DToWpDispMode == 2) {
+ if(!_kln89->_activeFP->IsEmpty()) {
+ // Switch to mode 0, set the position to the end of the active flightplan *and* run the mode 0 case.
+ _DToWpDispMode = 0;
+ _DToWpDispIndex = (int)_kln89->_activeFP->waypoints.size() - 1;
+ }
+ }
+ if(_DToWpDispMode == 0) {
+ // If the knob is pulled out, then the unit cycles through the waypoints of the active flight plan
+ // (This is deduced from the Bendix-King sim, I haven't found it documented in the pilot guide).
+ // If the active flight plan is empty it clears the field (this is possible, e.g. if a data page was
+ // active when DTO was pressed).
+ if(!_kln89->_activeFP->IsEmpty()) {
+ if(_DToWpDispIndex == 0) {
+ _DToWpDispIndex = (int)_kln89->_activeFP->waypoints.size() - 1;
+ } else {
+ _DToWpDispIndex--;
+ }
+ _id = _kln89->_activeFP->waypoints[_DToWpDispIndex]->id;
+ } else {
+ _DToWpDispMode = 2;
+ }
+ }
+ // _DToWpDispMode == 1 is a NO-OP when the knob is out.
+ } else {
+ if(_DToWpDispMode == 0) {
+ // If the knob is not pulled out, then turning it transitions the DIR page to the waypoint selection mode
+ // and sets the waypoint to the first beginning with '9'
+ _id = "9";
+ GPSWaypoint* wp = _kln89->FindFirstById(_id);
+ if(wp) {
+ _id = wp->id;
+ delete wp;
+ }
+ _uLinePos = 0;
+ _DToWpDispMode = 1;
+ } else if(_DToWpDispMode == 1) {
+ while(_id.size() < (_uLinePos + 1)) {
+ _id += ' ';
+ }
+ char ch = _id[_uLinePos];
+ if(ch == ' ') {
+ ch = '9';
+ } else if(ch == '0') {
+ ch = 'Z';
+ } else if(ch == 'A') {
+ // It seems that blanks are allowed within the name, but not for the first character
+ if(_uLinePos == 0) {
+ ch = '9';
+ } else {
+ ch = ' ';
+ }
+ } else {
+ ch--;
+ }
+ _id[_uLinePos] = ch;
+ GPSWaypoint* wp = _kln89->FindFirstById(_id.substr(0, _uLinePos+1));
+ if(wp) {
+ _id = wp->id;
+ delete wp;
+ }
+ } else {
+ _id = "9";
+ GPSWaypoint* wp = _kln89->FindFirstById(_id);
+ if(wp) {
+ _id = wp->id;
+ delete wp;
+ }
+ _uLinePos = 0;
+ _DToWpDispMode = 1;
+ }
+ }
+ } else {
+ // If the cursor is not displayed, then we return to the page that was displayed prior to DTO being pressed,
+ // and pass the knob turn to that page, whether pulled out or not.
+ _kln89->_activePage = _kln89->_pages[_kln89->_curPage];
+ _kln89->_activePage->Knob2Left1();
+ }
+}
+
+void KLN89DirPage::Knob2Right1() {
+ if(_kln89->_mode == KLN89_MODE_CRSR) {
+ if(fgGetBool("/instrumentation/kln89/scan-pull")) {
+ if(_DToWpDispMode == 2) {
+ if(!_kln89->_activeFP->IsEmpty()) {
+ // Switch to mode 0, set the position to the end of the active flightplan *and* run the mode 0 case.
+ _DToWpDispMode = 0;
+ _DToWpDispIndex = (int)_kln89->_activeFP->waypoints.size() - 1;
+ }
+ }
+ if(_DToWpDispMode == 0) {
+ // If the knob is pulled out, then the unit cycles through the waypoints of the active flight plan
+ // (This is deduced from the Bendix-King sim, I haven't found it documented in the pilot guide).
+ // If the active flight plan is empty it clears the field (this is possible, e.g. if a data page was
+ // active when DTO was pressed).
+ if(!_kln89->_activeFP->IsEmpty()) {
+ if(_DToWpDispIndex == (int)_kln89->_activeFP->waypoints.size() - 1) {
+ _DToWpDispIndex = 0;
+ } else {
+ _DToWpDispIndex++;
+ }
+ _id = _kln89->_activeFP->waypoints[_DToWpDispIndex]->id;
+ } else {
+ _DToWpDispMode = 2;
+ }
+ }
+ // _DToWpDispMode == 1 is a NO-OP when the knob is out.
+ } else {
+ if(_DToWpDispMode == 0) {
+ // If the knob is not pulled out, then turning it transitions the DIR page to the waypoint selection mode
+ // and sets the waypoint to the first beginning with 'A'
+ _id = "A";
+ GPSWaypoint* wp = _kln89->FindFirstById(_id);
+ if(wp) {
+ _id = wp->id;
+ delete wp;
+ }
+ _uLinePos = 0;
+ _DToWpDispMode = 1;
+ } else if(_DToWpDispMode == 1) {
+ while(_id.size() < (_uLinePos + 1)) {
+ _id += ' ';
+ }
+ char ch = _id[_uLinePos];
+ if(ch == ' ') {
+ ch = 'A';
+ } else if(ch == 'Z') {
+ ch = '0';
+ } else if(ch == '9') {
+ // It seems that blanks are allowed within the name, but not for the first character
+ if(_uLinePos == 0) {
+ ch = 'A';
+ } else {
+ ch = ' ';
+ }
+ } else {
+ ch++;
+ }
+ _id[_uLinePos] = ch;
+ GPSWaypoint* wp = _kln89->FindFirstById(_id.substr(0, _uLinePos+1));
+ if(wp) {
+ _id = wp->id;
+ delete wp;
+ }
+ } else {
+ _id = "A";
+ GPSWaypoint* wp = _kln89->FindFirstById(_id);
+ if(wp) {
+ _id = wp->id;
+ delete wp;
+ }
+ _uLinePos = 0;
+ _DToWpDispMode = 1;
+ }
+ }
+ } else {
+ // If the cursor is not displayed, then we return to the page that was displayed prior to DTO being pressed,
+ // and pass the knob turn to that page, whether pulled out or not.
+ _kln89->_activePage = _kln89->_pages[_kln89->_curPage];
+ _kln89->_activePage->Knob2Right1();
}
}
void SetId(const string& s);
+ void CrsrPressed();
void ClrPressed();
void EntPressed();
+ void Knob2Left1();
+ void Knob2Right1();
private:
// Waypoint display mode.
// 2 => Blanks. These can be displayed flashing when the cursor is active (eg. when CLR is pressed) and are always displayed if the cursor is turned off.
int _DToWpDispMode;
+ // Position of the list in the mode that scans through the active flight plan.
+ // This should be initialised to point at the final waypoint of the active flight plan when we enter mode zero above.
+ int _DToWpDispIndex;
+
// We need to save the mode when DTO gets pressed, since potentially this class handles page exit via. the CLR event handler
KLN89Mode _saveMasterMode;
};
//----------------------------------------- end active FP copy ------------------------------------------------
// Recalculate which waypoint is displayed at the top of the list if required (generally if this page has lost focus).
- int idx = _parent->GetActiveWaypointIndex();
+ int idx = _kln89->GetActiveWaypointIndex();
if(_resetFplPos0) {
if(waylist.size() <= 1) {
_fplPos = 0;
void KLN89FplPage::EntPressed() {
if(_delFP) {
- _parent->ClearFlightPlan(_subPage);
+ _kln89->ClearFlightPlan(_subPage);
CrsrPressed();
} else if(_delWp) {
int pos = _uLinePos - 4 + _fplPos;
}
} else {
// Use
- _parent->ClearFlightPlan(0);
+ _kln89->ClearFlightPlan(0);
for(unsigned int i=0; i<_kln89->_flightPlans[_subPage]->waypoints.size(); ++i) {
GPSWaypoint* wp = new GPSWaypoint;
*wp = *(_kln89->_flightPlans[_subPage]->waypoints[i]);
_kln89->OrientateToActiveFlightPlan();
_subPage = 0;
}
- _parent->CrsrPressed();
+ _kln89->CrsrPressed();
} else if(_uLinePos == 2) {
if(_kln89->_flightPlans[_subPage]->IsEmpty()) {
// ERROR !!!
} else {
// Use Invert
- _parent->ClearFlightPlan(0);
+ _kln89->ClearFlightPlan(0);
for(unsigned int i=0; i<_kln89->_flightPlans[_subPage]->waypoints.size(); ++i) {
GPSWaypoint* wp = new GPSWaypoint;
*wp = *(_kln89->_flightPlans[_subPage]->waypoints[i]);
}
_kln89->OrientateToActiveFlightPlan();
}
- _parent->CrsrPressed();
+ _kln89->CrsrPressed();
_subPage = 0;
}
}
void KLN89IntPage::EntPressed() {
if(_entInvert) {
_entInvert = false;
- _last_int_id = _int_id;
- _int_id = _save_int_id;
+ _entInvert = false;
+ if(_kln89->_dtoReview) {
+ _kln89->DtoInitiate(_int_id);
+ } else {
+ _last_int_id = _int_id;
+ _int_id = _save_int_id;
+ }
}
}
_menuPos = 0;
_suspendAVS = false;
_scanWpSet = false;
- _scanWpIndex = -1;
+ _scanWpIndex = -1;
}
KLN89NavPage::~KLN89NavPage() {
}
void KLN89NavPage::Update(double dt) {
- GPSFlightPlan* fp = ((KLN89*)_parent)->_activeFP;
- GPSWaypoint* awp = _parent->GetActiveWaypoint();
+ GPSFlightPlan* fp = _kln89->_activeFP;
+ GPSWaypoint* awp = _kln89->GetActiveWaypoint();
// Scan-pull out on nav4 page switches off the cursor
if(3 == _subPage && fgGetBool("/instrumentation/kln89/scan-pull")) { _kln89->_mode = KLN89_MODE_DISP; }
bool crsr = (_kln89->_mode == KLN89_MODE_CRSR);
void KLN89NDBPage::EntPressed() {
if(_entInvert) {
_entInvert = false;
- _last_ndb_id = _ndb_id;
- _ndb_id = _save_ndb_id;
+ if(_kln89->_dtoReview) {
+ _kln89->DtoInitiate(_ndb_id);
+ } else {
+ _last_ndb_id = _ndb_id;
+ _ndb_id = _save_ndb_id;
+ }
}
}
void KLN89VorPage::EntPressed() {
if(_entInvert) {
_entInvert = false;
- _last_vor_id = _vor_id;
- _vor_id = _save_vor_id;
+ _entInvert = false;
+ if(_kln89->_dtoReview) {
+ _kln89->DtoInitiate(_vor_id);
+ } else {
+ _last_vor_id = _vor_id;
+ _vor_id = _save_vor_id;
+ }
}
}
#include "dclgps.hxx"
#include <simgear/sg_inlines.h>
-#include <simgear/structure/commands.hxx>
#include <simgear/timing/sg_time.hxx>
#include <simgear/magvar/magvar.hxx>
#include <Navaids/fix.hxx>
#include <Navaids/navrecord.hxx>
#include <Airports/simple.hxx>
+#include <Airports/runways.hxx>
#include <iostream>
using namespace std;
-// Command callbacks for FlightGear
-
-static bool do_kln89_msg_pressed(const SGPropertyNode* arg) {
- //cout << "do_kln89_msg_pressed called!\n";
- DCLGPS* gps = (DCLGPS*)globals->get_subsystem("kln89");
- gps->MsgPressed();
- return(true);
-}
-
-static bool do_kln89_obs_pressed(const SGPropertyNode* arg) {
- //cout << "do_kln89_obs_pressed called!\n";
- DCLGPS* gps = (DCLGPS*)globals->get_subsystem("kln89");
- gps->OBSPressed();
- return(true);
-}
-
-static bool do_kln89_alt_pressed(const SGPropertyNode* arg) {
- //cout << "do_kln89_alt_pressed called!\n";
- DCLGPS* gps = (DCLGPS*)globals->get_subsystem("kln89");
- gps->AltPressed();
- return(true);
-}
-
-static bool do_kln89_nrst_pressed(const SGPropertyNode* arg) {
- DCLGPS* gps = (DCLGPS*)globals->get_subsystem("kln89");
- gps->NrstPressed();
- return(true);
-}
-
-static bool do_kln89_dto_pressed(const SGPropertyNode* arg) {
- DCLGPS* gps = (DCLGPS*)globals->get_subsystem("kln89");
- gps->DtoPressed();
- return(true);
-}
-
-static bool do_kln89_clr_pressed(const SGPropertyNode* arg) {
- DCLGPS* gps = (DCLGPS*)globals->get_subsystem("kln89");
- gps->ClrPressed();
- return(true);
-}
-
-static bool do_kln89_ent_pressed(const SGPropertyNode* arg) {
- DCLGPS* gps = (DCLGPS*)globals->get_subsystem("kln89");
- gps->EntPressed();
- return(true);
-}
-
-static bool do_kln89_crsr_pressed(const SGPropertyNode* arg) {
- DCLGPS* gps = (DCLGPS*)globals->get_subsystem("kln89");
- gps->CrsrPressed();
- return(true);
-}
-
-static bool do_kln89_knob1left1(const SGPropertyNode* arg) {
- DCLGPS* gps = (DCLGPS*)globals->get_subsystem("kln89");
- gps->Knob1Left1();
- return(true);
-}
-
-static bool do_kln89_knob1right1(const SGPropertyNode* arg) {
- DCLGPS* gps = (DCLGPS*)globals->get_subsystem("kln89");
- gps->Knob1Right1();
- return(true);
-}
-
-static bool do_kln89_knob2left1(const SGPropertyNode* arg) {
- DCLGPS* gps = (DCLGPS*)globals->get_subsystem("kln89");
- gps->Knob2Left1();
- return(true);
-}
-
-static bool do_kln89_knob2right1(const SGPropertyNode* arg) {
- DCLGPS* gps = (DCLGPS*)globals->get_subsystem("kln89");
- gps->Knob2Right1();
- return(true);
-}
-
-// End command callbacks
-
GPSWaypoint::GPSWaypoint() {
appType = GPS_APP_NONE;
}
ClockTime::~ClockTime() {
}
-GPSPage::GPSPage(DCLGPS* parent) {
- _parent = parent;
- _subPage = 0;
-}
-
-GPSPage::~GPSPage() {
-}
-
-void GPSPage::Update(double dt) {}
-
-void GPSPage::Knob1Left1() {}
-void GPSPage::Knob1Right1() {}
-
-void GPSPage::Knob2Left1() {
- _parent->_activePage->LooseFocus();
- _subPage--;
- if(_subPage < 0) _subPage = _nSubPages - 1;
-}
-
-void GPSPage::Knob2Right1() {
- _parent->_activePage->LooseFocus();
- _subPage++;
- if(_subPage >= _nSubPages) _subPage = 0;
-}
-
-void GPSPage::CrsrPressed() {}
-void GPSPage::EntPressed() {}
-void GPSPage::ClrPressed() {}
-void GPSPage::DtoPressed() {}
-void GPSPage::NrstPressed() {}
-void GPSPage::AltPressed() {}
-void GPSPage::OBSPressed() {}
-void GPSPage::MsgPressed() {}
-
-string GPSPage::GPSitoa(int n) {
- char buf[6];
- snprintf(buf, 6, "%i", n);
- string s = buf;
- return(s);
-}
-
-void GPSPage::CleanUp() {}
-void GPSPage::LooseFocus() {}
-void GPSPage::SetId(const string& s) {}
-
// ------------------------------------------------------------------------------------- //
DCLGPS::DCLGPS(RenderArea2D* instrument) {
_instrument = instrument;
_nFields = 1;
_maxFields = 2;
- _pages.clear();
// Units - lets default to US units - FG can set them to other units from config during startup if desired.
_altUnits = GPS_ALT_UNITS_FT;
}
void DCLGPS::init() {
- globals->get_commands()->addCommand("kln89_msg_pressed", do_kln89_msg_pressed);
- globals->get_commands()->addCommand("kln89_obs_pressed", do_kln89_obs_pressed);
- globals->get_commands()->addCommand("kln89_alt_pressed", do_kln89_alt_pressed);
- globals->get_commands()->addCommand("kln89_nrst_pressed", do_kln89_nrst_pressed);
- globals->get_commands()->addCommand("kln89_dto_pressed", do_kln89_dto_pressed);
- globals->get_commands()->addCommand("kln89_clr_pressed", do_kln89_clr_pressed);
- globals->get_commands()->addCommand("kln89_ent_pressed", do_kln89_ent_pressed);
- globals->get_commands()->addCommand("kln89_crsr_pressed", do_kln89_crsr_pressed);
- globals->get_commands()->addCommand("kln89_knob1left1", do_kln89_knob1left1);
- globals->get_commands()->addCommand("kln89_knob1right1", do_kln89_knob1right1);
- globals->get_commands()->addCommand("kln89_knob2left1", do_kln89_knob2left1);
- globals->get_commands()->addCommand("kln89_knob2right1", do_kln89_knob2right1);
// Not sure if this should be here, but OK for now.
CreateDefaultFlightPlans();
+
+ // Hack - hardwire some instrument approaches for development.
+ // These will shortly be replaced by a routine to read ARINC data from file instead.
+ FGNPIAP* iap;
+ GPSWaypoint* wp;
+ GPSFlightPlan* fp;
+ const GPSWaypoint* cwp;
+
+ iap = new FGNPIAP;
+ iap->_aptIdent = "KHAF";
+ iap->_ident = "R12-Y";
+ iap->_name = ExpandSIAPIdent(iap->_ident);
+ iap->_rwyStr = "12";
+ iap->_approachRoutes.clear();
+ iap->_IAP.clear();
+ // -------
+ wp = new GPSWaypoint;
+ wp->id = "GOBBS";
+ // Nasty using the find any function here, but it saves converting data from FGFix etc.
+ cwp = FindFirstByExactId(wp->id);
+ if(cwp) {
+ *wp = *cwp;
+ wp->appType = GPS_IAF;
+ fp = new GPSFlightPlan;
+ fp->waypoints.push_back(wp);
+ } else {
+ //cout << "Unable to find waypoint " << wp->id << '\n';
+ }
+ // -------
+ wp = new GPSWaypoint;
+ wp->id = "FUJCE";
+ cwp = FindFirstByExactId(wp->id);
+ if(cwp) {
+ *wp = *cwp;
+ wp->appType = GPS_IAP;
+ fp->waypoints.push_back(wp);
+ iap->_approachRoutes.push_back(fp);
+ iap->_IAP.push_back(wp);
+ } else {
+ //cout << "Unable to find waypoint " << wp->id << '\n';
+ }
+ // -------
+ wp = new GPSWaypoint;
+ wp->id = "JEVXY";
+ cwp = FindFirstByExactId(wp->id);
+ if(cwp) {
+ *wp = *cwp;
+ wp->appType = GPS_FAF;
+ iap->_IAP.push_back(wp);
+ } else {
+ //cout << "Unable to find waypoint " << wp->id << '\n';
+ }
+ // -------
+ wp = new GPSWaypoint;
+ wp->id = "RW12";
+ wp->appType = GPS_MAP;
+ if(wp->id.substr(0, 2) == "RW" && wp->appType == GPS_MAP) {
+ // Assume that this is a missed-approach point based on the runway number, which appears to be standard for most approaches.
+ const FGAirport* apt = fgFindAirportID(iap->_aptIdent);
+ if(apt) {
+ // TODO - sanity check the waypoint ID to ensure we have a double digit number
+ FGRunway* rwy = apt->getRunwayByIdent(wp->id.substr(2, 2));
+ if(rwy) {
+ wp->lat = rwy->begin().getLatitudeRad();
+ wp->lon = rwy->begin().getLongitudeRad();
+ }
+ }
+ } else {
+ cwp = FindFirstByExactId(wp->id);
+ if(cwp) {
+ *wp = *cwp;
+ wp->appType = GPS_MAP;
+ } else {
+ //cout << "Unable to find waypoint " << wp->id << '\n';
+ }
+ }
+ iap->_IAP.push_back(wp);
+ // -------
+ wp = new GPSWaypoint;
+ wp->id = "SEEMS";
+ cwp = FindFirstByExactId(wp->id);
+ if(cwp) {
+ *wp = *cwp;
+ wp->appType = GPS_MAHP;
+ iap->_IAP.push_back(wp);
+ } else {
+ //cout << "Unable to find waypoint " << wp->id << '\n';
+ }
+ // -------
+ _np_iap[iap->_aptIdent].push_back(iap);
}
void DCLGPS::bind() {
}
}
+/*
+ Expand a SIAP ident to the full procedure name (as shown on the approach chart).
+ NOTE: Some of this is inferred from data, some is from documentation.
+
+ Example expansions from ARINC 424-18 [and the airport they're taken from]:
+ "R10LY" <--> "RNAV (GPS) Y RWY 10 L" [KBOI]
+ "R10-Z" <--> "RNAV (GPS) Z RWY 10" [KHTO]
+ "S25" <--> "VOR or GPS RWY 25" [KHHR]
+ "P20" <--> "GPS RWY 20" [KDAN]
+ "NDB-B" <--> "NDB or GPS-B" [KDAW]
+ "NDBC" <--> "NDB or GPS-C" [KEMT]
+ "VDMA" <--> "VOR/DME or GPS-A" [KDAW]
+ "VDM-A" <--> "VOR/DME or GPS-A" [KEAG]
+ "VDMB" <--> "VOR/DME or GPS-B" [KDKX]
+ "VORA" <--> "VOR or GPS-A" [KEMT]
+
+ It seems that there are 2 basic types of expansions; those that include
+ the runway and those that don't. Of those that don't, it seems that 2
+ different positions within the string to encode the identifying letter
+ are used, i.e. with a dash and without.
+*/
+string DCLGPS::ExpandSIAPIdent(const string& ident) {
+ string name;
+ bool has_rwy;
+
+ switch(ident[0]) {
+ case 'N': name = "NDB or GPS"; has_rwy = false; break;
+ case 'P': name = "GPS"; has_rwy = true; break;
+ case 'R': name = "RNAV (GPS)"; has_rwy = true; break;
+ case 'S': name = "VOR or GPS"; has_rwy = true; break;
+ case 'V':
+ if(ident[1] == 'D') name = "VOR/DME or GPS";
+ else name = "VOR or GPS";
+ has_rwy = false;
+ break;
+ default: // TODO output a log message
+ break;
+ }
+
+ if(has_rwy) {
+ // Add the identifying letter if present
+ if(ident.size() == 5) {
+ name += ' ';
+ name += ident[4];
+ }
+
+ // Add the runway
+ name += " RWY ";
+ name += ident.substr(1, 2);
+
+ // Add a left/right/centre indication if present.
+ if(ident.size() > 3) {
+ if((ident[3] != '-') && (ident[3] != ' ')) { // Early versions of the spec allowed a blank instead of a dash so check for both
+ name += ' ';
+ name += ident[3];
+ }
+ }
+ } else {
+ // Add the identifying letter, which I *think* should always be present, but seems to be inconsistent as to whether a dash is used.
+ if(ident.size() == 5) {
+ name += '-';
+ name += ident[4];
+ } else if(ident.size() == 4) {
+ name += '-';
+ name += ident[3];
+ } else {
+ // No suffix letter
+ }
+ }
+
+ return(name);
+}
+
+GPSWaypoint* DCLGPS::GetActiveWaypoint() {
+ return &_activeWaypoint;
+}
+
+// Returns meters
+float DCLGPS::GetDistToActiveWaypoint() {
+ return _dist2Act;
+}
+
// I don't yet fully understand all the gotchas about where to source time from.
// This function sets the initial timer before the clock exports properties
// and the one below uses the clock to be consistent with the rest of the code.
}
void DCLGPS::DtoInitiate(const string& s) {
- //cout << "DtoInitiate, s = " << s << '\n';
const GPSWaypoint* wp = FindFirstByExactId(s);
if(wp) {
- //cout << "Waypoint found, starting dto operation!\n";
+ // TODO - Currently we start DTO operation unconditionally, regardless of which mode we are in.
+ // In fact, the following rules apply:
+ // In LEG mode, start DTO as we currently do.
+ // In OBS mode, set the active waypoint to the requested waypoint, and then:
+ // If the KLN89 is not connected to an external HSI or CDI, set the OBS course to go direct to the waypoint.
+ // If the KLN89 *is* connected to an external HSI or CDI, it cannot set the course itself, and will display
+ // a scratchpad message with the course to set manually on the HSI/CDI.
+ // In both OBS cases, leave _dto false, since we don't need the virtual waypoint created.
_dto = true;
_activeWaypoint = *wp;
_fromWaypoint.lat = _gpsLat;
_fromWaypoint.lon = _gpsLon;
_fromWaypoint.type = GPS_WP_VIRT;
_fromWaypoint.id = "DTOWP";
- delete wp;
+ delete wp;
} else {
- //cout << "Waypoint not found, ignoring dto request\n";
- // Should bring up the user waypoint page, but we're not implementing that yet.
- _dto = false; // TODO - implement this some day.
+ _dto = false;
}
}
_dto = false;
}
-void DCLGPS::Knob1Left1() {}
-void DCLGPS::Knob1Right1() {}
-void DCLGPS::Knob2Left1() {}
-void DCLGPS::Knob2Right1() {}
-void DCLGPS::CrsrPressed() { _activePage->CrsrPressed(); }
-void DCLGPS::EntPressed() { _activePage->EntPressed(); }
-void DCLGPS::ClrPressed() { _activePage->ClrPressed(); }
-void DCLGPS::DtoPressed() {}
-void DCLGPS::NrstPressed() {}
-void DCLGPS::AltPressed() {}
-
-void DCLGPS::OBSPressed() {
+void DCLGPS::ToggleOBSMode() {
_obsMode = !_obsMode;
if(_obsMode) {
if(!_activeWaypoint.id.empty()) {
_fromWaypoint.id = "OBSWP";
}
-void DCLGPS::MsgPressed() {}
-
void DCLGPS::CDIFSDIncrease() {
if(_currentCdiScaleIndex == 0) {
_currentCdiScaleIndex = _cdiScales.size() - 1;
virtual ~FGIAP() = 0;
//protected:
- string _id; // The ID of the airport this approach is for
- string _name; // The approach name, eg "VOR/DME OR GPS-B"
- string _abbrev; // The abbreviation the GPS unit uses - eg "VOR/D" in this instance. Possibly GPS model specific.
+ string _aptIdent; // The ident of the airport this approach is for
+ string _ident; // The approach ident.
+ string _name; // The full approach name.
string _rwyStr; // The string used to specify the rwy - eg "B" in this instance.
bool _precision; // True for precision approach, false for non-precision.
};
~FGNPIAP();
//private:
public:
- vector<GPSWaypoint*> _IAF; // The initial approach fix(es)
+ vector<GPSFlightPlan*> _approachRoutes; // The approach route(s) from the IAF(s) to the IF.
+ // NOTE: It is an assumption in the code that uses this that there is a unique IAF per approach route.
vector<GPSWaypoint*> _IAP; // The compulsory waypoints of the approach procedure (may duplicate one of the above).
- // _IAP includes the FAF and MAF.
- vector<GPSWaypoint*> _MAP; // The missed approach procedure (doesn't include the MAF).
+ // _IAP includes the FAF and MAF, and the missed approach waypoints.
};
typedef vector < FGIAP* > iap_list_type;
// ------------------------------------------------------------------------------
-class DCLGPS;
-
-class GPSPage {
-
-public:
- GPSPage(DCLGPS* parent);
- virtual ~GPSPage() = 0;
- virtual void Update(double dt);
- virtual void Knob1Left1();
- virtual void Knob1Right1();
- virtual void Knob2Left1();
- virtual void Knob2Right1();
- virtual void CrsrPressed();
- virtual void EntPressed();
- virtual void ClrPressed();
- virtual void DtoPressed();
- virtual void NrstPressed();
- virtual void AltPressed();
- virtual void OBSPressed();
- virtual void MsgPressed();
-
- // Sometimes a page needs to maintain state for some return paths,
- // but change it for others. The CleanUp function can be used for
- // changing state for non-ENT return paths in conjunction with
- // GPS::_cleanUpPage
- virtual void CleanUp();
-
- // The LooseFocus function is called when a page or subpage looses focus
- // and allows pages to clean up state that is maintained whilst focus is
- // retained, but lost on return.
- virtual void LooseFocus();
-
- // Allows pages that display info for a given ID to have it set/get if they implement these functions.
- virtual void SetId(const string& s);
- virtual const string& GetId()=0;
-
- inline int GetSubPage() { return(_subPage); }
-
- inline int GetNSubPages() { return(_nSubPages); }
-
- inline const string& GetName() { return(_name); }
-
-protected:
- DCLGPS* _parent;
- string _name; // eg. "APT", "NAV" etc
- int _nSubPages;
- // _subpage is zero based
- int _subPage; // The subpage gets remembered when other pages are displayed
- string GPSitoa(int n);
-};
-
-/*-----------------------------------------------------------------------*/
-
-typedef vector<GPSPage*> gps_page_list_type;
-typedef gps_page_list_type::iterator gps_page_list_itr;
-
// TODO - merge generic GPS functions instead and split out KLN specific stuff.
class DCLGPS : public SGSubsystem {
- friend class GPSPage;
-
public:
DCLGPS(RenderArea2D* instrument);
virtual ~DCLGPS() = 0;
virtual void bind();
virtual void unbind();
virtual void update(double dt);
+
+ // Expand a SIAP ident to the full procedure name.
+ string ExpandSIAPIdent(const string& ident);
// Render string s in display field field at position x, y
// WHERE POSITION IS IN CHARACTER UNITS!
// Render a char at a given position as above
virtual void DrawChar(char c, int field, int px, int py, bool bold = false);
- virtual void Knob1Right1();
- virtual void Knob1Left1();
- virtual void Knob2Right1();
- virtual void Knob2Left1();
- virtual void CrsrPressed();
- virtual void EntPressed();
- virtual void ClrPressed();
- virtual void DtoPressed();
- virtual void NrstPressed();
- virtual void AltPressed();
- virtual void OBSPressed();
- virtual void MsgPressed();
+ virtual void ToggleOBSMode();
// Set the number of fields
inline void SetNumFields(int n) { _nFields = (n > _maxFields ? _maxFields : (n < 1 ? 1 : n)); }
void SetOBSFromWaypoint();
- inline GPSWaypoint* GetActiveWaypoint() { return &_activeWaypoint; }
+ GPSWaypoint* GetActiveWaypoint();
// Get the (zero-based) position of the active waypoint in the active flightplan
// Returns -1 if no active waypoint.
int GetActiveWaypointIndex();
int GetWaypointIndex(const string& id);
// Returns meters
- inline float GetDistToActiveWaypoint() { return _dist2Act; }
+ float GetDistToActiveWaypoint();
// Returns degrees (magnetic)
float GetHeadingToActiveWaypoint();
// Returns degrees (magnetic)
inline bool GetToFlag() const { return(_headingBugTo); }
// Initiate Direct To operation to the supplied ID.
- void DtoInitiate(const string& id);
+ virtual void DtoInitiate(const string& id);
// Cancel Direct To operation
void DtoCancel();
// 2D rendering area
RenderArea2D* _instrument;
- // The actual pages
- gps_page_list_type _pages;
-
- // The currently active page
- GPSPage* _activePage;
- // And a facility to save the immediately preceeding active page
- GPSPage* _lastActivePage;
-
// Units
GPSSpeedUnits _velUnits;
GPSDistanceUnits _distUnits;
protected:
// Find first of any type of waypoint by id. (TODO - Possibly we should return multiple waypoints here).
- GPSWaypoint* FindFirstById(const string& id) const;
- GPSWaypoint* FindFirstByExactId(const string& id) const;
+ GPSWaypoint* FindFirstById(const string& id) const;
+ GPSWaypoint* FindFirstByExactId(const string& id) const;
FGNavRecord* FindFirstVorById(const string& id, bool &multi, bool exact = false);
FGNavRecord* FindFirstNDBById(const string& id, bool &multi, bool exact = false);
// Find the closest VOR to a position in RADIANS.
FGNavRecord* FindClosestVor(double lat_rad, double lon_rad);
- // helper to implement the above FindFirstXXX methods
- FGPositioned* FindTypedFirstById(const std::string& id, FGPositioned::Type ty, bool &multi, bool exact);
+ // helper to implement the above FindFirstXXX methods
+ FGPositioned* FindTypedFirstById(const std::string& id, FGPositioned::Type ty, bool &multi, bool exact);
// Position, orientation and velocity.
// These should be read from FG's built-in GPS logic if possible.
#include "gps.hxx"
-#include <simgear/compiler.h>
-#include <Aircraft/aircraft.hxx>
-#include <Main/fg_props.hxx>
-#include <Main/util.hxx> // for fgLowPass
-#include <Navaids/positioned.hxx>
+#include <memory>
+#include <set>
+
+#include "Main/fg_props.hxx"
+#include "Main/globals.hxx" // for get_subsystem
+#include "Main/util.hxx" // for fgLowPass
+#include "Navaids/positioned.hxx"
+#include "Navaids/navrecord.hxx"
+#include "Airports/simple.hxx"
+#include "Airports/runways.hxx"
+#include "Autopilot/route_mgr.hxx"
#include <simgear/math/sg_random.h>
#include <simgear/sg_inlines.h>
#include <simgear/math/sg_geodesy.hxx>
+#include <simgear/structure/exception.hxx>
+using std::auto_ptr;
using std::string;
-
+///////////////////////////////////////////////////////////////////
+
void SGGeodProperty::init(SGPropertyNode* base, const char* lonStr, const char* latStr, const char* altStr)
{
_lon = base->getChild(lonStr, 0, true);
}
}
+static const char* makeTTWString(double TTW)
+{
+ if ((TTW <= 0.0) || (TTW >= 356400.5)) { // 99 hours
+ return "--:--:--";
+ }
+
+ unsigned int TTW_seconds = (int) (TTW + 0.5);
+ unsigned int TTW_minutes = 0;
+ unsigned int TTW_hours = 0;
+ static char TTW_str[9];
+ TTW_hours = TTW_seconds / 3600;
+ TTW_minutes = (TTW_seconds / 60) % 60;
+ TTW_seconds = TTW_seconds % 60;
+ snprintf(TTW_str, 9, "%02d:%02d:%02d",
+ TTW_hours, TTW_minutes, TTW_seconds);
+ return TTW_str;
+}
+
+/////////////////////////////////////////////////////////////////////////////
+
+class GPSListener : public SGPropertyChangeListener
+{
+public:
+ GPSListener(GPS *m) :
+ _gps(m),
+ _guard(false) {}
+
+ virtual void valueChanged (SGPropertyNode * prop)
+ {
+ if (_guard) {
+ return;
+ }
+
+ _guard = true;
+ if (prop == _gps->_route_current_wp_node) {
+ _gps->routeManagerSequenced();
+ } else if (prop == _gps->_route_active_node) {
+ _gps->routeActivated();
+ } else if (prop == _gps->_ref_navaid_id_node) {
+ _gps->referenceNavaidSet(prop->getStringValue(""));
+ } else if (prop == _gps->_routeEditedSignal) {
+ _gps->routeEdited();
+ } else if (prop == _gps->_routeFinishedSignal) {
+ _gps->routeFinished();
+ }
+
+ _guard = false;
+ }
+
+ void setGuard(bool g) {
+ _guard = g;
+ }
+private:
+ GPS* _gps;
+ bool _guard; // re-entrancy guard
+};
+
+////////////////////////////////////////////////////////////////////////////
+/**
+ * Helper to monitor for Nasal or other code accessing properties we haven't
+ * defined. For the moment we complain about all such activites, since various
+ * users assume all kinds of weird, wonderful and non-existent interfaces.
+ */
+
+class DeprecatedPropListener : public SGPropertyChangeListener
+{
+public:
+ DeprecatedPropListener(SGPropertyNode* gps)
+ {
+ _parents.insert(gps);
+ SGPropertyNode* wp = gps->getChild("wp");
+ _parents.insert(wp);
+ _parents.insert(wp->getChild("wp", 0));
+ _parents.insert(wp->getChild("wp", 1));
+
+ std::set<SGPropertyNode*>::iterator it;
+ for (it = _parents.begin(); it != _parents.end(); ++it) {
+ (*it)->addChangeListener(this);
+ }
+ }
+
+ virtual void valueChanged (SGPropertyNode * prop)
+ {
+ }
+
+ virtual void childAdded (SGPropertyNode * parent, SGPropertyNode * child)
+ {
+ if (isDeprecated(parent, child)) {
+ SG_LOG(SG_INSTR, SG_WARN, "GPS: someone accessed a deprecated property:"
+ << child->getPath(true));
+ }
+ }
+private:
+ bool isDeprecated(SGPropertyNode * parent, SGPropertyNode * child) const
+ {
+ if (_parents.count(parent) < 1) {
+ return false;
+ }
+
+ // no child exclusions yet
+ return true;
+ }
+
+ std::set<SGPropertyNode*> _parents;
+};
+
+////////////////////////////////////////////////////////////////////////////
+// configuration helper object
+
+GPS::Config::Config() :
+ _enableTurnAnticipation(true),
+ _turnRate(3.0), // degrees-per-second, so 180 degree turn takes 60 seconds
+ _overflightArmDistance(0.5),
+ _waypointAlertTime(30.0),
+ _tuneRadio1ToRefVor(false),
+ _minRunwayLengthFt(0.0),
+ _requireHardSurface(true),
+ _cdiMaxDeflectionNm(-1), // default to angular mode
+ _driveAutopilot(true)
+{
+ _enableTurnAnticipation = false;
+ _extCourseSource = fgGetNode("/instrumentation/nav[0]/radials/selected-deg", true);
+}
+
+void GPS::Config::bind(GPS* aOwner, SGPropertyNode* aCfg)
+{
+ aOwner->tie(aCfg, "turn-rate-deg-sec", SGRawValuePointer<double>(&_turnRate));
+
+ aOwner->tie(aCfg, "turn-anticipation", SGRawValuePointer<bool>(&_enableTurnAnticipation));
+ aOwner->tie(aCfg, "wpt-alert-time", SGRawValuePointer<double>(&_waypointAlertTime));
+ aOwner->tie(aCfg, "tune-nav-radio-to-ref-vor", SGRawValuePointer<bool>(&_tuneRadio1ToRefVor));
+ aOwner->tie(aCfg, "min-runway-length-ft", SGRawValuePointer<double>(&_minRunwayLengthFt));
+ aOwner->tie(aCfg, "hard-surface-runways-only", SGRawValuePointer<bool>(&_requireHardSurface));
+
+ aOwner->tie(aCfg, "course-source", SGRawValueMethods<GPS::Config, const char*>
+ (*this, &GPS::Config::getCourseSource, &GPS::Config::setCourseSource));
+
+ aOwner->tie(aCfg, "cdi-max-deflection-nm", SGRawValuePointer<double>(&_cdiMaxDeflectionNm));
+ aOwner->tie(aCfg, "drive-autopilot", SGRawValuePointer<bool>(&_driveAutopilot));
+}
+
+const char*
+GPS::Config::getCourseSource() const
+{
+ if (!_extCourseSource) {
+ return "";
+ }
+
+ return _extCourseSource->getPath(true);
+}
-GPS::GPS ( SGPropertyNode *node)
- : _last_valid(false),
- _alt_dist_ratio(0),
- _distance_m(0),
- _course_deg(0),
- _name(node->getStringValue("name", "gps")),
- _num(node->getIntValue("number", 0))
+void
+GPS::Config::setCourseSource(const char* aPath)
{
+ SGPropertyNode* nd = fgGetNode(aPath, false);
+ if (!nd) {
+ SG_LOG(SG_INSTR, SG_WARN, "couldn't find course source at:" << aPath);
+ _extCourseSource = NULL;
+ }
+
+ _extCourseSource = nd;
+}
+
+double
+GPS::Config::getExternalCourse() const
+{
+ if (!_extCourseSource) {
+ return 0.0;
+ }
+
+ return _extCourseSource->getDoubleValue();
+}
+
+void
+GPS::Config::setExternalCourse(double aCourseDeg)
+{
+ if (!_extCourseSource) {
+ return;
+ }
+
+ _extCourseSource->setDoubleValue(aCourseDeg);
+}
+
+////////////////////////////////////////////////////////////////////////////
+
+GPS::GPS ( SGPropertyNode *node) :
+ _selectedCourse(0.0),
+ _dataValid(false),
+ _lastPosValid(false),
+ _mode("init"),
+ _name(node->getStringValue("name", "gps")),
+ _num(node->getIntValue("number", 0)),
+ _computeTurnData(false),
+ _anticipateTurn(false),
+ _inTurn(false)
+{
+ string branch = "/instrumentation/" + _name;
+ _gpsNode = fgGetNode(branch.c_str(), _num, true );
+ _scratchNode = _gpsNode->getChild("scratch", 0, true);
}
GPS::~GPS ()
void
GPS::init ()
{
- string branch;
- branch = "/instrumentation/" + _name;
-
- SGPropertyNode *node = fgGetNode(branch.c_str(), _num, true );
- _position.init("/position/longitude-deg", "/position/latitude-deg", "/position/altitude-ft");
- _magvar_node = fgGetNode("/environment/magnetic-variation-deg", true);
- _serviceable_node = node->getChild("serviceable", 0, true);
- _electrical_node = fgGetNode("/systems/electrical/outputs/gps", true);
-
- SGPropertyNode *wp_node = node->getChild("wp", 0, true);
- SGPropertyNode *wp0_node = wp_node->getChild("wp", 0, true);
- SGPropertyNode *wp1_node = wp_node->getChild("wp", 1, true);
-
- _wp0_position.init(wp0_node, "longitude-deg", "latitude-deg", "altitude-ft");
- _wp0_ID_node = wp0_node->getChild("ID", 0, true);
- _wp0_name_node = wp0_node->getChild("name", 0, true);
- _wp0_course_node = wp0_node->getChild("desired-course-deg", 0, true);
- _wp0_distance_node = wp0_node->getChild("distance-nm", 0, true);
- _wp0_ttw_node = wp0_node->getChild("TTW", 0, true);
- _wp0_bearing_node = wp0_node->getChild("bearing-true-deg", 0, true);
- _wp0_mag_bearing_node = wp0_node->getChild("bearing-mag-deg", 0, true);
- _wp0_course_deviation_node =
- wp0_node->getChild("course-deviation-deg", 0, true);
- _wp0_course_error_nm_node = wp0_node->getChild("course-error-nm", 0, true);
- _wp0_to_flag_node = wp0_node->getChild("to-flag", 0, true);
- _true_wp0_bearing_error_node =
- wp0_node->getChild("true-bearing-error-deg", 0, true);
- _magnetic_wp0_bearing_error_node =
- wp0_node->getChild("magnetic-bearing-error-deg", 0, true);
-
- _wp1_position.init(wp1_node, "longitude-deg", "latitude-deg", "altitude-ft");
- _wp1_ID_node = wp1_node->getChild("ID", 0, true);
- _wp1_name_node = wp1_node->getChild("name", 0, true);
- _wp1_course_node = wp1_node->getChild("desired-course-deg", 0, true);
- _wp1_distance_node = wp1_node->getChild("distance-nm", 0, true);
- _wp1_ttw_node = wp1_node->getChild("TTW", 0, true);
- _wp1_bearing_node = wp1_node->getChild("bearing-true-deg", 0, true);
- _wp1_mag_bearing_node = wp1_node->getChild("bearing-mag-deg", 0, true);
- _wp1_course_deviation_node =
- wp1_node->getChild("course-deviation-deg", 0, true);
- _wp1_course_error_nm_node = wp1_node->getChild("course-error-nm", 0, true);
- _wp1_to_flag_node = wp1_node->getChild("to-flag", 0, true);
- _true_wp1_bearing_error_node =
- wp1_node->getChild("true-bearing-error-deg", 0, true);
- _magnetic_wp1_bearing_error_node =
- wp1_node->getChild("magnetic-bearing-error-deg", 0, true);
- _get_nearest_airport_node =
- wp1_node->getChild("get-nearest-airport", 0, true);
-
- _tracking_bug_node = node->getChild("tracking-bug", 0, true);
- _raim_node = node->getChild("raim", 0, true);
-
- _indicated_pos.init(node, "indicated-longitude-deg",
+ _routeMgr = (FGRouteMgr*) globals->get_subsystem("route-manager");
+ assert(_routeMgr);
+
+ _position.init("/position/longitude-deg", "/position/latitude-deg", "/position/altitude-ft");
+ _magvar_node = fgGetNode("/environment/magnetic-variation-deg", true);
+ _serviceable_node = _gpsNode->getChild("serviceable", 0, true);
+ _serviceable_node->setBoolValue(true);
+ _electrical_node = fgGetNode("/systems/electrical/outputs/gps", true);
+
+// basic GPS outputs
+ _raim_node = _gpsNode->getChild("raim", 0, true);
+ _odometer_node = _gpsNode->getChild("odometer", 0, true);
+ _trip_odometer_node = _gpsNode->getChild("trip-odometer", 0, true);
+ _true_bug_error_node = _gpsNode->getChild("true-bug-error-deg", 0, true);
+ _magnetic_bug_error_node = _gpsNode->getChild("magnetic-bug-error-deg", 0, true);
+
+// waypoints
+ SGPropertyNode *wp_node = _gpsNode->getChild("wp", 0, true);
+ SGPropertyNode *wp1_node = wp_node->getChild("wp", 1, true);
+
+ // for compatability, alias selected course down to wp/wp[1]/desired-course-deg
+ SGPropertyNode* wp1Crs = wp1_node->getChild("desired-course-deg", 0, true);
+ wp1Crs->alias(_gpsNode->getChild("selected-course-deg"));
+
+// _true_wp1_bearing_error_node =
+// wp1_node->getChild("true-bearing-error-deg", 0, true);
+// _magnetic_wp1_bearing_error_node =
+ // wp1_node->getChild("magnetic-bearing-error-deg", 0, true);
+
+ _tracking_bug_node = _gpsNode->getChild("tracking-bug", 0, true);
+
+// reference navid
+ SGPropertyNode_ptr ref_navaid = _gpsNode->getChild("ref-navaid", 0, true);
+ _ref_navaid_id_node = ref_navaid->getChild("id", 0, true);
+ _ref_navaid_name_node = ref_navaid->getChild("name", 0, true);
+ _ref_navaid_bearing_node = ref_navaid->getChild("bearing-deg", 0, true);
+ _ref_navaid_frequency_node = ref_navaid->getChild("frequency-mhz", 0, true);
+ _ref_navaid_distance_node = ref_navaid->getChild("distance-nm", 0, true);
+ _ref_navaid_mag_bearing_node = ref_navaid->getChild("mag-bearing-deg", 0, true);
+ _ref_navaid_elapsed = 0.0;
+ _ref_navaid_set = false;
+
+// route properties
+ // should these move to the route manager?
+ _routeDistanceNm = _gpsNode->getChild("route-distance-nm", 0, true);
+ _routeETE = _gpsNode->getChild("ETE", 0, true);
+ _routeEditedSignal = fgGetNode("/autopilot/route-manager/signals/edited", true);
+ _routeFinishedSignal = fgGetNode("/autopilot/route-manager/signals/finished", true);
+
+// add listener to various things
+ _listener = new GPSListener(this);
+ _route_current_wp_node = fgGetNode("/autopilot/route-manager/current-wp", true);
+ _route_current_wp_node->addChangeListener(_listener);
+ _route_active_node = fgGetNode("/autopilot/route-manager/active", true);
+ _route_active_node->addChangeListener(_listener);
+ _ref_navaid_id_node->addChangeListener(_listener);
+ _routeEditedSignal->addChangeListener(_listener);
+ _routeFinishedSignal->addChangeListener(_listener);
+
+// navradio slaving properties
+ SGPropertyNode* toFlag = _gpsNode->getChild("to-flag", 0, true);
+ toFlag->alias(wp1_node->getChild("to-flag"));
+
+ SGPropertyNode* fromFlag = _gpsNode->getChild("from-flag", 0, true);
+ fromFlag->alias(wp1_node->getChild("from-flag"));
+
+// autopilot drive properties
+ _apTrueHeading = fgGetNode("/autopilot/settings/true-heading-deg",true);
+ _apTargetAltitudeFt = fgGetNode("/autopilot/settings/target-altitude-ft", true);
+ _apAltitudeLock = fgGetNode("/autopilot/locks/altitude", true);
+
+// realism prop[s]
+ _realismSimpleGps = fgGetNode("/sim/realism/simple-gps", true);
+ if (!_realismSimpleGps->hasValue()) {
+ _realismSimpleGps->setBoolValue(true);
+ }
+
+ // last thing, add the deprecated prop watcher
+ new DeprecatedPropListener(_gpsNode);
+
+ clearOutput();
+}
+
+void
+GPS::bind()
+{
+ _config.bind(this, _gpsNode->getChild("config", 0, true));
+// basic GPS outputs
+ tie(_gpsNode, "selected-course-deg", SGRawValueMethods<GPS, double>
+ (*this, &GPS::getSelectedCourse, NULL));
+
+
+ tieSGGeodReadOnly(_gpsNode, _indicated_pos, "indicated-longitude-deg",
"indicated-latitude-deg", "indicated-altitude-ft");
-
- _indicated_vertical_speed_node =
- node->getChild("indicated-vertical-speed", 0, true);
- _true_track_node =
- node->getChild("indicated-track-true-deg", 0, true);
- _magnetic_track_node =
- node->getChild("indicated-track-magnetic-deg", 0, true);
- _speed_node =
- node->getChild("indicated-ground-speed-kt", 0, true);
- _odometer_node =
- node->getChild("odometer", 0, true);
- _trip_odometer_node =
- node->getChild("trip-odometer", 0, true);
- _true_bug_error_node =
- node->getChild("true-bug-error-deg", 0, true);
- _magnetic_bug_error_node =
- node->getChild("magnetic-bug-error-deg", 0, true);
-
- _leg_distance_node =
- wp_node->getChild("leg-distance-nm", 0, true);
- _leg_course_node =
- wp_node->getChild("leg-true-course-deg", 0, true);
- _leg_magnetic_course_node =
- wp_node->getChild("leg-mag-course-deg", 0, true);
- _alt_dist_ratio_node =
- wp_node->getChild("alt-dist-ratio", 0, true);
- _leg_course_deviation_node =
- wp_node->getChild("leg-course-deviation-deg", 0, true);
- _leg_course_error_nm_node =
- wp_node->getChild("leg-course-error-nm", 0, true);
- _leg_to_flag_node =
- wp_node->getChild("leg-to-flag", 0, true);
- _alt_deviation_node =
- wp_node->getChild("alt-deviation-ft", 0, true);
-
- _serviceable_node->setBoolValue(true);
+
+ tie(_gpsNode, "indicated-vertical-speed", SGRawValueMethods<GPS, double>
+ (*this, &GPS::getVerticalSpeed, NULL));
+ tie(_gpsNode, "indicated-track-true-deg", SGRawValueMethods<GPS, double>
+ (*this, &GPS::getTrueTrack, NULL));
+ tie(_gpsNode, "indicated-track-magnetic-deg", SGRawValueMethods<GPS, double>
+ (*this, &GPS::getMagTrack, NULL));
+ tie(_gpsNode, "indicated-ground-speed-kt", SGRawValueMethods<GPS, double>
+ (*this, &GPS::getGroundspeedKts, NULL));
+
+// command system
+ tie(_gpsNode, "mode", SGRawValueMethods<GPS, const char*>(*this, &GPS::getMode, NULL));
+ tie(_gpsNode, "command", SGRawValueMethods<GPS, const char*>(*this, &GPS::getCommand, &GPS::setCommand));
+
+ tieSGGeod(_scratchNode, _scratchPos, "longitude-deg", "latitude-deg", "altitude-ft");
+ tie(_scratchNode, "valid", SGRawValueMethods<GPS, bool>(*this, &GPS::getScratchValid, NULL));
+ tie(_scratchNode, "distance-nm", SGRawValueMethods<GPS, double>(*this, &GPS::getScratchDistance, NULL));
+ tie(_scratchNode, "true-bearing-deg", SGRawValueMethods<GPS, double>(*this, &GPS::getScratchTrueBearing, NULL));
+ tie(_scratchNode, "mag-bearing-deg", SGRawValueMethods<GPS, double>(*this, &GPS::getScratchMagBearing, NULL));
+ tie(_scratchNode, "has-next", SGRawValueMethods<GPS, bool>(*this, &GPS::getScratchHasNext, NULL));
+ _scratchValid = false;
+
+// waypoint data (including various historical things)
+ SGPropertyNode *wp_node = _gpsNode->getChild("wp", 0, true);
+ SGPropertyNode *wp0_node = wp_node->getChild("wp", 0, true);
+ SGPropertyNode *wp1_node = wp_node->getChild("wp", 1, true);
+
+ tieSGGeodReadOnly(wp0_node, _wp0_position, "longitude-deg", "latitude-deg", "altitude-ft");
+ tie(wp0_node, "ID", SGRawValueMethods<GPS, const char*>
+ (*this, &GPS::getWP0Ident, NULL));
+ tie(wp0_node, "name", SGRawValueMethods<GPS, const char*>
+ (*this, &GPS::getWP0Name, NULL));
+
+ tieSGGeodReadOnly(wp1_node, _wp1_position, "longitude-deg", "latitude-deg", "altitude-ft");
+ tie(wp1_node, "ID", SGRawValueMethods<GPS, const char*>
+ (*this, &GPS::getWP1Ident, NULL));
+ tie(wp1_node, "name", SGRawValueMethods<GPS, const char*>
+ (*this, &GPS::getWP1Name, NULL));
+
+ tie(wp1_node, "distance-nm", SGRawValueMethods<GPS, double>
+ (*this, &GPS::getWP1Distance, NULL));
+ tie(wp1_node, "bearing-true-deg", SGRawValueMethods<GPS, double>
+ (*this, &GPS::getWP1Bearing, NULL));
+ tie(wp1_node, "bearing-mag-deg", SGRawValueMethods<GPS, double>
+ (*this, &GPS::getWP1MagBearing, NULL));
+ tie(wp1_node, "TTW-sec", SGRawValueMethods<GPS, double>
+ (*this, &GPS::getWP1TTW, NULL));
+ tie(wp1_node, "TTW", SGRawValueMethods<GPS, const char*>
+ (*this, &GPS::getWP1TTWString, NULL));
+
+ tie(wp1_node, "course-deviation-deg", SGRawValueMethods<GPS, double>
+ (*this, &GPS::getWP1CourseDeviation, NULL));
+ tie(wp1_node, "course-error-nm", SGRawValueMethods<GPS, double>
+ (*this, &GPS::getWP1CourseErrorNm, NULL));
+ tie(wp1_node, "to-flag", SGRawValueMethods<GPS, bool>
+ (*this, &GPS::getWP1ToFlag, NULL));
+ tie(wp1_node, "from-flag", SGRawValueMethods<GPS, bool>
+ (*this, &GPS::getWP1FromFlag, NULL));
+
+// leg properties (only valid in DTO/LEG modes, not OBS)
+ tie(wp_node, "leg-distance-nm", SGRawValueMethods<GPS, double>(*this, &GPS::getLegDistance, NULL));
+ tie(wp_node, "leg-true-course-deg", SGRawValueMethods<GPS, double>(*this, &GPS::getLegCourse, NULL));
+ tie(wp_node, "leg-mag-course-deg", SGRawValueMethods<GPS, double>(*this, &GPS::getLegMagCourse, NULL));
+ tie(wp_node, "alt-dist-ratio", SGRawValueMethods<GPS, double>(*this, &GPS::getAltDistanceRatio, NULL));
+
+// navradio slaving properties
+ tie(_gpsNode, "cdi-deflection", SGRawValueMethods<GPS,double>
+ (*this, &GPS::getCDIDeflection));
+}
+
+void
+GPS::unbind()
+{
+ for (unsigned int t=0; t<_tiedNodes.size(); ++t) {
+ _tiedNodes[t]->untie();
+ }
+ _tiedNodes.clear();
}
void
GPS::clearOutput()
{
- _last_valid = false;
- _last_speed_kts = 0;
- _last_pos = SGGeod();
- _raim_node->setDoubleValue(false);
- _indicated_pos = SGGeod();
- _indicated_vertical_speed_node->setDoubleValue(0);
- _true_track_node->setDoubleValue(0);
- _magnetic_track_node->setDoubleValue(0);
- _speed_node->setDoubleValue(0);
- _wp1_distance_node->setDoubleValue(0);
- _wp1_bearing_node->setDoubleValue(0);
- _wp1_position = SGGeod();
- _wp1_course_node->setDoubleValue(0);
- _odometer_node->setDoubleValue(0);
- _trip_odometer_node->setDoubleValue(0);
- _tracking_bug_node->setDoubleValue(0);
- _true_bug_error_node->setDoubleValue(0);
- _magnetic_bug_error_node->setDoubleValue(0);
- _true_wp1_bearing_error_node->setDoubleValue(0);
- _magnetic_wp1_bearing_error_node->setDoubleValue(0);
+ _dataValid = false;
+ _last_speed_kts = 0.0;
+ _last_pos = SGGeod();
+ _lastPosValid = false;
+ _indicated_pos = SGGeod();
+ _last_vertical_speed = 0.0;
+ _last_true_track = 0.0;
+
+ _raim_node->setDoubleValue(0.0);
+ _indicated_pos = SGGeod();
+ _wp1DistanceM = 0.0;
+ _wp1TrueBearing = 0.0;
+ _wp1_position = SGGeod();
+ _odometer_node->setDoubleValue(0);
+ _trip_odometer_node->setDoubleValue(0);
+ _tracking_bug_node->setDoubleValue(0);
+ _true_bug_error_node->setDoubleValue(0);
+ _magnetic_bug_error_node->setDoubleValue(0);
}
void
GPS::update (double delta_time_sec)
{
- // If it's off, don't bother.
+ if (!_realismSimpleGps->getBoolValue()) {
+ // If it's off, don't bother.
if (!_serviceable_node->getBoolValue() || !_electrical_node->getBoolValue()) {
- clearOutput();
- return;
+ clearOutput();
+ return;
}
-
- UpdateContext ctx;
- ctx.dt = delta_time_sec;
- ctx.waypoint_changed = false;
- ctx.pos = _position.get();
-
+ }
+
+ if (delta_time_sec <= 0.0) {
+ return; // paused, don't bother
+ }
// TODO: Add noise and other errors.
/*
printf("%f %f \n", error_length, error_angle);
*/
- _raim_node->setBoolValue(true);
- _indicated_pos = ctx.pos;
+ _raim_node->setDoubleValue(1.0);
+ _indicated_pos = _position.get();
+ updateBasicData(delta_time_sec);
- if (_last_valid) {
- updateWithValid(ctx);
+ if (_dataValid) {
+ if (_mode == "obs") {
+ _selectedCourse = _config.getExternalCourse();
} else {
- _true_track_node->setDoubleValue(0.0);
- _magnetic_track_node->setDoubleValue(0.0);
- _speed_node->setDoubleValue(0.0);
- _last_valid = true;
+ updateTurn();
}
+
+ updateWaypoints();
+ updateTrackingBug();
+ updateReferenceNavaid(delta_time_sec);
+ updateRouteData();
+ driveAutopilot();
+ }
+
+ if (_dataValid && (_mode == "init")) {
+ // allow a realistic delay in the future, here
+ SG_LOG(SG_INSTR, SG_INFO, "GPS initialisation complete");
+
+ _selectedCourse = _config.getExternalCourse();
+
+ if (_route_active_node->getBoolValue()) {
+ // GPS init with active route
+ SG_LOG(SG_INSTR, SG_INFO, "GPS init with active route");
+ selectLegMode();
+ } else {
+ // initialise in OBS mode, with waypt set to the nearest airport.
+ // keep in mind at this point, _dataValid is not set
+
+ auto_ptr<FGPositioned::Filter> f(createFilter(FGPositioned::AIRPORT));
+ FGPositionedRef apt = FGPositioned::findClosest(_position.get(), 20.0, f.get());
+ if (apt) {
+ setScratchFromPositioned(apt, 0);
+ selectOBSMode();
+ }
+ }
+ } // of init mode check
+
+ _last_pos = _indicated_pos;
+ _lastPosValid = true;
+}
- _last_pos = ctx.pos;
+void
+GPS::updateBasicData(double dt)
+{
+ if (!_lastPosValid) {
+ return;
+ }
+
+ double distance_m;
+ double track2_deg;
+ SGGeodesy::inverse(_last_pos, _indicated_pos, _last_true_track, track2_deg, distance_m );
+
+ double speed_kt = ((distance_m * SG_METER_TO_NM) * ((1 / dt) * 3600.0));
+ double vertical_speed_mpm = ((_indicated_pos.getElevationM() - _last_pos.getElevationM()) * 60 / dt);
+ _last_vertical_speed = vertical_speed_mpm * SG_METER_TO_FEET;
+
+ speed_kt = fgGetLowPass(_last_speed_kts, speed_kt, dt/20.0);
+ _last_speed_kts = speed_kt;
+
+ double odometer = _odometer_node->getDoubleValue();
+ _odometer_node->setDoubleValue(odometer + distance_m * SG_METER_TO_NM);
+ odometer = _trip_odometer_node->getDoubleValue();
+ _trip_odometer_node->setDoubleValue(odometer + distance_m * SG_METER_TO_NM);
+
+ if (!_dataValid) {
+ SG_LOG(SG_INSTR, SG_INFO, "GPS setting data valid");
+ _dataValid = true;
+ }
}
void
-GPS::updateNearestAirport(UpdateContext& ctx)
+GPS::updateTrackingBug()
{
- if (!_get_nearest_airport_node->getBoolValue()) {
- return;
+ double tracking_bug = _tracking_bug_node->getDoubleValue();
+ double true_bug_error = tracking_bug - getTrueTrack();
+ double magnetic_bug_error = tracking_bug - getMagTrack();
+
+ // Get the errors into the (-180,180) range.
+ SG_NORMALIZE_RANGE(true_bug_error, -180.0, 180.0);
+ SG_NORMALIZE_RANGE(magnetic_bug_error, -180.0, 180.0);
+
+ _true_bug_error_node->setDoubleValue(true_bug_error);
+ _magnetic_bug_error_node->setDoubleValue(magnetic_bug_error);
+}
+
+void
+GPS::updateWaypoints()
+{
+ double az2;
+ SGGeodesy::inverse(_indicated_pos, _wp1_position, _wp1TrueBearing, az2,_wp1DistanceM);
+}
+
+void GPS::updateReferenceNavaid(double dt)
+{
+ if (!_ref_navaid_set) {
+ _ref_navaid_elapsed += dt;
+ if (_ref_navaid_elapsed > 5.0) {
+ _ref_navaid_elapsed = 0.0;
+
+ FGPositioned::TypeFilter vorFilter(FGPositioned::VOR);
+ FGPositionedRef nav = FGPositioned::findClosest(_indicated_pos, 400.0, &vorFilter);
+ if (!nav) {
+ SG_LOG(SG_INSTR, SG_INFO, "GPS couldn't find a reference navid");
+ _ref_navaid_id_node->setStringValue("");
+ _ref_navaid_name_node->setStringValue("");
+ _ref_navaid_bearing_node->setDoubleValue(0.0);
+ _ref_navaid_mag_bearing_node->setDoubleValue(0.0);
+ _ref_navaid_distance_node->setDoubleValue(0.0);
+ _ref_navaid_frequency_node->setStringValue("");
+ } else if (nav != _ref_navaid) {
+ SG_LOG(SG_INSTR, SG_INFO, "GPS code selected new ref-navaid:" << nav->ident());
+ _listener->setGuard(true);
+ _ref_navaid_id_node->setStringValue(nav->ident().c_str());
+ _ref_navaid_name_node->setStringValue(nav->name().c_str());
+ FGNavRecord* vor = (FGNavRecord*) nav.ptr();
+ _ref_navaid_frequency_node->setDoubleValue(vor->get_freq() / 100.0);
+ _listener->setGuard(false);
+ tuneNavRadios();
+ } else {
+ // SG_LOG(SG_INSTR, SG_ALERT, "matched existing");
+ }
+
+ _ref_navaid = nav;
}
+ }
+
+ if (_ref_navaid) {
+ double trueCourse, distanceM, az2;
+ SGGeodesy::inverse(_indicated_pos, _ref_navaid->geod(), trueCourse, az2, distanceM);
+ _ref_navaid_distance_node->setDoubleValue(distanceM * SG_METER_TO_NM);
+ _ref_navaid_bearing_node->setDoubleValue(trueCourse);
+ _ref_navaid_mag_bearing_node->setDoubleValue(trueCourse - _magvar_node->getDoubleValue());
+ }
+}
+
+void GPS::referenceNavaidSet(const std::string& aNavaid)
+{
+ _ref_navaid = NULL;
+ // allow setting an empty string to restore normal nearest-vor selection
+ if (aNavaid.size() > 0) {
+ FGPositioned::TypeFilter vorFilter(FGPositioned::VOR);
+ _ref_navaid = FGPositioned::findClosestWithIdent(aNavaid,
+ _position.get(), &vorFilter);
- // If the get-nearest-airport-node is true.
- // Get the nearest airport, and set it as waypoint 1.
-
- FGPositioned::TypeFilter aptFilter(FGPositioned::AIRPORT);
- FGPositionedRef a = FGPositioned::findClosest(ctx.pos, 360.0, &aptFilter);
- if (!a) {
- return;
+ if (!_ref_navaid) {
+ SG_LOG(SG_INSTR, SG_ALERT, "GPS: unknown ref navaid:" << aNavaid);
}
+ }
- _wp1_position = a->geod();
- _wp1_ID_node->setStringValue(a->ident().c_str());
- _wp1_name_node->setStringValue(a->name().c_str());
- _get_nearest_airport_node->setBoolValue(false);
- _last_wp1_ID = a->ident(); // don't trigger updateWaypoint1();
- ctx.waypoint_changed = true;
+ if (_ref_navaid) {
+ _ref_navaid_set = true;
+ SG_LOG(SG_INSTR, SG_INFO, "GPS code set explict ref-navaid:" << _ref_navaid->ident());
+ _ref_navaid_id_node->setStringValue(_ref_navaid->ident().c_str());
+ _ref_navaid_name_node->setStringValue(_ref_navaid->name().c_str());
+ FGNavRecord* vor = (FGNavRecord*) _ref_navaid.ptr();
+ _ref_navaid_frequency_node->setDoubleValue(vor->get_freq() / 100.0);
+ tuneNavRadios();
+ } else {
+ _ref_navaid_set = false;
+ _ref_navaid_elapsed = 9999.0; // update next tick
+ }
}
-void
-GPS::updateWithValid(UpdateContext& ctx)
+void GPS::tuneNavRadios()
{
- assert(_last_valid);
- double distance_m;
- SGGeodesy::inverse(_last_pos, ctx.pos, ctx.track1_deg, ctx.track2_deg, distance_m );
-
- ctx.speed_kt = ((distance_m * SG_METER_TO_NM) * ((1 / ctx.dt) * 3600.0));
-
- double vertical_speed_mpm = ((ctx.pos.getElevationM() - _last_pos.getElevationM()) * 60 /
- ctx.dt);
- _indicated_vertical_speed_node->setDoubleValue(vertical_speed_mpm * SG_METER_TO_FEET);
- _true_track_node->setDoubleValue(ctx.track1_deg);
+ if (!_ref_navaid || !_config.tuneNavRadioToRefVor()) {
+ return;
+ }
+
+ SGPropertyNode_ptr navRadio1 = fgGetNode("/instrumentation/nav", false);
+ if (!navRadio1) {
+ return;
+ }
+
+ FGNavRecord* vor = (FGNavRecord*) _ref_navaid.ptr();
+ SGPropertyNode_ptr freqs = navRadio1->getChild("frequencies");
+ freqs->setDoubleValue("selected-mhz", vor->get_freq() / 100.0);
+}
+
+void GPS::routeActivated()
+{
+ if (_route_active_node->getBoolValue()) {
+ SG_LOG(SG_INSTR, SG_INFO, "GPS::route activated, switching to LEG mode");
+ selectLegMode();
- ctx.magvar_deg = _magvar_node->getDoubleValue();
- double mag_track_bearing = ctx.track1_deg - ctx.magvar_deg;
- SG_NORMALIZE_RANGE(mag_track_bearing, 0.0, 360.0);
- _magnetic_track_node->setDoubleValue(mag_track_bearing);
- ctx.speed_kt = fgGetLowPass(_last_speed_kts, ctx.speed_kt, ctx.dt/20.0);
- _last_speed_kts = ctx.speed_kt;
- _speed_node->setDoubleValue(ctx.speed_kt);
-
- double odometer = _odometer_node->getDoubleValue();
- _odometer_node->setDoubleValue(odometer + distance_m * SG_METER_TO_NM);
- odometer = _trip_odometer_node->getDoubleValue();
- _trip_odometer_node->setDoubleValue(odometer + distance_m * SG_METER_TO_NM);
-
- updateNearestAirport(ctx);
- updateWaypoint0(ctx);
- updateWaypoint1(ctx);
-
- ctx.wp0_pos = _wp0_position.get();
- ctx.wp1_pos = _wp1_position.get();
- // if this flag is set, we need to recompute leg data, because either
- // WP0 or WP1 has been updated
- if (ctx.waypoint_changed) {
- waypointChanged(ctx);
+ // if we've already passed the current waypoint, sequence.
+ if (_dataValid && getWP1FromFlag()) {
+ SG_LOG(SG_INSTR, SG_INFO, "GPS::route activated, FROM wp1, sequencing");
+ _routeMgr->sequence();
}
+ } else if (_mode == "leg") {
+ SG_LOG(SG_INSTR, SG_INFO, "GPS::route deactivated, switching to OBS mode");
+ selectOBSMode();
+ }
+}
- ctx.wp0_course_deg = _wp0_course_node->getDoubleValue();
- ctx.wp1_course_deg = _wp1_course_node->getDoubleValue();
-
- updateWaypoint0Course(ctx);
- updateWaypoint1Course(ctx);
- updateLegCourse(ctx);
-
- // Altitude deviation
- //double desired_altitude_m = wp1_altitude_m
- // + wp1_distance * _alt_dist_ratio;
- //double altitude_deviation_m = altitude_m - desired_altitude_m;
- // _alt_deviation_node->setDoubleValue(altitude_deviation_m * SG_METER_TO_FEET);
-
- updateTrackingBug(ctx);
+void GPS::routeManagerSequenced()
+{
+ if (_mode != "leg") {
+ SG_LOG(SG_INSTR, SG_INFO, "GPS ignoring route sequencing, not in LEG mode");
+ return;
+ }
+
+ int index = _routeMgr->currentWaypoint(),
+ count = _routeMgr->size();
+ if ((index < 0) || (index >= count)) {
+ SG_LOG(SG_INSTR, SG_ALERT, "GPS: malformed route, index=" << index);
+ return;
+ }
+
+ SG_LOG(SG_INSTR, SG_INFO, "GPS waypoint index is now " << index);
+
+ if (index > 0) {
+ SGWayPoint wp0(_routeMgr->get_waypoint(index - 1));
+ _wp0Ident = wp0.get_id();
+ _wp0Name = wp0.get_name();
+ _wp0_position = wp0.get_target();
+
+ }
+
+ SGWayPoint wp1(_routeMgr->get_waypoint(index));
+ _wp1Ident = wp1.get_id();
+ _wp1Name = wp1.get_name();
+ _wp1_position = wp1.get_target();
+
+ _selectedCourse = getLegMagCourse();
+ wp1Changed();
}
-void
-GPS::updateLegCourse(UpdateContext& ctx)
+void GPS::routeEdited()
{
- // Leg course deviation is the diffenrence between the bearing
- // and the course.
- double course_deviation_deg = ctx.wp1_bearing_deg - _course_deg;
- SG_NORMALIZE_RANGE(course_deviation_deg, -180.0, 180.0);
-
- // If the course deviation is less than 90 degrees to either side,
- // our desired course is towards the waypoint.
- // It does not matter if we are actually moving
- // towards or from the waypoint.
- if (fabs(course_deviation_deg) < 90.0) {
- _leg_to_flag_node->setBoolValue(true);
- }
- // If it's more than 90 degrees the desired
- // course is from the waypoint.
- else if (fabs(course_deviation_deg) > 90.0) {
- _leg_to_flag_node->setBoolValue(false);
- // When the course is away from the waypoint,
- // it makes sense to change the sign of the deviation.
- course_deviation_deg *= -1.0;
- SG_NORMALIZE_RANGE(course_deviation_deg, -90.0, 90.0);
+ if (_mode != "leg") {
+ return;
+ }
+
+ SG_LOG(SG_INSTR, SG_INFO, "GPS route edited while in LEG mode, updating waypoints");
+ routeManagerSequenced();
+}
+
+void GPS::routeFinished()
+{
+ if (_mode != "leg") {
+ return;
+ }
+
+ SG_LOG(SG_INSTR, SG_INFO, "GPS route finished, reverting to OBS");
+ _mode = "obs";
+ _wp0_position = _indicated_pos;
+ wp1Changed();
+}
+
+void GPS::updateTurn()
+{
+ bool printProgress = false;
+
+ if (_computeTurnData) {
+ if (_last_speed_kts < 60) {
+ // need valid leg course and sensible ground speed to compute the turn
+ return;
}
- _leg_course_deviation_node->setDoubleValue(course_deviation_deg);
-
- // Cross track error.
- double course_error_m = sin(course_deviation_deg * SG_PI / 180.0)
- * (_distance_m);
- _leg_course_error_nm_node->setDoubleValue(course_error_m * SG_METER_TO_NM);
+ computeTurnData();
+ printProgress = true;
+ }
+
+ if (!_anticipateTurn) {
+ updateOverflight();
+ return;
+ }
+ updateTurnData();
+ // find bearing to turn centre
+ double bearing, az2, distanceM;
+ SGGeodesy::inverse(_indicated_pos, _turnCentre, bearing, az2, distanceM);
+ double progress = computeTurnProgress(bearing);
+
+ if (printProgress) {
+ SG_LOG(SG_INSTR, SG_INFO,"turn progress=" << progress);
+ }
+
+ if (!_inTurn && (progress > 0.0)) {
+ beginTurn();
+ }
+
+ if (_inTurn && !_turnSequenced && (progress > 0.5)) {
+ _turnSequenced = true;
+ SG_LOG(SG_INSTR, SG_INFO, "turn passed midpoint, sequencing");
+ _routeMgr->sequence();
+ }
+
+ if (_inTurn && (progress >= 1.0)) {
+ endTurn();
+ }
+
+ if (_inTurn) {
+ // drive deviation and desired course
+ double desiredCourse = bearing - copysign(90, _turnAngle);
+ SG_NORMALIZE_RANGE(desiredCourse, 0.0, 360.0);
+ double deviationNm = (distanceM * SG_METER_TO_NM) - _turnRadius;
+ double deviationDeg = desiredCourse - getMagTrack();
+ deviationNm = copysign(deviationNm, deviationDeg);
+ // FXIME
+ //_wp1_course_deviation_node->setDoubleValue(deviationDeg);
+ //_wp1_course_error_nm_node->setDoubleValue(deviationNm);
+ //_cdiDeflectionNode->setDoubleValue(deviationDeg);
+ }
}
-void
-GPS::updateTrackingBug(UpdateContext& ctx)
+void GPS::updateOverflight()
{
- double tracking_bug = _tracking_bug_node->getDoubleValue();
- double true_bug_error = tracking_bug - ctx.track1_deg;
- double magnetic_bug_error = tracking_bug - _magnetic_track_node->getDoubleValue();
+ if ((_wp1DistanceM * SG_METER_TO_NM) > _config.overflightArmDistanceNm()) {
+ return;
+ }
+
+ if (getWP1ToFlag()) {
+ return; // still heading towards the WP
+ }
+
+ if (_mode == "dto") {
+ SG_LOG(SG_INSTR, SG_INFO, "GPS DTO reached destination point");
+
+ // check for wp1 being on active route - resume leg mode
+ if (_routeMgr->isRouteActive()) {
+ int index = _routeMgr->findWaypoint(_wp1_position);
+ if (index >= 0) {
+ SG_LOG(SG_INSTR, SG_INFO, "GPS DTO, resuming LEG mode at wp:" << index);
+ _mode = "leg";
+ _routeMgr->jumpToIndex(index);
+ }
+ }
+ } else if (_mode == "leg") {
+ SG_LOG(SG_INSTR, SG_INFO, "GPS doing overflight sequencing");
+ _routeMgr->sequence();
+ } else if (_mode == "obs") {
+ // nothing to do here, TO/FROM will update but that's fine
+ }
+
+ _computeTurnData = true;
+}
- // Get the errors into the (-180,180) range.
- SG_NORMALIZE_RANGE(true_bug_error, -180.0, 180.0);
- SG_NORMALIZE_RANGE(magnetic_bug_error, -180.0, 180.0);
+void GPS::beginTurn()
+{
+ _inTurn = true;
+ _turnSequenced = false;
+ SG_LOG(SG_INSTR, SG_INFO, "begining turn");
+}
- _true_bug_error_node->setDoubleValue(true_bug_error);
- _magnetic_bug_error_node->setDoubleValue(magnetic_bug_error);
+void GPS::endTurn()
+{
+ _inTurn = false;
+ SG_LOG(SG_INSTR, SG_INFO, "ending turn");
+ _computeTurnData = true;
}
-void
-GPS::waypointChanged(UpdateContext& ctx)
+double GPS::computeTurnProgress(double aBearing) const
{
- // If any of the two waypoints have changed
- // we need to calculate a new course between them,
- // and values for vertical navigation.
- assert(ctx.waypoint_changed);
+ double startBearing = _turnStartBearing + copysign(90, _turnAngle);
+ return (aBearing - startBearing) / _turnAngle;
+}
- double track2;
- SGGeodesy::inverse(ctx.wp0_pos, ctx.wp1_pos, _course_deg, track2, _distance_m);
-
- double leg_mag_course = _course_deg - _magvar_node->getDoubleValue();
- SG_NORMALIZE_RANGE(leg_mag_course, 0.0, 360.0);
+void GPS::computeTurnData()
+{
+ _computeTurnData = false;
+ if (_mode != "leg") { // and approach modes in the future
+ _anticipateTurn = false;
+ return;
+ }
+
+ int curIndex = _routeMgr->currentWaypoint();
+ if ((curIndex + 1) >= _routeMgr->size()) {
+ _anticipateTurn = false;
+ return;
+ }
+
+ if (!_config.turnAnticipationEnabled()) {
+ _anticipateTurn = false;
+ return;
+ }
+
+ _turnStartBearing = _selectedCourse;
+// compute next leg course
+ SGWayPoint wp1(_routeMgr->get_waypoint(curIndex)),
+ wp2(_routeMgr->get_waypoint(curIndex + 1));
+ double crs, dist;
+ wp2.CourseAndDistance(wp1, &crs, &dist);
+
- // Get the altitude / distance ratio
- if ( _distance_m > 0.0 ) {
- double alt_difference_m = ctx.wp0_pos.getElevationM() - ctx.wp1_pos.getElevationM();
- _alt_dist_ratio = alt_difference_m / _distance_m;
- }
+// compute offset bearing
+ _turnAngle = crs - _turnStartBearing;
+ SG_NORMALIZE_RANGE(_turnAngle, -180.0, 180.0);
+ double median = _turnStartBearing + (_turnAngle * 0.5);
+ double offsetBearing = median + copysign(90, _turnAngle);
+ SG_NORMALIZE_RANGE(offsetBearing, 0.0, 360.0);
+
+ SG_LOG(SG_INSTR, SG_INFO, "GPS computeTurnData: in=" << _turnStartBearing <<
+ ", out=" << crs << "; turnAngle=" << _turnAngle << ", median=" << median
+ << ", offset=" << offsetBearing);
+
+ SG_LOG(SG_INSTR, SG_INFO, "next leg is now:" << wp1.get_id() << "->" << wp2.get_id());
- _leg_distance_node->setDoubleValue(_distance_m * SG_METER_TO_NM);
- _leg_course_node->setDoubleValue(_course_deg);
- _leg_magnetic_course_node->setDoubleValue(leg_mag_course);
- _alt_dist_ratio_node->setDoubleValue(_alt_dist_ratio);
+ _turnPt = _wp1_position;
+ _anticipateTurn = true;
}
-void
-GPS::updateWaypoint0(UpdateContext& ctx)
+void GPS::updateTurnData()
{
- string id(_wp0_ID_node->getStringValue());
- if (_last_wp0_ID == id) {
- return; // easy, nothing to do
+ // depends on ground speed, so needs to be updated per-frame
+ _turnRadius = computeTurnRadiusNm(_last_speed_kts);
+
+ // compute the turn centre, based on the turn radius.
+ // key thing is to understand that we're working a right-angle triangle,
+ // where the right-angle is the point we start the turn. From that point,
+ // one side is the inbound course to the turn pt, and the other is the
+ // perpendicular line, of length 'r', to the turn centre.
+ // the triangle's hypotenuse, which we need to find, is the distance from the
+ // turn pt to the turn center (in the direction of the offset bearing)
+ // note that d - _turnRadius tell us how much we're 'cutting' the corner.
+
+ double halfTurnAngle = fabs(_turnAngle * 0.5) * SG_DEGREES_TO_RADIANS;
+ double d = _turnRadius / cos(halfTurnAngle);
+
+ // SG_LOG(SG_INSTR, SG_INFO, "turnRadius=" << _turnRadius << ", d=" << d
+ // << " (cut distance=" << d - _turnRadius << ")");
+
+ double median = _turnStartBearing + (_turnAngle * 0.5);
+ double offsetBearing = median + copysign(90, _turnAngle);
+ SG_NORMALIZE_RANGE(offsetBearing, 0.0, 360.0);
+
+ double az2;
+ SGGeodesy::direct(_turnPt, offsetBearing, d * SG_NM_TO_METER, _turnCentre, az2);
+}
+
+double GPS::computeTurnRadiusNm(double aGroundSpeedKts) const
+{
+ // turn time is seconds to execute a 360 turn.
+ double turnTime = 360.0 / _config.turnRateDegSec();
+
+ // c is ground distance covered in that time (circumference of the circle)
+ double c = turnTime * (aGroundSpeedKts / 3600.0); // convert knts to nm/sec
+
+ // divide by 2PI to go from circumference -> radius
+ return c / (2 * M_PI);
+}
+
+void GPS::updateRouteData()
+{
+ double totalDistance = _wp1DistanceM * SG_METER_TO_NM;
+ // walk all waypoints from wp2 to route end, and sum
+ for (int i=_routeMgr->currentWaypoint()+1; i<_routeMgr->size(); ++i) {
+ totalDistance += _routeMgr->get_waypoint(i).get_distance();
+ }
+
+ _routeDistanceNm->setDoubleValue(totalDistance * SG_METER_TO_NM);
+ if (_last_speed_kts > 1.0) {
+ double TTW = ((totalDistance * SG_METER_TO_NM) / _last_speed_kts) * 3600.0;
+ _routeETE->setStringValue(makeTTWString(TTW));
+ }
+}
+
+void GPS::driveAutopilot()
+{
+ if (!_config.driveAutopilot() || !_realismSimpleGps->getBoolValue()) {
+ return;
+ }
+
+ // compatability feature - allow the route-manager / GPS to drive the
+ // generic autopilot heading hold *in leg mode only*
+ if (_mode == "leg") {
+ // FIXME: we want to set desired track, not heading, here
+ _apTrueHeading->setDoubleValue(getWP1Bearing());
+ }
+}
+
+void GPS::wp1Changed()
+{
+ // update external HSI/CDI/NavDisplay/PFD/etc
+ _config.setExternalCourse(getLegMagCourse());
+
+ if (!_config.driveAutopilot()) {
+ return;
+ }
+
+ double altFt = _wp1_position.getElevationFt();
+ if (altFt < -9990.0) {
+ _apTargetAltitudeFt->setDoubleValue(0.0);
+ } else {
+ _apTargetAltitudeFt->setDoubleValue(altFt);
+ }
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// property getter/setters
+
+double GPS::getLegDistance() const
+{
+ if (!_dataValid || (_mode == "obs")) {
+ return -1;
+ }
+
+ return SGGeodesy::distanceNm(_wp0_position, _wp1_position);
+}
+
+double GPS::getLegCourse() const
+{
+ if (!_dataValid) {
+ return -9999.0;
+ }
+
+ return SGGeodesy::courseDeg(_wp0_position, _wp1_position);
+}
+
+double GPS::getLegMagCourse() const
+{
+ if (!_dataValid) {
+ return 0.0;
+ }
+
+ double m = getLegCourse() - _magvar_node->getDoubleValue();
+ SG_NORMALIZE_RANGE(m, 0.0, 360.0);
+ return m;
+}
+
+double GPS::getAltDistanceRatio() const
+{
+ if (!_dataValid || (_mode == "obs")) {
+ return 0.0;
+ }
+
+ double dist = SGGeodesy::distanceM(_wp0_position, _wp1_position);
+ if ( dist <= 0.0 ) {
+ return 0.0;
+ }
+
+ double alt_difference_m = _wp0_position.getElevationM() - _wp1_position.getElevationM();
+ return alt_difference_m / dist;
+}
+
+double GPS::getMagTrack() const
+{
+ if (!_dataValid) {
+ return 0.0;
+ }
+
+ double m = getTrueTrack() - _magvar_node->getDoubleValue();
+ SG_NORMALIZE_RANGE(m, 0.0, 360.0);
+ return m;
+}
+
+double GPS::getCDIDeflection() const
+{
+ if (!_dataValid) {
+ return 0.0;
+ }
+
+ double defl;
+ if (_config.cdiDeflectionIsAngular()) {
+ defl = getWP1CourseDeviation();
+ SG_CLAMP_RANGE(defl, -10.0, 10.0); // as in navradio.cxx
+ } else {
+ double fullScale = _config.cdiDeflectionLinearPeg();
+ double normError = getWP1CourseErrorNm() / fullScale;
+ SG_CLAMP_RANGE(normError, -1.0, 1.0);
+ defl = normError * 10.0; // re-scale to navradio limits, i.e [-10.0 .. 10.0]
+ }
+
+ return defl;
+}
+
+const char* GPS::getWP0Ident() const
+{
+ if (!_dataValid || (_mode != "leg")) {
+ return "";
+ }
+
+ return _wp0Ident.c_str();
+}
+
+const char* GPS::getWP0Name() const
+{
+ if (!_dataValid || (_mode != "leg")) {
+ return "";
+ }
+
+ return _wp0Name.c_str();
+}
+
+const char* GPS::getWP1Ident() const
+{
+ if (!_dataValid) {
+ return "";
+ }
+
+ return _wp1Ident.c_str();
+}
+
+const char* GPS::getWP1Name() const
+{
+ if (!_dataValid) {
+ return "";
+ }
+
+ return _wp1Name.c_str();
+}
+
+double GPS::getWP1Distance() const
+{
+ if (!_dataValid) {
+ return -1.0;
+ }
+
+ return _wp1DistanceM * SG_METER_TO_NM;
+}
+
+double GPS::getWP1TTW() const
+{
+ if (!_dataValid) {
+ return -1.0;
+ }
+
+ if (_last_speed_kts < 1.0) {
+ return -1.0;
+ }
+
+ return (getWP1Distance() / _last_speed_kts) * 3600.0;
+}
+
+const char* GPS::getWP1TTWString() const
+{
+ if (!_dataValid) {
+ return "";
+ }
+
+ return makeTTWString(getWP1TTW());
+}
+
+double GPS::getWP1Bearing() const
+{
+ if (!_dataValid) {
+ return -9999.0;
+ }
+
+ return _wp1TrueBearing;
+}
+
+double GPS::getWP1MagBearing() const
+{
+ if (!_dataValid) {
+ return -9999.0;
+ }
+
+ return _wp1TrueBearing - _magvar_node->getDoubleValue();
+}
+
+double GPS::getWP1CourseDeviation() const
+{
+ if (!_dataValid) {
+ return 0.0;
+ }
+
+ double dev = getWP1MagBearing() - _selectedCourse;
+ SG_NORMALIZE_RANGE(dev, -180.0, 180.0);
+
+ if (fabs(dev) > 90.0) {
+ // When the course is away from the waypoint,
+ // it makes sense to change the sign of the deviation.
+ dev *= -1.0;
+ SG_NORMALIZE_RANGE(dev, -90.0, 90.0);
+ }
+
+ return dev;
+}
+
+double GPS::getWP1CourseErrorNm() const
+{
+ if (!_dataValid) {
+ return 0.0;
+ }
+
+ double radDev = getWP1CourseDeviation() * SG_DEGREES_TO_RADIANS;
+ double course_error_m = sin(radDev) * _wp1DistanceM;
+ return course_error_m * SG_METER_TO_NM;
+}
+
+bool GPS::getWP1ToFlag() const
+{
+ if (!_dataValid) {
+ return false;
+ }
+
+ double dev = getWP1MagBearing() - _selectedCourse;
+ SG_NORMALIZE_RANGE(dev, -180.0, 180.0);
+
+ return (fabs(dev) < 90.0);
+}
+
+bool GPS::getWP1FromFlag() const
+{
+ if (!_dataValid) {
+ return false;
+ }
+
+ return !getWP1ToFlag();
+}
+
+double GPS::getScratchDistance() const
+{
+ if (!_scratchValid) {
+ return 0.0;
+ }
+
+ return SGGeodesy::distanceNm(_indicated_pos, _scratchPos);
+}
+
+double GPS::getScratchTrueBearing() const
+{
+ if (!_scratchValid) {
+ return 0.0;
+ }
+
+ return SGGeodesy::courseDeg(_indicated_pos, _scratchPos);
+}
+
+double GPS::getScratchMagBearing() const
+{
+ if (!_scratchValid) {
+ return 0.0;
+ }
+
+ double crs = getScratchTrueBearing() - _magvar_node->getDoubleValue();
+ SG_NORMALIZE_RANGE(crs, 0.0, 360.0);
+ return crs;
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// command / scratch / search system
+
+void GPS::setCommand(const char* aCmd)
+{
+ SG_LOG(SG_INSTR, SG_INFO, "GPS command:" << aCmd);
+
+ if (!strcmp(aCmd, "direct")) {
+ directTo();
+ } else if (!strcmp(aCmd, "obs")) {
+ selectOBSMode();
+ } else if (!strcmp(aCmd, "leg")) {
+ selectLegMode();
+ } else if (!strcmp(aCmd, "load-route-wpt")) {
+ loadRouteWaypoint();
+ } else if (!strcmp(aCmd, "nearest")) {
+ loadNearest();
+ } else if (!strcmp(aCmd, "search")) {
+ _searchNames = false;
+ search();
+ } else if (!strcmp(aCmd, "search-names")) {
+ _searchNames = true;
+ search();
+ } else if (!strcmp(aCmd, "next")) {
+ nextResult();
+ } else if (!strcmp(aCmd, "previous")) {
+ previousResult();
+ } else if (!strcmp(aCmd, "define-user-wpt")) {
+ defineWaypoint();
+ } else if (!strcmp(aCmd, "route-insert-before")) {
+ int index = _scratchNode->getIntValue("index");
+ if (index < 0 || (_routeMgr->size() == 0)) {
+ index = _routeMgr->size();
+ } else if (index >= _routeMgr->size()) {
+ SG_LOG(SG_INSTR, SG_WARN, "GPS:route-insert-before, bad index:" << index);
+ return;
}
- FGPositionedRef result = FGPositioned::findClosestWithIdent(id, ctx.pos);
- if (!result) {
- // not found, hmm
- _last_wp0_ID = id;
- return;
+ insertWaypointAtIndex(index);
+ } else if (!strcmp(aCmd, "route-insert-after")) {
+ int index = _scratchNode->getIntValue("index");
+ if (index < 0 || (_routeMgr->size() == 0)) {
+ index = _routeMgr->size();
+ } else if (index >= _routeMgr->size()) {
+ SG_LOG(SG_INSTR, SG_WARN, "GPS:route-insert-after, bad index:" << index);
+ return;
+ } else {
+ ++index;
+ }
+
+ insertWaypointAtIndex(index);
+ } else if (!strcmp(aCmd, "route-delete")) {
+ int index = _scratchNode->getIntValue("index");
+ if (index < 0) {
+ index = _routeMgr->size();
+ } else if (index >= _routeMgr->size()) {
+ SG_LOG(SG_INSTR, SG_WARN, "GPS:route-delete, bad index:" << index);
+ return;
}
- _wp0_position = result->geod();
- _wp0_name_node->setStringValue(result->name().c_str());
- _last_wp0_ID = id;
- ctx.waypoint_changed = true;
+ removeWaypointAtIndex(index);
+ } else {
+ SG_LOG(SG_INSTR, SG_WARN, "GPS:unrecognized command:" << aCmd);
+ }
}
-void
-GPS::updateWaypoint1(UpdateContext& ctx)
+void GPS::clearScratch()
+{
+ _scratchPos = SGGeod::fromDegFt(-9999.0, -9999.0, -9999.0);
+ _scratchValid = false;
+ _scratchNode->setStringValue("type", "");
+ _scratchNode->setStringValue("query", "");
+}
+
+bool GPS::isScratchPositionValid() const
+{
+ if ((_scratchPos.getLongitudeDeg() < -9990.0) ||
+ (_scratchPos.getLatitudeDeg() < -9990.0)) {
+ return false;
+ }
+
+ return true;
+}
+
+void GPS::directTo()
+{
+ if (!isScratchPositionValid()) {
+ SG_LOG(SG_INSTR, SG_WARN, "invalid DTO lat/lon");
+ return;
+ }
+
+ _wp0_position = _indicated_pos;
+ _wp1Ident = _scratchNode->getStringValue("ident");
+ _wp1Name = _scratchNode->getStringValue("name");
+ _wp1_position = _scratchPos;
+
+ _mode = "dto";
+ _selectedCourse = getLegMagCourse();
+ clearScratch();
+
+ wp1Changed();
+}
+
+void GPS::loadRouteWaypoint()
+{
+ _scratchValid = false;
+// if (!_routeMgr->isRouteActive()) {
+// SG_LOG(SG_INSTR, SG_WARN, "GPS:loadWaypoint: no active route");
+// return;
+// }
+
+ int index = _scratchNode->getIntValue("index", -9999);
+ clearScratch();
+
+ if ((index < 0) || (index >= _routeMgr->size())) { // no index supplied, use current wp
+ index = _routeMgr->currentWaypoint();
+ }
+
+ _searchIsRoute = true;
+ setScratchFromRouteWaypoint(index);
+}
+
+void GPS::setScratchFromRouteWaypoint(int aIndex)
+{
+ assert(_searchIsRoute);
+ if ((aIndex < 0) || (aIndex >= _routeMgr->size())) {
+ SG_LOG(SG_INSTR, SG_WARN, "GPS:setScratchFromRouteWaypoint: route-index out of bounds");
+ return;
+ }
+
+ _searchResultIndex = aIndex;
+ SGWayPoint wp(_routeMgr->get_waypoint(aIndex));
+ _scratchNode->setStringValue("name", wp.get_name());
+ _scratchNode->setStringValue("ident", wp.get_id());
+ _scratchPos = wp.get_target();
+ _scratchValid = true;
+ _scratchNode->setDoubleValue("course", wp.get_track());
+ _scratchNode->setIntValue("index", aIndex);
+
+ int lastResult = _routeMgr->size() - 1;
+ _searchHasNext = (_searchResultIndex < lastResult);
+}
+
+void GPS::loadNearest()
+{
+ string sty(_scratchNode->getStringValue("type"));
+ FGPositioned::Type ty = FGPositioned::typeFromName(sty);
+ if (ty == FGPositioned::INVALID) {
+ SG_LOG(SG_INSTR, SG_WARN, "GPS:loadNearest: request type is invalid:" << sty);
+ return;
+ }
+
+ auto_ptr<FGPositioned::Filter> f(createFilter(ty));
+ int limitCount = _scratchNode->getIntValue("max-results", 1);
+ double cutoffDistance = _scratchNode->getDoubleValue("cutoff-nm", 400.0);
+
+ SGGeod searchPos = _indicated_pos;
+ if (isScratchPositionValid()) {
+ searchPos = _scratchPos;
+ }
+
+ clearScratch(); // clear now, regardless of whether we find a match or not
+
+ _searchResults =
+ FGPositioned::findClosestN(searchPos, limitCount, cutoffDistance, f.get());
+ _searchResultsCached = true;
+ _searchResultIndex = 0;
+ _searchIsRoute = false;
+ _searchHasNext = false;
+
+ if (_searchResults.empty()) {
+ SG_LOG(SG_INSTR, SG_INFO, "GPS:loadNearest: no matches at all");
+ return;
+ }
+
+ _searchHasNext = (_searchResults.size() > 1);
+ setScratchFromCachedSearchResult();
+}
+
+bool GPS::SearchFilter::pass(FGPositioned* aPos) const
+{
+ switch (aPos->type()) {
+ case FGPositioned::AIRPORT:
+ // heliport and seaport too?
+ case FGPositioned::VOR:
+ case FGPositioned::NDB:
+ case FGPositioned::FIX:
+ case FGPositioned::TACAN:
+ case FGPositioned::WAYPOINT:
+ return true;
+ default:
+ return false;
+ }
+}
+
+FGPositioned::Type GPS::SearchFilter::minType() const
+{
+ return FGPositioned::AIRPORT;
+}
+
+FGPositioned::Type GPS::SearchFilter::maxType() const
+{
+ return FGPositioned::WAYPOINT;
+}
+
+FGPositioned::Filter* GPS::createFilter(FGPositioned::Type aTy)
+{
+ if (aTy == FGPositioned::AIRPORT) {
+ return new FGAirport::HardSurfaceFilter(_config.minRunwayLengthFt());
+ }
+
+ // if we were passed INVALID, assume it means 'all types interesting to a GPS'
+ if (aTy == FGPositioned::INVALID) {
+ return new SearchFilter;
+ }
+
+ return new FGPositioned::TypeFilter(aTy);
+}
+
+void GPS::search()
{
- string id(_wp1_ID_node->getStringValue());
- if (_last_wp1_ID == id) {
- return; // easy, nothing to do
+ // parse search terms into local members, and exec the first search
+ string sty(_scratchNode->getStringValue("type"));
+ _searchType = FGPositioned::typeFromName(sty);
+ _searchQuery = _scratchNode->getStringValue("query");
+ if (_searchQuery.empty()) {
+ SG_LOG(SG_INSTR, SG_WARN, "empty GPS search query");
+ clearScratch();
+ return;
+ }
+
+ _searchExact = _scratchNode->getBoolValue("exact", true);
+ _searchOrderByRange = _scratchNode->getBoolValue("order-by-distance", true);
+ _searchResultIndex = 0;
+ _searchIsRoute = false;
+ _searchHasNext = false;
+
+ if (_searchExact && _searchOrderByRange) {
+ // immediate mode search, get all the results now and cache them
+ auto_ptr<FGPositioned::Filter> f(createFilter(_searchType));
+ if (_searchNames) {
+ _searchResults = FGPositioned::findAllWithNameSortedByRange(_searchQuery, _indicated_pos, f.get());
+ } else {
+ _searchResults = FGPositioned::findAllWithIdentSortedByRange(_searchQuery, _indicated_pos, f.get());
}
- FGPositionedRef result = FGPositioned::findClosestWithIdent(id, ctx.pos);
- if (!result) {
- // not found, hmm
- _last_wp1_ID = id;
- return;
+ _searchResultsCached = true;
+
+ if (_searchResults.empty()) {
+ clearScratch();
+ return;
}
- _wp1_position = result->geod();
- _wp1_name_node->setStringValue(result->name().c_str());
- _last_wp1_ID = id;
- ctx.waypoint_changed = true;
+ _searchHasNext = (_searchResults.size() > 1);
+ setScratchFromCachedSearchResult();
+ } else {
+ // iterative search, look up result zero
+ _searchResultsCached = false;
+ performSearch();
+ }
}
-void
-GPS::updateTTWNode(UpdateContext& ctx, double distance_m, SGPropertyNode_ptr node)
-{
- // Estimate time to waypoint.
- // The estimation does not take track into consideration,
- // so if you are going away from the waypoint the TTW will
- // increase. Makes most sense when travelling directly towards
- // the waypoint.
- double TTW = 0.0;
- double speed_nm_per_second = ctx.speed_kt / 3600;
- if (speed_nm_per_second > SGLimitsd::min() && distance_m > 0.0) {
- TTW = (distance_m * SG_METER_TO_NM) / speed_nm_per_second;
+void GPS::performSearch()
+{
+ auto_ptr<FGPositioned::Filter> f(createFilter(_searchType));
+ clearScratch();
+
+ FGPositionedRef r;
+ if (_searchNames) {
+ if (_searchOrderByRange) {
+ r = FGPositioned::findClosestWithPartialName(_indicated_pos, _searchQuery, f.get(), _searchResultIndex, _searchHasNext);
+ } else {
+ r = FGPositioned::findWithPartialName(_searchQuery, f.get(), _searchResultIndex, _searchHasNext);
}
- if (TTW < 356400.5) { // That's 99 hours
- unsigned int TTW_seconds = (int) (TTW + 0.5);
- unsigned int TTW_minutes = 0;
- unsigned int TTW_hours = 0;
- char TTW_str[9];
- TTW_hours = TTW_seconds / 3600;
- TTW_minutes = (TTW_seconds / 60) % 60;
- TTW_seconds = TTW_seconds % 60;
- snprintf(TTW_str, 9, "%02d:%02d:%02d",
- TTW_hours, TTW_minutes, TTW_seconds);
- node->setStringValue(TTW_str);
+ } else {
+ if (_searchOrderByRange) {
+ r = FGPositioned::findClosestWithPartialId(_indicated_pos, _searchQuery, f.get(), _searchResultIndex, _searchHasNext);
} else {
- node->setStringValue("--:--:--");
+ r = FGPositioned::findWithPartialId(_searchQuery, f.get(), _searchResultIndex, _searchHasNext);
}
+ }
+
+ if (!r) {
+ return;
+ }
+
+ setScratchFromPositioned(r.get(), _searchResultIndex);
}
-void
-GPS::updateWaypoint0Course(UpdateContext& ctx)
+void GPS::setScratchFromCachedSearchResult()
{
- // Find the bearing and distance to waypoint 0.
- double az2;
- SGGeodesy::inverse(ctx.pos, ctx.wp0_pos, ctx.wp0_bearing_deg, az2,ctx.wp0_distance);
- _wp0_distance_node->setDoubleValue(ctx.wp0_distance * SG_METER_TO_NM);
- _wp0_bearing_node->setDoubleValue(ctx.wp0_bearing_deg);
-
- double mag_bearing_deg = ctx.wp0_bearing_deg - ctx.magvar_deg;
- SG_NORMALIZE_RANGE(mag_bearing_deg, 0.0, 360.0);
- _wp0_mag_bearing_node->setDoubleValue(mag_bearing_deg);
- double bearing_error_deg = ctx.track1_deg - ctx.wp0_bearing_deg;
- SG_NORMALIZE_RANGE(bearing_error_deg, -180.0, 180.0);
- _true_wp0_bearing_error_node->setDoubleValue(bearing_error_deg);
+ assert(_searchResultsCached);
+ int index = _searchResultIndex;
+
+ if ((index < 0) || (index >= (int) _searchResults.size())) {
+ SG_LOG(SG_INSTR, SG_WARN, "GPS:setScratchFromCachedSearchResult: index out of bounds:" << index);
+ return;
+ }
+
+ setScratchFromPositioned(_searchResults[index], index);
+
+ int lastResult = (int) _searchResults.size() - 1;
+ _searchHasNext = (_searchResultIndex < lastResult);
+}
+
+void GPS::setScratchFromPositioned(FGPositioned* aPos, int aIndex)
+{
+ clearScratch();
+ assert(aPos);
+
+ _scratchPos = aPos->geod();
+ _scratchNode->setStringValue("name", aPos->name());
+ _scratchNode->setStringValue("ident", aPos->ident());
+ _scratchNode->setStringValue("type", FGPositioned::nameForType(aPos->type()));
- updateTTWNode(ctx, ctx.wp0_distance, _wp0_ttw_node);
-
- // Course deviation is the diffenrence between the bearing
- // and the course.
- double course_deviation_deg = ctx.wp0_bearing_deg -
- ctx.wp0_course_deg;
- SG_NORMALIZE_RANGE(course_deviation_deg, -180.0, 180.0);
-
- // If the course deviation is less than 90 degrees to either side,
- // our desired course is towards the waypoint.
- // It does not matter if we are actually moving
- // towards or from the waypoint.
- if (fabs(course_deviation_deg) < 90.0) {
- _wp0_to_flag_node->setBoolValue(true);
- }
- // If it's more than 90 degrees the desired
- // course is from the waypoint.
- else if (fabs(course_deviation_deg) > 90.0) {
- _wp0_to_flag_node->setBoolValue(false);
- // When the course is away from the waypoint,
- // it makes sense to change the sign of the deviation.
- course_deviation_deg *= -1.0;
- SG_NORMALIZE_RANGE(course_deviation_deg, -90.0, 90.0);
+ if (aIndex >= 0) {
+ _scratchNode->setIntValue("index", aIndex);
+ }
+
+ _scratchValid = true;
+ if (_searchResultsCached) {
+ _scratchNode->setIntValue("result-count", _searchResults.size());
+ }
+
+ switch (aPos->type()) {
+ case FGPositioned::VOR:
+ _scratchNode->setDoubleValue("frequency-mhz", static_cast<FGNavRecord*>(aPos)->get_freq() / 100.0);
+ break;
+
+ case FGPositioned::NDB:
+ _scratchNode->setDoubleValue("frequency-khz", static_cast<FGNavRecord*>(aPos)->get_freq() / 100.0);
+ break;
+
+ case FGPositioned::AIRPORT:
+ addAirportToScratch((FGAirport*)aPos);
+ break;
+
+ default:
+ // no-op
+ break;
+ }
+
+ // look for being on the route and set?
+}
+
+void GPS::addAirportToScratch(FGAirport* aAirport)
+{
+ for (unsigned int r=0; r<aAirport->numRunways(); ++r) {
+ SGPropertyNode* rwyNd = _scratchNode->getChild("runways", r, true);
+ FGRunway* rwy = aAirport->getRunwayByIndex(r);
+ // TODO - filter out unsuitable runways in the future
+ // based on config again
+
+ rwyNd->setStringValue("id", rwy->ident().c_str());
+ rwyNd->setIntValue("length-ft", rwy->lengthFt());
+ rwyNd->setIntValue("width-ft", rwy->widthFt());
+ rwyNd->setIntValue("heading-deg", rwy->headingDeg());
+ // map surface code to a string
+ // TODO - lighting information
+
+ if (rwy->ILS()) {
+ rwyNd->setDoubleValue("ils-frequency-mhz", rwy->ILS()->get_freq() / 100.0);
}
+ } // of runways iteration
+}
- _wp0_course_deviation_node->setDoubleValue(course_deviation_deg);
- // Cross track error.
- double course_error_m = sin(course_deviation_deg * SG_PI / 180.0)
- * (ctx.wp0_distance);
- _wp0_course_error_nm_node->setDoubleValue(course_error_m * SG_METER_TO_NM);
+void GPS::selectOBSMode()
+{
+ if (!isScratchPositionValid()) {
+ SG_LOG(SG_INSTR, SG_WARN, "invalid OBS lat/lon");
+ return;
+ }
+
+ SG_LOG(SG_INSTR, SG_INFO, "GPS switching to OBS mode");
+ _mode = "obs";
+
+ _wp1Ident = _scratchNode->getStringValue("ident");
+ _wp1Name = _scratchNode->getStringValue("name");
+ _wp1_position = _scratchPos;
+ _wp0_position = _indicated_pos;
+ wp1Changed();
}
-void
-GPS::updateWaypoint1Course(UpdateContext& ctx)
+void GPS::selectLegMode()
{
- // Find the bearing and distance to waypoint 0.
- double az2;
- SGGeodesy::inverse(ctx.pos, ctx.wp1_pos, ctx.wp1_bearing_deg, az2,ctx.wp1_distance);
- _wp1_distance_node->setDoubleValue(ctx.wp1_distance * SG_METER_TO_NM);
- _wp1_bearing_node->setDoubleValue(ctx.wp1_bearing_deg);
-
- double mag_bearing_deg = ctx.wp1_bearing_deg - ctx.magvar_deg;
- SG_NORMALIZE_RANGE(mag_bearing_deg, 0.0, 360.0);
- _wp1_mag_bearing_node->setDoubleValue(mag_bearing_deg);
- double bearing_error_deg = ctx.track1_deg - ctx.wp1_bearing_deg;
- SG_NORMALIZE_RANGE(bearing_error_deg, -180.0, 180.0);
- _true_wp1_bearing_error_node->setDoubleValue(bearing_error_deg);
+ if (_mode == "leg") {
+ return;
+ }
+
+ if (!_routeMgr->isRouteActive()) {
+ SG_LOG(SG_INSTR, SG_WARN, "GPS:selectLegMode: no active route");
+ return;
+ }
+
+ SG_LOG(SG_INSTR, SG_INFO, "GPS switching to LEG mode");
+ _mode = "leg";
+
+ // depending on the situation, this will either get over-written
+ // in routeManagerSequenced or not; either way it does no harm to
+ // set it here.
+ _wp0_position = _indicated_pos;
+
+ // not really sequenced, but does all the work of updating wp0/1
+ routeManagerSequenced();
+}
+
+void GPS::nextResult()
+{
+ if (!_searchHasNext) {
+ return;
+ }
+
+ clearScratch();
+ if (_searchIsRoute) {
+ setScratchFromRouteWaypoint(++_searchResultIndex);
+ } else if (_searchResultsCached) {
+ ++_searchResultIndex;
+ setScratchFromCachedSearchResult();
+ } else {
+ ++_searchResultIndex;
+ performSearch();
+ } // of iterative search case
+}
+
+void GPS::previousResult()
+{
+ if (_searchResultIndex <= 0) {
+ return;
+ }
+
+ clearScratch();
+ --_searchResultIndex;
+
+ if (_searchIsRoute) {
+ setScratchFromRouteWaypoint(_searchResultIndex);
+ } else if (_searchResultsCached) {
+ setScratchFromCachedSearchResult();
+ } else {
+ performSearch();
+ }
+}
+
+void GPS::defineWaypoint()
+{
+ if (!isScratchPositionValid()) {
+ SG_LOG(SG_INSTR, SG_WARN, "GPS:defineWaypoint: invalid lat/lon");
+ return;
+ }
+
+ string ident = _scratchNode->getStringValue("ident");
+ if (ident.size() < 2) {
+ SG_LOG(SG_INSTR, SG_WARN, "GPS:defineWaypoint: waypoint identifier must be at least two characters");
+ return;
+ }
- updateTTWNode(ctx, ctx.wp1_distance, _wp1_ttw_node);
-
- // Course deviation is the diffenrence between the bearing
- // and the course.
- double course_deviation_deg = ctx.wp1_bearing_deg -
- ctx.wp1_course_deg;
- SG_NORMALIZE_RANGE(course_deviation_deg, -180.0, 180.0);
-
- // If the course deviation is less than 90 degrees to either side,
- // our desired course is towards the waypoint.
- // It does not matter if we are actually moving
- // towards or from the waypoint.
- if (fabs(course_deviation_deg) < 90.0) {
- _wp1_to_flag_node->setBoolValue(true);
- }
- // If it's more than 90 degrees the desired
- // course is from the waypoint.
- else if (fabs(course_deviation_deg) > 90.0) {
- _wp1_to_flag_node->setBoolValue(false);
- // When the course is away from the waypoint,
- // it makes sense to change the sign of the deviation.
- course_deviation_deg *= -1.0;
- SG_NORMALIZE_RANGE(course_deviation_deg, -90.0, 90.0);
- }
+// check for duplicate idents
+ FGPositioned::TypeFilter f(FGPositioned::WAYPOINT);
+ FGPositioned::List dups = FGPositioned::findAllWithIdentSortedByRange(ident, _indicated_pos, &f);
+ if (!dups.empty()) {
+ SG_LOG(SG_INSTR, SG_WARN, "GPS:defineWaypoint: non-unique waypoint identifier, ho-hum");
+ }
+
+ SG_LOG(SG_INSTR, SG_INFO, "GPS:defineWaypoint: creating waypoint:" << ident);
+ FGPositionedRef wpt = FGPositioned::createUserWaypoint(ident, _scratchPos);
+ _searchResultsCached = false;
+ setScratchFromPositioned(wpt.get(), -1);
+}
+
+void GPS::insertWaypointAtIndex(int aIndex)
+{
+ // note we do allow index = routeMgr->size(), that's an append
+ if ((aIndex < 0) || (aIndex > _routeMgr->size())) {
+ throw sg_range_exception("GPS::insertWaypointAtIndex: index out of bounds");
+ }
+
+ if (!isScratchPositionValid()) {
+ SG_LOG(SG_INSTR, SG_WARN, "GPS:insertWaypointAtIndex: invalid lat/lon");
+ return;
+ }
+
+ string ident = _scratchNode->getStringValue("ident");
+ string name = _scratchNode->getStringValue("name");
+
+ _routeMgr->add_waypoint(SGWayPoint(_scratchPos, ident, name), aIndex);
+}
- _wp1_course_deviation_node->setDoubleValue(course_deviation_deg);
+void GPS::removeWaypointAtIndex(int aIndex)
+{
+ if ((aIndex < 0) || (aIndex >= _routeMgr->size())) {
+ throw sg_range_exception("GPS::removeWaypointAtIndex: index out of bounds");
+ }
+
+ _routeMgr->pop_waypoint(aIndex);
+}
- // Cross track error.
- double course_error_m = sin(course_deviation_deg * SG_PI / 180.0)
- * (ctx.wp1_distance);
- _wp1_course_error_nm_node->setDoubleValue(course_error_m * SG_METER_TO_NM);
+void GPS::tieSGGeod(SGPropertyNode* aNode, SGGeod& aRef,
+ const char* lonStr, const char* latStr, const char* altStr)
+{
+ tie(aNode, lonStr, SGRawValueMethods<SGGeod, double>(aRef, &SGGeod::getLongitudeDeg, &SGGeod::setLongitudeDeg));
+ tie(aNode, latStr, SGRawValueMethods<SGGeod, double>(aRef, &SGGeod::getLatitudeDeg, &SGGeod::setLatitudeDeg));
+
+ if (altStr) {
+ tie(aNode, altStr, SGRawValueMethods<SGGeod, double>(aRef, &SGGeod::getElevationFt, &SGGeod::setElevationFt));
+ }
+}
+void GPS::tieSGGeodReadOnly(SGPropertyNode* aNode, SGGeod& aRef,
+ const char* lonStr, const char* latStr, const char* altStr)
+{
+ tie(aNode, lonStr, SGRawValueMethods<SGGeod, double>(aRef, &SGGeod::getLongitudeDeg, NULL));
+ tie(aNode, latStr, SGRawValueMethods<SGGeod, double>(aRef, &SGGeod::getLatitudeDeg, NULL));
+
+ if (altStr) {
+ tie(aNode, altStr, SGRawValueMethods<SGGeod, double>(aRef, &SGGeod::getElevationFt, NULL));
+ }
}
// end of gps.cxx
#include <simgear/structure/subsystem_mgr.hxx>
#include <simgear/math/SGMath.hxx>
+#include "Navaids/positioned.hxx"
+
// forward decls
class SGRoute;
+class FGRouteMgr;
+class FGAirport;
+class GPSListener;
class SGGeodProperty
{
* /systems/electrical/outputs/gps
* /instrumentation/gps/serviceable
*
- * /instrumentation/gps/wp-longitude-deg
- * /instrumentation/gps/wp-latitude-deg
- * /instrumentation/gps/wp-altitude-ft
- * /instrumentation/gps/wp-ID
- * /instrumentation/gps/wp-name
- * /instrumentation/gps/desired-course-deg
- * /instrumentation/gps/get-nearest-airport
- * /instrumentation/gps/waypoint-type
- * /instrumentation/gps/tracking-bug
*
* Output properties:
*
* /instrumentation/gps/trip-odometer
* /instrumentation/gps/true-bug-error-deg
* /instrumentation/gps/magnetic-bug-error-deg
- * /instrumentation/gps/true-bearing-error-deg
- * /instrumentation/gps/magnetic-bearing-error-deg
+
*/
class GPS : public SGSubsystem
{
virtual void init ();
virtual void update (double delta_time_sec);
-
+
+ virtual void bind();
+ virtual void unbind();
private:
- typedef struct {
- double dt;
- SGGeod pos;
- SGGeod wp0_pos;
- SGGeod wp1_pos;
- bool waypoint_changed;
- double speed_kt;
- double track1_deg;
- double track2_deg;
- double magvar_deg;
- double wp0_distance;
- double wp0_course_deg;
- double wp0_bearing_deg;
- double wp1_distance;
- double wp1_course_deg;
- double wp1_bearing_deg;
- } UpdateContext;
+ friend class GPSListener;
+ friend class SearchFilter;
+
+ /**
+ * Configuration manager, track data relating to aircraft installation
+ */
+ class Config
+ {
+ public:
+ Config();
+
+ void bind(GPS* aOwner, SGPropertyNode* aCfg);
+
+ bool turnAnticipationEnabled() const
+ { return _enableTurnAnticipation; }
+
+ /**
+ * Desired turn rate in degrees/second. From this we derive the turn
+ * radius and hence how early we need to anticipate it.
+ */
+ double turnRateDegSec() const
+ { return _turnRate; }
+
+ /**
+ * Distance at which we arm overflight sequencing. Once inside this
+ * distance, a change of the wp1 'TO' flag to false will be considered
+ * overlight of the wp.
+ */
+ double overflightArmDistanceNm() const
+ { return _overflightArmDistance; }
+
+ /**
+ * Time before the next WP to activate an external annunciator
+ */
+ double waypointAlertTime() const
+ { return _waypointAlertTime; }
+
+ bool tuneNavRadioToRefVor() const
+ { return _tuneRadio1ToRefVor; }
+
+ bool requireHardSurface() const
+ { return _requireHardSurface; }
+
+ double minRunwayLengthFt() const
+ { return _minRunwayLengthFt; }
+
+ double getExternalCourse() const;
+
+ void setExternalCourse(double aCourseDeg);
+
+ bool cdiDeflectionIsAngular() const
+ { return (_cdiMaxDeflectionNm <= 0.0); }
+
+ double cdiDeflectionLinearPeg() const
+ {
+ assert(_cdiMaxDeflectionNm > 0.0);
+ return _cdiMaxDeflectionNm;
+ }
+
+ bool driveAutopilot() const
+ { return _driveAutopilot; }
+ private:
+ bool _enableTurnAnticipation;
+
+ // desired turn rate in degrees per second
+ double _turnRate;
+
+ // distance from waypoint to arm overflight sequencing (in nm)
+ double _overflightArmDistance;
+
+ // time before reaching a waypoint to trigger annunicator light/sound
+ // (in seconds)
+ double _waypointAlertTime;
+
+ // should GPS automatically tune NAV1 to the reference VOR?
+ bool _tuneRadio1ToRefVor;
+
+ // minimum runway length to require when filtering
+ double _minRunwayLengthFt;
+
+ // should we require a hard-surfaced runway when filtering?
+ bool _requireHardSurface;
+
+ // helpers to tie course-source property
+ const char* getCourseSource() const;
+ void setCourseSource(const char* aPropPath);
+
+ // property to retrieve the external course from
+ SGPropertyNode_ptr _extCourseSource;
+
+ double _cdiMaxDeflectionNm;
+
+ bool _driveAutopilot;
+ };
+
+ class SearchFilter : public FGPositioned::Filter
+ {
+ public:
+ virtual bool pass(FGPositioned* aPos) const;
+
+ virtual FGPositioned::Type minType() const;
+ virtual FGPositioned::Type maxType() const;
+ };
- void search (double frequency, const SGGeod& pos);
-
/**
* reset all output properties to default / non-service values
*/
void clearOutput();
- void updateWithValid(UpdateContext& ctx);
+ void updateBasicData(double dt);
+ void updateWaypoints();
+
+ void updateTrackingBug();
+ void updateReferenceNavaid(double dt);
+ void referenceNavaidSet(const std::string& aNavaid);
+ void tuneNavRadios();
+ void updateRouteData();
+ void driveAutopilot();
- void updateNearestAirport(UpdateContext& ctx);
- void updateWaypoint0(UpdateContext& ctx);
- void updateWaypoint1(UpdateContext& ctx);
+ void routeActivated();
+ void routeManagerSequenced();
+ void routeEdited();
+ void routeFinished();
+
+ void updateTurn();
+ void updateOverflight();
+ void beginTurn();
+ void endTurn();
+
+ double computeTurnProgress(double aBearing) const;
+ void computeTurnData();
+ void updateTurnData();
+ double computeTurnRadiusNm(double aGroundSpeedKts) const;
+
+ /**
+ * Update one-shot things when WP1 / leg data change
+ */
+ void wp1Changed();
+
+// scratch maintenence utilities
+ void setScratchFromPositioned(FGPositioned* aPos, int aIndex);
+ void setScratchFromCachedSearchResult();
+ void setScratchFromRouteWaypoint(int aIndex);
+
+ /**
+ * Add airport-specific information to a scratch result
+ */
+ void addAirportToScratch(FGAirport* aAirport);
+
+ void clearScratch();
+
+ /**
+ * Predicate, determine if the lon/lat position in the scratch is
+ * valid or not.
+ */
+ bool isScratchPositionValid() const;
+
+ FGPositioned::Filter* createFilter(FGPositioned::Type aTy);
+
+ /**
+ * Search kernel - called each time we step through a result
+ */
+ void performSearch();
+
+// command handlers
+ void selectLegMode();
+ void selectOBSMode();
+ void directTo();
+ void loadRouteWaypoint();
+ void loadNearest();
+ void search();
+ void nextResult();
+ void previousResult();
+ void defineWaypoint();
+ void insertWaypointAtIndex(int aIndex);
+ void removeWaypointAtIndex(int aIndex);
+
+// tied-property getter/setters
+ void setCommand(const char* aCmd);
+ const char* getCommand() const { return ""; }
+
+ const char* getMode() const { return _mode.c_str(); }
+
+ bool getScratchValid() const { return _scratchValid; }
+ double getScratchDistance() const;
+ double getScratchMagBearing() const;
+ double getScratchTrueBearing() const;
+ bool getScratchHasNext() const { return _searchHasNext; }
+
+ double getSelectedCourse() const { return _selectedCourse; }
+ double getCDIDeflection() const;
+
+ double getLegDistance() const;
+ double getLegCourse() const;
+ double getLegMagCourse() const;
+ double getAltDistanceRatio() const;
+
+ double getTrueTrack() const { return _last_true_track; }
+ double getMagTrack() const;
+ double getGroundspeedKts() const { return _last_speed_kts; }
+ double getVerticalSpeed() const { return _last_vertical_speed; }
+
+ //bool getLegMode() const { return _mode == "leg"; }
+ //bool getObsMode() const { return _mode == "obs"; }
+
+ const char* getWP0Ident() const;
+ const char* getWP0Name() const;
+
+ const char* getWP1Ident() const;
+ const char* getWP1Name() const;
+
+ double getWP1Distance() const;
+ double getWP1TTW() const;
+ const char* getWP1TTWString() const;
+ double getWP1Bearing() const;
+ double getWP1MagBearing() const;
+ double getWP1CourseDeviation() const;
+ double getWP1CourseErrorNm() const;
+ bool getWP1ToFlag() const;
+ bool getWP1FromFlag() const;
+
+ // true-bearing-error and mag-bearing-error
+
- void updateLegCourse(UpdateContext& ctx);
- void updateWaypoint0Course(UpdateContext& ctx);
- void updateWaypoint1Course(UpdateContext& ctx);
+ /**
+ * Tied-properties helper, record nodes which are tied for easy un-tie-ing
+ */
+ template <typename T>
+ void tie(SGPropertyNode* aNode, const char* aRelPath, const SGRawValue<T>& aRawValue)
+ {
+ SGPropertyNode* nd = aNode->getNode(aRelPath, true);
+ _tiedNodes.push_back(nd);
+ nd->tie(aRawValue);
+ }
- void waypointChanged(UpdateContext& ctx);
- void updateTTWNode(UpdateContext& ctx, double distance_m, SGPropertyNode_ptr node);
- void updateTrackingBug(UpdateContext& ctx);
-
- SGPropertyNode_ptr _magvar_node;
- SGPropertyNode_ptr _serviceable_node;
- SGPropertyNode_ptr _electrical_node;
- SGPropertyNode_ptr _wp0_ID_node;
- SGPropertyNode_ptr _wp0_name_node;
- SGPropertyNode_ptr _wp0_course_node;
- SGPropertyNode_ptr _get_nearest_airport_node;
- SGPropertyNode_ptr _wp1_ID_node;
- SGPropertyNode_ptr _wp1_name_node;
- SGPropertyNode_ptr _wp1_course_node;
- SGPropertyNode_ptr _tracking_bug_node;
-
- SGPropertyNode_ptr _raim_node;
- SGPropertyNode_ptr _indicated_vertical_speed_node;
- SGPropertyNode_ptr _true_track_node;
- SGPropertyNode_ptr _magnetic_track_node;
- SGPropertyNode_ptr _speed_node;
- SGPropertyNode_ptr _wp0_distance_node;
- SGPropertyNode_ptr _wp0_ttw_node;
- SGPropertyNode_ptr _wp0_bearing_node;
- SGPropertyNode_ptr _wp0_mag_bearing_node;
- SGPropertyNode_ptr _wp0_course_deviation_node;
- SGPropertyNode_ptr _wp0_course_error_nm_node;
- SGPropertyNode_ptr _wp0_to_flag_node;
- SGPropertyNode_ptr _wp1_distance_node;
- SGPropertyNode_ptr _wp1_ttw_node;
- SGPropertyNode_ptr _wp1_bearing_node;
- SGPropertyNode_ptr _wp1_mag_bearing_node;
- SGPropertyNode_ptr _wp1_course_deviation_node;
- SGPropertyNode_ptr _wp1_course_error_nm_node;
- SGPropertyNode_ptr _wp1_to_flag_node;
- SGPropertyNode_ptr _odometer_node;
+ /// helper, tie the lat/lon/elev of a SGGeod to the named children of aNode
+ void tieSGGeod(SGPropertyNode* aNode, SGGeod& aRef,
+ const char* lonStr, const char* latStr, const char* altStr);
+
+ /// helper, tie a SGGeod to proeprties, but read-only
+ void tieSGGeodReadOnly(SGPropertyNode* aNode, SGGeod& aRef,
+ const char* lonStr, const char* latStr, const char* altStr);
+
+// members
+ SGPropertyNode_ptr _gpsNode;
+ SGPropertyNode_ptr _magvar_node;
+ SGPropertyNode_ptr _serviceable_node;
+ SGPropertyNode_ptr _electrical_node;
+ SGPropertyNode_ptr _tracking_bug_node;
+ SGPropertyNode_ptr _raim_node;
+
+ SGPropertyNode_ptr _odometer_node;
SGPropertyNode_ptr _trip_odometer_node;
SGPropertyNode_ptr _true_bug_error_node;
SGPropertyNode_ptr _magnetic_bug_error_node;
- SGPropertyNode_ptr _true_wp0_bearing_error_node;
- SGPropertyNode_ptr _magnetic_wp0_bearing_error_node;
- SGPropertyNode_ptr _true_wp1_bearing_error_node;
- SGPropertyNode_ptr _magnetic_wp1_bearing_error_node;
- SGPropertyNode_ptr _leg_distance_node;
- SGPropertyNode_ptr _leg_course_node;
- SGPropertyNode_ptr _leg_magnetic_course_node;
- SGPropertyNode_ptr _alt_dist_ratio_node;
- SGPropertyNode_ptr _leg_course_deviation_node;
- SGPropertyNode_ptr _leg_course_error_nm_node;
- SGPropertyNode_ptr _leg_to_flag_node;
- SGPropertyNode_ptr _alt_deviation_node;
-
- bool _last_valid;
+
+ SGPropertyNode_ptr _ref_navaid_id_node;
+ SGPropertyNode_ptr _ref_navaid_bearing_node;
+ SGPropertyNode_ptr _ref_navaid_distance_node;
+ SGPropertyNode_ptr _ref_navaid_mag_bearing_node;
+ SGPropertyNode_ptr _ref_navaid_frequency_node;
+ SGPropertyNode_ptr _ref_navaid_name_node;
+
+ SGPropertyNode_ptr _route_active_node;
+ SGPropertyNode_ptr _route_current_wp_node;
+ SGPropertyNode_ptr _routeDistanceNm;
+ SGPropertyNode_ptr _routeETE;
+ SGPropertyNode_ptr _routeEditedSignal;
+ SGPropertyNode_ptr _routeFinishedSignal;
+
+ double _selectedCourse;
+
+ bool _dataValid;
SGGeod _last_pos;
+ bool _lastPosValid;
double _last_speed_kts;
-
- std::string _last_wp0_ID;
- std::string _last_wp1_ID;
-
- double _alt_dist_ratio;
- double _distance_m;
- double _course_deg;
-
- double _bias_length;
- double _bias_angle;
- double _azimuth_error;
- double _range_error;
- double _elapsed_time;
-
+ double _last_true_track;
+ double _last_vertical_speed;
+
+ std::string _mode;
+ GPSListener* _listener;
+ Config _config;
+ FGRouteMgr* _routeMgr;
+
+ bool _ref_navaid_set;
+ double _ref_navaid_elapsed;
+ FGPositionedRef _ref_navaid;
+
std::string _name;
int _num;
-
- SGGeodProperty _position;
- SGGeodProperty _wp0_position;
- SGGeodProperty _wp1_position;
- SGGeodProperty _indicated_pos;
+
+ SGGeodProperty _position;
+ SGGeod _wp0_position;
+ SGGeod _wp1_position;
+ SGGeod _indicated_pos;
+ std::string _wp0Ident, _wp0Name, _wp1Ident, _wp1Name;
+ double _wp1DistanceM, _wp1TrueBearing;
+
+// scratch data
+ SGGeod _scratchPos;
+ SGPropertyNode_ptr _scratchNode;
+ bool _scratchValid;
+
+// search data
+ int _searchResultIndex;
+ std::string _searchQuery;
+ FGPositioned::Type _searchType;
+ bool _searchExact;
+ bool _searchOrderByRange;
+ bool _searchResultsCached;
+ FGPositioned::List _searchResults;
+ bool _searchIsRoute; ///< set if 'search' is actually the current route
+ bool _searchHasNext; ///< is there a result after this one?
+ bool _searchNames; ///< set if we're searching names instead of idents
+
+ // turn data
+ bool _computeTurnData; ///< do we need to update the turn data?
+ bool _anticipateTurn; ///< are we anticipating the next turn or not?
+ bool _inTurn; // is a turn in progress?
+ bool _turnSequenced; // have we sequenced the new leg?
+ double _turnAngle; // angle to turn through, in degrees
+ double _turnStartBearing; // bearing of inbound leg
+ double _turnRadius; // radius of turn in nm
+ SGGeod _turnPt;
+ SGGeod _turnCentre;
+
+ SGPropertyNode_ptr _realismSimpleGps; ///< should the GPS be simple or realistic?
+
+// autopilot drive properties
+ SGPropertyNode_ptr _apTrueHeading;
+ SGPropertyNode_ptr _apTargetAltitudeFt;
+ SGPropertyNode_ptr _apAltitudeLock;
+
+ std::vector<SGPropertyNode*> _tiedNodes;
};
geo_inverse_wgs_84(aTowerLat, aTowerLon, (*loopBegin)->mPos.getLatitudeDeg(), (*loopBegin)->mPos.getLongitudeDeg(), &az1, &az2, &dist_m);
osg::Vec3 p1 = fromPolar(az1, dist_m * aScale) + osg::Vec3(TextureHalfSize, TextureHalfSize, 0);
pts->push_back( p1 );
- polygon->setVertexArray( pts );
+ polygon->setVertexArray( pts.get() );
polygon->addPrimitiveSet( new osg::DrawArrays( osg::PrimitiveSet::POLYGON, 0, pts->size() ) );
// Next, calculate the indicated heading,
// introducing errors.
- double factor = 0.1 / (spin * spin * spin * spin * spin * spin);
+ double factor = 100 * (spin * spin * spin * spin * spin * spin);
double heading = _heading_in_node->getDoubleValue();
// Now, we have to get the current
if ((heading - _last_heading_deg) < -180)
_last_heading_deg -= 360;
- heading = fgGetLowPass(_last_heading_deg, heading, dt / factor);
+ heading = fgGetLowPass(_last_heading_deg, heading, dt * factor);
_last_heading_deg = heading;
heading += offset;
#include "agradar.hxx"
#include "rad_alt.hxx"
-FGInstrumentMgr::FGInstrumentMgr ()
+FGInstrumentMgr::FGInstrumentMgr () :
+ _explicitGps(false)
{
set_subsystem("od_gauge", new FGODGauge);
set_subsystem("hud", new HUD);
}
delete config_props;
+
+ if (!_explicitGps) {
+ SG_LOG(SG_INSTR, SG_INFO, "creating default GPS instrument");
+ SGPropertyNode_ptr nd(new SGPropertyNode);
+ nd->setStringValue("name", "gps");
+ nd->setIntValue("number", 0);
+ set_subsystem("gps[0]", new GPS(nd));
+ }
}
FGInstrumentMgr::~FGInstrumentMgr ()
set_subsystem( id, new Altimeter( node ) );
} else if ( name == "gps" ) {
- set_subsystem( id, new GPS( node ), 0.45 );
-
+ set_subsystem( id, new GPS( node ) );
+ _explicitGps = true;
} else if ( name == "gsdi" ) {
set_subsystem( id, new GSDI( node ) );
private:
SGPropertyNode *config_props;
+ bool _explicitGps;
};
#endif // __INSTRUMENT_MGR_HXX
if ( func_knob == 1 ) {
sby_ann = true;
- } else if ( func_knob == 2 ) {
+ } else if ( func_knob == 2 ) { // selftest
fl_ann = true;
alt_ann = true;
gnd_ann = true;
on_ann = true;
sby_ann = true;
reply_ann = true;
+ id_code = 8888;
+ flight_level = 888;
} else if ( func_knob == 3 ) {
fl_ann = true;
gnd_ann = true;
: mk(device) {}
virtual bool passAirport(FGAirport *a) const;
-
- virtual FGPositioned::Type maxType() const {
- return FGPositioned::AIRPORT;
- }
private:
MK_VIII* mk;
};
lon_node(fgGetNode("/position/longitude-deg", true)),
lat_node(fgGetNode("/position/latitude-deg", true)),
alt_node(fgGetNode("/position/altitude-ft", true)),
- is_valid_node(NULL),
- power_btn_node(NULL),
- freq_node(NULL),
- alt_freq_node(NULL),
- sel_radial_node(NULL),
- vol_btn_node(NULL),
- ident_btn_node(NULL),
- audio_btn_node(NULL),
- backcourse_node(NULL),
- nav_serviceable_node(NULL),
- cdi_serviceable_node(NULL),
- gs_serviceable_node(NULL),
- tofrom_serviceable_node(NULL),
- dme_serviceable_node(NULL),
- fmt_freq_node(NULL),
- fmt_alt_freq_node(NULL),
- heading_node(NULL),
- radial_node(NULL),
- recip_radial_node(NULL),
- target_radial_true_node(NULL),
- target_auto_hdg_node(NULL),
- time_to_intercept(NULL),
- to_flag_node(NULL),
- from_flag_node(NULL),
- inrange_node(NULL),
- signal_quality_norm_node(NULL),
- cdi_deflection_node(NULL),
- cdi_deflection_norm_node(NULL),
- cdi_xtrack_error_node(NULL),
- cdi_xtrack_hdg_err_node(NULL),
- has_gs_node(NULL),
- loc_node(NULL),
- loc_dist_node(NULL),
- gs_deflection_node(NULL),
- gs_deflection_deg_node(NULL),
- gs_deflection_norm_node(NULL),
- gs_rate_of_climb_node(NULL),
- gs_dist_node(NULL),
- gs_inrange_node(NULL),
- nav_id_node(NULL),
- id_c1_node(NULL),
- id_c2_node(NULL),
- id_c3_node(NULL),
- id_c4_node(NULL),
- nav_slaved_to_gps_node(NULL),
- gps_cdi_deflection_node(NULL),
- gps_to_flag_node(NULL),
- gps_from_flag_node(NULL),
- gps_has_gs_node(NULL),
play_count(0),
last_time(0),
target_radial(0.0),
last_x(0.0),
last_loc_dist(0.0),
last_xtrack_error(0.0),
+ xrate_ms(0.0),
_localizerWidth(5.0),
_name(node->getStringValue("name", "nav")),
_num(node->getIntValue("number", 0)),
_time_before_search_sec(-1.0),
- _falseCoursesEnabled(true),
_sgr(NULL)
{
SGPath path( globals->get_fg_root() );
term_tbl = new SGInterpTable( term.str() );
low_tbl = new SGInterpTable( low.str() );
high_tbl = new SGInterpTable( high.str() );
+
+
+ string branch("/instrumentation/" + _name);
+ _radio_node = fgGetNode(branch.c_str(), _num, true);
}
morse.init();
- string branch;
- branch = "/instrumentation/" + _name;
-
- SGPropertyNode *node = fgGetNode(branch.c_str(), _num, true );
-
+ SGPropertyNode* node = _radio_node.get();
bus_power_node =
fgGetNode(("/systems/electrical/outputs/" + _name).c_str(), true);
tofrom_serviceable_node = createServiceableProp(node, "to-from");
dme_serviceable_node = createServiceableProp(node, "dme");
- globals->get_props()->tie("sim/realism/false-radio-courses-enabled",
- SGRawValuePointer<bool>(&_falseCoursesEnabled));
-
+ falseCoursesEnabledNode =
+ fgGetNode("/sim/realism/false-radio-courses-enabled");
+ if (!falseCoursesEnabledNode) {
+ falseCoursesEnabledNode =
+ fgGetNode("/sim/realism/false-radio-courses-enabled", true);
+ falseCoursesEnabledNode->setBoolValue(true);
+ }
+
// frequencies
SGPropertyNode *subnode = node->getChild("frequencies", 0, true);
freq_node = subnode->getChild("selected-mhz", 0, true);
id_c3_node = node->getChild("nav-id_asc3", 0, true);
id_c4_node = node->getChild("nav-id_asc4", 0, true);
- node->tie("dme-in-range", SGRawValuePointer<bool>(&_dmeInRange));
-
// gps slaving support
nav_slaved_to_gps_node = node->getChild("slaved-to-gps", 0, true);
gps_cdi_deflection_node = fgGetNode("/instrumentation/gps/cdi-deflection", true);
gps_to_flag_node = fgGetNode("/instrumentation/gps/to-flag", true);
gps_from_flag_node = fgGetNode("/instrumentation/gps/from-flag", true);
gps_has_gs_node = fgGetNode("/instrumentation/gps/has-gs", true);
+ gps_course_node = fgGetNode("/instrumentation/gps/selected-course-deg", true);
+ gps_xtrack_error_nm_node = fgGetNode("/instrumentation/gps/wp/wp[1]/course-error-nm", true);
+ _magvarNode = fgGetNode("/environment/magnetic-variation-deg", true);
std::ostringstream temp;
temp << _name << "nav-ident" << _num;
void
FGNavRadio::bind ()
{
-
+ tie("dme-in-range", SGRawValuePointer<bool>(&_dmeInRange));
+ tie("operable", SGRawValueMethods<FGNavRadio, bool>(*this, &FGNavRadio::isOperable, NULL));
}
void
FGNavRadio::unbind ()
{
+ for (unsigned int t=0; t<_tiedNodes.size(); ++t) {
+ _tiedNodes[t]->untie();
+ }
+ _tiedNodes.clear();
}
if (power_btn_node->getBoolValue()
&& (bus_power_node->getDoubleValue() > 1.0)
&& nav_serviceable_node->getBoolValue() )
- {
+ {
+ _operable = true;
if (nav_slaved_to_gps_node->getBoolValue()) {
updateGPSSlaved();
} else {
from_flag_node->setBoolValue( false );
_dmeInRange = false;
+ _operable = false;
}
void FGNavRadio::updateReceiver(double dt)
SG_NORMALIZE_RANGE(r, -180.0, 180.0);
if ( is_loc ) {
- if (_falseCoursesEnabled) {
+ if (falseCoursesEnabledNode->getBoolValue()) {
// The factor of 30.0 gives a period of 120 which gives us 3 cycles and six
// zeros i.e. six courses: one front course, one back course, and four
// false courses. Three of the six are reverse sensing.
double angle = atan2(dot_v, dot_h) * SGD_RADIANS_TO_DEGREES;
double deflectionAngle = target_gs - angle;
- if (_falseCoursesEnabled) {
+ if (falseCoursesEnabledNode->getBoolValue()) {
// Construct false glideslopes. The scale factor of 1.5
// in the sawtooth gives a period of 6 degrees.
// There will be zeros at 3, 6r, 9, 12r et cetera
_toFlag = gps_to_flag_node->getBoolValue();
_fromFlag = gps_from_flag_node->getBoolValue();
- inrange_node->setBoolValue(_toFlag | _fromFlag);
+ bool gpsValid = (_toFlag | _fromFlag);
+ inrange_node->setBoolValue(gpsValid);
+ if (!gpsValid) {
+ signal_quality_norm_node->setDoubleValue(0.0);
+ _cdiDeflection = 0.0;
+ _cdiCrossTrackErrorM = 0.0;
+ _gsNeedleDeflection = 0.0;
+ return;
+ }
+
+ // this is unfortunate, but panel instruments use this value to decide
+ // if the navradio output is valid.
+ signal_quality_norm_node->setDoubleValue(1.0);
_cdiDeflection = gps_cdi_deflection_node->getDoubleValue();
// clmap to some range (+/- 10 degrees) as the regular deflection
SG_CLAMP_RANGE(_cdiDeflection, -10.0, 10.0 );
- _cdiCrossTrackErrorM = 0.0; // FIXME, supply this
+ _cdiCrossTrackErrorM = gps_xtrack_error_nm_node->getDoubleValue() * SG_NM_TO_METER;
_gsNeedleDeflection = 0.0; // FIXME, supply this
+
+ double trtrue = gps_course_node->getDoubleValue() + _magvarNode->getDoubleValue();
+ SG_NORMALIZE_RANGE(trtrue, 0.0, 360.0);
+ target_radial_true_node->setDoubleValue( trtrue );
}
void FGNavRadio::updateCDI(double dt)
//////////////////////////////////////////////////////////
double t = 0.0;
if ( inrange && cdi_serviceable ) {
- double xrate_ms = (last_xtrack_error - _cdiCrossTrackErrorM) / dt;
+ double cur_rate = (last_xtrack_error - _cdiCrossTrackErrorM) / dt;
+ xrate_ms = 0.99 * xrate_ms + 0.01 * cur_rate;
if ( fabs(xrate_ms) > 0.00001 ) {
t = _cdiCrossTrackErrorM / xrate_ms;
} else {
SGInterpTable *low_tbl;
SGInterpTable *high_tbl;
+ SGPropertyNode_ptr _radio_node;
SGPropertyNode_ptr lon_node;
SGPropertyNode_ptr lat_node;
SGPropertyNode_ptr alt_node;
SGPropertyNode_ptr gps_to_flag_node;
SGPropertyNode_ptr gps_from_flag_node;
SGPropertyNode_ptr gps_has_gs_node;
+ SGPropertyNode_ptr gps_course_node;
+ SGPropertyNode_ptr gps_xtrack_error_nm_node;
+ SGPropertyNode_ptr _magvarNode;
+
+ // realism setting, are false courses and GS lobes enabled?
+ SGPropertyNode_ptr falseCoursesEnabledNode;
// internal (private) values
+ bool _operable; ///< is the unit serviceable, on, powered, etc
int play_count;
time_t last_time;
FGNavRecordPtr _navaid;
double last_x;
double last_loc_dist;
double last_xtrack_error;
+ double xrate_ms;
double _localizerWidth; // cached localizer width in degrees
string _name;
double _gsNeedleDeflection;
double _gsNeedleDeflectionNorm;
- // realism setting, are false courses and GS lobes enabled?
- bool _falseCoursesEnabled;
-
SGSharedPtr<SGSampleGroup> _sgr;
+ std::vector<SGPropertyNode*> _tiedNodes;
bool updateWithPower(double aDt);
*/
double localizerWidth(FGNavRecord* aLOC);
FGNavRecord* findPrimaryNavaid(const SGGeod& aPos, double aFreqMHz);
+
+ /// accessor for tied, read-only 'operable' property
+ bool isOperable() const
+ { return _operable; }
+
+ /**
+ * Tied-properties helper, record nodes which are tied for easy un-tie-ing
+ */
+ template <typename T>
+ void tie(const char* aRelPath, const SGRawValue<T>& aRawValue)
+ {
+ SGPropertyNode* nd = _radio_node->getNode(aRelPath, true);
+ _tiedNodes.push_back(nd);
+ nd->tie(aRawValue);
+ }
public:
FGNavRadio(SGPropertyNode *node);
void
TACAN::update (double delta_time_sec)
{
+ // don't do anything when paused
+ if (delta_time_sec == 0) return;
+
if (!_serviceable_node->getBoolValue() || !_electrical_node->getBoolValue()) {
_last_distance_nm = 0;
_in_range_node->setBoolValue(false);
}
_distance_node->setDoubleValue( tmp_dist );
_speed_node->setDoubleValue(speed_kt);
- _time_node->setDoubleValue(distance_nm/speed_kt*60.0);
+ _time_node->setDoubleValue(speed_kt > 0 ? (distance_nm/speed_kt*60.0) : 0);
_bearing_node->setDoubleValue(bearing);
_x_shift_node->setDoubleValue(x_shift);
_y_shift_node->setDoubleValue(y_shift);
--- /dev/null
+
+#include <Main/fg_init.hxx>
+#include <Main/globals.hxx>
+#include <Main/fg_props.hxx>
+
+#include <Instrumentation/gps.hxx>
+#include <Autopilot/route_mgr.hxx>
+#include <Environment/environment_mgr.hxx>
+
+using std::string;
+
+char *homedir = ::getenv( "HOME" );
+char *hostname = ::getenv( "HOSTNAME" );
+bool free_hostname = false;
+
+void testSetPosition(const SGGeod& aPos)
+{
+ fgSetDouble("/position/longitude-deg", aPos.getLongitudeDeg());
+ fgSetDouble("/position/latitude-deg", aPos.getLatitudeDeg());
+ fgSetDouble("/position/altitude-ft", aPos.getElevationFt());
+}
+
+void printScratch(SGPropertyNode* scratch)
+{
+ if (!scratch->getBoolValue("valid", false)) {
+ SG_LOG(SG_GENERAL, SG_ALERT, "Scratch is invalid.");
+ return;
+ }
+
+ SG_LOG(SG_GENERAL, SG_ALERT, "Scratch:" <<
+ scratch->getStringValue("ident") << "/" << scratch->getStringValue("name"));
+
+ SG_LOG(SG_GENERAL, SG_ALERT, "\t" << scratch->getDoubleValue("longitude-deg")
+ << " " << scratch->getDoubleValue("latitude-deg") << " @ " << scratch->getDoubleValue("altitude-ft"));
+
+ SG_LOG(SG_GENERAL, SG_ALERT, "\t" << scratch->getDoubleValue("true-bearing-deg") <<
+ " (" << scratch->getDoubleValue("mag-bearing-deg") << " magnetic) " << scratch->getDoubleValue("distance-nm"));
+
+ if (scratch->hasChild("result-index")) {
+ SG_LOG(SG_GENERAL, SG_ALERT, "\tresult-index:" << scratch->getIntValue("result-index"));
+ }
+
+ if (scratch->hasChild("route-index")) {
+ SG_LOG(SG_GENERAL, SG_ALERT, "\troute-index:" << scratch->getIntValue("route-index"));
+ }
+}
+
+void createDummyRoute(FGRouteMgr* rm)
+{
+ SGPropertyNode* rmInput = fgGetNode("/autopilot/route-manager/input", true);
+ rmInput->setStringValue("UW");
+ rmInput->setStringValue("TLA/347/13");
+ rmInput->setStringValue("TLA");
+ rmInput->setStringValue("HAVEN");
+ rmInput->setStringValue("NEW/305/29");
+ rmInput->setStringValue("NEW");
+ rmInput->setStringValue("OTR");
+}
+
+int main(int argc, char* argv[])
+{
+ globals = new FGGlobals;
+
+ fgInitFGRoot(argc, argv);
+ if (!fgInitConfig(argc, argv) ) {
+ SG_LOG( SG_GENERAL, SG_ALERT, "Config option parsing failed" );
+ exit(-1);
+ }
+
+
+ fgInitNav();
+
+ SG_LOG(SG_GENERAL, SG_ALERT, "hello world!");
+
+ const FGAirport* egph = fgFindAirportID("EGPH");
+ SG_LOG(SG_GENERAL, SG_ALERT, "egph: cart location:" << egph->cart());
+
+ FGAirport::AirportFilter af;
+ FGPositioned::List l = FGPositioned::findClosestN(egph->geod(), 20, 2000.0, &af);
+ for (unsigned int i=0; i<l.size(); ++i) {
+ SG_LOG(SG_GENERAL, SG_ALERT, "\t" << l[i]->ident() << "/" << l[i]->name());
+ }
+
+ //l = FGPositioned::findWithinRange(egph->geod(), 500.0, &af);
+ //for (unsigned int i=0; i<l.size(); ++i) {
+ // SG_LOG(SG_GENERAL, SG_ALERT, "\t" << l[i]->ident() << "/" << l[i]->name());
+ //}
+
+
+ FGRouteMgr* rm = new FGRouteMgr;
+ globals->add_subsystem( "route-manager", rm );
+
+ // FGEnvironmentMgr* envMgr = new FGEnvironmentMgr;
+ // globals->add_subsystem("environment", envMgr);
+ // envMgr->init();
+
+
+ SGPropertyNode* nd = fgGetNode("/instrumentation/gps", true);
+ GPS* gps = new GPS(nd);
+ globals->add_subsystem("gps", gps);
+
+
+ testSetPosition(egph->geod());
+
+ // startup the route manager
+ rm->init();
+
+ nd->setBoolValue("serviceable", true);
+ fgSetBool("/systems/electrical/outputs/gps", true);
+
+ gps->init();
+ SGPropertyNode* scratch = nd->getChild("scratch", 0, true);
+ SGPropertyNode* wp = nd->getChild("wp", 0, true);
+ SGPropertyNode* wp1 = wp->getChild("wp", 1, true);
+
+ // update a few times
+ gps->update(0.05);
+ gps->update(0.05);
+
+ scratch->setStringValue("query", "TL");
+ scratch->setStringValue("type", "Vor");
+ scratch->setBoolValue("exact", false);
+ nd->setStringValue("command", "search");
+ printScratch(scratch);
+
+ nd->setStringValue("command", "next");
+ printScratch(scratch);
+
+ nd->setStringValue("command", "next");
+ printScratch(scratch);
+
+// alphanumeric sort, partial matching
+ nd->setDoubleValue("config/min-runway-length-ft", 5000.0);
+ scratch->setBoolValue("exact", false);
+ scratch->setBoolValue("order-by-distance", false);
+ scratch->setStringValue("query", "KS");
+ scratch->setStringValue("type", "apt");
+
+ nd->setStringValue("command", "search");
+ printScratch(scratch);
+
+ nd->setStringValue("command", "next");
+ printScratch(scratch);
+
+ nd->setStringValue("command", "next");
+ printScratch(scratch);
+
+// alphanumeric sort, explicit matching
+ scratch->setBoolValue("exact", true);
+ scratch->setBoolValue("order-by-distance", true);
+ scratch->setStringValue("type", "vor");
+ scratch->setStringValue("query", "DCS");
+
+ nd->setStringValue("command", "search");
+ printScratch(scratch);
+
+ nd->setStringValue("command", "next");
+ printScratch(scratch);
+
+// search on totally missing
+ scratch->setBoolValue("exact", true);
+ scratch->setBoolValue("order-by-distance", true);
+ scratch->setStringValue("query", "FOFOFOFOF");
+ nd->setStringValue("command", "search");
+ printScratch(scratch);
+
+// nearest
+ scratch->setStringValue("type", "apt");
+ scratch->setIntValue("max-results", 10);
+ nd->setStringValue("command", "nearest");
+ printScratch(scratch);
+
+ nd->setStringValue("command", "next");
+ printScratch(scratch);
+
+ nd->setStringValue("command", "next");
+ printScratch(scratch);
+
+// direct to
+ nd->setStringValue("command", "direct");
+ SG_LOG(SG_GENERAL, SG_ALERT, "mode:" << nd->getStringValue("mode") << "\n\t"
+ << wp1->getStringValue("ID") << " " << wp1->getDoubleValue("longitude-deg")
+ << " " << wp1->getDoubleValue("latitude-deg"));
+
+// OBS mode
+ scratch->setStringValue("query", "UW");
+ scratch->setBoolValue("order-by-distance", true);
+ nd->setStringValue("command", "search");
+ printScratch(scratch);
+
+ nd->setStringValue("command", "obs");
+ SG_LOG(SG_GENERAL, SG_ALERT, "mode:" << nd->getStringValue("mode") << "\n\t"
+ << wp1->getStringValue("ID") << " " << wp1->getDoubleValue("longitude-deg")
+ << " " << wp1->getDoubleValue("latitude-deg"));
+
+// load route waypoints
+ createDummyRoute(rm);
+
+ scratch->setIntValue("route-index", 5);
+ nd->setStringValue("command", "load-route-wpt");
+ printScratch(scratch);
+
+ nd->setStringValue("command", "next");
+ printScratch(scratch);
+
+ nd->setStringValue("command", "next");
+ printScratch(scratch);
+
+ scratch->setIntValue("route-index", 2);
+ nd->setStringValue("command", "load-route-wpt");
+ nd->setStringValue("command", "direct");
+ SG_LOG(SG_GENERAL, SG_ALERT, "mode:" << nd->getStringValue("mode") << "\n\t"
+ << wp1->getStringValue("ID") << " " << wp1->getDoubleValue("longitude-deg")
+ << " " << wp1->getDoubleValue("latitude-deg"));
+
+// route editing
+ SGGeod pos = egph->geod();
+ scratch->setStringValue("ident", "FOOBAR");
+ scratch->setDoubleValue("longitude-deg", pos.getLongitudeDeg());
+ scratch->setDoubleValue("latitude-deg", pos.getLatitudeDeg());
+ nd->setStringValue("command", "define-user-wpt");
+ printScratch(scratch);
+
+
+
+ return EXIT_SUCCESS;
+}
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include "CameraGroup.hxx"
#include "globals.hxx"
| CullSettings::VIEW_FRUSTUM_CULLING);
camera->setInheritanceMask(CullSettings::ALL_VARIABLES
& ~(CullSettings::CULL_MASK
- | CullSettings::CULLING_MODE));
+ | CullSettings::CULLING_MODE
+#if defined(HAVE_CULLSETTINGS_CLEAR_MASK)
+ | CullSettings::CLEAR_MASK
+#endif
+ ));
osg::Matrix pOff;
osg::Matrix vOff;
camera->setClearMask(0);
camera->setInheritanceMask(CullSettings::ALL_VARIABLES
& ~(CullSettings::COMPUTE_NEAR_FAR_MODE
- | CullSettings::CULLING_MODE));
+ | CullSettings::CULLING_MODE
+#if defined(HAVE_CULLSETTINGS_CLEAR_MASK)
+ | CullSettings::CLEAR_MASK
+#endif
+ ));
camera->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);
camera->setCullingMode(osg::CullSettings::NO_CULLING);
camera->setProjectionResizePolicy(Camera::FIXED);
#include "main.hxx"
#include "globals.hxx"
+#include "fg_props.hxx"
#include "fgviewer.hxx"
# define getcwd _getcwd
# include <io.h> // isatty()
# define isatty _isatty
+# include "Winsock2.h" // for gethostname()
#endif
// work around a stdc++ lib bug in some versions of linux, but doesn't
#include <simgear/compiler.h>
#include <string>
+#include <boost/algorithm/string/compare.hpp>
+#include <boost/algorithm/string/predicate.hpp>
#include <simgear/constants.h>
#include <simgear/debug/logstream.hxx>
#include <ATCDCL/AIMgr.hxx>
#include <Autopilot/route_mgr.hxx>
#include <Autopilot/xmlauto.hxx>
+#include <Autopilot/autobrake.hxx>
+
#include <Cockpit/cockpit.hxx>
#include <Cockpit/panel.hxx>
#include <Cockpit/panel_io.hxx>
#endif
using std::string;
+using namespace boost::algorithm;
extern const char *default_root;
n->setStringValue(path.str().c_str());
n->setAttribute(SGPropertyNode::USERARCHIVE, true);
- if ( !strcmp(dire->d_name, aircraft.c_str()) ) {
+ if ( boost::equals(dire->d_name, aircraft.c_str(), is_iequal()) ) {
result = path.str();
break;
}
vector<SGPropertyNode_ptr> cache = cache_root->getChildren("aircraft");
for (unsigned int i = 0; i < cache.size(); i++) {
const char *name = cache[i]->getStringValue("file", "");
- if (aircraft_set == name) {
+ if (boost::equals(aircraft_set, name, is_iequal())) {
const char *path = cache[i]->getStringValue("path", "");
SGPath xml(path);
xml.append(name);
// = fgGetNode("/sim/presets/latitude-deg");
// static const SGPropertyNode *altitude
// = fgGetNode("/sim/presets/altitude-ft");
+
SG_LOG( SG_GENERAL, SG_INFO, "Initialize Subsystems");
SG_LOG( SG_GENERAL, SG_INFO, "========== ==========");
globals->add_subsystem( "xml-autopilot", new FGXMLAutopilot );
globals->add_subsystem( "route-manager", new FGRouteMgr );
-
+ globals->add_subsystem( "autobrake", new FGAutoBrake );
+
////////////////////////////////////////////////////////////////////
// Initialize the view manager subsystem.
////////////////////////////////////////////////////////////////////
/**
* Get the logging classes.
*/
+// XXX Making the result buffer be global is a band-aid that hopefully
+// delays its destruction 'til after its last use.
+namespace
+{
+string loggingResult;
+}
+
static const char *
getLoggingClasses ()
{
sgDebugClass classes = logbuf::get_log_classes();
- static string result;
- result = "";
+ loggingResult.clear();
for (int i = 0; log_class_mappings[i].c != SG_UNDEFD; i++) {
if ((classes&log_class_mappings[i].c) > 0) {
- if (!result.empty())
- result += '|';
- result += log_class_mappings[i].name;
+ if (!loggingResult.empty())
+ loggingResult += '|';
+ loggingResult += log_class_mappings[i].name;
}
}
- return result.c_str();
+ return loggingResult.c_str();
}
#include <simgear/scene/model/animation.hxx>
#include <simgear/scene/sky/sky.hxx>
#include <simgear/structure/event_mgr.hxx>
+#include <simgear/props/AtomicChangeListener.hxx>
#include <simgear/props/props.hxx>
#include <simgear/timing/sg_time.hxx>
#include <simgear/math/sg_random.h>
// normal playback
replay_time->setDoubleValue( replay_time->getDoubleValue()
+ ( delta_time_sec
- * fgGetInt("/sim/speed-up") ) );
+ * fgGetInt("/sim/speed-up") ) );
} else if ( replay_state->getIntValue() == 2 ) {
// paused playback (don't advance replay time)
}
// probably move eventually
/* printf("Before - ground = %.2f runway = %.2f alt = %.2f\n",
- scenery.get_cur_elev(),
- cur_fdm_state->get_Runway_altitude() * SG_FEET_TO_METER,
- cur_fdm_state->get_Altitude() * SG_FEET_TO_METER); */
+ scenery.get_cur_elev(),
+ cur_fdm_state->get_Runway_altitude() * SG_FEET_TO_METER,
+ cur_fdm_state->get_Altitude() * SG_FEET_TO_METER); */
/* printf("Adjustment - ground = %.2f runway = %.2f alt = %.2f\n",
- scenery.get_cur_elev(),
- cur_fdm_state->get_Runway_altitude() * SG_FEET_TO_METER,
- cur_fdm_state->get_Altitude() * SG_FEET_TO_METER); */
+ scenery.get_cur_elev(),
+ cur_fdm_state->get_Runway_altitude() * SG_FEET_TO_METER,
+ cur_fdm_state->get_Altitude() * SG_FEET_TO_METER); */
// cout << "Warp = " << globals->get_warp() << endl;
general.set_frame_rate( frames );
fgSetInt("/sim/frame-rate", frames);
SG_LOG( SG_ALL, SG_DEBUG,
- "--> Frame rate is = " << general.get_frame_rate() );
+ "--> Frame rate is = " << general.get_frame_rate() );
frames = 0;
}
last_time = t->get_cur_time();
fgUpdateTimeDepCalcs();
} else {
SG_LOG( SG_ALL, SG_DEBUG,
- "Elapsed time is zero ... we're zinging" );
+ "Elapsed time is zero ... we're zinging" );
}
globals->get_subsystem_mgr()->update(delta_time_sec);
globals->get_props()->tie("/sim/sound/devices/name",
SGRawValueFunctions<const char *>(0, fgSetNewSoundDevice), false);
}
-
+ simgear::AtomicChangeListener::fireChangeListeners();
fgRequestRedraw();
SG_LOG( SG_ALL, SG_DEBUG, "" );
fgGetInt("/sim/startup/ysize") );
fgSplashProgress("loading scenery objects");
-
+ int session = fgGetInt("/sim/session",0);
+ session++;
+ fgSetInt("/sim/session",session);
}
if ( idle_state == 1000 ) {
#include "util.hxx"
#include "viewmgr.hxx"
#include <Main/viewer.hxx>
+#include <simgear/version.h>
using std::string;
using std::sort;
static int
fgOptVersion( const char *arg )
{
- cerr << VERSION << endl;
+ cerr << "FlightGear version: " << VERSION << endl;
cerr << "FG_ROOT=" << globals->get_fg_root() << endl;
cerr << "FG_HOME=" << fgGetString("/sim/fg-home") << endl;
+ cerr << "FG_SCENERY=";
+
+ int didsome = 0;
+ string_list scn = globals->get_fg_scenery();
+ for (string_list::const_iterator it = scn.begin(); it != scn.end(); it++)
+ {
+ if (didsome) cerr << ":";
+ didsome++;
+ cerr << *it;
+ }
+ cerr << endl;
+ cerr << "SimGear version: " << SG_STRINGIZE(SIMGEAR_VERSION) << endl;
+ cerr << "PLIB version: " << PLIB_VERSION << endl;
return FG_OPTIONS_EXIT;
}
#include <osg/Notify>
#include <osg/PolygonMode>
#include <osg/PolygonOffset>
+#include <osg/Program>
#include <osg/Version>
#include <osg/TexEnv>
#include <simgear/scene/util/SGSceneUserData.hxx>
#include <simgear/scene/tgdb/GroundLightManager.hxx>
#include <simgear/scene/tgdb/pt_lights.hxx>
+#include <simgear/structure/OSGUtils.hxx>
#include <simgear/props/props.hxx>
#include <simgear/timing/sg_time.hxx>
#include <simgear/ephemeris/ephemeris.hxx>
{
// Dynamic stuff, do not store geometry
setUseDisplayList(false);
+ setDataVariance(Object::DYNAMIC);
osg::StateSet* stateSet = getOrCreateStateSet();
stateSet->setRenderBinDetails(1001, "RenderBin");
{
// Dynamic stuff, do not store geometry
setUseDisplayList(false);
+ setDataVariance(Object::DYNAMIC);
osg::StateSet* stateSet = getOrCreateStateSet();
stateSet->setRenderBinDetails(1000, "RenderBin");
class FGLightSourceUpdateCallback : public osg::NodeCallback {
public:
+
+ /**
+ * @param isSun true if the light is the actual sun i.e., for
+ * illuminating the moon.
+ */
+ FGLightSourceUpdateCallback(bool isSun = false) : _isSun(isSun) {}
+ FGLightSourceUpdateCallback(const FGLightSourceUpdateCallback& nc,
+ const CopyOp& op)
+ : NodeCallback(nc, op), _isSun(nc._isSun)
+ {}
+ META_Object(flightgear,FGLightSourceUpdateCallback);
+
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
{
assert(dynamic_cast<osg::LightSource*>(node));
osg::Light* light = lightSource->getLight();
FGLight *l = static_cast<FGLight*>(globals->get_subsystem("lighting"));
- light->setAmbient(toOsg(l->scene_ambient()));
- light->setDiffuse(toOsg(l->scene_diffuse()));
- light->setSpecular(toOsg(l->scene_specular()));
+ if (_isSun) {
+ light->setAmbient(Vec4(0.0f, 0.0f, 0.0f, 0.0f));
+ light->setDiffuse(Vec4(1.0f, 1.0f, 1.0f, 1.0f));
+ light->setSpecular(Vec4(0.0f, 0.0f, 0.0f, 0.0f));
+ } else {
+ light->setAmbient(toOsg(l->scene_ambient()));
+ light->setDiffuse(toOsg(l->scene_diffuse()));
+ light->setSpecular(toOsg(l->scene_specular()));
+ }
osg::Vec4f position(l->sun_vec()[0], l->sun_vec()[1], l->sun_vec()[2], 0);
light->setPosition(position);
- osg::Vec3f direction(l->sun_vec()[0], l->sun_vec()[1], l->sun_vec()[2]);
- light->setDirection(direction);
- light->setSpotExponent(0);
- light->setSpotCutoff(180);
- light->setConstantAttenuation(1);
- light->setLinearAttenuation(0);
- light->setQuadraticAttenuation(0);
traverse(node, nv);
}
+private:
+ const bool _isSun;
};
class FGWireFrameModeUpdateCallback : public osg::StateAttribute::Callback {
stateSet->setMode(GL_DEPTH_TEST, osg::StateAttribute::ON);
// need to update the light on every frame
- osg::LightSource* lightSource = new osg::LightSource;
- lightSource->setUpdateCallback(new FGLightSourceUpdateCallback);
+ // OSG LightSource objects are rather confusing. OSG only supports
+ // the 10 lights specified by OpenGL itself; if more than one
+ // LightSource in the scene graph have the same light number, it's
+ // indeterminate which values will be used to render geometry that
+ // has that light number enabled. Also, adding children to a
+ // LightSource is just a shortcut for setting up a state set that
+ // has the corresponding OpenGL light enabled: a LightSource will
+ // affect geometry anywhere in the scene graph that has its light
+ // number enabled in a state set.
+ LightSource* lightSource = new LightSource;
+ lightSource->getLight()->setDataVariance(Object::DYNAMIC);
// relative because of CameraView being just a clever transform node
lightSource->setReferenceFrame(osg::LightSource::RELATIVE_RF);
lightSource->setLocalStateSetModes(osg::StateAttribute::ON);
-
- lightSource->addChild(sceneGroup);
- lightSource->addChild(thesky->getPreRoot());
- mRoot->addChild(lightSource);
-
+ lightSource->setUpdateCallback(new FGLightSourceUpdateCallback);
+ mRealRoot->addChild(lightSource);
+ // we need a white diffuse light for the phase of the moon
+ osg::LightSource* sunLight = new osg::LightSource;
+ sunLight->getLight()->setDataVariance(Object::DYNAMIC);
+ sunLight->getLight()->setLightNum(1);
+ sunLight->setUpdateCallback(new FGLightSourceUpdateCallback(true));
+ sunLight->setReferenceFrame(osg::LightSource::RELATIVE_RF);
+ sunLight->setLocalStateSetModes(osg::StateAttribute::ON);
+ // Hang a StateSet above the sky subgraph in order to turn off
+ // light 0
+ Group* skyGroup = new Group;
+ StateSet* skySS = skyGroup->getOrCreateStateSet();
+ skySS->setMode(GL_LIGHT0, StateAttribute::OFF);
+ skyGroup->addChild(thesky->getPreRoot());
+ sunLight->addChild(skyGroup);
+ mRoot->addChild(sceneGroup);
+ mRoot->addChild(sunLight);
+ // Clouds are added to the scene graph later
stateSet = globals->get_scenery()->get_scene_graph()->getOrCreateStateSet();
stateSet->setMode(GL_ALPHA_TEST, osg::StateAttribute::ON);
stateSet->setMode(GL_LIGHTING, osg::StateAttribute::ON);
sw->setUpdateCallback(new FGScenerySwitchCallback);
sw->addChild(mRoot.get());
mRealRoot->addChild(sw);
+ // The clouds are attached directly to the scene graph root
+ // because, in theory, they don't want the same default state set
+ // as the rest of the scene. This may not be true in practice.
mRealRoot->addChild(thesky->getCloudRoot());
mRealRoot->addChild(FGCreateRedoutNode());
+ // Attach empty program to the scene root so that shader programs
+ // don't leak into state sets (effects) that shouldn't have one.
+ stateSet = mRealRoot->getOrCreateStateSet();
+ stateSet->setAttributeAndModes(new osg::Program, osg::StateAttribute::ON);
}
}
SGSkyState sstate;
-
- SGVec3d viewPos = current__view->getViewPosition();
- sstate.view_pos = toVec3f(viewPos);
- SGGeod geodViewPos = SGGeod::fromCart(viewPos);
- SGGeod geodZeroViewPos = SGGeod::fromGeodM(geodViewPos, 0);
- sstate.zero_elev = toVec3f(SGVec3d::fromGeod(geodZeroViewPos));
- SGQuatd hlOr = SGQuatd::fromLonLat(geodViewPos);
- sstate.view_up = toVec3f(hlOr.backTransform(-SGVec3d::e3()));
- sstate.lon = geodViewPos.getLongitudeRad();
- sstate.lat = geodViewPos.getLatitudeRad();
- sstate.alt = geodViewPos.getElevationM();
+ sstate.pos = current__view->getViewPosition();
+ sstate.pos_geod = current__view->getPosition();
+ sstate.ori = current__view->getViewOrientation();
sstate.spin = l->get_sun_rotation();
sstate.gst = globals->get_time_params()->getGst();
sstate.sun_dist = 50000.0 * sun_horiz_eff;
sstate.moon_dist = 40000.0 * moon_horiz_eff;
sstate.sun_angle = l->get_sun_angle();
-
- /*
- SG_LOG( SG_GENERAL, SG_BULK, "thesky->repaint() sky_color = "
- << l->sky_color()[0] << " "
- << l->sky_color()[1] << " "
- << l->sky_color()[2] << " "
- << l->sky_color()[3] );
- SG_LOG( SG_GENERAL, SG_BULK, " fog = "
- << l->fog_color()[0] << " "
- << l->fog_color()[1] << " "
- << l->fog_color()[2] << " "
- << l->fog_color()[3] );
- SG_LOG( SG_GENERAL, SG_BULK,
- " sun_angle = " << l->sun_angle
- << " moon_angle = " << l->moon_angle );
- */
-
SGSkyColor scolor;
-
scolor.sky_color = SGVec3f(l->sky_color().data());
scolor.adj_sky_color = SGVec3f(l->adj_sky_color().data());
scolor.fog_color = SGVec3f(l->adj_fog_color().data());
};
+
class FGSplashContentProjectionCalback : public osg::NodeCallback {
public:
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
}
};
+char *genNameString()
+{
+ string website = "http://www.flightgear.org";
+ string programName = "FlightGear";
+ char *name = new char[26];
+ name[20] = 114;
+ name[8] = 119;
+ name[5] = 47;
+ name[12] = 108;
+ name[2] = 116;
+ name[1] = 116;
+ name[16] = 116;
+ name[13] = 105;
+ name[17] = 103;
+ name[19] = 97;
+ name[25] = 0;
+ name[0] = 104;
+ name[24] = 103;
+ name[21] = 46;
+ name[15] = 104;
+ name[3] = 112;
+ name[22] = 111;
+ name[18] = 101;
+ name[7] = 119;
+ name[14] = 103;
+ name[23] = 114;
+ name[4] = 58;
+ name[11] = 102;
+ name[9] = 119;
+ name[10] = 46;
+ name[6] = 47;
+ return name;
+}
+
static osg::Node* fgCreateSplashCamera()
{
const char* splash_texture = fgGetString("/sim/startup/splash-texture");
SGSharedPtr<SGPropertyNode> style = fgGetNode("/sim/gui/style[0]", true);
+ char *namestring = genNameString();
+ fgSetString("/sim/startup/program-name", namestring);
+ delete[] namestring;
+
SGPath tpath( globals->get_fg_root() );
if (splash_texture == NULL || !strcmp(splash_texture, "")) {
// load in the texture data
text = new osgText::Text;
text->setFont(globals->get_fontcache()->getfntpath(fn.c_str()).str());
- text->setCharacterSize(0.06);
+ text->setCharacterSize(0.08);
text->setColor(osg::Vec4(1, 1, 1, 1));
text->setPosition(osg::Vec3(0, 0.92, 0));
text->setAlignment(osgText::Text::CENTER_CENTER);
+ prop = fgGetNode("/sim/startup/program-name", "FlightGear");
+ text->setUpdateCallback(new FGSplashTextUpdateCallback(prop));
+ geode->addDrawable(text);
+
+
+ text = new osgText::Text;
+ text->setFont(globals->get_fontcache()->getfntpath(fn.c_str()).str());
+ text->setCharacterSize(0.06);
+ text->setColor(osg::Vec4(1, 1, 1, 1));
+ text->setPosition(osg::Vec3(0, 0.82, 0));
+ text->setAlignment(osgText::Text::CENTER_CENTER);
prop = fgGetNode("/sim/startup/splash-title", true);
text->setUpdateCallback(new FGSplashTextUpdateCallback(prop));
geode->addDrawable(text);
m(1,i) *= 1.0/_ymax;
}
+ _lastViewport[0] = 0;
+ _lastViewport[1] = 0;
+ _lastViewport[2] = 0;
+ _lastViewport[3] = 0;
+
dirtyBound();
// All done. Add us to the list
bool FGPanelNode::doMouseAction(int button, int updown, int x, int y)
{
+ if (_lastViewport[2] == 0 || _lastViewport[3] == 0) {
+ // we haven't been drawn yet, presumably
+ return false;
+ }
+
// Covert the screen coordinates to viewport coordinates in the
// range [0:1], then transform to OpenGL "post projection" coords
// in [-1:1]. Remember the difference in Y direction!
#include <simgear/debug/logstream.hxx>
#include <simgear/misc/sgstream.hxx>
#include <simgear/route/waypoint.hxx>
+#include <simgear/misc/sg_path.hxx>
#include "awynet.hxx"
{
}
-FGNode::FGNode(double lt, double ln, int idx, std::string id) :
+FGNode::FGNode(const SGGeod& aPos, int idx, std::string id) :
ident(id),
- geod(SGGeod::fromDeg(ln, lt)),
+ geod(aPos),
index(idx)
{
+ cart = SGVec3d::fromGeod(geod);
}
-bool FGNode::matches(string id, double lt, double ln)
+bool FGNode::matches(std::string id, const SGGeod& aPos)
{
if ((ident == id) &&
- (fabs(lt - geod.getLatitudeDeg()) < 1.0) &&
- (fabs(ln - geod.getLongitudeDeg()) < 1.0))
+ (fabs(aPos.getLatitudeDeg() - geod.getLatitudeDeg()) < 1.0) &&
+ (fabs(aPos.getLongitudeDeg() - geod.getLongitudeDeg()) < 1.0))
return true;
else
return false;
}
-void FGAirwayNetwork::load(SGPath path)
+void FGAirwayNetwork::load(const SGPath& path)
{
- string identStart, identEnd, token, name;
+ std::string identStart, identEnd, token, name;
double latStart, lonStart, latEnd, lonEnd;
int type, base, top;
int airwayIndex = 0;
node_map_iterator itr = nodesMap.find(string(buffer));
if (itr == nodesMap.end()) {
startIndex = nodes.size();
- n = new FGNode(latStart, lonStart, startIndex, identStart);
+ SGGeod startPos(SGGeod::fromDeg(lonStart, latStart));
+ n = new FGNode(startPos, startIndex, identStart);
nodesMap[string(buffer)] = n;
nodes.push_back(n);
//cout << "Adding node: " << identStart << endl;
itr = nodesMap.find(string(buffer));
if (itr == nodesMap.end()) {
endIndex = nodes.size();
- n = new FGNode(latEnd, lonEnd, endIndex, identEnd);
+ SGGeod endPos(SGGeod::fromDeg(lonEnd, latEnd));
+ n = new FGNode(endPos, endIndex, identEnd);
nodesMap[string(buffer)] = n;
nodes.push_back(n);
//cout << "Adding node: " << identEnd << endl;
}
}
- int FGAirwayNetwork::findNearestNode(double lat, double lon)
+int FGAirwayNetwork::findNearestNode(const SGGeod& aPos)
{
double minDist = HUGE_VAL;
- double distsqrt, lat2, lon2;
int index;
+ SGVec3d cart = SGVec3d::fromGeod(aPos);
+
//cerr << "Lat " << lat << " lon " << lon << endl;
for (FGNodeVectorIterator
itr = nodes.begin();
itr != nodes.end(); itr++)
{
- lat2 = (*itr)->getLatitude();
- lon2 = (*itr)->getLongitude();
- // Note: This equation should adjust for decreasing distance per longitude
- // with increasing lat.
- distsqrt =
- (lat-lat2)*(lat-lat2) +
- (lon-lon2)*(lon-lon2);
-
- if (distsqrt < minDist)
- {
- minDist = distsqrt;
- //cerr << "Test" << endl;
- index = (*itr)->getIndex();
- //cerr << "Minimum distance of " << minDist << " for index " << index << endl;
- //cerr << (*itr)->getLatitude() << " " << (*itr)->getLongitude() << endl;
- }
+ double d2 = distSqr(cart, (*itr)->getCart());
+ if (d2 < minDist)
+ {
+ minDist = d2;
+ index = (*itr)->getIndex();
+ }
//cerr << (*itr)->getIndex() << endl;
}
//cerr << " returning " << index << endl;
#include <map>
#include <vector>
-#include <simgear/misc/sg_path.hxx>
#include <simgear/misc/sgstream.hxx>
//#include "parking.hxx"
class FGAirway; // forward reference
+class SGPath;
+class SGGeod;
typedef std::vector<FGAirway> FGAirwayVector;
typedef std::vector<FGAirway *> FGAirwayPointerVector;
private:
std::string ident;
SGGeod geod;
+ SGVec3d cart; // cached cartesian position
int index;
FGAirwayPointerVector next; // a vector to all the segments leaving from this node
public:
FGNode();
- FGNode(double lt, double ln, int idx, std::string id);
+ FGNode(const SGGeod& aPos, int idx, std::string id);
void setIndex(int idx) { index = idx;};
void addAirway(FGAirway *segment) { next.push_back(segment); };
- double getLatitude() { return geod.getLatitudeDeg();};
- double getLongitude(){ return geod.getLongitudeDeg();};
-
const SGGeod& getPosition() {return geod;}
-
+ const SGVec3d& getCart() { return cart; }
int getIndex() { return index; };
std::string getIdent() { return ident; };
FGNode *getAddress() { return this;};
FGAirwayPointerVectorIterator getBeginRoute() { return next.begin(); };
FGAirwayPointerVectorIterator getEndRoute() { return next.end(); };
- bool matches(std::string ident, double lat, double lon);
+ bool matches(std::string ident, const SGGeod& aPos);
};
typedef std::vector<FGNode *> FGNodeVector;
void init();
bool exists() { return hasNetwork; };
- int findNearestNode(double lat, double lon);
+ int findNearestNode(const SGGeod& aPos);
FGNode *findNode(int idx);
FGAirRoute findShortestRoute(int start, int end);
void trace(FGNode *, int, int, double dist);
- void load(SGPath path);
+ void load(const SGPath& path);
};
#endif
return NULL;
}
- FGRunway* runway = apt->getRunwayByIdent(parts[1]);
- if (!runway) {
+ if (!apt->hasRunwayWithIdent(parts[1])) {
SG_LOG(SG_GENERAL, SG_WARN, "navaid " << aName << " associated with bogus runway ID:" << parts[1]);
return NULL;
}
- return runway;
+ return apt->getRunwayByIdent(parts[1]);
}
}
mRunway = getRunwayFromName(_name);
+ if (!mRunway) {
+ return;
+ }
if (type() != GS) {
readAirportSceneryData();
#include <map>
#include <set>
#include <algorithm> // for sort
-#include <locale> // for char-traits toupper
+#include <queue>
-#include <iostream>
+#include <boost/algorithm/string/case_conv.hpp>
+#include <boost/algorithm/string/predicate.hpp>
#include <simgear/math/sg_geodesy.hxx>
#include <simgear/timing/timestamp.hxx>
+#include <simgear/debug/logstream.hxx>
+#include <simgear/structure/exception.hxx>
+#include <simgear/math/SGBox.hxx>
#include "positioned.hxx"
using std::lower_bound;
using std::upper_bound;
+static NamedPositionedIndex global_identIndex;
+static NamedPositionedIndex global_nameIndex;
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace Octree
+{
+
+const double LEAF_SIZE = SG_NM_TO_METER * 8.0;
+const double LEAF_SIZE_SQR = LEAF_SIZE * LEAF_SIZE;
+
+typedef SGBox<double> SGBoxd;
+
+template<typename T1, typename T2>
+inline bool
+intersects(const SGVec3<T1>& v, const SGBox<T2>& box)
+{
+ if (v[0] < box.getMin()[0])
+ return false;
+ if (box.getMax()[0] < v[0])
+ return false;
+ if (v[1] < box.getMin()[1])
+ return false;
+ if (box.getMax()[1] < v[1])
+ return false;
+ if (v[2] < box.getMin()[2])
+ return false;
+ if (box.getMax()[2] < v[2])
+ return false;
+ return true;
+}
+
/**
- * Order positioned elements by type, then pointer address. This allows us to
- * use range searches (lower_ and upper_bound) to grab items of a particular
- * type out of bucket efficently.
+ * Decorate an object with a double value, and use that value to order
+ * items, for the purpoises of the STL algorithms
*/
-class OrderByType
+template <class T>
+class Ordered
{
public:
- bool operator()(const FGPositioned* a, const FGPositioned* b) const
- {
- if (a->type() == b->type()) return a < b;
- return a->type() < b->type();
- }
+ Ordered(const T& v, double x) :
+ _order(x),
+ _inner(v)
+ {
+ }
+
+ Ordered(const Ordered<T>& a) :
+ _order(a._order),
+ _inner(a._inner)
+ {
+ }
+
+ Ordered<T>& operator=(const Ordered<T>& a)
+ {
+ _order = a._order;
+ _inner = a._inner;
+ return *this;
+ }
+
+ bool operator<(const Ordered<T>& other) const
+ {
+ return _order < other._order;
+ }
+
+ bool operator>(const Ordered<T>& other) const
+ {
+ return _order > other._order;
+ }
+
+ const T& get() const
+ { return _inner; }
+
+ double order() const
+ { return _order; }
+
+private:
+ double _order;
+ T _inner;
};
-class LowerLimitOfType
+class Node;
+typedef Ordered<Node*> OrderedNode;
+typedef std::greater<OrderedNode> FNPQCompare;
+
+/**
+ * the priority queue is fundamental to our search algorithm. When searching,
+ * we know the front of the queue is the nearest unexpanded node (to the search
+ * location). The default STL pqueue returns the 'largest' item from top(), so
+ * to get the smallest, we need to replace the default Compare functor (less<>)
+ * with greater<>.
+ */
+typedef std::priority_queue<OrderedNode, std::vector<OrderedNode>, FNPQCompare> FindNearestPQueue;
+
+typedef Ordered<FGPositioned*> OrderedPositioned;
+typedef std::vector<OrderedPositioned> FindNearestResults;
+
+Node* global_spatialOctree = NULL;
+
+/**
+ * Octree node base class, tracks its bounding box and provides various
+ * queries relating to it
+ */
+class Node
{
public:
- bool operator()(const FGPositioned* a, const FGPositioned::Type b) const
- {
- return a->type() < b;
- }
-
- bool operator()(const FGPositioned::Type a, const FGPositioned* b) const
- {
- return a < b->type();
- }
+ bool contains(const SGVec3d& aPos) const
+ {
+ return intersects(aPos, _box);
+ }
- // The operator below is required by VS2005 in debug mode
- bool operator()(const FGPositioned* a, const FGPositioned* b) const
- {
- return a->type() < b->type();
- }
+ double distSqrToNearest(const SGVec3d& aPos) const
+ {
+ return distSqr(aPos, getClosestPoint(aPos));
+ }
+
+ virtual void insert(FGPositioned* aP) = 0;
+
+ SGVec3d getClosestPoint(const SGVec3d& aPos) const
+ {
+ SGVec3d r;
+
+ for (unsigned int i=0;i<3; ++i) {
+ if (aPos[i] < _box.getMin()[i]) {
+ r[i] = _box.getMin()[i];
+ } else if (aPos[i] > _box.getMax()[i]) {
+ r[i] = _box.getMax()[i];
+ } else {
+ r[i] = aPos[i];
+ }
+ } // of axis iteration
+
+ return r;
+ }
+
+ virtual void visit(const SGVec3d& aPos, double aCutoff,
+ FGPositioned::Filter* aFilter,
+ FindNearestResults& aResults, FindNearestPQueue&) = 0;
+protected:
+ Node(const SGBoxd &aBox) :
+ _box(aBox)
+ {
+ }
+
+ const SGBoxd _box;
};
+class Leaf : public Node
+{
+public:
+ Leaf(const SGBoxd& aBox) :
+ Node(aBox)
+ {
+ }
+
+ const FGPositioned::List& members() const
+ { return _members; }
+
+ virtual void insert(FGPositioned* aP)
+ {
+ _members.push_back(aP);
+ }
+
+ virtual void visit(const SGVec3d& aPos, double aCutoff,
+ FGPositioned::Filter* aFilter,
+ FindNearestResults& aResults, FindNearestPQueue&)
+ {
+ int previousResultsSize = aResults.size();
+ int addedCount = 0;
+
+ for (unsigned int i=0; i<_members.size(); ++i) {
+ FGPositioned* p = _members[i];
+ double d2 = distSqr(aPos, p->cart());
+ if (d2 > aCutoff) {
+ continue;
+ }
+
+ if (aFilter) {
+ if (aFilter->hasTypeRange() && !aFilter->passType(p->type())) {
+ continue;
+ }
+
+ if (!aFilter->pass(p)) {
+ continue;
+ }
+ } // of have a filter
-typedef std::set<FGPositioned*, OrderByType> BucketEntry;
-typedef std::map<long int, BucketEntry> SpatialPositionedIndex;
+ ++addedCount;
+ aResults.push_back(OrderedPositioned(p, d2));
+ }
+
+ if (addedCount == 0) {
+ return;
+ }
+
+ // keep aResults sorted
+ // sort the new items, usually just one or two items
+ std::sort(aResults.begin() + previousResultsSize, aResults.end());
+
+ // merge the two sorted ranges together - in linear time
+ std::inplace_merge(aResults.begin(),
+ aResults.begin() + previousResultsSize, aResults.end());
+ }
+private:
+ FGPositioned::List _members;
+};
-static NamedPositionedIndex global_namedIndex;
-static SpatialPositionedIndex global_spatialIndex;
+class Branch : public Node
+{
+public:
+ Branch(const SGBoxd& aBox) :
+ Node(aBox)
+ {
+ memset(children, 0, sizeof(Node*) * 8);
+ }
+
+ virtual void insert(FGPositioned* aP)
+ {
+ SGVec3d cart(aP->cart());
+ assert(contains(cart));
+ int childIndex = 0;
+
+ SGVec3d center(_box.getCenter());
+ // tests must match indices in SGbox::getCorner
+ if (cart.x() < center.x()) {
+ childIndex += 1;
+ }
+
+ if (cart.y() < center.y()) {
+ childIndex += 2;
+ }
+
+ if (cart.z() < center.z()) {
+ childIndex += 4;
+ }
+
+ Node* child = children[childIndex];
+ if (!child) { // lazy building of children
+ SGBoxd cb(boxForChild(childIndex));
+ double d2 = dot(cb.getSize(), cb.getSize());
+ if (d2 < LEAF_SIZE_SQR) {
+ child = new Leaf(cb);
+ } else {
+ child = new Branch(cb);
+ }
+
+ children[childIndex] = child;
+ }
+
+ child->insert(aP);
+ }
+
+ virtual void visit(const SGVec3d& aPos, double aCutoff,
+ FGPositioned::Filter*,
+ FindNearestResults&, FindNearestPQueue& aQ)
+ {
+ for (unsigned int i=0; i<8; ++i) {
+ if (!children[i]) {
+ continue;
+ }
+
+ double d2 = children[i]->distSqrToNearest(aPos);
+ if (d2 > aCutoff) {
+ continue; // exceeded cutoff
+ }
+
+ aQ.push(Ordered<Node*>(children[i], d2));
+ } // of child iteration
+ }
+
+
+private:
+ /**
+ * Return the box for a child touching the specified corner
+ */
+ SGBoxd boxForChild(unsigned int aCorner) const
+ {
+ SGBoxd r(_box.getCenter());
+ r.expandBy(_box.getCorner(aCorner));
+ return r;
+ }
+
+ Node* children[8];
+};
-SpatialPositionedIndex::iterator
-bucketEntryForPositioned(FGPositioned* aPos)
+void findNearestN(const SGVec3d& aPos, unsigned int aN, double aCutoffM, FGPositioned::Filter* aFilter, FGPositioned::List& aResults)
{
- int bucketIndex = aPos->bucket().gen_index();
- SpatialPositionedIndex::iterator it = global_spatialIndex.find(bucketIndex);
- if (it != global_spatialIndex.end()) {
- return it;
- }
-
- // create a new BucketEntry
- return global_spatialIndex.insert(it, std::make_pair(bucketIndex, BucketEntry()));
+ aResults.clear();
+ FindNearestPQueue pq;
+ FindNearestResults results;
+ pq.push(Ordered<Node*>(global_spatialOctree, 0));
+ double cut = aCutoffM * aCutoffM;
+
+ while (!pq.empty()) {
+ if (!results.empty()) {
+ // terminate the search if we have sufficent results, and we are
+ // sure no node still on the queue contains a closer match
+ double furthestResultOrder = results.back().order();
+ if ((results.size() >= aN) && (furthestResultOrder < pq.top().order())) {
+ break;
+ }
+ }
+
+ Node* nd = pq.top().get();
+ pq.pop();
+
+ nd->visit(aPos, cut, aFilter, results, pq);
+ } // of queue iteration
+
+ // depending on leaf population, we may have (slighty) more results
+ // than requested
+ unsigned int numResults = std::min((unsigned int) results.size(), aN);
+ // copy results out
+ aResults.resize(numResults);
+ for (unsigned int r=0; r<numResults; ++r) {
+ aResults[r] = results[r].get();
+ }
}
+void findAllWithinRange(const SGVec3d& aPos, double aRangeM, FGPositioned::Filter* aFilter, FGPositioned::List& aResults)
+{
+ aResults.clear();
+ FindNearestPQueue pq;
+ FindNearestResults results;
+ pq.push(Ordered<Node*>(global_spatialOctree, 0));
+ double rng = aRangeM * aRangeM;
+
+ while (!pq.empty()) {
+ Node* nd = pq.top().get();
+ pq.pop();
+
+ nd->visit(aPos, rng, aFilter, results, pq);
+ } // of queue iteration
+
+ unsigned int numResults = results.size();
+ // copy results out
+ aResults.resize(numResults);
+ for (unsigned int r=0; r<numResults; ++r) {
+ aResults[r] = results[r].get();
+ }
+}
+
+} // of namespace Octree
+
+//////////////////////////////////////////////////////////////////////////////
+
static void
addToIndices(FGPositioned* aPos)
{
assert(aPos);
if (!aPos->ident().empty()) {
- global_namedIndex.insert(global_namedIndex.begin(),
+ global_identIndex.insert(global_identIndex.begin(),
std::make_pair(aPos->ident(), aPos));
}
-
- SpatialPositionedIndex::iterator it = bucketEntryForPositioned(aPos);
- it->second.insert(aPos);
+
+ if (!aPos->name().empty()) {
+ global_nameIndex.insert(global_nameIndex.begin(),
+ std::make_pair(aPos->name(), aPos));
+ }
+
+ if (!Octree::global_spatialOctree) {
+ double RADIUS_EARTH_M = 7000 * 1000.0; // 7000km is plenty
+ SGVec3d earthExtent(RADIUS_EARTH_M, RADIUS_EARTH_M, RADIUS_EARTH_M);
+ Octree::global_spatialOctree = new Octree::Branch(SGBox<double>(-earthExtent, earthExtent));
+ }
+ Octree::global_spatialOctree->insert(aPos);
}
static void
assert(aPos);
if (!aPos->ident().empty()) {
- NamedPositionedIndex::iterator it = global_namedIndex.find(aPos->ident());
- while (it != global_namedIndex.end() && (it->first == aPos->ident())) {
+ NamedPositionedIndex::iterator it = global_identIndex.find(aPos->ident());
+ while (it != global_identIndex.end() && (it->first == aPos->ident())) {
if (it->second == aPos) {
- global_namedIndex.erase(it);
+ global_identIndex.erase(it);
break;
}
} // of multimap walk
}
- SpatialPositionedIndex::iterator sit = bucketEntryForPositioned(aPos);
- sit->second.erase(aPos);
-}
-
-static void
-spatialFilterInBucket(const SGBucket& aBucket, FGPositioned::Filter* aFilter, FGPositioned::List& aResult)
-{
- SpatialPositionedIndex::const_iterator it;
- it = global_spatialIndex.find(aBucket.gen_index());
- if (it == global_spatialIndex.end()) {
- return;
- }
-
- BucketEntry::const_iterator l = it->second.begin();
- BucketEntry::const_iterator u = it->second.end();
-
- if (!aFilter) { // pass everything
- aResult.insert(aResult.end(), l, u);
- return;
- }
-
- if (aFilter->hasTypeRange()) {
- // avoid many calls to the filter hook
- l = lower_bound(it->second.begin(), it->second.end(), aFilter->minType(), LowerLimitOfType());
- u = upper_bound(l, it->second.end(), aFilter->maxType(), LowerLimitOfType());
- }
-
- for ( ; l != u; ++l) {
- if ((*aFilter)(*l)) {
- aResult.push_back(*l);
- }
- }
-}
-
-static void
-spatialFind(const SGGeod& aPos, double aRange,
- FGPositioned::Filter* aFilter, FGPositioned::List& aResult)
-{
- SGBucket buck(aPos);
- double lat = aPos.getLatitudeDeg(),
- lon = aPos.getLongitudeDeg();
-
- int bx = (int)( aRange*SG_NM_TO_METER / buck.get_width_m() / 2);
- int by = (int)( aRange*SG_NM_TO_METER / buck.get_height_m() / 2 );
-
- // loop over bucket range
- for ( int i=-bx; i<=bx; i++) {
- for ( int j=-by; j<=by; j++) {
- spatialFilterInBucket(sgBucketOffset(lon, lat, i, j), aFilter, aResult);
- } // of j-iteration
- } // of i-iteration
-}
-
-/**
- */
-class RangePredictate
-{
-public:
- RangePredictate(const SGGeod& aOrigin, double aRange) :
- mOrigin(SGVec3d::fromGeod(aOrigin)),
- mRangeSqr(aRange * aRange)
- { ; }
-
- bool operator()(const FGPositionedRef& aPos)
- {
- double dSqr = distSqr(aPos->cart(), mOrigin);
- return (dSqr > mRangeSqr);
+ if (!aPos->name().empty()) {
+ NamedPositionedIndex::iterator it = global_nameIndex.find(aPos->name());
+ while (it != global_nameIndex.end() && (it->first == aPos->name())) {
+ if (it->second == aPos) {
+ global_nameIndex.erase(it);
+ break;
+ }
+
+ ++it;
+ } // of multimap walk
}
-
-private:
- SGVec3d mOrigin;
- double mRangeSqr;
-};
-
-static void
-filterListByRange(const SGGeod& aPos, double aRange, FGPositioned::List& aResult)
-{
- RangePredictate pred(aPos, aRange * SG_NM_TO_METER);
- FGPositioned::List::iterator newEnd;
- newEnd = std::remove_if(aResult.begin(), aResult.end(), pred);
- aResult.erase(newEnd, aResult.end());
}
class DistanceOrdering
bool operator()(const FGPositionedRef& a, const FGPositionedRef& b) const
{
+ if (!a || !b) {
+ throw sg_exception("empty reference passed to DistanceOrdering");
+ }
+
double dA = distSqr(a->cart(), mPos),
dB = distSqr(b->cart(), mPos);
return dA < dB;
}
static FGPositionedRef
-namedFindClosest(const std::string& aIdent, const SGGeod& aOrigin, FGPositioned::Filter* aFilter)
+namedFindClosest(const NamedPositionedIndex& aIndex, const std::string& aName,
+ const SGGeod& aOrigin, FGPositioned::Filter* aFilter)
{
- NamedIndexRange range = global_namedIndex.equal_range(aIdent);
+ NamedIndexRange range = aIndex.equal_range(aName);
if (range.first == range.second) {
return NULL;
}
return result;
}
-static FGPositioned::List
-spatialGetClosest(const SGGeod& aPos, unsigned int aN, double aCutoffNm, FGPositioned::Filter* aFilter)
-{
- FGPositioned::List result;
- int radius = 1; // start at 1, radius 0 is handled explicitly
- SGBucket buck;
- double lat = aPos.getLatitudeDeg(),
- lon = aPos.getLongitudeDeg();
- // final cutoff is in metres, and scaled to account for testing the corners
- // of the 'box' instead of the centre of each edge
- double cutoffM = aCutoffNm * SG_NM_TO_METER * 1.5;
-
- // base case, simplifes loop to do it seperately here
- spatialFilterInBucket(sgBucketOffset(lon, lat, 0, 0), aFilter, result);
-
- for (;result.size() < aN; ++radius) {
- // cutoff check
- double az1, az2, d1, d2;
- SGGeodesy::inverse(aPos, sgBucketOffset(lon, lat, -radius, -radius).get_center(), az1, az2, d1);
- SGGeodesy::inverse(aPos, sgBucketOffset(lon, lat, radius, radius).get_center(), az1, az2, d2);
-
- if ((d1 > cutoffM) && (d2 > cutoffM)) {
- //std::cerr << "spatialGetClosest terminating due to range cutoff" << std::endl;
- break;
- }
-
- FGPositioned::List hits;
- for ( int i=-radius; i<=radius; i++) {
- spatialFilterInBucket(sgBucketOffset(lon, lat, i, -radius), aFilter, hits);
- spatialFilterInBucket(sgBucketOffset(lon, lat, -radius, i), aFilter, hits);
- spatialFilterInBucket(sgBucketOffset(lon, lat, i, radius), aFilter, hits);
- spatialFilterInBucket(sgBucketOffset(lon, lat, radius, i), aFilter, hits);
- }
-
- result.insert(result.end(), hits.begin(), hits.end()); // append
- } // of outer loop
-
- sortByDistance(aPos, result);
- if (result.size() > aN) {
- result.resize(aN); // truncate at requested number of matches
- }
-
- return result;
-}
-
//////////////////////////////////////////////////////////////////////////////
class OrderByName
ct.toupper((char *)filter.data(), (char *)filter.data() + filter.size());
}
- NamedPositionedIndex::const_iterator it = global_namedIndex.begin();
- NamedPositionedIndex::const_iterator end = global_namedIndex.end();
+ NamedPositionedIndex::const_iterator it = global_identIndex.begin();
+ NamedPositionedIndex::const_iterator end = global_identIndex.end();
// note this is a vector of raw pointers, not smart pointers, because it
// may get very large and smart-pointer-atomicity-locking then becomes a
return (minType() <= aTy) && (maxType() >= aTy);
}
+static FGPositioned::List
+findAllSortedByRange(const NamedPositionedIndex& aIndex,
+ const std::string& aName, const SGGeod& aPos, FGPositioned::Filter* aFilter)
+{
+ FGPositioned::List result;
+ NamedIndexRange range = aIndex.equal_range(aName);
+ for (; range.first != range.second; ++range.first) {
+ FGPositioned* candidate = range.first->second;
+ if (aFilter) {
+ if (aFilter->hasTypeRange() && !aFilter->passType(candidate->type())) {
+ continue;
+ }
+
+ if (!aFilter->pass(candidate)) {
+ continue;
+ }
+ }
+
+ result.push_back(range.first->second);
+ }
+
+ sortByDistance(aPos, result);
+ return result;
+}
+
+static FGPositionedRef
+findWithPartial(const NamedPositionedIndex& aIndex, const std::string& aName,
+ FGPositioned::Filter* aFilter, int aOffset, bool& aNext)
+{
+ // see comment in findNextWithPartialId concerning upperBoundId
+ std::string upperBoundId = aName;
+ upperBoundId[upperBoundId.size()-1]++;
+ NamedPositionedIndex::const_iterator upperBound = aIndex.lower_bound(upperBoundId);
+
+ NamedIndexRange range = aIndex.equal_range(aName);
+ FGPositionedRef result;
+
+ while (range.first != upperBound) {
+ for (; range.first != range.second; ++range.first) {
+ FGPositionedRef candidate = range.first->second;
+ if (aFilter) {
+ if (aFilter->hasTypeRange() && !aFilter->passType(candidate->type())) {
+ continue;
+ }
+
+ if (!aFilter->pass(candidate)) {
+ continue;
+ }
+ }
+
+ if (result) {
+ aNext = true;
+ return result;
+ } else if (aOffset == 0) {
+ // okay, found our result. we need to go around once more to set aNext
+ result = candidate;
+ } else {
+ --aOffset; // seen one more valid result, decrement the count
+ }
+ }
+
+ // Unable to match the filter with this range - try the next range.
+ range = aIndex.equal_range(range.second->first);
+ }
+
+ // if we fell out, we reached the end of the valid range. We might have a
+ // valid result, but we definitiely don't have a next result.
+ aNext = false;
+ return result;
+}
+
///////////////////////////////////////////////////////////////////////////////
FGPositioned::FGPositioned(Type ty, const std::string& aIdent, const SGGeod& aPos, bool aIndexed) :
removeFromIndices(this);
}
+FGPositioned*
+FGPositioned::createUserWaypoint(const std::string& aIdent, const SGGeod& aPos)
+{
+ return new FGPositioned(WAYPOINT, aIdent, aPos, true);
+}
+
SGBucket
FGPositioned::bucket() const
{
return SGVec3d::fromGeod(mPosition);
}
+FGPositioned::Type FGPositioned::typeFromName(const std::string& aName)
+{
+ if (aName.empty() || (aName == "")) {
+ return INVALID;
+ }
+
+ typedef struct {
+ const char* _name;
+ Type _ty;
+ } NameTypeEntry;
+
+ const NameTypeEntry names[] = {
+ {"airport", AIRPORT},
+ {"vor", VOR},
+ {"ndb", NDB},
+ {"wpt", WAYPOINT},
+ {"fix", FIX},
+ {"tacan", TACAN},
+ {"dme", DME},
+ // aliases
+ {"waypoint", WAYPOINT},
+ {"apt", AIRPORT},
+ {"arpt", AIRPORT},
+ {"any", INVALID},
+ {"all", INVALID},
+
+ {NULL, INVALID}
+ };
+
+ std::string lowerName(boost::to_lower_copy(aName));
+
+ for (const NameTypeEntry* n = names; (n->_name != NULL); ++n) {
+ if (::strcmp(n->_name, lowerName.c_str()) == 0) {
+ return n->_ty;
+ }
+ }
+
+ SG_LOG(SG_GENERAL, SG_WARN, "FGPositioned::typeFromName: couldn't match:" << aName);
+ return INVALID;
+}
+
const char* FGPositioned::nameForType(Type aTy)
{
switch (aTy) {
FGPositionedRef
FGPositioned::findClosestWithIdent(const std::string& aIdent, const SGGeod& aPos, Filter* aFilter)
{
- return namedFindClosest(aIdent, aPos, aFilter);
+ return namedFindClosest(global_identIndex, aIdent, aPos, aFilter);
}
FGPositioned::List
FGPositioned::findWithinRange(const SGGeod& aPos, double aRangeNm, Filter* aFilter)
{
List result;
- spatialFind(aPos, aRangeNm, aFilter, result);
- filterListByRange(aPos, aRangeNm, result);
+ Octree::findAllWithinRange(SGVec3d::fromGeod(aPos),
+ aRangeNm * SG_NM_TO_METER, aFilter, result);
return result;
}
FGPositioned::List
FGPositioned::findAllWithIdentSortedByRange(const std::string& aIdent, const SGGeod& aPos, Filter* aFilter)
{
- List result;
- NamedIndexRange range = global_namedIndex.equal_range(aIdent);
- for (; range.first != range.second; ++range.first) {
- if (aFilter && !aFilter->pass(range.first->second)) {
- continue;
- }
-
- result.push_back(range.first->second);
- }
-
- sortByDistance(aPos, result);
- return result;
+ return findAllSortedByRange(global_identIndex, aIdent, aPos, aFilter);
+}
+
+FGPositioned::List
+FGPositioned::findAllWithNameSortedByRange(const std::string& aName, const SGGeod& aPos, Filter* aFilter)
+{
+ return findAllSortedByRange(global_nameIndex, aName, aPos, aFilter);
}
FGPositionedRef
FGPositioned::findClosest(const SGGeod& aPos, double aCutoffNm, Filter* aFilter)
{
- FGPositioned::List l(spatialGetClosest(aPos, 1, aCutoffNm, aFilter));
+ List l(findClosestN(aPos, 1, aCutoffNm, aFilter));
if (l.empty()) {
return NULL;
}
FGPositioned::List
FGPositioned::findClosestN(const SGGeod& aPos, unsigned int aN, double aCutoffNm, Filter* aFilter)
{
- return spatialGetClosest(aPos, aN, aCutoffNm, aFilter);
+ List result;
+ Octree::findNearestN(SGVec3d::fromGeod(aPos), aN, aCutoffNm * SG_NM_TO_METER, aFilter, result);
+ return result;
}
-/*
FGPositionedRef
FGPositioned::findNextWithPartialId(FGPositionedRef aCur, const std::string& aId, Filter* aFilter)
{
- NamedIndexRange range = global_namedIndex.equal_range(aId);
- for (; range.first != range.second; ++range.first) {
- FGPositionedRef candidate = range.first->second;
- if (aCur == candidate) {
- aCur = NULL; // found our start point, next match will pass
- continue;
- }
-
- if (aFilter) {
- if (aFilter->hasTypeRange() && !aFilter->passType(candidate->type())) {
- continue;
- }
-
- if(!aFilter->pass(candidate)) {
- continue;
- }
- }
-
- if (!aCur) {
- return candidate;
- }
+ if (aId.empty()) {
+ return NULL;
}
- return NULL; // fell out, no match in range
-}*/
+ std::string id(boost::to_upper_copy(aId));
-FGPositionedRef
-FGPositioned::findNextWithPartialId(FGPositionedRef aCur, const std::string& aId, Filter* aFilter)
-{
// It is essential to bound our search, to avoid iterating all the way to the end of the database.
// Do this by generating a second ID with the final character incremented by 1.
// e.g., if the partial ID is "KI", we wish to search "KIxxx" but not "KJ".
- std::string upperBoundId = aId;
+ std::string upperBoundId = id;
upperBoundId[upperBoundId.size()-1]++;
- NamedPositionedIndex::const_iterator upperBound = global_namedIndex.lower_bound(upperBoundId);
+ NamedPositionedIndex::const_iterator upperBound = global_identIndex.lower_bound(upperBoundId);
- NamedIndexRange range = global_namedIndex.equal_range(aId);
+ NamedIndexRange range = global_identIndex.equal_range(id);
while (range.first != upperBound) {
for (; range.first != range.second; ++range.first) {
FGPositionedRef candidate = range.first->second;
}
// Unable to match the filter with this range - try the next range.
- range = global_namedIndex.equal_range(range.second->first);
+ range = global_identIndex.equal_range(range.second->first);
}
return NULL; // Reached the end of the valid sequence with no match.
}
+FGPositionedRef
+FGPositioned::findWithPartialId(const std::string& aId, Filter* aFilter, int aOffset, bool& aNext)
+{
+ return findWithPartial(global_identIndex, aId, aFilter, aOffset, aNext);
+}
+
+
+FGPositionedRef
+FGPositioned::findWithPartialName(const std::string& aName, Filter* aFilter, int aOffset, bool& aNext)
+{
+ return findWithPartial(global_nameIndex, aName, aFilter, aOffset, aNext);
+}
+
+/**
+ * Wrapper filter which proxies to an inner filter, but also ensures the
+ * ident starts with supplied partial ident.
+ */
+class PartialIdentFilter : public FGPositioned::Filter
+{
+public:
+ PartialIdentFilter(const std::string& ident, FGPositioned::Filter* filter) :
+ _inner(filter)
+ {
+ _ident = boost::to_upper_copy(ident);
+ }
+
+ virtual bool pass(FGPositioned* aPos) const
+ {
+ if (!_inner->pass(aPos)) {
+ return false;
+ }
+
+ return (boost::algorithm::starts_with(aPos->ident(), _ident));
+ }
+
+ virtual FGPositioned::Type minType() const
+ { return _inner->minType(); }
+
+ virtual FGPositioned::Type maxType() const
+ { return _inner->maxType(); }
+
+private:
+ std::string _ident;
+ FGPositioned::Filter* _inner;
+};
+
+static FGPositionedRef
+findClosestWithPartial(const SGGeod& aPos, FGPositioned::Filter* aFilter, int aOffset, bool& aNext)
+{
+ // why aOffset +2 ? at offset=3, we want the fourth search result, but also
+ // to know if the fifth result exists (to set aNext flag for iterative APIs)
+ FGPositioned::List matches;
+ Octree::findNearestN(SGVec3d::fromGeod(aPos), aOffset + 2, 1000 * SG_NM_TO_METER, aFilter, matches);
+
+ if ((int) matches.size() <= aOffset) {
+ SG_LOG(SG_GENERAL, SG_INFO, "findClosestWithPartial, couldn't match enough with prefix");
+ aNext = false;
+ return NULL; // couldn't find a match within the cutoff distance
+ }
+
+ aNext = ((int) matches.size() >= (aOffset + 2));
+ return matches[aOffset];
+
+}
+
+FGPositionedRef
+FGPositioned::findClosestWithPartialId(const SGGeod& aPos, const std::string& aId, Filter* aFilter, int aOffset, bool& aNext)
+{
+ PartialIdentFilter pf(aId, aFilter);
+ return findClosestWithPartial(aPos, &pf, aOffset, aNext);
+}
+
+/**
+ * Wrapper filter which proxies to an inner filter, but also ensures the
+ * name starts with supplied partial name.
+ */
+class PartialNameFilter : public FGPositioned::Filter
+{
+public:
+ PartialNameFilter(const std::string& nm, FGPositioned::Filter* filter) :
+ _inner(filter)
+ {
+ _name = nm;
+ }
+
+ virtual bool pass(FGPositioned* aPos) const
+ {
+ if (!_inner->pass(aPos)) {
+ return false;
+ }
+
+ return (boost::algorithm::istarts_with(aPos->name(), _name));
+ }
+
+ virtual FGPositioned::Type minType() const
+ { return _inner->minType(); }
+
+ virtual FGPositioned::Type maxType() const
+ { return _inner->maxType(); }
+
+private:
+ std::string _name;
+ FGPositioned::Filter* _inner;
+};
+
+FGPositionedRef
+FGPositioned::findClosestWithPartialName(const SGGeod& aPos, const std::string& aName, Filter* aFilter, int aOffset, bool& aNext)
+{
+ PartialNameFilter pf(aName, aFilter);
+ return findClosestWithPartial(aPos, &pf, aOffset, aNext);
+}
*/
static FGPositionedRef findNextWithPartialId(FGPositionedRef aCur, const std::string& aId, Filter* aFilter = NULL);
+ /**
+ * As above, but searches using an offset index
+ */
+ static FGPositionedRef findWithPartialId(const std::string& aId, Filter* aFilter, int aOffset, bool& aNext);
+
+ /**
+ * As above, but search names instead of idents
+ */
+ static FGPositionedRef findWithPartialName(const std::string& aName, Filter* aFilter, int aOffset, bool& aNext);
+
/**
* Find all items with the specified ident, and return then sorted by
* distance from a position
*/
static List findAllWithIdentSortedByRange(const std::string& aIdent, const SGGeod& aPos, Filter* aFilter = NULL);
+ /**
+ * As above, but searches names instead of idents
+ */
+ static List findAllWithNameSortedByRange(const std::string& aName, const SGGeod& aPos, Filter* aFilter = NULL);
+
/**
* Find the closest item to a position, which pass the specified filter
* A cutoff range in NM must be specified, to constrain the search acceptably.
* Very large cutoff values will make this slow.
*
* @result The matches (possibly less than N, depending on the filter and cutoff),
- * sorted by distance from the search pos
+ * sorted by distance from the search pos
* @param aN - number of matches to find
* @param aCutoffNm - maximum distance to search within, in nautical miles
*/
static List findClosestN(const SGGeod& aPos, unsigned int aN, double aCutoffNm, Filter* aFilter = NULL);
+ /**
+ * Find the closest match based on partial id (with an offset to allow selecting the n-th closest).
+ * Cutoff distance is limited internally, to avoid making this very slow.
+ */
+ static FGPositionedRef findClosestWithPartialId(const SGGeod& aPos, const std::string& aId, Filter* aFilter, int aOffset, bool& aNext);
+
+ /**
+ * As above, but matches on name
+ */
+ static FGPositionedRef findClosestWithPartialName(const SGGeod& aPos, const std::string& aName, Filter* aFilter, int aOffset, bool& aNext);
/**
- * Debug helper, map a type to a human-readable string
+ * Map a candidate type string to a real type. Returns INVALID if the string
+ * does not correspond to a defined type.
+ */
+ static Type typeFromName(const std::string& aName);
+
+ /**
+ * Map a type to a human-readable string
*/
static const char* nameForType(Type aTy);
+
+ static FGPositioned* createUserWaypoint(const std::string& aIdent, const SGGeod& aPos);
protected:
FGPositioned(Type ty, const std::string& aIdent, const SGGeod& aPos, bool aIndex = true);
#include <simgear/constants.h>
#include <simgear/debug/logstream.hxx>
#include <simgear/scene/tgdb/userdata.hxx>
-#include <simgear/scene/material/Effect.hxx>
-#include <simgear/scene/material/EffectGeode.hxx>
-#include <simgear/scene/material/Technique.hxx>
#include <simgear/scene/material/matlib.hxx>
#include <simgear/scene/util/SGNodeMasks.hxx>
#include <simgear/scene/util/SGSceneUserData.hxx>
return pager.get();
}
-// Effect initialization stuff
-
-class PropertyExpression : public SGExpression<bool>
-{
-public:
- PropertyExpression(SGPropertyNode* pnode) : _pnode(pnode) {}
-
- void eval(bool& value, const expression::Binding*) const
- {
- value = _pnode->getValue<bool>();
- }
-protected:
- SGPropertyNode_ptr _pnode;
-};
-
-class EffectPropertyListener : public SGPropertyChangeListener
-{
-public:
- EffectPropertyListener(Technique* tniq) : _tniq(tniq) {}
-
- void valueChanged(SGPropertyNode* node)
- {
- _tniq->refreshValidity();
- }
-protected:
- osg::ref_ptr<Technique> _tniq;
-};
-
-Expression* propertyExpressionParser(const SGPropertyNode* exp,
- expression::Parser* parser)
-{
- SGPropertyNode_ptr pnode = fgGetNode(exp->getStringValue(), true);
- PropertyExpression* pexp = new PropertyExpression(pnode);
- TechniquePredParser* predParser
- = dynamic_cast<TechniquePredParser*>(parser);
- if (predParser)
- pnode->addChangeListener(new EffectPropertyListener(predParser
- ->getTechnique()));
- return pexp;
-}
-
-expression::ExpParserRegistrar propertyRegistrar("property",
- propertyExpressionParser);
-
#include <deque>
#include <map>
-#include <pair.h>
-#include <stdio.h>
+#include <iostream>
#include <string>
+using std::deque;
+using std::map;
+using std::string;
+using std::less;
+using std::cout;
main() {
deque < int > mylist;
mymap["dan"] = 24;
printf("curt age = %d\n", mymap["curt"]);
- printf("doug age = %d\n", mymap["doug"]);
+ printf("dan age = %d\n", mymap["dan"]);
- map < string, int, less<string> > :: iterator test = mymap.find("dan");
+ map < string, int, less<string> > :: iterator test = mymap.find("doug");
if ( test == mymap.end() ) {
- printf("dan age = not found\n");
+ printf("doug age = not found\n");
} else {
- printf("dan age = %d\n", (*test).second);
+ printf("doug age = %d\n", (*test).second);
+ mymap.erase( "doug" );
}
+ printf("\n");
map < string, int, less<string> > :: iterator mapcurrent = mymap.begin();
map < string, int, less<string> > :: iterator maplast = mymap.end();
while ( mapcurrent != maplast ) {
osg::Node*
FGTileMgr::loadTileModel(const string& modelPath, bool cacheModel)
{
+ SGPath fullPath;
+ if (fgGetBool("/sim/paths/use-custom-scenery-data") == true) {
+ string_list sc = globals->get_fg_scenery();
+
+ for (string_list_iterator it = sc.begin(); it != sc.end(); ++it) {
+ SGPath tmpPath(*it);
+ tmpPath.append(modelPath);
+ if (tmpPath.exists()) {
+ fullPath = tmpPath;
+ break;
+ }
+ }
+ } else {
+ fullPath.append(modelPath);
+ }
osg::Node* result = 0;
try {
if(cacheModel)
result =
- SGModelLib::loadModel(modelPath, globals->get_props(),
+ SGModelLib::loadModel(fullPath.str(), globals->get_props(),
new FGNasalModelData);
-
else
result=
SGModelLib::loadPagedModel(modelPath, globals->get_props(),
#include <Main/fg_props.hxx>
#include <Main/util.hxx>
#include <Scenery/scenery.hxx>
+#include <Navaids/navrecord.hxx>
#include "NasalSys.hxx"
// user provided an <id>, hopefully
apt = FGAirport::findByIdent(s);
if (!apt) {
- naRuntimeError(c, "airportinfo() couldn't find airport: %s", s);
+ // return nil here, but don't raise a runtime error; this is a
+ // legitamate way to validate an ICAO code, for example in a
+ // dialog box or similar.
return naNil();
}
}
HASHSET("width", 5, naNum(rwy->widthM()));
HASHSET("threshold", 9, naNum(rwy->displacedThresholdM()));
HASHSET("stopway", 7, naNum(rwy->stopwayM()));
+
+ if (rwy->ILS()) {
+ HASHSET("ils_frequency_mhz", 17, naNum(rwy->ILS()->get_freq() / 100.0));
+ }
+
#undef HASHSET
naHash_set(rwys, rwyid, rwydata);
}
# include "config.h"
#endif
+#include <cstring>
+
+#include <simgear/math/SGMath.hxx>
#include <simgear/nasal/nasal.h>
#include <simgear/props/props.hxx>
#include "NasalSys.hxx"
+using namespace std;
+
// Implementation of a Nasal wrapper for the SGPropertyNode class,
// using the Nasal "ghost" (er... Garbage collection Handle for
// OutSide Thingy) facility.
_sun_lat(0),
_moon_lon(0),
_moon_gc_lat(0),
- _sunpos(0, 0, 0),
- _moonpos(0, 0, 0),
_sun_vec(0, 0, 0, 0),
_moon_vec(0, 0, 0, 0),
_sun_vec_inv(0, 0, 0, 0),
_scene_ambient(0, 0, 0, 0),
_scene_diffuse(0, 0, 0, 0),
_scene_specular(0, 0, 0, 0),
+ _scene_chrome(0, 0, 0, 0),
_sky_color(0, 0, 0, 0),
_fog_color(0, 0, 0, 0),
_cloud_color(0, 0, 0, 0),
prop->tie("/rendering/dome/fog/red",SGRawValuePointer<float>(&_fog_color[0]));
prop->tie("/rendering/dome/fog/green",SGRawValuePointer<float>(&_fog_color[1]));
prop->tie("/rendering/dome/fog/blue",SGRawValuePointer<float>(&_fog_color[2]));
+ // Properties used directly by effects
+ _chromeProps[0] = prop->getNode("/rendering/scene/chrome-light/red", true);
+ _chromeProps[1] = prop->getNode("/rendering/scene/chrome-light/green",
+ true);
+ _chromeProps[2] = prop->getNode("/rendering/scene/chrome-light/blue", true);
+ _chromeProps[3] = prop->getNode("/rendering/scene/chrome-light/alpha",
+ true);
+ for (int i = 0; i < 4; ++i)
+ _chromeProps[i]->setValue(0.0);
}
void FGLight::unbind () {
prop->untie("/rendering/dome/sun/red");
prop->untie("/rendering/dome/sun/green");
prop->untie("/rendering/dome/sun/blue");
- prop->untie("/rendering/dome/skyred");
+ prop->untie("/rendering/dome/sky/red");
prop->untie("/rendering/dome/sky/green");
prop->untie("/rendering/dome/sky/blue");
- prop->untie("/rendering/dome/fogred");
+ prop->untie("/rendering/dome/fog/red");
prop->untie("/rendering/dome/fog/green");
prop->untie("/rendering/dome/fog/blue");
}
// if the 4th field is 0.0, this specifies a direction ...
// const GLfloat white[4] = { 1.0, 1.0, 1.0, 1.0 };
const GLfloat base_sky_color[4] = { 0.31, 0.43, 0.69, 1.0 };
- const GLfloat base_fog_color[4] = { 0.84, 0.87, 1.0, 1.0 };
+ const GLfloat base_fog_color[4] = { 0.60, 0.70, 0.9, 1.0 };
SG_LOG( SG_EVENT, SG_DEBUG, "Updating light parameters." );
_scene_diffuse[3] = 1.0;
gamma_correct_rgb( _scene_diffuse.data() );
+ SGVec4f chrome = _scene_ambient * .4f + _scene_diffuse;
+ chrome[3] = 1.0f;
+ if (chrome != _scene_chrome) {
+ _scene_chrome = chrome;
+ for (int i = 0; i < 4; ++i)
+ _chromeProps[i]->setValue(static_cast<double>(_scene_chrome[i]));
+ }
+
color = thesky->get_sun_color();
_scene_specular[0] = color[0] * specular;
_scene_specular[1] = color[1] * specular;
// Calculate the fog color in the direction of the sun for
// sunrise/sunset effects.
//
- float s_red = color[0]*color[0];
- float s_green = color[1]*color[1];
- float s_blue = color[2];
+ float s_red = color[0]*color[0]*color[0];
+ float s_green = color[1]*color[1]*color[1];
+ float s_blue = color[2]*color[2];
// interpolate beween the sunrise/sunset color and the color
// at the opposite direction of this effect. Take in account
#include <simgear/compiler.h>
+#include <simgear/props/props.hxx>
#include <simgear/structure/subsystem_mgr.hxx>
#include <simgear/math/interpolater.hxx>
double _sun_lon, _sun_lat;
double _moon_lon, _moon_gc_lat;
- // in cartesian coordiantes
- SGVec3d _sunpos, _moonpos;
-
// (in view coordinates)
SGVec4f _sun_vec, _moon_vec;
SGVec4f _scene_ambient;
SGVec4f _scene_diffuse;
SGVec4f _scene_specular;
+ SGVec4f _scene_chrome;
// clear sky, fog and cloud color
SGVec4f _sky_color;
void update_sky_color ();
void update_adj_fog_color ();
+ // properties for chrome light; not a tie because I want to fire
+ // property listeners when the values change.
+ SGPropertyNode_ptr _chromeProps[4];
public:
FGLight ();
inline const SGVec4f& scene_ambient () const { return _scene_ambient; }
inline const SGVec4f& scene_diffuse () const { return _scene_diffuse; }
inline const SGVec4f& scene_specular () const { return _scene_specular; }
+ inline const SGVec4f& scene_chrome () const { return _scene_chrome; }
inline const SGVec4f& sky_color () const { return _sky_color; }
inline const SGVec4f& cloud_color () const { return _cloud_color; }
inline double get_sun_lat () const { return _sun_lat; }
inline void set_sun_lat (double l) { _sun_lat = l; }
- inline const SGVec3d& get_sunpos () const { return _sunpos; }
- inline void set_sunpos (const SGVec3d& p) { _sunpos = p; }
-
inline SGVec4f& sun_vec () { return _sun_vec; }
inline SGVec4f& sun_vec_inv () { return _sun_vec_inv; }
inline double get_moon_gc_lat () const { return _moon_gc_lat; }
inline void set_moon_gc_lat (double l) { _moon_gc_lat = l; }
- inline const SGVec3d& get_moonpos () const { return _moonpos; }
- inline void set_moonpos (const SGVec3d& p) { _moonpos = p; }
-
inline const SGVec4f& moon_vec () const { return _moon_vec; }
inline const SGVec4f& moon_vec_inv () const { return _moon_vec_inv; }
};
// update the cur_time_params structure with the current sun position
void fgUpdateSunPos( void ) {
+#if 0
+ // This only works at lat,lon = 0,0
+ // need to find a way to get it working at other locations
+
+ FGLight *light = (FGLight *)(globals->get_subsystem("lighting"));
+ FGViewer *viewer = globals->get_current_view();
+ SGTime *time_now = globals->get_time_params();
+
+ SG_LOG( SG_EVENT, SG_DEBUG, " Updating Sun position" );
+ SG_LOG( SG_EVENT, SG_DEBUG, " Gst = " << time_now->getGst() );
+
+ double sun_lon, sun_lat;
+ fgSunPositionGST(time_now->getGst(), &sun_lon, &sun_lat);
+ light->set_sun_lon(sun_lon);
+ light->set_sun_lat(sun_lat);
+
+ // update the sun light vector
+ // calculations are in the horizontal normal plane: x-north, y-east, z-down
+ static SGQuatd q = SGQuatd::fromLonLat(SGGeod::fromRad(0,0));
+
+ // sun orientation
+ SGGeod geodSunPos = SGGeod::fromRad(sun_lon, sun_lat);
+ SGQuatd sunOr = SGQuatd::fromLonLat(geodSunPos);
+
+ // scenery orientation
+ SGGeod geodViewPos = SGGeod::fromCart(viewer->getViewPosition());
+ SGQuatd hlOr = SGQuatd::fromLonLat(geodViewPos);
+ SGVec3d localAt = hlOr.backTransform(SGVec3d::e3());
+
+ // transpose the sun direction from (lat,lon) to (0,0)
+ SGVec3d transSunDir = (q*sunOr).transform(-localAt);
+ SGQuatd sunDirOr = SGQuatd::fromRealImag(0, transSunDir);
+
+ // transpose the calculated sun vector back to (lat,lon)
+ SGVec3d sunDirection = sunDirOr.transform(localAt);
+ light->set_sun_rotation( acos(sunDirection[1])-SGD_PI_2 );
+ light->set_sun_angle( acos(-sunDirection[2]) );
+
+ SGVec3d sunPos = SGVec3d::fromGeod(geodSunPos);
+ light->sun_vec() = SGVec4f(toVec3f(normalize(sunPos)), 0);
+ light->sun_vec_inv() = -light->sun_vec();
+
+#else
FGLight *l = (FGLight *)(globals->get_subsystem("lighting"));
SGTime *t = globals->get_time_params();
FGViewer *v = globals->get_current_view();
fgSunPositionGST(t->getGst(), &sun_l, &sun_gd_lat);
l->set_sun_lon(sun_l);
l->set_sun_lat(sun_gd_lat);
- l->set_sunpos(SGVec3d::fromGeod(SGGeod::fromRad(sun_l, sun_gd_lat)));
+ SGVec3d sunpos(SGVec3d::fromGeod(SGGeod::fromRad(sun_l, sun_gd_lat)));
SG_LOG( SG_EVENT, SG_DEBUG, " t->cur_time = " << t->get_cur_time() );
SG_LOG( SG_EVENT, SG_DEBUG,
- " Sun Geodetic lat = " << sun_gd_lat
- << " Geodetic lat = " << sun_gd_lat );
+ " Sun Geodetic lat = " << sun_gd_lat
+ << " Geodetic lat = " << sun_gd_lat );
// update the sun light vector
- l->sun_vec() = SGVec4f(toVec3f(normalize(l->get_sunpos())), 0);
+ l->sun_vec() = SGVec4f(toVec3f(normalize(sunpos)), 0);
l->sun_vec_inv() = - l->sun_vec();
// calculate the sun's relative angle to local up
SGVec3d viewPos = v->get_view_pos();
SGQuatd hlOr = SGQuatd::fromLonLat(SGGeod::fromCart(viewPos));
- SGVec3f nup(toVec3f(hlOr.backTransform(-SGVec3d::e3())));
-
- SGVec3f nsun(toVec3f(normalize(l->get_sunpos())));
- // cout << "nup = " << nup[0] << "," << nup[1] << ","
+ SGVec3f world_up = toVec3f(hlOr.backTransform(-SGVec3d::e3()));
+ SGVec3f nsun = toVec3f(normalize(sunpos));
+ // cout << "nup = " << nup[0] << "," << nup[1] << ","
// << nup[2] << endl;
- // cout << "nsun = " << nsun[0] << "," << nsun[1] << ","
+ // cout << "nsun = " << nsun[0] << "," << nsun[1] << ","
// << nsun[2] << endl;
- l->set_sun_angle( acos( dot ( nup, nsun ) ) );
+ l->set_sun_angle( acos( dot ( world_up, nsun ) ) );
SG_LOG( SG_EVENT, SG_DEBUG, "sun angle relative to current location = "
- << l->get_sun_angle() );
-
+ << l->get_sun_angle() );
+
// calculate vector to sun's position on the earth's surface
- SGVec3d rel_sunpos = l->get_sunpos() - v->get_view_pos();
+ SGVec3d rel_sunpos = sunpos - v->get_view_pos();
// vector in cartesian coordinates from current position to the
// postion on the earth's surface the sun is directly over
SGVec3f to_sun = toVec3f(rel_sunpos);
// earth's surface the sun is directly over, map into onto the
// local plane representing "horizontal".
- SGVec3f world_up = toVec3f(hlOr.backTransform(-SGVec3d::e3()));
- SGVec3f view_pos = toVec3f(v->get_view_pos());
// surface direction to go to head towards sun
SGVec3f surface_to_sun;
+ SGVec3f view_pos = toVec3f(v->get_view_pos());
sgmap_vec_onto_cur_surface_plane( world_up.data(), view_pos.data(),
- to_sun.data(), surface_to_sun.data() );
+ to_sun.data(), surface_to_sun.data() );
surface_to_sun = normalize(surface_to_sun);
// cout << "(sg) Surface direction to sun is "
- // << surface_to_sun[0] << ","
+ // << surface_to_sun[0] << ","
// << surface_to_sun[1] << ","
// << surface_to_sun[2] << endl;
- // cout << "Should be close to zero = "
+ // cout << "Should be close to zero = "
// << sgScalarProductVec3(nup, surface_to_sun) << endl;
// calculate the angle between surface_to_sun and
}
if ( east_dot >= 0 ) {
- l->set_sun_rotation( acos(dot_) );
+ l->set_sun_rotation( acos(dot_) );
} else {
- l->set_sun_rotation( -acos(dot_) );
+ l->set_sun_rotation( -acos(dot_) );
}
// cout << " Sky needs to rotate = " << angle << " rads = "
// << angle * SGD_RADIANS_TO_DEGREES << " degrees." << endl;
+
+#endif
}
userLatitude,
userLongitude;
+ SGVec3d newPos(0, 0, 0);
+
+
if (fgGetBool("/sim/traffic-manager/enabled") == false)
return true;
if (!(dep && arr))
return false;
- SGVec3d a = SGVec3d::fromGeoc(SGGeoc::fromDegM(dep->getLongitude(),
- dep->getLatitude(), 1));
- SGVec3d b = SGVec3d::fromGeoc(SGGeoc::fromDegM(arr->getLongitude(),
- arr->getLatitude(), 1));
- SGVec3d _cross = cross(b, a);
+ if (dep != arr) {
+ SGVec3d a = SGVec3d::fromGeoc(SGGeoc::fromDegM(dep->getLongitude(),
+ dep->getLatitude(), 1));
+ SGVec3d b = SGVec3d::fromGeoc(SGGeoc::fromDegM(arr->getLongitude(),
+ arr->getLatitude(), 1));
+ SGVec3d _cross = cross(b, a);
- angle = sgACos(dot(a, b));
+ angle = sgACos(dot(a, b));
- // Okay, at this point we have the angle between departure and
- // arrival airport, in degrees. From here we can interpolate the
- // position of the aircraft by calculating the ratio between
- // total time enroute and elapsed time enroute.
+ // Okay, at this point we have the angle between departure and
+ // arrival airport, in degrees. From here we can interpolate the
+ // position of the aircraft by calculating the ratio between
+ // total time enroute and elapsed time enroute.
- totalTimeEnroute = (*i)->getArrivalTime() - (*i)->getDepartureTime();
- if (now > (*i)->getDepartureTime())
- {
- //err << "Lat = " << lat << ", lon = " << lon << endl;
- //cerr << "Time diff: " << now-i->getDepartureTime() << endl;
- elapsedTimeEnroute = now - (*i)->getDepartureTime();
- remainingTimeEnroute = (*i)->getArrivalTime() - now;
- SG_LOG (SG_GENERAL, SG_DEBUG, "Traffic Manager: Flight is in progress.");
- }
- else
- {
- lat = dep->getLatitude();
- lon = dep->getLongitude();
- elapsedTimeEnroute = 0;
- remainingTimeEnroute = totalTimeEnroute;
- SG_LOG (SG_GENERAL, SG_DEBUG, "Traffic Manager: Flight is pending.");
- }
-
- angle *= ( (double) elapsedTimeEnroute/ (double) totalTimeEnroute);
-
-
- //cout << "a = " << a[0] << " " << a[1] << " " << a[2]
- // << "b = " << b[0] << " " << b[1] << " " << b[2] << endl;
- sgdMat4 matrix;
- sgdMakeRotMat4(matrix, angle, _cross.data());
- SGVec3d newPos(0, 0, 0);
- for(int j = 0; j < 3; j++)
- {
- for (int k = 0; k<3; k++)
- {
- newPos[j] += matrix[j][k]*a[k];
- }
- }
-
- SGGeod current;
- if (now > (*i)->getDepartureTime())
- {
- current = SGGeod::fromCart(newPos);
- }
- else
- {
- current = dep->geod();
- }
-
- SGGeod user = SGGeod::fromDegM(userLongitude, userLatitude, (*i)->getCruiseAlt());
- speed = SGGeodesy::distanceNm(current, arr->geod()) /
- ((double) remainingTimeEnroute/3600.0);
-
- distanceToUser = SGGeodesy::distanceNm(current, user);
+ totalTimeEnroute = (*i)->getArrivalTime() - (*i)->getDepartureTime();
+ if (now > (*i)->getDepartureTime())
+ {
+ //err << "Lat = " << lat << ", lon = " << lon << endl;
+ //cerr << "Time diff: " << now-i->getDepartureTime() << endl;
+ elapsedTimeEnroute = now - (*i)->getDepartureTime();
+ remainingTimeEnroute = (*i)->getArrivalTime() - now;
+ SG_LOG (SG_GENERAL, SG_DEBUG, "Traffic Manager: Flight is in progress.");
+ }
+ else
+ {
+ lat = dep->getLatitude();
+ lon = dep->getLongitude();
+ elapsedTimeEnroute = 0;
+ remainingTimeEnroute = totalTimeEnroute;
+ SG_LOG (SG_GENERAL, SG_DEBUG, "Traffic Manager: Flight is pending.");
+ }
+ angle *= ( (double) elapsedTimeEnroute/ (double) totalTimeEnroute);
+ //cout << "a = " << a[0] << " " << a[1] << " " << a[2]
+ // << "b = " << b[0] << " " << b[1] << " " << b[2] << endl;
+ sgdMat4 matrix;
+ sgdMakeRotMat4(matrix, angle, _cross.data());
+ for(int j = 0; j < 3; j++) {
+ for (int k = 0; k<3; k++) {
+ newPos[j] += matrix[j][k]*a[k];
+ }
+ }
+ }
+ SGGeod current;
+ if ((now > (*i)->getDepartureTime() && (dep != arr))) {
+ current = SGGeod::fromCart(newPos);
+ speed = SGGeodesy::distanceNm(current, arr->geod()) /
+ ((double) remainingTimeEnroute/3600.0);
+ } else {
+ current = dep->geod();
+ speed = 450;
+ }
+ SGGeod user = SGGeod::fromDegM(userLongitude, userLatitude, (*i)->getCruiseAlt());
+
+ distanceToUser = SGGeodesy::distanceNm(current, user);
// If distance between user and simulated aircaft is less
// then 500nm, create this flight. At jet speeds 500 nm is roughly
#include <stdlib.h>
#include <time.h>
+#include <cstring>
#include <iostream>
#include <fstream>
#include "TrafficMgr.hxx"
using std::sort;
+using std::strcmp;
/******************************************************************************
* TrafficManager
void FGTrafficManager::endElement (const char * name) {
//cout << "End element " << name << endl;
- string element(name);
- string value = elementValueStack.back();
- elementValueStack.pop_back();
+ const string& value = elementValueStack.back();
- if (element == string("model"))
+ if (!strcmp(name, "model"))
mdl = value;
- else if (element == string("livery"))
+ else if (!strcmp(name, "livery"))
livery = value;
- else if (element == string("home-port"))
+ else if (!strcmp(name, "home-port"))
homePort = value;
- else if (element == string("registration"))
+ else if (!strcmp(name, "registration"))
registration = value;
- else if (element == string("airline"))
+ else if (!strcmp(name, "airline"))
airline = value;
- else if (element == string("actype"))
+ else if (!strcmp(name, "actype"))
acType = value;
- else if (element == string("required-aircraft"))
+ else if (!strcmp(name, "required-aircraft"))
requiredAircraft = value;
- else if (element == string("flighttype"))
+ else if (!strcmp(name, "flighttype"))
flighttype = value;
- else if (element == string("radius"))
+ else if (!strcmp(name, "radius"))
radius = atoi(value.c_str());
- else if (element == string("offset"))
+ else if (!strcmp(name, "offset"))
offset = atoi(value.c_str());
- else if (element == string("performance-class"))
+ else if (!strcmp(name, "performance-class"))
m_class = value;
- else if (element == string("heavy"))
+ else if (!strcmp(name, "heavy"))
{
if(value == string("true"))
heavy = true;
else
heavy = false;
}
- else if (element == string("callsign"))
+ else if (!strcmp(name, "callsign"))
callsign = value;
- else if (element == string("fltrules"))
+ else if (!strcmp(name, "fltrules"))
fltrules = value;
- else if (element == string("port"))
+ else if (!strcmp(name, "port"))
port = value;
- else if (element == string("time"))
+ else if (!strcmp(name, "time"))
timeString = value;
- else if (element == string("departure"))
+ else if (!strcmp(name, "departure"))
{
departurePort = port;
departureTime = timeString;
}
- else if (element == string("cruise-alt"))
+ else if (!strcmp(name, "cruise-alt"))
cruiseAlt = atoi(value.c_str());
- else if (element == string("arrival"))
+ else if (!strcmp(name, "arrival"))
{
arrivalPort = port;
arrivalTime = timeString;
}
- else if (element == string("repeat"))
+ else if (!strcmp(name, "repeat"))
repeat = value;
- else if (element == string("flight"))
+ else if (!strcmp(name, "flight"))
{
// We have loaded and parsed all the information belonging to this flight
// so we temporarily store it.
requiredAircraft));
requiredAircraft = "";
}
- else if (element == string("aircraft"))
+ else if (!strcmp(name, "aircraft"))
{
int proportion = (int) (fgGetDouble("/sim/traffic-manager/proportion") * 100);
int randval = rand() & 100;
<< score);
score = 0;
}
+ elementValueStack.pop_back();
}
void FGTrafficManager::data (const char * s, int len) {
noinst_PROGRAMS = test-gethostname test-mktime test-text test-up test-env-map
-est_epsilon_SOURCES = est-epsilon.c
+if HAVE_FRAMEWORK_PLIB
+test_up_LDFLAGS = $(plib_FRAMEWORK)
+else
+test_up_PLIB_LIBS = -lplibsg -lplibul
+endif
+
+est_epsilon_SOURCES = est-epsilon.cxx
est_epsilon_LDADD = $(opengl_LIBS)
-gl_info_SOURCES = gl-info.c
+gl_info_SOURCES = gl-info.cxx
gl_info_LDADD = $(opengl_LIBS)
alcinfo_SOURCES = alcinfo.cxx
test_text_SOURCES = test-text.cxx
test_up_SOURCES = test-up.cxx
-test_up_LDADD = -lsgmath -lsgxml -lsgmisc -lsgdebug -lsgstructure -lsgtiming -lplibsg -lplibul -lz $(base_LIBS)
+test_up_LDADD = $(test_up_PLIB_LIBS) -lsgmath -lsgxml -lsgmisc -lsgdebug -lsgstructure -lsgtiming -lz $(base_LIBS)
+++ /dev/null
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef HAVE_WINDOWS_H
-# include <windows.h>
-#endif
-
-#include <stdio.h>
-
-#include <simgear/compiler.h>
-#if defined( __APPLE__)
-# include <OpenGL/OpenGL.h>
-#else
-# include <GL/gl.h>
-#endif
-
-int main() {
- GLfloat a, t;
-
- a = 1.0;
-
- do {
- printf("a = %.10f\n", a);
- a = a / 2.0;
- t = 1.0 + a;
- } while ( t > 1.0 );
-
- a = a + a;
-
- printf("Estimated GLfloat epsilon = %.10f\n", a);
-
- return(0);
-}
--- /dev/null
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef HAVE_WINDOWS_H
+# include <windows.h>
+#endif
+
+#include <stdio.h>
+
+#include <simgear/compiler.h>
+#if defined( __APPLE__)
+# include <OpenGL/OpenGL.h>
+#else
+# include <GL/gl.h>
+#endif
+
+int main() {
+ GLfloat a, t;
+
+ a = 1.0;
+
+ do {
+ printf("a = %.10f\n", a);
+ a = a / 2.0;
+ t = 1.0 + a;
+ } while ( t > 1.0 );
+
+ a = a + a;
+
+ printf("Estimated GLfloat epsilon = %.10f\n", a);
+
+ return(0);
+}
+++ /dev/null
-/*
-From: Steve Baker <sbaker@link.com>
-Sender: root@fatcity.com
-To: OPENGL-GAMEDEV-L <OPENGL-GAMEDEV-L@fatcity.com>
-Subject: Re: Win32 OpenGL Resource Page
-Date: Fri, 24 Apr 1998 07:33:51 -0800
-*/
-
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef HAVE_WINDOWS_H
-# include <windows.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <simgear/compiler.h>
-#if defined( __APPLE__)
-# include <OpenGL/OpenGL.h>
-# include <GLUT/glut.h>
-#else
-# include <GL/gl.h>
-# ifdef HAVE_GLUT_H
-# include <GL/glut.h>
-# endif
-#endif
-
-
-void getPrints ( GLenum token, char *string )
-{
- printf ( "%s = \"%s\"\n", string, glGetString ( token ) ) ;
-}
-
-void getPrint2f ( GLenum token, char *string )
-{
- GLfloat f[2] ;
- glGetFloatv ( token, f ) ;
- printf ( "%s = %g,%g\n", string, f[0],f[1] ) ;
-}
-
-void getPrintf ( GLenum token, char *string )
-{
- GLfloat f ;
- glGetFloatv ( token, &f ) ;
- printf ( "%s = %g\n", string, f ) ;
-}
-
-void getPrint2i ( GLenum token, char *string )
-{
- GLint i[2] ;
- glGetIntegerv ( token, i ) ;
- printf ( "%s = %d,%d\n", string, i[0],i[1] ) ;
-}
-
-void getPrinti ( GLenum token, char *string )
-{
- GLint i ;
- glGetIntegerv ( token, &i ) ;
- printf ( "%s = %d\n", string, i ) ;
-}
-
-int main ( int argc, char **argv )
-{
-#ifdef HAVE_GLUT_H
- glutInit ( &argc, argv ) ;
- glutInitDisplayMode ( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ) ;
- glutCreateWindow ( "You should never see this window!" ) ;
-
- getPrints ( GL_VENDOR , "GL_VENDOR" ) ;
- getPrints ( GL_RENDERER , "GL_RENDERER" ) ;
- getPrints ( GL_VERSION , "GL_VERSION" ) ;
- getPrints ( GL_EXTENSIONS , "GL_EXTENSIONS" ) ;
-
- getPrinti ( GL_RED_BITS , "GL_RED_BITS" ) ;
- getPrinti ( GL_GREEN_BITS , "GL_GREEN_BITS" ) ;
- getPrinti ( GL_BLUE_BITS , "GL_BLUE_BITS" ) ;
- getPrinti ( GL_ALPHA_BITS , "GL_ALPHA_BITS" ) ;
- getPrinti ( GL_DEPTH_BITS , "GL_DEPTH_BITS" ) ;
- getPrinti ( GL_INDEX_BITS , "GL_INDEX_BITS" ) ;
- getPrinti ( GL_STENCIL_BITS, "GL_STENCIL_BITS" ) ;
-
- getPrinti ( GL_ACCUM_RED_BITS , "GL_ACCUM_RED_BITS" ) ;
- getPrinti ( GL_ACCUM_GREEN_BITS, "GL_ACCUM_GREEN_BITS" ) ;
- getPrinti ( GL_ACCUM_BLUE_BITS , "GL_ACCUM_BLUE_BITS" ) ;
- getPrinti ( GL_ACCUM_ALPHA_BITS, "GL_ACCUM_ALPHA_BITS" ) ;
-
- getPrinti ( GL_AUX_BUFFERS, "GL_AUX_BUFFERS" ) ;
-
- getPrinti ( GL_MAX_ATTRIB_STACK_DEPTH , "GL_MAX_ATTRIB_STACK_DEPTH" ) ;
- getPrinti ( GL_MAX_NAME_STACK_DEPTH , "GL_MAX_NAME_STACK_DEPTH" ) ;
- getPrinti ( GL_MAX_TEXTURE_STACK_DEPTH , "GL_MAX_TEXTURE_STACK_DEPTH" ) ;
- getPrinti ( GL_MAX_PROJECTION_STACK_DEPTH, "GL_MAX_PROJECTION_STACK_DEPTH" ) ;
- getPrinti ( GL_MAX_MODELVIEW_STACK_DEPTH , "GL_MAX_MODELVIEW_STACK_DEPTH" ) ;
-
- getPrinti ( GL_MAX_CLIP_PLANES , "GL_MAX_CLIP_PLANES" ) ;
- getPrinti ( GL_MAX_EVAL_ORDER , "GL_MAX_EVAL_ORDER" ) ;
- getPrinti ( GL_MAX_LIGHTS , "GL_MAX_LIGHTS" ) ;
- getPrinti ( GL_MAX_LIST_NESTING , "GL_MAX_LIST_NESTING" ) ;
- getPrinti ( GL_MAX_TEXTURE_SIZE , "GL_MAX_TEXTURE_SIZE" ) ;
- getPrint2i( GL_MAX_VIEWPORT_DIMS , "GL_MAX_VIEWPORT_DIMS" ) ;
-
- getPrintf ( GL_POINT_SIZE_GRANULARITY, "GL_POINT_SIZE_GRANULARITY" ) ;
- getPrint2f( GL_POINT_SIZE_RANGE , "GL_POINT_SIZE_RANGE" ) ;
-
- printf("Default values:\n\n");
-
- getPrinti( GL_UNPACK_ALIGNMENT , "GL_UNPACK_ALIGNMENT" ) ;
- getPrinti( GL_UNPACK_ROW_LENGTH , "GL_UNPACK_ROW_LENGTH" ) ;
- getPrinti( GL_UNPACK_SKIP_PIXELS , "GL_UNPACK_SKIP_PIXELS" ) ;
- getPrinti( GL_UNPACK_SKIP_ROWS , "GL_UNPACK_SKIP_ROWS" ) ;
- getPrinti( GL_BLEND_SRC , "GL_BLEND_SRC" ) ;
- getPrinti( GL_BLEND_DST , "GL_BLEND_DST" ) ;
-#else
-
- printf("GL Utility Toolkit (glut) was not found on this system.\n");
-#endif
-
- return 0 ;
-}
--- /dev/null
+/*
+From: Steve Baker <sbaker@link.com>
+Sender: root@fatcity.com
+To: OPENGL-GAMEDEV-L <OPENGL-GAMEDEV-L@fatcity.com>
+Subject: Re: Win32 OpenGL Resource Page
+Date: Fri, 24 Apr 1998 07:33:51 -0800
+*/
+
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef HAVE_WINDOWS_H
+# include <windows.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <simgear/compiler.h>
+#if defined( __APPLE__)
+# include <OpenGL/OpenGL.h>
+# include <GLUT/glut.h>
+#else
+# include <GL/gl.h>
+# ifdef HAVE_GLUT_H
+# include <GL/glut.h>
+# endif
+#endif
+
+
+void getPrints ( GLenum token, char *string )
+{
+ printf ( "%s = \"%s\"\n", string, glGetString ( token ) ) ;
+}
+
+void getPrint2f ( GLenum token, char *string )
+{
+ GLfloat f[2] ;
+ glGetFloatv ( token, f ) ;
+ printf ( "%s = %g,%g\n", string, f[0],f[1] ) ;
+}
+
+void getPrintf ( GLenum token, char *string )
+{
+ GLfloat f ;
+ glGetFloatv ( token, &f ) ;
+ printf ( "%s = %g\n", string, f ) ;
+}
+
+void getPrint2i ( GLenum token, char *string )
+{
+ GLint i[2] ;
+ glGetIntegerv ( token, i ) ;
+ printf ( "%s = %d,%d\n", string, i[0],i[1] ) ;
+}
+
+void getPrinti ( GLenum token, char *string )
+{
+ GLint i ;
+ glGetIntegerv ( token, &i ) ;
+ printf ( "%s = %d\n", string, i ) ;
+}
+
+int main ( int argc, char **argv )
+{
+#ifdef HAVE_GLUT_H
+ glutInit ( &argc, argv ) ;
+ glutInitDisplayMode ( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH ) ;
+ glutCreateWindow ( "You should never see this window!" ) ;
+
+ getPrints ( GL_VENDOR , "GL_VENDOR" ) ;
+ getPrints ( GL_RENDERER , "GL_RENDERER" ) ;
+ getPrints ( GL_VERSION , "GL_VERSION" ) ;
+ getPrints ( GL_EXTENSIONS , "GL_EXTENSIONS" ) ;
+
+ getPrinti ( GL_RED_BITS , "GL_RED_BITS" ) ;
+ getPrinti ( GL_GREEN_BITS , "GL_GREEN_BITS" ) ;
+ getPrinti ( GL_BLUE_BITS , "GL_BLUE_BITS" ) ;
+ getPrinti ( GL_ALPHA_BITS , "GL_ALPHA_BITS" ) ;
+ getPrinti ( GL_DEPTH_BITS , "GL_DEPTH_BITS" ) ;
+ getPrinti ( GL_INDEX_BITS , "GL_INDEX_BITS" ) ;
+ getPrinti ( GL_STENCIL_BITS, "GL_STENCIL_BITS" ) ;
+
+ getPrinti ( GL_ACCUM_RED_BITS , "GL_ACCUM_RED_BITS" ) ;
+ getPrinti ( GL_ACCUM_GREEN_BITS, "GL_ACCUM_GREEN_BITS" ) ;
+ getPrinti ( GL_ACCUM_BLUE_BITS , "GL_ACCUM_BLUE_BITS" ) ;
+ getPrinti ( GL_ACCUM_ALPHA_BITS, "GL_ACCUM_ALPHA_BITS" ) ;
+
+ getPrinti ( GL_AUX_BUFFERS, "GL_AUX_BUFFERS" ) ;
+
+ getPrinti ( GL_MAX_ATTRIB_STACK_DEPTH , "GL_MAX_ATTRIB_STACK_DEPTH" ) ;
+ getPrinti ( GL_MAX_NAME_STACK_DEPTH , "GL_MAX_NAME_STACK_DEPTH" ) ;
+ getPrinti ( GL_MAX_TEXTURE_STACK_DEPTH , "GL_MAX_TEXTURE_STACK_DEPTH" ) ;
+ getPrinti ( GL_MAX_PROJECTION_STACK_DEPTH, "GL_MAX_PROJECTION_STACK_DEPTH" ) ;
+ getPrinti ( GL_MAX_MODELVIEW_STACK_DEPTH , "GL_MAX_MODELVIEW_STACK_DEPTH" ) ;
+
+ getPrinti ( GL_MAX_CLIP_PLANES , "GL_MAX_CLIP_PLANES" ) ;
+ getPrinti ( GL_MAX_EVAL_ORDER , "GL_MAX_EVAL_ORDER" ) ;
+ getPrinti ( GL_MAX_LIGHTS , "GL_MAX_LIGHTS" ) ;
+ getPrinti ( GL_MAX_LIST_NESTING , "GL_MAX_LIST_NESTING" ) ;
+ getPrinti ( GL_MAX_TEXTURE_SIZE , "GL_MAX_TEXTURE_SIZE" ) ;
+ getPrint2i( GL_MAX_VIEWPORT_DIMS , "GL_MAX_VIEWPORT_DIMS" ) ;
+
+ getPrintf ( GL_POINT_SIZE_GRANULARITY, "GL_POINT_SIZE_GRANULARITY" ) ;
+ getPrint2f( GL_POINT_SIZE_RANGE , "GL_POINT_SIZE_RANGE" ) ;
+
+ printf("Default values:\n\n");
+
+ getPrinti( GL_UNPACK_ALIGNMENT , "GL_UNPACK_ALIGNMENT" ) ;
+ getPrinti( GL_UNPACK_ROW_LENGTH , "GL_UNPACK_ROW_LENGTH" ) ;
+ getPrinti( GL_UNPACK_SKIP_PIXELS , "GL_UNPACK_SKIP_PIXELS" ) ;
+ getPrinti( GL_UNPACK_SKIP_ROWS , "GL_UNPACK_SKIP_ROWS" ) ;
+ getPrinti( GL_BLEND_SRC , "GL_BLEND_SRC" ) ;
+ getPrinti( GL_BLEND_DST , "GL_BLEND_DST" ) ;
+#else
+
+ printf("GL Utility Toolkit (glut) was not found on this system.\n");
+#endif
+
+ return 0 ;
+}
--- /dev/null
+#!BPY
+
+# """
+# Name: 'YASim (.xml)'
+# Blender: 245
+# Group: 'Import'
+# Tooltip: 'Loads and visualizes a YASim FDM geometry'
+# """
+
+__author__ = "Melchior FRANZ < mfranz # aon : at >"
+__url__ = ["http://www.flightgear.org/", "http://cvs.flightgear.org/viewvc/source/utils/Modeller/yasim_import.py"]
+__version__ = "0.2"
+__bpydoc__ = """\
+yasim_import.py loads and visualizes a YASim FDM geometry
+=========================================================
+
+It is recommended to load the model superimposed over a greyed out and immutable copy of the aircraft model:
+
+ (0) put this script into ~/.blender/scripts/
+ (1) load or import aircraft model (menu -> "File" -> "Import" -> "AC3D (.ac) ...")
+ (2) create new *empty* scene (menu -> arrow button left of "SCE:scene1" combobox -> "ADD NEW" -> "empty")
+ (3) rename scene to yasim (not required)
+ (4) link to scene1 (F10 -> "Output" tab in "Buttons Window" -> arrow button left of text entry "No Set Scene" -> "scene1")
+ (5) now load the YASim config file (menu -> "File" -> "Import" -> "YASim (.xml) ...")
+
+This is good enough for simple checks. But if you are working on the YASim configuration, then you need a
+quick and convenient way to reload the file. In that case continue after (4):
+
+ (5) switch the button area at the bottom of the blender screen to "Scripts Window" mode (green python snake icon)
+ (6) load the YASim config file (menu -> "Scripts" -> "Import" -> "YASim (.xml) ...")
+ (7) make the "Scripts Window" area as small as possible by dragging the area separator down
+ (8) optionally split the "3D View" area and switch the right part to the "Outliner"
+ (9) press the "Reload YASim" button in the script area to reload the file
+
+
+If the 3D model is displaced with respect to the FDM model, then the <offsets> values from the
+model animation XML file should be added as comment to the YASim config file, as a line all by
+itself, with no spaces surrounding the equal signs. Spaces elsewhere are allowed. For example:
+
+ <offsets>
+ <x-m>3.45</x-m>
+ <z-m>-0.4</z-m>
+ <pitch-deg>5</pitch-deg>
+ </offsets>
+
+becomes:
+
+ <!-- offsets: x=3.45 z=-0.4 p=5 -->
+
+Possible variables are:
+
+ x ... <x-m>
+ y ... <y-m>
+ z ... <z-m>
+ h ... <heading-deg>
+ p ... <pitch-deg>
+ r ... <roll-deg>
+
+Of course, absolute FDM coordinates can then no longer directly be read from Blender's 3D view.
+The cursor coordinates display in the script area, however, shows the coordinates in YASim space.
+Note that object names don't contain XML indices but element numbers. YASim_flap0#2 is the third
+flap0 in the whole file, not necessarily in its parent XML group. A floating point part in the
+object name (e.g. YASim_flap0#2.004) only means that the geometry has been reloaded that often.
+It's an unavoidable consequence of how Blender deals with meshes.
+
+
+Elements are displayed as follows:
+
+ cockpit -> monkey head
+ fuselage -> blue "tube" (with only 12 sides for less clutter); center at "a"
+ vstab -> red with yellow control surfaces (flap0, flap1, slat, spoiler)
+ wing/mstab/hstab -> green with yellow control surfaces (which are always 20 cm deep);
+ symmetric surfaces are only displayed on the left side, unless
+ the "Mirror" button is active
+ thrusters (jet/propeller/thruster) -> dashed line from center to actionpt;
+ arrow from actionpt along thrust vector (always 1 m long);
+ propeller circle
+ rotor -> radius and rel_len_blade_start circle, normal and forward vector,
+ one blade at phi0 with direction arrow near blade tip
+ gear -> contact point and compression vector (no arrow head)
+ tank -> magenta cube (10 cm side length)
+ weight -> inverted cyan cone
+ ballast -> yellow cylinder
+ hitch -> hexagon (10 cm diameter)
+ hook -> dashed line for up angle, T-line for down angle
+ launchbar -> dashed line for up angles, T-line for down angles
+ (launchbar and holdback each)
+
+
+The Mirror button complements symmetrical surfaces (wing/hstab/mstab) and control surfaces
+(flap0/flap1/slat/spoiler). This is useful for asymmetrical aircraft, but has the disadvantage
+that it moves the surfaces' object centers from their usual place, yasim's [x, y, z] value,
+to [0, 0, 0]. Turning mirroring off restores the object center.
+
+
+
+Environment variable BLENDER_YASIM_IMPORT can be set to a space-separated list of options:
+
+ $ BLENDER_YASIM_IMPORT="mirror verbose" blender
+
+whereby:
+
+ verbose ... enables verbose logs
+ mirror ... enables mirroring of symmetric surfaces
+"""
+
+
+#--------------------------------------------------------------------------------
+# Copyright (C) 2009 Melchior FRANZ < mfranz # aon : at >
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#--------------------------------------------------------------------------------
+
+
+import Blender, BPyMessages, string, math, os
+from Blender.Mathutils import *
+from xml.sax import handler, make_parser
+
+
+CONFIG = string.split(os.getenv("BLENDER_YASIM_IMPORT") or "")
+YASIM_MATRIX = Matrix([-1, 0, 0, 0], [0, -1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1])
+ORIGIN = Vector(0, 0, 0)
+X = Vector(1, 0, 0)
+Y = Vector(0, 1, 0)
+Z = Vector(0, 0, 1)
+DEG2RAD = math.pi / 180
+RAD2DEG = 180 / math.pi
+
+NO_EVENT = 0
+RELOAD_BUTTON = 1
+CURSOR_BUTTON = 2
+MIRROR_BUTTON = 3
+
+
+
+class Global:
+ verbose = "verbose" in CONFIG
+ path = ""
+ matrix = None
+ data = None
+ cursor = ORIGIN
+ last_cursor = Vector(Blender.Window.GetCursorPos())
+ mirror_button = Blender.Draw.Create("mirror" in CONFIG)
+
+
+
+class Abort(Exception):
+ def __init__(self, msg, term = None):
+ self.msg = msg
+ self.term = term
+
+
+
+def log(msg):
+ if Global.verbose:
+ print(msg)
+
+
+
+def draw_dashed_line(mesh, start, end):
+ w = 0.04
+ step = w * (end - start).normalize()
+ n = len(mesh.verts)
+ for i in range(int(1 + 0.5 * (end - start).length / w)):
+ a = start + 2 * i * step
+ b = a + step
+ if (b - end).length < step.length:
+ b = end
+ mesh.verts.extend([a, b])
+ mesh.edges.extend([n + 2 * i, n + 2 * i + 1])
+
+
+
+def draw_arrow(mesh, start, end):
+ v = end - start
+ m = v.toTrackQuat('x', 'z').toMatrix().resize4x4() * TranslationMatrix(start)
+ v = v.length * X
+ n = len(mesh.verts)
+ mesh.verts.extend([ORIGIN * m , v * m, (v - 0.05 * X + 0.05 * Y) * m, (v - 0.05 * X - 0.05 * Y) * m]) # head
+ mesh.verts.extend([(ORIGIN + 0.05 * Y) * m, (ORIGIN - 0.05 * Y) * m]) # base
+ mesh.edges.extend([[n, n + 1], [n + 1, n + 2], [n + 1, n + 3], [n + 4, n + 5]])
+
+
+
+def draw_circle(mesh, numpoints, radius, matrix):
+ n = len(mesh.verts)
+ for i in range(numpoints):
+ angle = 2.0 * math.pi * i / numpoints
+ v = Vector(radius * math.cos(angle), radius * math.sin(angle), 0)
+ mesh.verts.extend([v * matrix])
+ for i in range(numpoints):
+ i1 = (i + 1) % numpoints
+ mesh.edges.extend([[n + i, n + i1]])
+
+
+
+class Item:
+ scene = Blender.Scene.GetCurrent()
+
+ def make_twosided(self, mesh):
+ mesh.faceUV = True
+ for f in mesh.faces:
+ f.mode |= Blender.Mesh.FaceModes.TWOSIDE | Blender.Mesh.FaceModes.OBCOL
+
+ def set_color(self, obj, color):
+ mat = Blender.Material.New()
+ mat.setRGBCol(color[0], color[1], color[2])
+ mat.setAlpha(color[3])
+ mat.mode |= Blender.Material.Modes.ZTRANSP | Blender.Material.Modes.TRANSPSHADOW
+ obj.transp = True
+
+ mesh = obj.getData(mesh = True)
+ mesh.materials += [mat]
+
+ for f in mesh.faces:
+ f.smooth = True
+ mesh.calcNormals()
+
+
+
+class Cockpit(Item):
+ def __init__(self, center):
+ mesh = Blender.Mesh.Primitives.Monkey()
+ mesh.transform(ScaleMatrix(0.13, 4) * Euler(90, 0, 90).toMatrix().resize4x4() * TranslationMatrix(Vector(-0.1, 0, -0.032)))
+ obj = self.scene.objects.new(mesh, "YASim_cockpit")
+ obj.setMatrix(TranslationMatrix(center) * Global.matrix)
+
+
+
+class Tank(Item):
+ def __init__(self, name, center):
+ mesh = Blender.Mesh.Primitives.Cube()
+ mesh.transform(ScaleMatrix(0.05, 4))
+ obj = self.scene.objects.new(mesh, name)
+ obj.setMatrix(TranslationMatrix(center) * Global.matrix)
+ self.set_color(obj, [1, 0, 1, 0.5])
+
+
+
+class Ballast(Item):
+ def __init__(self, name, center):
+ mesh = Blender.Mesh.Primitives.Cylinder()
+ mesh.transform(ScaleMatrix(0.05, 4))
+ obj = self.scene.objects.new(mesh, name)
+ obj.setMatrix(TranslationMatrix(center) * Global.matrix)
+ self.set_color(obj, [1, 1, 0, 0.5])
+
+
+
+class Weight(Item):
+ def __init__(self, name, center):
+ mesh = Blender.Mesh.Primitives.Cone()
+ mesh.transform(ScaleMatrix(0.05, 4))
+ obj = self.scene.objects.new(mesh, name)
+ obj.setMatrix(TranslationMatrix(center) * Global.matrix)
+ self.set_color(obj, [0, 1, 1, 0.5])
+
+
+
+class Gear(Item):
+ def __init__(self, name, center, compression):
+ mesh = Blender.Mesh.New()
+ mesh.verts.extend([ORIGIN, compression])
+ mesh.edges.extend([0, 1])
+ obj = self.scene.objects.new(mesh, name)
+ obj.setMatrix(TranslationMatrix(center) * Global.matrix)
+
+
+
+class Hook(Item):
+ def __init__(self, name, center, length, up_angle, dn_angle):
+ mesh = Blender.Mesh.New()
+ up = ORIGIN - length * math.cos(up_angle * DEG2RAD) * X - length * math.sin(up_angle * DEG2RAD) * Z
+ dn = ORIGIN - length * math.cos(dn_angle * DEG2RAD) * X - length * math.sin(dn_angle * DEG2RAD) * Z
+ mesh.verts.extend([ORIGIN, dn, dn + 0.05 * Y, dn - 0.05 * Y])
+ mesh.edges.extend([[0, 1], [2, 3]])
+ draw_dashed_line(mesh, ORIGIN, up)
+ draw_dashed_line(mesh, ORIGIN, dn)
+ obj = self.scene.objects.new(mesh, name)
+ obj.setMatrix(TranslationMatrix(center) * Global.matrix)
+
+
+
+class Launchbar(Item):
+ def __init__(self, name, lb, lb_length, hb, hb_length, up_angle, dn_angle):
+ mesh = Blender.Mesh.New()
+ hb = hb - lb
+ lb_tip = ORIGIN + lb_length * math.cos(dn_angle * DEG2RAD) * X - lb_length * math.sin(dn_angle * DEG2RAD) * Z
+ hb_tip = hb - hb_length * math.cos(dn_angle * DEG2RAD) * X - hb_length * math.sin(dn_angle * DEG2RAD) * Z
+ mesh.verts.extend([lb_tip, ORIGIN, hb, hb_tip, lb_tip + 0.05 * Y, lb_tip - 0.05 * Y, hb_tip + 0.05 * Y, hb_tip - 0.05 * Y])
+ mesh.edges.extend([[0, 1], [1, 2], [2, 3], [4, 5], [6, 7]])
+ draw_dashed_line(mesh, ORIGIN, lb_length * math.cos(up_angle * DEG2RAD) * X - lb_length * math.sin(up_angle * DEG2RAD) * Z)
+ draw_dashed_line(mesh, hb, hb - hb_length * math.cos(up_angle * DEG2RAD) * X - hb_length * math.sin(up_angle * DEG2RAD) * Z)
+ obj = self.scene.objects.new(mesh, name)
+ obj.setMatrix(TranslationMatrix(lb) * Global.matrix)
+
+
+
+class Hitch(Item):
+ def __init__(self, name, center):
+ mesh = Blender.Mesh.Primitives.Circle(6, 0.1)
+ obj = self.scene.objects.new(mesh, name)
+ obj.setMatrix(RotationMatrix(90, 4, "x") * TranslationMatrix(center) * Global.matrix)
+
+
+
+class Thrust:
+ def set_actionpt(self, p):
+ self.actionpt = p
+
+ def set_dir(self, d):
+ self.thrustvector = d
+
+
+
+class Thruster(Thrust, Item):
+ def __init__(self, name, center, thrustvector):
+ (self.name, self.center, self.actionpt, self.thrustvector) = (name, center, center, thrustvector)
+
+ def __del__(self):
+ a = self.actionpt - self.center
+ mesh = Blender.Mesh.New()
+ draw_dashed_line(mesh, ORIGIN, a)
+ draw_arrow(mesh, a, a + self.thrustvector.normalize())
+ obj = self.scene.objects.new(mesh, self.name)
+ obj.setMatrix(TranslationMatrix(self.center) * Global.matrix)
+
+
+
+class Propeller(Thrust, Item):
+ def __init__(self, name, center, radius):
+ (self.name, self.center, self.radius, self.actionpt, self.thrustvector) = (name, center, radius, center, -X)
+
+ def __del__(self):
+ a = self.actionpt - self.center
+ matrix = self.thrustvector.toTrackQuat('z', 'x').toMatrix().resize4x4() * TranslationMatrix(a)
+
+ mesh = Blender.Mesh.New()
+ mesh.verts.extend([ORIGIN * matrix, (ORIGIN + self.radius * X) * matrix])
+ mesh.edges.extend([[0, 1]])
+ draw_dashed_line(mesh, ORIGIN, a)
+ draw_arrow(mesh, a, a + self.thrustvector.normalize())
+
+ draw_circle(mesh, 128, self.radius, matrix)
+ obj = self.scene.objects.new(mesh, self.name)
+ obj.setMatrix(TranslationMatrix(self.center) * Global.matrix)
+
+
+
+class Jet(Thrust, Item):
+ def __init__(self, name, center, rotate):
+ (self.name, self.center, self.actionpt) = (name, center, center)
+ self.thrustvector = -X * RotationMatrix(rotate, 4, "y")
+
+ def __del__(self):
+ a = self.actionpt - self.center
+ mesh = Blender.Mesh.New()
+ draw_dashed_line(mesh, ORIGIN, a)
+ draw_arrow(mesh, a, a + self.thrustvector.normalize())
+ obj = self.scene.objects.new(mesh, self.name)
+ obj.setMatrix(TranslationMatrix(self.center) * Global.matrix)
+
+
+
+class Fuselage(Item):
+ def __init__(self, name, a, b, width, taper, midpoint):
+ numvert = 12
+ angle = []
+ for i in range(numvert):
+ alpha = i * 2 * math.pi / float(numvert)
+ angle.append([math.cos(alpha), math.sin(alpha)])
+
+ axis = b - a
+ length = axis.length
+ mesh = Blender.Mesh.New()
+
+ for i in range(numvert):
+ mesh.verts.extend([[0, 0.5 * width * taper * angle[i][0], 0.5 * width * taper * angle[i][1]]])
+ for i in range(numvert):
+ mesh.verts.extend([[midpoint * length, 0.5 * width * angle[i][0], 0.5 * width * angle[i][1]]])
+ for i in range(numvert):
+ mesh.verts.extend([[length, 0.5 * width * taper * angle[i][0], 0.5 * width * taper * angle[i][1]]])
+ for i in range(numvert):
+ i1 = (i + 1) % numvert
+ mesh.faces.extend([[i, i1, i1 + numvert, i + numvert]])
+ mesh.faces.extend([[i + numvert, i1 + numvert, i1 + 2 * numvert, i + 2 * numvert]])
+
+ mesh.verts.extend([ORIGIN, length * X])
+ obj = self.scene.objects.new(mesh, name)
+ obj.setMatrix(axis.toTrackQuat('x', 'y').toMatrix().resize4x4() * TranslationMatrix(a) * Global.matrix)
+ self.set_color(obj, [0, 0, 0.5, 0.4])
+
+
+
+class Rotor(Item):
+ def __init__(self, name, center, up, fwd, numblades, radius, chord, twist, taper, rel_len_blade_start, phi0, ccw):
+ matrix = RotationMatrix(phi0, 4, "z") * up.toTrackQuat('z', 'x').toMatrix().resize4x4()
+ invert = matrix.copy().invert()
+ direction = [-1, 1][ccw]
+ twist *= DEG2RAD
+ a = ORIGIN + rel_len_blade_start * radius * X
+ b = ORIGIN + radius * X
+ tw = 0.5 * chord * taper * math.cos(twist) * Y + 0.5 * direction * chord * taper * math.sin(twist) * Z
+
+ mesh = Blender.Mesh.New()
+ mesh.verts.extend([ORIGIN, a, b, a + 0.5 * chord * Y, a - 0.5 * chord * Y, b + tw, b - tw])
+ mesh.edges.extend([[0, 1], [1, 2], [1, 3], [1, 4], [3, 5], [4, 6], [5, 6]])
+ draw_circle(mesh, 64, rel_len_blade_start * radius, Matrix())
+ draw_circle(mesh, 128, radius, Matrix())
+ draw_arrow(mesh, ORIGIN, up * invert)
+ draw_arrow(mesh, ORIGIN, fwd * invert)
+ b += 0.1 * X + direction * chord * Y
+ draw_arrow(mesh, b, b + min(0.5 * radius, 1) * direction * Y)
+ obj = self.scene.objects.new(mesh, name)
+ obj.setMatrix(matrix * TranslationMatrix(center) * Global.matrix)
+
+
+
+class Wing(Item):
+ def __init__(self, name, root, length, chord, incidence, twist, taper, sweep, dihedral):
+ # <1--0--2
+ # \ | /
+ # 4-3-5
+ self.is_symmetric = not name.startswith("YASim_vstab#")
+ mesh = Blender.Mesh.New()
+ mesh.verts.extend([ORIGIN, ORIGIN + 0.5 * chord * X, ORIGIN - 0.5 * chord * X])
+ tip = ORIGIN + math.cos(sweep * DEG2RAD) * length * Y - math.sin(sweep * DEG2RAD) * length * X
+ tipfore = tip + 0.5 * taper * chord * math.cos(twist * DEG2RAD) * X + 0.5 * taper * chord * math.sin(twist * DEG2RAD) * Z
+ tipaft = tip + tip - tipfore
+ mesh.verts.extend([tip, tipfore, tipaft])
+ mesh.faces.extend([[0, 1, 4, 3], [2, 0, 3, 5]])
+
+ self.make_twosided(mesh)
+
+ obj = self.scene.objects.new(mesh, name)
+ mesh.transform(Euler(dihedral, -incidence, 0).toMatrix().resize4x4())
+ self.set_color(obj, [[0.5, 0.0, 0, 0.5], [0.0, 0.5, 0, 0.5]][self.is_symmetric])
+ (self.obj, self.mesh) = (obj, mesh)
+
+ if self.is_symmetric and Global.mirror_button.val:
+ mod = obj.modifiers.append(Blender.Modifier.Type.MIRROR)
+ mod[Blender.Modifier.Settings.AXIS_X] = False
+ mod[Blender.Modifier.Settings.AXIS_Y] = True
+ mod[Blender.Modifier.Settings.AXIS_Z] = False
+ mesh.transform(TranslationMatrix(root)) # must move object center to x axis
+ obj.setMatrix(Global.matrix)
+ else:
+ obj.setMatrix(TranslationMatrix(root) * Global.matrix)
+
+ def add_flap(self, name, start, end):
+ a = Vector(self.mesh.verts[2].co)
+ b = Vector(self.mesh.verts[5].co)
+ c = 0.2 * (Vector(self.mesh.verts[0].co - a)).normalize()
+ m = self.obj.getMatrix()
+
+ mesh = Blender.Mesh.New()
+ i0 = a + start * (b - a)
+ i1 = a + end * (b - a)
+ mesh.verts.extend([i0, i1, i0 + c, i1 + c])
+ mesh.faces.extend([[0, 1, 3, 2]])
+
+ self.make_twosided(mesh)
+
+ obj = self.scene.objects.new(mesh, name)
+ obj.setMatrix(m)
+ self.set_color(obj, [0.8, 0.8, 0, 0.9])
+
+ if self.is_symmetric and Global.mirror_button.val:
+ mod = obj.modifiers.append(Blender.Modifier.Type.MIRROR)
+ mod[Blender.Modifier.Settings.AXIS_X] = False
+ mod[Blender.Modifier.Settings.AXIS_Y] = True
+ mod[Blender.Modifier.Settings.AXIS_Z] = False
+
+
+
+class import_yasim(handler.ErrorHandler, handler.ContentHandler):
+ ignored = ["cruise", "approach", "control-input", "control-output", "control-speed", \
+ "control-setting", "stall", "airplane", "piston-engine", "turbine-engine", \
+ "rotorgear", "tow", "winch", "solve-weight"]
+
+
+ # err_handler
+ def warning(self, exception):
+ print((self.error_string("Warning", exception)))
+
+ def error(self, exception):
+ print((self.error_string("Error", exception)))
+
+ def fatalError(self, exception):
+ raise Abort(str(exception), self.error_string("Fatal", exception))
+
+ def error_string(self, tag, e):
+ (column, line) = (e.getColumnNumber(), e.getLineNumber())
+ return "%s: %s\n%s%s^" % (tag, str(e), Global.data[line - 1], column * ' ')
+
+
+ # doc_handler
+ def setDocumentLocator(self, locator):
+ self.locator = locator
+
+ def startDocument(self):
+ self.tags = []
+ self.counter = {}
+ self.items = [None]
+
+ def endDocument(self):
+ for o in Item.scene.objects:
+ o.sel = True
+
+ def startElement(self, tag, attrs):
+ if len(self.tags) == 0 and tag != "airplane":
+ raise Abort("this isn't a YASim config file (bad root tag at line %d)" % self.locator.getLineNumber())
+
+ self.tags.append(tag)
+ path = string.join(self.tags, '/')
+ item = Item()
+ parent = self.items[-1]
+
+ if self.counter.has_key(tag):
+ self.counter[tag] += 1
+ else:
+ self.counter[tag] = 0
+
+ if tag == "cockpit":
+ c = Vector(float(attrs["x"]), float(attrs["y"]), float(attrs["z"]))
+ log("\033[31mcockpit x=%f y=%f z=%f\033[m" % (c[0], c[1], c[2]))
+ item = Cockpit(c)
+
+ elif tag == "fuselage":
+ a = Vector(float(attrs["ax"]), float(attrs["ay"]), float(attrs["az"]))
+ b = Vector(float(attrs["bx"]), float(attrs["by"]), float(attrs["bz"]))
+ width = float(attrs["width"])
+ taper = float(attrs.get("taper", 1))
+ midpoint = float(attrs.get("midpoint", 0.5))
+ log("\033[32mfuselage ax=%f ay=%f az=%f bx=%f by=%f bz=%f width=%f taper=%f midpoint=%f\033[m" % \
+ (a[0], a[1], a[2], b[0], b[1], b[2], width, taper, midpoint))
+ item = Fuselage("YASim_%s#%d" % (tag, self.counter[tag]), a, b, width, taper, midpoint)
+
+ elif tag == "gear":
+ c = Vector(float(attrs["x"]), float(attrs["y"]), float(attrs["z"]))
+ compression = float(attrs.get("compression", 1))
+ up = Z * compression
+ if attrs.has_key("upx"):
+ up = Vector(float(attrs["upx"]), float(attrs["upy"]), float(attrs["upz"])).normalize() * compression
+ log("\033[35;1mgear x=%f y=%f z=%f compression=%f upx=%f upy=%f upz=%f\033[m" \
+ % (c[0], c[1], c[2], compression, up[0], up[1], up[2]))
+ item = Gear("YASim_gear#%d" % self.counter[tag], c, up)
+
+ elif tag == "jet":
+ c = Vector(float(attrs["x"]), float(attrs["y"]), float(attrs["z"]))
+ rotate = float(attrs.get("rotate", 0))
+ log("\033[36;1mjet x=%f y=%f z=%f rotate=%f\033[m" % (c[0], c[1], c[2], rotate))
+ item = Jet("YASim_jet#%d" % self.counter[tag], c, rotate)
+
+ elif tag == "propeller":
+ c = Vector(float(attrs["x"]), float(attrs["y"]), float(attrs["z"]))
+ radius = float(attrs["radius"])
+ log("\033[36;1m%s x=%f y=%f z=%f radius=%f\033[m" % (tag, c[0], c[1], c[2], radius))
+ item = Propeller("YASim_propeller#%d" % self.counter[tag], c, radius)
+
+ elif tag == "thruster":
+ c = Vector(float(attrs["x"]), float(attrs["y"]), float(attrs["z"]))
+ v = Vector(float(attrs["vx"]), float(attrs["vy"]), float(attrs["vz"]))
+ log("\033[36;1m%s x=%f y=%f z=%f vx=%f vy=%f vz=%f\033[m" % (tag, c[0], c[1], c[2], v[0], v[1], v[2]))
+ item = Thruster("YASim_thruster#%d" % self.counter[tag], c, v)
+
+ elif tag == "actionpt":
+ if not isinstance(parent, Thrust):
+ raise Abort("%s is not part of a thruster/propeller/jet at line %d" \
+ % (path, self.locator.getLineNumber()))
+
+ c = Vector(float(attrs["x"]), float(attrs["y"]), float(attrs["z"]))
+ log("\t\033[36mactionpt x=%f y=%f z=%f\033[m" % (c[0], c[1], c[2]))
+ parent.set_actionpt(c)
+
+ elif tag == "dir":
+ if not isinstance(parent, Thrust):
+ raise Abort("%s is not part of a thruster/propeller/jet at line %d" \
+ % (path, self.locator.getLineNumber()))
+
+ c = Vector(float(attrs["x"]), float(attrs["y"]), float(attrs["z"]))
+ log("\t\033[36mdir x=%f y=%f z=%f\033[m" % (c[0], c[1], c[2]))
+ parent.set_dir(c)
+
+ elif tag == "tank":
+ c = Vector(float(attrs["x"]), float(attrs["y"]), float(attrs["z"]))
+ log("\033[34;1m%s x=%f y=%f z=%f\033[m" % (tag, c[0], c[1], c[2]))
+ item = Tank("YASim_tank#%d" % self.counter[tag], c)
+
+ elif tag == "ballast":
+ c = Vector(float(attrs["x"]), float(attrs["y"]), float(attrs["z"]))
+ log("\033[34m%s x=%f y=%f z=%f\033[m" % (tag, c[0], c[1], c[2]))
+ item = Ballast("YASim_ballast#%d" % self.counter[tag], c)
+
+ elif tag == "weight":
+ c = Vector(float(attrs["x"]), float(attrs["y"]), float(attrs["z"]))
+ log("\033[34m%s x=%f y=%f z=%f\033[m" % (tag, c[0], c[1], c[2]))
+ item = Weight("YASim_weight#%d" % self.counter[tag], c)
+
+ elif tag == "hook":
+ c = Vector(float(attrs["x"]), float(attrs["y"]), float(attrs["z"]))
+ length = float(attrs.get("length", 1))
+ up_angle = float(attrs.get("up-angle", 0))
+ down_angle = float(attrs.get("down-angle", 70))
+ log("\033[35m%s x=%f y=%f z=%f length=%f up-angle=%f down-angle=%f\033[m" \
+ % (tag, c[0], c[1], c[2], length, up_angle, down_angle))
+ item = Hook("YASim_hook#%d" % self.counter[tag], c, length, up_angle, down_angle)
+
+ elif tag == "hitch":
+ c = Vector(float(attrs["x"]), float(attrs["y"]), float(attrs["z"]))
+ log("\033[35m%s x=%f y=%f z=%f\033[m" % (tag, c[0], c[1], c[2]))
+ item = Hitch("YASim_hitch#%d" % self.counter[tag], c)
+
+ elif tag == "launchbar":
+ c = Vector(float(attrs["x"]), float(attrs["y"]), float(attrs["z"]))
+ length = float(attrs.get("length", 1))
+ up_angle = float(attrs.get("up-angle", -45))
+ down_angle = float(attrs.get("down-angle", 45))
+ holdback = Vector(float(attrs.get("holdback-x", c[0])), float(attrs.get("holdback-y", c[1])), float(attrs.get("holdback-z", c[2])))
+ holdback_length = float(attrs.get("holdback-length", 2))
+ log("\033[35m%s x=%f y=%f z=%f length=%f down-angle=%f up-angle=%f holdback-x=%f holdback-y=%f holdback-z+%f holdback-length=%f\033[m" \
+ % (tag, c[0], c[1], c[2], length, down_angle, up_angle, \
+ holdback[0], holdback[1], holdback[2], holdback_length))
+ item = Launchbar("YASim_launchbar#%d" % self.counter[tag], c, length, holdback, holdback_length, up_angle, down_angle)
+
+ elif tag == "wing" or tag == "hstab" or tag == "vstab" or tag == "mstab":
+ root = Vector(float(attrs["x"]), float(attrs["y"]), float(attrs["z"]))
+ length = float(attrs["length"])
+ chord = float(attrs["chord"])
+ incidence = float(attrs.get("incidence", 0))
+ twist = float(attrs.get("twist", 0))
+ taper = float(attrs.get("taper", 1))
+ sweep = float(attrs.get("sweep", 0))
+ dihedral = float(attrs.get("dihedral", [0, 90][tag == "vstab"]))
+ log("\033[33;1m%s x=%f y=%f z=%f length=%f chord=%f incidence=%f twist=%f taper=%f sweep=%f dihedral=%f\033[m" \
+ % (tag, root[0], root[1], root[2], length, chord, incidence, twist, taper, sweep, dihedral))
+ item = Wing("YASim_%s#%d" % (tag, self.counter[tag]), root, length, chord, incidence, twist, taper, sweep, dihedral)
+
+ elif tag == "flap0" or tag == "flap1" or tag == "slat" or tag == "spoiler":
+ if not isinstance(parent, Wing):
+ raise Abort("%s is not part of a wing or stab at line %d" \
+ % (path, self.locator.getLineNumber()))
+
+ start = float(attrs["start"])
+ end = float(attrs["end"])
+ log("\t\033[33m%s start=%f end=%f\033[m" % (tag, start, end))
+ parent.add_flap("YASim_%s#%d" % (tag, self.counter[tag]), start, end)
+
+ elif tag == "rotor":
+ c = Vector(float(attrs.get("x", 0)), float(attrs.get("y", 0)), float(attrs.get("z", 0)))
+ norm = Vector(float(attrs.get("nx", 0)), float(attrs.get("ny", 0)), float(attrs.get("nz", 1)))
+ fwd = Vector(float(attrs.get("fx", 1)), float(attrs.get("fy", 0)), float(attrs.get("fz", 0)))
+ diameter = float(attrs.get("diameter", 10.2))
+ numblades = int(attrs.get("numblades", 4))
+ chord = float(attrs.get("chord", 0.3))
+ twist = float(attrs.get("twist", 0))
+ taper = float(attrs.get("taper", 1))
+ rel_len_blade_start = float(attrs.get("rel-len-blade-start", 0))
+ phi0 = float(attrs.get("phi0", 0))
+ ccw = not not int(attrs.get("ccw", 0))
+
+ log(("\033[36;1mrotor x=%f y=%f z=%f nx=%f ny=%f nz=%f fx=%f fy=%f fz=%f numblades=%d diameter=%f " \
+ + "chord=%f twist=%f taper=%f rel_len_blade_start=%f phi0=%f ccw=%d\033[m") \
+ % (c[0], c[1], c[2], norm[0], norm[1], norm[2], fwd[0], fwd[1], fwd[2], numblades, \
+ diameter, chord, twist, taper, rel_len_blade_start, phi0, ccw))
+ item = Rotor("YASim_rotor#%d" % self.counter[tag], c, norm, fwd, numblades, 0.5 * diameter, chord, \
+ twist, taper, rel_len_blade_start, phi0, ccw)
+
+ elif tag not in self.ignored:
+ log("\033[30;1m%s\033[m" % path)
+
+ self.items.append(item)
+
+ def endElement(self, tag):
+ self.tags.pop()
+ self.items.pop()
+
+
+
+def extract_matrix(filedata, tag):
+ v = { 'x': 0.0, 'y': 0.0, 'z': 0.0, 'h': 0.0, 'p': 0.0, 'r': 0.0 }
+ has_offsets = False
+ for line in filedata:
+ line = string.strip(line)
+ if not line.startswith("<!--") or not line.endswith("-->"):
+ continue
+ line = string.strip(line[4:-3])
+ if not string.lower(line).startswith("%s:" % tag):
+ continue
+ line = string.strip(line[len(tag) + 1:])
+ for assignment in string.split(line):
+ (key, value) = string.split(assignment, '=', 2)
+ v[string.strip(key)] = float(string.strip(value))
+ has_offsets = True
+
+ if not has_offsets:
+ return None
+
+ print(("using offsets: x=%f y=%f z=%f h=%f p=%f r=%f" % (v['x'], v['y'], v['z'], v['h'], v['p'], v['r'])))
+ return Euler(v['r'], v['p'], v['h']).toMatrix().resize4x4() * TranslationMatrix(Vector(v['x'], v['y'], v['z']))
+
+
+
+def load_yasim_config(path):
+ if BPyMessages.Error_NoFile(path):
+ return
+
+ Blender.Window.WaitCursor(1)
+ Blender.Window.EditMode(0)
+
+ print(("loading '%s'" % path))
+ try:
+ for o in Item.scene.objects:
+ if o.name.startswith("YASim_"):
+ Item.scene.objects.unlink(o)
+
+ f = open(path)
+ Global.data = f.readlines()
+ f.close
+
+ Global.path = path
+ Global.matrix = YASIM_MATRIX
+ matrix = extract_matrix(Global.data, "offsets")
+ if matrix:
+ Global.matrix *= matrix.invert()
+
+ Global.yasim.parse(path)
+ Blender.Registry.SetKey("FGYASimImportExport", { "path": path }, False)
+ Global.data = None
+
+ except Abort, e:
+ print(("%s\nAborting ..." % (e.term or e.msg)))
+ Blender.Draw.PupMenu("Error%t|" + e.msg)
+
+ Blender.Window.RedrawAll()
+ Blender.Window.WaitCursor(0)
+
+
+
+def gui_draw():
+ from Blender import BGL, Draw
+ (width, height) = Blender.Window.GetAreaSize()
+
+ BGL.glClearColor(0.4, 0.4, 0.45, 1)
+ BGL.glClear(BGL.GL_COLOR_BUFFER_BIT)
+
+ BGL.glColor3f(1, 1, 1)
+ BGL.glRasterPos2f(5, 55)
+ Draw.Text("FlightGear YASim Import: '%s'" % Global.path)
+
+ Draw.PushButton("Reload", RELOAD_BUTTON, 5, 5, 80, 32, "reload YASim config file")
+ Global.mirror_button = Draw.Toggle("Mirror", MIRROR_BUTTON, 100, 5, 50, 16, Global.mirror_button.val, \
+ "show symmetric surfaces on both sides (reloads config)")
+ Draw.PushButton("Update Cursor", CURSOR_BUTTON, width - 650, 5, 100, 32, "update cursor display (in YASim coordinate system)")
+
+ BGL.glRasterPos2f(width - 530 + Blender.Draw.GetStringWidth("Vector from last") - Blender.Draw.GetStringWidth("Current"), 24)
+ Draw.Text("Current cursor pos: x = %+.3f y = %+.3f z = %+.3f" % tuple(Global.cursor))
+
+ c = Global.cursor - Global.last_cursor
+ BGL.glRasterPos2f(width - 530, 7)
+ Draw.Text("Vector from last cursor pos: x = %+.3f y = %+.3f z = %+.3f length = %.3f m" % (c[0], c[1], c[2], c.length))
+
+
+
+def gui_event(ev, value):
+ if ev == Blender.Draw.ESCKEY:
+ Blender.Draw.Exit()
+
+
+
+def gui_button(n):
+ if n == NO_EVENT:
+ return
+
+ elif n == RELOAD_BUTTON:
+ load_yasim_config(Global.path)
+
+ elif n == CURSOR_BUTTON:
+ Global.last_cursor = Global.cursor
+ Global.cursor = Vector(Blender.Window.GetCursorPos()) * Global.matrix.invert()
+ d = Global.cursor - Global.last_cursor
+ print(("cursor: x=\"%f\" y=\"%f\" z=\"%f\" dx=%f dy=%f dz=%f length=%f" \
+ % (Global.cursor[0], Global.cursor[1], Global.cursor[2], d[0], d[1], d[2], d.length)))
+
+ elif n == MIRROR_BUTTON:
+ load_yasim_config(Global.path)
+
+ Blender.Draw.Redraw(1)
+
+
+
+def main():
+ log(6 * "\n")
+ registry = Blender.Registry.GetKey("FGYASimImportExport", False)
+ if registry and "path" in registry and Blender.sys.exists(Blender.sys.expandpath(registry["path"])):
+ path = registry["path"]
+ else:
+ path = ""
+
+ xml_handler = import_yasim()
+ Global.yasim = make_parser()
+ Global.yasim.setContentHandler(xml_handler)
+ Global.yasim.setErrorHandler(xml_handler)
+
+ if Blender.Window.GetScreenInfo(Blender.Window.Types.SCRIPT):
+ Blender.Draw.Register(gui_draw, gui_event, gui_button)
+
+ Blender.Window.FileSelector(load_yasim_config, "Import YASim Configuration File", path)
+
+
+
+main()
+
apr_pool_t *mysvn_pool = NULL;
svn_client_ctx_t *mysvn_ctx = NULL;
svn_opt_revision_t *mysvn_rev = NULL;
+svn_opt_revision_t *mysvn_rev_peg = NULL;
static const svn_version_checklist_t mysvn_checklist[] = {
{ "svn_subr", svn_subr_version },
mysvn_ctx->auth_baton = ab;
mysvn_ctx->conflict_func = NULL;
mysvn_ctx->conflict_baton = NULL;
+ // Now our magic revisions
mysvn_rev = (svn_opt_revision_t*) apr_palloc(pool,
sizeof(svn_opt_revision_t));
if (!mysvn_rev)
return EXIT_FAILURE;
+ mysvn_rev_peg = (svn_opt_revision_t*) apr_palloc(pool,
+ sizeof(svn_opt_revision_t));
+ if (!mysvn_rev_peg)
+ return EXIT_FAILURE;
mysvn_rev->kind = svn_opt_revision_head;
+ mysvn_rev_peg->kind = svn_opt_revision_unspecified;
// Success if we got this far
mysvn_pool = pool;
return EXIT_SUCCESS;
if (mysvn_setup() != EXIT_SUCCESS)
exit(1);
apr_pool_t *subpool = svn_pool_create(mysvn_pool);
- err = svn_client_checkout(NULL,
+ err = svn_client_checkout3(NULL,
command,
dest_base_dir,
+ mysvn_rev_peg,
mysvn_rev,
- 1,
+ svn_depth_infinity,
+ 0,
+ 0,
mysvn_ctx,
subpool);
if (err) {
source_base = rsync_base;
}
- // We just want one grid square, no FGFS communications
- if (testing) {
- sync_areas( 37, -123, 0, 0 );
- exit(0);
- }
-
// Must call this before any other net stuff
netInit( &argc,argv );
int last_lat = nowhere;
int last_lon = nowhere;
bool recv_msg = false;
- char synced_other = 'J';
+
+ char synced_other;
+ for ( synced_other = 'K'; synced_other <= 'Z'; synced_other++ ) {
+ char dir[512];
+ snprintf( dir, 512, "Airports/%c", synced_other );
+ waitingTiles.push_back( dir );
+ }
+ for ( synced_other = 'A'; synced_other <= 'J'; synced_other++ ) {
+ char dir[512];
+ snprintf( dir, 512, "Airports/%c", synced_other );
+ waitingTiles.push_back( dir );
+ }
+ if ( use_svn ) {
+ waitingTiles.push_back( "Models" );
+ }
while ( true ) {
recv_msg = false;
+ if ( testing ) {
+ // No FGFS communications
+ lat = 37;
+ lon = -123;
+ recv_msg = (lat != last_lat) || (lon != last_lon);
+ }
while ( (len = s.recv(msg, maxlen, 0)) >= 0 ) {
msg[len] = '\0';
recv_msg = true;
}
if ( recv_msg ) {
- if ( lat != last_lat || lon != last_lon ) {
+ // Ignore messages where the location does not change
+ if ( lat != last_lat || lon != last_lon ) {
cout << "pos in msg = " << lat << "," << lon << endl;
std::deque<std::string> oldRequests;
oldRequests.swap( waitingTiles );
waitingTiles.push_back( oldRequests.front() );
oldRequests.pop_front();
}
- } else if ( !waitingTiles.empty() ) {
- getWaitingTile();
- } else {
- if ( last_lat == nowhere || last_lon == nowhere ) {
- cout << "Waiting for FGFS to finish startup" << endl;
- }
- char c;
- while ( !isdigit( c = ++synced_other ) && !isupper( c ) );
-
- char dir[512];
- snprintf( dir, 512, "Airports/%c", c );
- waitingTiles.push_back( dir );
- }
+ last_lat = lat;
+ last_lon = lon;
+ }
+ } else
- last_lat = lat;
- last_lon = lon;
- } else if ( !waitingTiles.empty() ) {
+ // No messages inbound, so process some pending work
+ if ( !waitingTiles.empty() ) {
getWaitingTile();
- }
+ } else
+
+ if ( testing ) {
+ exit( 0 );
+ } else
+
+ if ( last_lat == nowhere || last_lon == nowhere ) {
+ cout << "FlightGear is not running, exiting." << endl;
+ exit( 1 );
+ } else
ulSleep( 1 );
} // while true