diff --git a/configure.ac b/configure.ac
index 20be78508..8285ffce2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -368,6 +368,7 @@ case "${host}" in
dnl Mac OS X
LIBS="$LIBS -framework GLUT -framework OpenGL -framework AGL -framework $macAPI -lobjc"
+ LDFLAGS="$LDFLAGS -headerpad_max_install_names"
joystick_LIBS="$joystick_LIBS -framework IOKit -framework CoreFoundation"
;;
diff --git a/package/mac/FlightGear.icns b/package/mac/FlightGear.icns
new file mode 100644
index 000000000..3ed453186
Binary files /dev/null and b/package/mac/FlightGear.icns differ
diff --git a/package/mac/build-mac-nightly-dmg.rb b/package/mac/build-mac-nightly-dmg.rb
new file mode 100755
index 000000000..21290ec03
--- /dev/null
+++ b/package/mac/build-mac-nightly-dmg.rb
@@ -0,0 +1,95 @@
+#!/usr/bin/ruby
+
+require 'ERB'
+
+$osgLibs = ['osgFX', 'osgParticle', 'osg', 'osgGA', 'osgText', 'osgUtil', 'osgSim', 'osgViewer', 'osgDB']
+$osgPlugins = ['ac', 'osg', 'freetype', 'qt', 'imageio', 'rgb', 'txf']
+$osgDylibVersion='63'
+$alutSourcePath='/Library/Frameworks/ALUT.framework'
+
+def fix_install_names(object)
+ #puts "fixing install names for #{object}"
+
+ $osgLibs.each do |l|
+ oldName = "lib#{l}.#{$osgDylibVersion}.dylib"
+ newName = "@executable_path/../Frameworks/#{oldName}"
+ `install_name_tool -change #{oldName} #{newName} #{object}`
+ end
+
+ oldName = "libOpenThreads.12.dylib"
+ newName= "@executable_path/../Frameworks/#{oldName}"
+ `install_name_tool -change #{oldName} #{newName} #{object}`
+
+ alutBundlePath = "@executable_path/../Frameworks/Alut.framework"
+ alutLib = "Versions/A/ALUT"
+ `install_name_tool -change #{$alutSourcePath}/#{alutLib} #{alutBundlePath}/#{alutLib} #{object}`
+end
+
+prefixDir=Dir.pwd + "/dist"
+dmgDir=Dir.pwd + "/image"
+srcDir=Dir.pwd + "/flightgear"
+dmgPath = Dir.pwd + "/fg_mac_nightly.dmg"
+
+puts "Erasing previous image dir"
+`rm -rf #{dmgDir}`
+
+bundle=dmgDir + "/FlightGear.app"
+contents=bundle + "/Contents"
+macosDir=contents + "/MacOS"
+frameworksDir=contents +"/Frameworks"
+resourcesDir=contents+"/Resources"
+osgPluginsDir=contents+"/PlugIns/osgPlugins-2.9.7"
+volName="\"FlightGear Nightly Build\""
+
+puts "Creating directory structure"
+`mkdir -p #{macosDir}`
+`mkdir -p #{frameworksDir}`
+`mkdir -p #{resourcesDir}`
+`mkdir -p #{osgPluginsDir}`
+
+puts "Copying binaries"
+bins = ['fgfs', 'terrasync', 'fgjs']
+bins.each do |b|
+ `cp #{prefixDir}/bin/#{b} #{macosDir}/#{b}`
+ fix_install_names("#{macosDir}/#{b}")
+end
+
+puts "copying libraries"
+$osgLibs.each do |l|
+ libFile = "lib#{l}.#{$osgDylibVersion}.dylib"
+ `cp #{prefixDir}/lib/#{libFile} #{frameworksDir}`
+ fix_install_names("#{frameworksDir}/#{libFile}")
+end
+
+# and not forgetting OpenThreads
+libFile = "libOpenThreads.12.dylib"
+`cp #{prefixDir}/lib/#{libFile} #{frameworksDir}`
+
+$osgPlugins.each do |p|
+ pluginFile = "osgdb_#{p}.so"
+ `cp #{prefixDir}/lib/osgPlugins-2.9.7/#{pluginFile} #{osgPluginsDir}`
+ fix_install_names("#{osgPluginsDir}/#{pluginFile}")
+end
+
+# custom ALUT
+# must copy frameworks using ditto
+`ditto #{$alutSourcePath} #{frameworksDir}/ALUT.framework`
+
+# Info.plist
+template = File.read("#{srcDir}/package/mac/nightly.plist.in")
+output = ERB.new(template).result(binding)
+
+File.open("#{contents}/Info.plist", 'w') { |f|
+ f.write(output)
+}
+
+`cp #{srcDir}/package/mac/nightly-readme.rtf #{dmgDir}/ReadMe.rtf`
+`cp #{srcDir}/package/mac/FlightGear.icns #{resourcesDir}/FlightGear.icns`
+`cp #{srcDir}/COPYING #{dmgDir}`
+
+puts "Creating DMG"
+
+createArgs = "-format UDBZ -imagekey bzip2-level=9 -quiet -volname #{volName}"
+
+`rm #{dmgPath}`
+`hdiutil create -srcfolder #{dmgDir} #{createArgs} #{dmgPath}`
diff --git a/package/mac/nightly-readme.rtf b/package/mac/nightly-readme.rtf
new file mode 100644
index 000000000..10e4c54a2
--- /dev/null
+++ b/package/mac/nightly-readme.rtf
@@ -0,0 +1,53 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf320
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fmodern\fcharset0 Courier;}
+{\colortbl;\red255\green255\blue255;}
+\paperw11900\paperh16840\margl1440\margr1440\vieww14720\viewh15300\viewkind0
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\qc\pardirnatural
+
+\f0\b\fs30 \cf0 FlightGear nightly build
+\b0\fs24 \
+\
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
+
+\b\fs26 \cf0 Introduction
+\b0\fs24 \
+\
+This is an automatically generated build of FlightGear from the developer code repositories (Git), for Intel Macs running Mac OSX 10.5 (Leopard) or higher. It does not include a GUI launcher, despite being packaged as an application - see 'Running' below.\
+\
+This build receives NO manual testing, and only the most limited automatic testing (at present). Use it at your own risk, and report problems you encounter via the appropriate project communication channels - the {\field{\*\fldinst{HYPERLINK "https://lists.sourceforge.net/lists/listinfo/flightgear-devel"}}{\fldrslt developer mailing list}} or the {\field{\*\fldinst{HYPERLINK "http://code.google.com/p/flightgear-bugs/issues/list"}}{\fldrslt bug tracker}}. Please don't use IRC or the forums as a bug-reporting tool, since they are difficult to track over time.\
+\
+
+\b\fs26 Running
+\b0\fs24 \
+\
+No GUI launcher tool is included, unlike official releases. Launch the
+\f1 fgfs
+\f0 binary from Terminal, passing appropriate arguments, such as
+\f1 --fg-root
+\f0 ,
+\f1 --aircraft
+\f0 and
+\f1 --airport
+\f0 . If you're not familiar with using Terminal to launch a bundled application, or specifying arguments directly to FlightGear, this build is not for you!\
+\
+This build will read settings from
+\f1 .fgfsrc
+\f0 as normal, if you wish to save standard options (such as the root, aircraft and scenery dirs) instead of specifying them on the command line. Note all directory paths passed to FlightGear must be absolute.\
+\
+
+\b\fs26 Examples
+\b0\fs24 \
+\
+
+\f1 ./FlightGear.app/Contents/MacOS/fgfs --fg-root=$HOME/Documents/fgdata --aircraft=b1900d\
+
+\f0 \
+
+\f1 ./FlightGear.app/Contents/MacOS/fgfs --fg-root=$HOME/fgdata --fg-scenery=$HOME/terrasync-scenery
+\f0 \
+\
+
+\b\fs26 TerraSync
+\b0\fs24 \
+\
+A terrasync binary is included in the bundle, also in Contents/MacOS. Again it is assumed the user is familiar with manually specifying appropriate terrasync arguments to specify a scenery direction, and also connecting terrasync to FlightGear.}
\ No newline at end of file
diff --git a/package/mac/nightly.plist.in b/package/mac/nightly.plist.in
new file mode 100644
index 000000000..f8b2c562a
--- /dev/null
+++ b/package/mac/nightly.plist.in
@@ -0,0 +1,25 @@
+
+
+
+
+ CFBundleIconFile
+ FlightGear.icns
+ CFBundlePackageType
+ APPL
+ CFBundleGetInfoString
+ FlightGear nightly build
+ CFBundleSignature
+ ????
+ CFBundleExecutable
+ fgfs
+ CFBundleIdentifier
+ org.flightgear.FlightGear
+ CFBundleVersion
+ 2.0
+ CFBundleShortVersionString
+ unstable nightly build
+ LSMinimumSystemVersion
+ 10.5.0
+
+
+
diff --git a/projects/VC100/FlightGear/FlightGear.vcxproj b/projects/VC100/FlightGear/FlightGear.vcxproj
index 990696f94..b8ebf96b9 100644
--- a/projects/VC100/FlightGear/FlightGear.vcxproj
+++ b/projects/VC100/FlightGear/FlightGear.vcxproj
@@ -384,23 +384,6 @@
-
-
- $(IntDir)%(Filename)1.obj
- $(IntDir)%(Filename)1.obj
-
-
-
-
-
-
-
-
-
-
- $(IntDir)%(Filename)1.obj
- $(IntDir)%(Filename)1.obj
-
@@ -409,7 +392,6 @@
-
@@ -984,8 +966,6 @@
-
-
@@ -994,7 +974,6 @@
-
diff --git a/projects/VC100/FlightGear/FlightGear.vcxproj.filters b/projects/VC100/FlightGear/FlightGear.vcxproj.filters
index 392ec0ef7..95059cdab 100644
--- a/projects/VC100/FlightGear/FlightGear.vcxproj.filters
+++ b/projects/VC100/FlightGear/FlightGear.vcxproj.filters
@@ -228,39 +228,6 @@
Lib_Autopilot
-
- Lib_Cockpit
-
-
- Lib_Cockpit
-
-
- Lib_Cockpit
-
-
- Lib_Cockpit
-
-
- Lib_Cockpit
-
-
- Lib_Cockpit
-
-
- Lib_Cockpit
-
-
- Lib_Cockpit
-
-
- Lib_Cockpit
-
-
- Lib_Cockpit
-
-
- Lib_Cockpit
-
Lib_Cockpit
@@ -276,9 +243,6 @@
Lib_JSBSim
-
- Lib_JSBSim
-
Lib_JSBSim
@@ -1676,12 +1640,6 @@
Lib_Autopilot
-
- Lib_Cockpit
-
-
- Lib_Cockpit
-
Lib_Cockpit
@@ -1697,9 +1655,6 @@
Lib_JSBSim
-
- Lib_JSBSim
-
Lib_JSBSim
diff --git a/projects/VC100/fgviewer/fgviewer.vcxproj b/projects/VC100/fgviewer/fgviewer.vcxproj
index 4c37c4d30..50652682a 100644
--- a/projects/VC100/fgviewer/fgviewer.vcxproj
+++ b/projects/VC100/fgviewer/fgviewer.vcxproj
@@ -1,207 +1,211 @@
-
-
-
-
- Debug
- Win32
-
-
- Debug
- x64
-
-
- Release
- Win32
-
-
- Release
- x64
-
-
-
- {0F13A557-EC52-481D-ADFB-9209C068FCEB}
- Win32Proj
-
-
-
- Application
- MultiByte
-
-
- Application
- MultiByte
-
-
- Application
- MultiByte
-
-
- Application
- MultiByte
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <_ProjectFileVersion>10.0.30319.1
- $(SolutionDir)$(Platform)\$(Configuration)\
- $(Platform)\$(Configuration)\
- true
- $(SolutionDir)$(Platform)\$(Configuration)\
- $(Platform)\$(Configuration)\
- true
- $(SolutionDir)$(Platform)\$(Configuration)\
- $(Platform)\$(Configuration)\
- false
- $(SolutionDir)$(Platform)\$(Configuration)\
- $(Platform)\$(Configuration)\
- false
- AllRules.ruleset
-
-
- AllRules.ruleset
-
-
- AllRules.ruleset
-
-
- AllRules.ruleset
-
-
-
-
-
- Disabled
- ..\..\..\..\SimGear;..\..\..\..\install\msvc100\OpenSceneGraph\include;..\..\..\..\boost_1_43_0;..\..\..\..\3rdParty\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_CONSOLE;NOMINMAX;%(PreprocessorDefinitions)
- true
- EnableFastChecks
- MultiThreadedDebugDLL
- true
-
-
- Level3
- EditAndContinue
-
-
- opengl32.lib;osgd.lib;osgDBd.lib;osgViewerd.lib;osgGAd.lib;openthreadsd.lib;osgParticled.lib;osgUtild.lib;osgTextd.lib;ul_d.lib;sg_d.lib;zlibd.lib;%(AdditionalDependencies)
- ..\..\..\..\install\msvc100\OpenSceneGraph\lib;..\..\..\..\3rdParty\lib;%(AdditionalLibraryDirectories)
- true
- $(OutDir)fgviewer.pdb
- Console
- false
-
-
- MachineX86
-
-
-
-
- X64
-
-
- Disabled
- ..\..\..\..\SimGear;..\..\..\..\install\msvc100-64\OpenSceneGraph\include;..\..\..\..\boost_1_43_0;..\..\..\..\3rdParty.x64\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_CONSOLE;NOMINMAX;%(PreprocessorDefinitions)
- true
- EnableFastChecks
- MultiThreadedDebugDLL
- true
-
-
- Level3
- EditAndContinue
-
-
- opengl32.lib;osgd.lib;osgDBd.lib;osgViewerd.lib;osgGAd.lib;openthreadsd.lib;osgParticled.lib;osgUtild.lib;osgTextd.lib;ul_d.lib;sg_d.lib;zlibd.lib;%(AdditionalDependencies)
- ..\..\..\..\install\msvc100-64\OpenSceneGraph\lib;..\..\..\..\3rdParty.x64\lib;%(AdditionalLibraryDirectories)
- true
- $(OutDir)fgviewer.pdb
- Console
- false
-
-
- MachineX64
-
-
-
-
- ..\..\..\..\SimGear;..\..\..\..\install\msvc100\OpenSceneGraph\include;..\..\..\..\boost_1_43_0;..\..\..\..\3rdParty\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_CONSOLE;NOMINMAX;%(PreprocessorDefinitions)
- MultiThreadedDLL
- true
-
-
- Level3
- ProgramDatabase
- AnySuitable
-
-
- opengl32.lib;osg.lib;osgDB.lib;osgViewer.lib;osgGA.lib;openthreads.lib;osgParticle.lib;osgUtil.lib;osgText.lib;ul.lib;sg.lib;zlib.lib;%(AdditionalDependencies)
- ..\..\..\..\install\msvc100\OpenSceneGraph\lib;..\..\..\..\3rdParty\lib;%(AdditionalLibraryDirectories)
- true
- Console
- true
- true
- false
-
-
- MachineX86
-
-
-
-
- X64
-
-
- ..\..\..\..\SimGear;..\..\..\..\install\msvc100-64\OpenSceneGraph\include;..\..\..\..\boost_1_43_0;..\..\..\..\3rdParty.x64\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_CONSOLE;NOMINMAX;%(PreprocessorDefinitions)
- MultiThreadedDLL
- true
-
-
- Level3
- ProgramDatabase
-
-
- opengl32.lib;osg.lib;osgDB.lib;osgViewer.lib;osgGA.lib;openthreads.lib;osgParticle.lib;osgUtil.lib;osgText.lib;ul.lib;sg.lib;zlib.lib;%(AdditionalDependencies)
- ..\..\..\..\install\msvc100-64\OpenSceneGraph\lib;..\..\..\..\3rdParty.x64\lib;%(AdditionalLibraryDirectories)
- true
- Console
- true
- true
- false
-
-
- MachineX64
-
-
-
-
-
-
-
- {22540cd3-d3ca-4c86-a773-80aeee3acded}
-
-
-
-
-
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {0F13A557-EC52-481D-ADFB-9209C068FCEB}
+ Win32Proj
+
+
+
+ Application
+ MultiByte
+
+
+ Application
+ MultiByte
+
+
+ Application
+ MultiByte
+
+
+ Application
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.30319.1
+ $(SolutionDir)$(Platform)\$(Configuration)\
+ $(Platform)\$(Configuration)\
+ true
+ $(SolutionDir)$(Platform)\$(Configuration)\
+ $(Platform)\$(Configuration)\
+ true
+ $(SolutionDir)$(Platform)\$(Configuration)\
+ $(Platform)\$(Configuration)\
+ false
+ $(SolutionDir)$(Platform)\$(Configuration)\
+ $(Platform)\$(Configuration)\
+ false
+ AllRules.ruleset
+
+
+ AllRules.ruleset
+
+
+ AllRules.ruleset
+
+
+ AllRules.ruleset
+
+
+
+
+
+ Disabled
+ ..\..\..\..\SimGear;..\..\..\..\install\msvc100\OpenSceneGraph\include;..\..\..\..\boost_1_43_0;..\..\..\..\3rdParty\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_CONSOLE;NOMINMAX;%(PreprocessorDefinitions)
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ true
+
+
+ Level3
+ EditAndContinue
+
+
+ opengl32.lib;osgd.lib;osgDBd.lib;osgViewerd.lib;osgGAd.lib;openthreadsd.lib;osgParticled.lib;osgUtild.lib;osgTextd.lib;ul_d.lib;sg_d.lib;zlibd.lib;%(AdditionalDependencies)
+ ..\..\..\..\install\msvc100\OpenSceneGraph\lib;..\..\..\..\3rdParty\lib;%(AdditionalLibraryDirectories)
+ true
+ $(OutDir)fgviewer.pdb
+ Console
+ false
+
+
+ MachineX86
+ MultiplyDefinedSymbolOnly
+
+
+
+
+ X64
+
+
+ Disabled
+ ..\..\..\..\SimGear;..\..\..\..\install\msvc100-64\OpenSceneGraph\include;..\..\..\..\boost_1_43_0;..\..\..\..\3rdParty.x64\include;%(AdditionalIncludeDirectories)
+ WIN32;_DEBUG;_CONSOLE;NOMINMAX;%(PreprocessorDefinitions)
+ true
+ EnableFastChecks
+ MultiThreadedDebugDLL
+ true
+
+
+ Level3
+ EditAndContinue
+
+
+ opengl32.lib;osgd.lib;osgDBd.lib;osgViewerd.lib;osgGAd.lib;openthreadsd.lib;osgParticled.lib;osgUtild.lib;osgTextd.lib;ul_d.lib;sg_d.lib;zlibd.lib;%(AdditionalDependencies)
+ ..\..\..\..\install\msvc100-64\OpenSceneGraph\lib;..\..\..\..\3rdParty.x64\lib;%(AdditionalLibraryDirectories)
+ true
+ $(OutDir)fgviewer.pdb
+ Console
+ false
+
+
+ MachineX64
+ MultiplyDefinedSymbolOnly
+
+
+
+
+ ..\..\..\..\SimGear;..\..\..\..\install\msvc100\OpenSceneGraph\include;..\..\..\..\boost_1_43_0;..\..\..\..\3rdParty\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_CONSOLE;NOMINMAX;%(PreprocessorDefinitions)
+ MultiThreadedDLL
+ true
+
+
+ Level3
+ ProgramDatabase
+ AnySuitable
+
+
+ opengl32.lib;osg.lib;osgDB.lib;osgViewer.lib;osgGA.lib;openthreads.lib;osgParticle.lib;osgUtil.lib;osgText.lib;ul.lib;sg.lib;zlib.lib;%(AdditionalDependencies)
+ ..\..\..\..\install\msvc100\OpenSceneGraph\lib;..\..\..\..\3rdParty\lib;%(AdditionalLibraryDirectories)
+ true
+ Console
+ true
+ true
+ false
+
+
+ MachineX86
+ MultiplyDefinedSymbolOnly
+
+
+
+
+ X64
+
+
+ ..\..\..\..\SimGear;..\..\..\..\install\msvc100-64\OpenSceneGraph\include;..\..\..\..\boost_1_43_0;..\..\..\..\3rdParty.x64\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_CONSOLE;NOMINMAX;%(PreprocessorDefinitions)
+ MultiThreadedDLL
+ true
+
+
+ Level3
+ ProgramDatabase
+
+
+ opengl32.lib;osg.lib;osgDB.lib;osgViewer.lib;osgGA.lib;openthreads.lib;osgParticle.lib;osgUtil.lib;osgText.lib;ul.lib;sg.lib;zlib.lib;%(AdditionalDependencies)
+ ..\..\..\..\install\msvc100-64\OpenSceneGraph\lib;..\..\..\..\3rdParty.x64\lib;%(AdditionalLibraryDirectories)
+ true
+ Console
+ true
+ true
+ false
+
+
+ MachineX64
+ MultiplyDefinedSymbolOnly
+
+
+
+
+
+
+
+ {22540cd3-d3ca-4c86-a773-80aeee3acded}
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Autopilot/digitalfilter.cxx b/src/Autopilot/digitalfilter.cxx
index bdd39397a..57bca13c8 100644
--- a/src/Autopilot/digitalfilter.cxx
+++ b/src/Autopilot/digitalfilter.cxx
@@ -303,7 +303,8 @@ bool ExponentialFilterImplementation::configure( const std::string & nodeName, S
/* --------------------------------------------------------------------------------- */
DigitalFilter::DigitalFilter() :
- AnalogComponent()
+ AnalogComponent(),
+ _initializeTo(INITIALIZE_INPUT)
{
}
@@ -335,6 +336,20 @@ bool DigitalFilter::configure(const string& nodeName, SGPropertyNode_ptr configN
return true;
}
+ if( nodeName == "initialize-to" ) {
+ string s( configNode->getStringValue() );
+ if( s == "input" ) {
+ _initializeTo = INITIALIZE_INPUT;
+ } else if( s == "output" ) {
+ _initializeTo = INITIALIZE_OUTPUT;
+ } else if( s == "none" ) {
+ _initializeTo = INITIALIZE_NONE;
+ } else {
+ SG_LOG( SG_AUTOPILOT, SG_WARN, "unhandled initialize-to value '" << s << "' ignored" );
+ }
+ return true;
+ }
+
SG_LOG( SG_AUTOPILOT, SG_BULK, "DigitalFilter::configure(" << nodeName << ") [unhandled]" << endl );
return false; // not handled by us, let the base class try
}
@@ -344,8 +359,22 @@ void DigitalFilter::update( bool firstTime, double dt)
if( _implementation == NULL ) return;
if( firstTime ) {
- SG_LOG(SG_AUTOPILOT,SG_DEBUG, "First time initialization of " << get_name() << " to " << _valueInput.get_value() );
- _implementation->initialize( _valueInput.get_value() );
+ switch( _initializeTo ) {
+
+ case INITIALIZE_INPUT:
+ SG_LOG(SG_AUTOPILOT,SG_DEBUG, "First time initialization of " << get_name() << " to " << _valueInput.get_value() );
+ _implementation->initialize( _valueInput.get_value() );
+ break;
+
+ case INITIALIZE_OUTPUT:
+ SG_LOG(SG_AUTOPILOT,SG_DEBUG, "First time initialization of " << get_name() << " to " << get_output_value() );
+ _implementation->initialize( get_output_value() );
+ break;
+
+ default:
+ SG_LOG(SG_AUTOPILOT,SG_DEBUG, "First time initialization of " << get_name() << " to (uninitialized)" );
+ break;
+ }
}
double input = _valueInput.get_value() - _referenceInput.get_value();
diff --git a/src/Autopilot/digitalfilter.hxx b/src/Autopilot/digitalfilter.hxx
index 4bc37a904..d9b0ac48d 100644
--- a/src/Autopilot/digitalfilter.hxx
+++ b/src/Autopilot/digitalfilter.hxx
@@ -53,6 +53,12 @@ class DigitalFilter : public AnalogComponent
private:
SGSharedPtr _implementation;
+ enum InitializeTo {
+ INITIALIZE_OUTPUT,
+ INITIALIZE_INPUT,
+ INITIALIZE_NONE
+ };
+
protected:
bool configure( const std::string & nodeName, SGPropertyNode_ptr configNode);
void update( bool firstTime, double dt);
@@ -61,6 +67,7 @@ protected:
InputValueList _samples;
InputValueList _rateOfChange;
InputValueList _gain;
+ InitializeTo _initializeTo;
public:
DigitalFilter();
diff --git a/src/Main/Makefile.am b/src/Main/Makefile.am
index b7d7ed87c..60df638c1 100644
--- a/src/Main/Makefile.am
+++ b/src/Main/Makefile.am
@@ -125,7 +125,7 @@ fgfs_LDADD = \
$(openal_LIBS) \
$(EVENT_LIBS)
-fgfs_LDFLAGS = $(fgfs_PLIB_FW) $(fgfs_OSG_FW)
+fgfs_LDFLAGS = $(fgfs_PLIB_FW) $(fgfs_OSG_FW) $(LDFLAGS)
metar_SOURCES = metar_main.cxx