Skip to content

Commit

Permalink
Merge branch 'master' of git://gitorious.org/jsbsim/jsbsim
Browse files Browse the repository at this point in the history
Conflicts:
	JSBSim.vcxproj
  • Loading branch information
James Goppert committed May 20, 2012
2 parents 3cd13dd + 7c9d6cc commit bfb1022
Show file tree
Hide file tree
Showing 25 changed files with 440 additions and 120 deletions.
Binary file added JSBSimGlobeLogo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 51 additions & 22 deletions doc/JSBSim.dox
@@ -1,4 +1,4 @@
# Doxyfile 1.7.2
# Doxyfile 1.7.3

# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project
Expand Down Expand Up @@ -31,7 +31,20 @@ PROJECT_NAME = "JSBSim Flight Dynamics Model"
# This could be handy for archiving the generated documentation or
# if some version control system is used.

PROJECT_NUMBER = "1.0 (3 September 2011)"
PROJECT_NUMBER = "1.0 (13 May 2012)"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer
# a quick idea about the purpose of the project. Keep the description short.

PROJECT_BRIEF =

# With the PROJECT_LOGO tag one can specify an logo or icon that is
# included in the documentation. The maximum height of the logo should not
# exceed 55 pixels and the maximum width should not exceed 200 pixels.
# Doxygen will copy the logo to the output directory.

PROJECT_LOGO = JSBSimGlobeLogo.png

# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
Expand All @@ -57,7 +70,7 @@ CREATE_SUBDIRS = NO
# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.

OUTPUT_LANGUAGE = English
Expand Down Expand Up @@ -290,7 +303,7 @@ TYPEDEF_HIDES_STRUCT = NO
# For small to medium size projects (<1000 input files) the default value is
# probably good enough. For larger projects a too small cache size can cause
# doxygen to be busy swapping symbols to and from disk most of the time
# causing a significant performance penality.
# causing a significant performance penalty.
# If the system has enough physical memory increasing the cache will improve the
# performance by keeping more symbols in memory. Note that the value works on
# a logarithmic scale so increasing the size by one will roughly double the
Expand Down Expand Up @@ -449,6 +462,15 @@ SORT_GROUP_NAMES = NO

SORT_BY_SCOPE_NAME = NO

# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
# do proper type resolution of all parameters of a function it will reject a
# match between the prototype and the implementation of a member function even
# if there is only one candidate or it is obvious which candidate to choose
# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
# will still accept a match between prototype and implementation in such cases.

STRICT_PROTO_MATCHING = NO

# The GENERATE_TODOLIST tag can be used to enable (YES) or
# disable (NO) the todo list. This list is created by putting \todo
# commands in the documentation.
Expand Down Expand Up @@ -615,7 +637,7 @@ INPUT_ENCODING = UTF-8
# blank the following patterns are tested:
# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
# *.f90 *.f *.vhd *.vhdl
# *.f90 *.f *.for *.vhd *.vhdl

FILE_PATTERNS = *.h \
*.cpp
Expand All @@ -633,7 +655,7 @@ RECURSIVE = NO
EXCLUDE =

# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
# directories that are symbolic links (a Unix filesystem feature) are excluded
# directories that are symbolic links (a Unix file system feature) are excluded
# from the input.

EXCLUDE_SYMLINKS = NO
Expand Down Expand Up @@ -694,8 +716,8 @@ INPUT_FILTER =
# basis. Doxygen will compare the file name with each pattern and apply the
# filter if there is a match. The filters are a list of the form:
# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
# is applied to all files.
# info on how filters are used. If FILTER_PATTERNS is empty or if
# non of the patterns match the file name, INPUT_FILTER is applied.

FILTER_PATTERNS =

Expand All @@ -705,6 +727,14 @@ FILTER_PATTERNS =

FILTER_SOURCE_FILES = NO

# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
# and it is also possible to disable source filtering for a specific pattern
# using *.ext= (so without naming a filter). This option only has effect when
# FILTER_SOURCE_FILES is enabled.

FILTER_SOURCE_PATTERNS =

#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
Expand Down Expand Up @@ -1123,7 +1153,7 @@ SERVER_BASED_SEARCH = NO
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
# generate Latex output.

GENERATE_LATEX = NO
GENERATE_LATEX = YES

# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
Expand Down Expand Up @@ -1174,13 +1204,13 @@ LATEX_HEADER =
# contain links (just like the HTML output) instead of page references
# This makes the output suitable for online browsing using a pdf viewer.

PDF_HYPERLINKS = NO
PDF_HYPERLINKS = YES

# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
# plain latex in the generated Makefile. Set this option to YES to get a
# higher quality PDF documentation.

USE_PDFLATEX = NO
USE_PDFLATEX = YES

# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
# command to the generated LaTeX files. This will instruct LaTeX to keep
Expand Down Expand Up @@ -1406,15 +1436,15 @@ PREDEFINED =
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.
# The macro definition that is found in the sources will be used.
# Use the PREDEFINED tag if you want to use a different macro definition.
# Use the PREDEFINED tag if you want to use a different macro definition that
# overrules the definition found in the source code.

EXPAND_AS_DEFINED =

# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
# doxygen's preprocessor will remove all function-like macros that are alone
# on a line, have an all uppercase name, and do not end with a semicolon. Such
# function macros are typically used for boiler-plate code, and will confuse
# the parser if not removed.
# doxygen's preprocessor will remove all references to function-like macros
# that are alone on a line, have an all uppercase name, and do not end with a
# semicolon, because these will confuse the parser if not removed.

SKIP_FUNCTION_MACROS = YES

Expand Down Expand Up @@ -1503,11 +1533,10 @@ HAVE_DOT = YES

DOT_NUM_THREADS = 0

# By default doxygen will write a font called FreeSans.ttf to the output
# directory and reference it in all dot files that doxygen generates. This
# font does not include all possible unicode characters however, so when you need
# these (or just want a differently looking font) you can specify the font name
# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
# By default doxygen will write a font called Helvetica to the output
# directory and reference it in all dot files that doxygen generates.
# When you want a differently looking font you can specify the font name
# using DOT_FONTNAME. You need to make sure dot is able to find the font,
# which can be done by putting it in a standard location or by setting the
# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
# containing the font.
Expand Down Expand Up @@ -1599,7 +1628,7 @@ GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES

# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
# generated by dot. Possible values are png, jpg, or gif.
# generated by dot. Possible values are png, svg, gif or svg.
# If left blank png will be used.

DOT_IMAGE_FORMAT = png
Expand Down
11 changes: 3 additions & 8 deletions src/FGFDMExec.cpp
Expand Up @@ -59,7 +59,6 @@ INCLUDES
#include "models/FGAircraft.h"
#include "models/FGAccelerations.h"
#include "models/FGPropagate.h"
#include "models/propulsion/FGTank.h"
#include "models/FGAuxiliary.h"
#include "models/FGInput.h"
#include "models/FGOutput.h"
Expand All @@ -72,7 +71,7 @@ using namespace std;

namespace JSBSim {

static const char *IdSrc = "$Id: FGFDMExec.cpp,v 1.130 2012/04/01 17:05:51 bcoconni Exp $";
static const char *IdSrc = "$Id: FGFDMExec.cpp,v 1.133 2012/04/14 18:10:43 bcoconni Exp $";
static const char *IdHdr = ID_FDMEXEC;

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down Expand Up @@ -416,9 +415,7 @@ void FGFDMExec::LoadInputs(unsigned int idx)
Propulsion->in.PropFeather = FCS->GetPropFeather();
Propulsion->in.H_agl = Propagate->GetDistanceAGL();
Propulsion->in.PQR = Propagate->GetPQR();
for (int i=0; i<Propulsion->GetNumTanks(); i++) {
Propulsion->in.vTankBodyVec[i] = MassBalance->StructuralToBody(Propulsion->GetTank(i)->GetXYZ());
}
Propulsion->in.vXYZcg = MassBalance->GetXYZcg();

break;
case eAerodynamics:
Expand Down Expand Up @@ -538,9 +535,7 @@ void FGFDMExec::LoadModelConstants(void)
Auxiliary->in.Wingspan = Aircraft->GetWingSpan();
Auxiliary->in.Wingchord = Aircraft->Getcbar();
GroundReactions->in.vXYZcg = MassBalance->GetXYZcg();
for (int i=0; i<Propulsion->GetNumTanks(); i++) {
Propulsion->in.vTankBodyVec[i] = MassBalance->StructuralToBody(Propulsion->GetTank(i)->GetXYZ());
}
Propulsion->in.vXYZcg = MassBalance->GetXYZcg();

LoadPlanetConstants();
}
Expand Down
4 changes: 3 additions & 1 deletion src/initialization/FGInitialCondition.cpp
Expand Up @@ -63,7 +63,7 @@ using namespace std;

namespace JSBSim {

static const char *IdSrc = "$Id: FGInitialCondition.cpp,v 1.80 2012/01/22 16:31:56 bcoconni Exp $";
static const char *IdSrc = "$Id: FGInitialCondition.cpp,v 1.81 2012/04/08 15:22:56 jberndt Exp $";
static const char *IdHdr = ID_INITIALCONDITION;

//******************************************************************************
Expand Down Expand Up @@ -1255,6 +1255,8 @@ bool FGInitialCondition::Load_v2(void)
vPQR_body = Tl2b * position.GetTec2l() * vAttRate;
} else if (frame == "local") {
vPQR_body = Tl2b * (vAttRate + vOmegaLocal);
} else if (frame == "body") {
vPQR_body = vAttRate;
} else if (!frame.empty()) { // misspelling of frame

cerr << endl << fgred << " Attitude rate frame type: \"" << frame
Expand Down
4 changes: 1 addition & 3 deletions src/math/FGLocation.cpp
Expand Up @@ -48,7 +48,7 @@ INCLUDES

namespace JSBSim {

static const char *IdSrc = "$Id: FGLocation.cpp,v 1.28 2012/03/26 04:42:46 jberndt Exp $";
static const char *IdSrc = "$Id: FGLocation.cpp,v 1.29 2012/04/14 12:14:37 bcoconni Exp $";
static const char *IdHdr = ID_LOCATION;
using std::cerr;
using std::endl;
Expand Down Expand Up @@ -134,8 +134,6 @@ FGLocation::FGLocation(const FGColumnVector3& lv)
FGLocation::FGLocation(const FGLocation& l)
: mECLoc(l.mECLoc), mCacheValid(l.mCacheValid)
{
mCacheValid = false;

a = l.a;
b = l.b;
a2 = l.a2;
Expand Down
56 changes: 54 additions & 2 deletions src/math/FGModelFunctions.cpp
Expand Up @@ -37,14 +37,16 @@ COMMENTS, REFERENCES, and NOTES
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/

#include "FGModelFunctions.h"
#include <iostream>
#include <sstream>
#include <string>
#include "FGModelFunctions.h"

using namespace std;

namespace JSBSim {

static const char *IdSrc = "$Id: FGModelFunctions.cpp,v 1.4 2010/09/07 00:40:03 jberndt Exp $";
static const char *IdSrc = "$Id: FGModelFunctions.cpp,v 1.5 2012/04/13 13:25:52 jberndt Exp $";
static const char *IdHdr = ID_MODELFUNCTIONS;

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down Expand Up @@ -163,4 +165,54 @@ void FGModelFunctions::RunPostFunctions(void)
(*it)->GetValue();
}

//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

string FGModelFunctions::GetFunctionStrings(const string& delimeter) const
{
string FunctionStrings = "";
bool firstime = true;
unsigned int sd;

for (sd = 0; sd < PreFunctions.size(); sd++) {
if (firstime) {
firstime = false;
} else {
FunctionStrings += delimeter;
}
FunctionStrings += PreFunctions[sd]->GetName();
}

for (sd = 0; sd < PostFunctions.size(); sd++) {
if (firstime) {
firstime = false;
} else {
FunctionStrings += delimeter;
}
FunctionStrings += PostFunctions[sd]->GetName();
}

return FunctionStrings;
}

//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

string FGModelFunctions::GetFunctionValues(const string& delimeter) const
{
ostringstream buf;

for (unsigned int sd = 0; sd < PreFunctions.size(); sd++) {
if (buf.tellp() > 0) buf << delimeter;
buf << PreFunctions[sd]->GetValue();
}

for (unsigned int sd = 0; sd < PostFunctions.size(); sd++) {
if (buf.tellp() > 0) buf << delimeter;
buf << PostFunctions[sd]->GetValue();
}

return buf.str();
}

//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

}
13 changes: 12 additions & 1 deletion src/math/FGModelFunctions.h
Expand Up @@ -44,7 +44,7 @@ INCLUDES
DEFINITIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/

#define ID_MODELFUNCTIONS "$Id: FGModelFunctions.h,v 1.4 2011/06/21 04:41:54 jberndt Exp $"
#define ID_MODELFUNCTIONS "$Id: FGModelFunctions.h,v 1.5 2012/04/13 13:25:52 jberndt Exp $"

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FORWARD DECLARATIONS
Expand Down Expand Up @@ -83,6 +83,17 @@ class FGModelFunctions : public FGJSBBase
void PreLoad(Element* el, FGPropertyManager* PropertyManager, std::string prefix="");
void PostLoad(Element* el, FGPropertyManager* PropertyManager, std::string prefix="");

/** Gets the strings for the current set of functions.
@param delimeter either a tab or comma string depending on output type
@return a string containing the descriptive names for all functions */
std::string GetFunctionStrings(const std::string& delimeter) const;

/** Gets the function 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
functions */
std::string GetFunctionValues(const std::string& delimeter) const;

protected:
std::vector <FGFunction*> PreFunctions;
std::vector <FGFunction*> PostFunctions;
Expand Down
23 changes: 22 additions & 1 deletion src/models/FGAerodynamics.cpp
Expand Up @@ -48,7 +48,7 @@ using namespace std;

namespace JSBSim {

static const char *IdSrc = "$Id: FGAerodynamics.cpp,v 1.44 2011/10/23 14:23:13 jentron Exp $";
static const char *IdSrc = "$Id: FGAerodynamics.cpp,v 1.45 2012/04/13 13:25:52 jberndt Exp $";
static const char *IdHdr = ID_AERODYNAMICS;

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down Expand Up @@ -372,6 +372,17 @@ string FGAerodynamics::GetAeroFunctionStrings(const string& delimeter) const
AeroFunctionStrings += AeroFunctions[axis][sd]->GetName();
}
}

string FunctionStrings = FGModelFunctions::GetFunctionStrings(delimeter);

if (FunctionStrings.size() > 0) {
if (AeroFunctionStrings.size() > 0) {
AeroFunctionStrings += delimeter + FunctionStrings;
} else {
AeroFunctionStrings = FunctionStrings;
}
}

return AeroFunctionStrings;
}

Expand All @@ -388,6 +399,16 @@ string FGAerodynamics::GetAeroFunctionValues(const string& delimeter) const
}
}

string FunctionValues = FGModelFunctions::GetFunctionValues(delimeter);

if (FunctionValues.size() > 0) {
if (buf.str().size() > 0) {
buf << delimeter << FunctionValues;
} else {
buf << FunctionValues;
}
}

return buf.str();
}

Expand Down

0 comments on commit bfb1022

Please sign in to comment.