Merge branches 'jmt/aircraft-name' and 'jmt/runway'
This commit is contained in:
commit
d2c7179cd0
2 changed files with 7 additions and 5 deletions
|
@ -151,9 +151,8 @@ void FGRunway::processThreshold(SGPropertyNode* aThreshold)
|
||||||
_displ_thresh = aThreshold->getDoubleValue("displ-m") * SG_METER_TO_FEET;
|
_displ_thresh = aThreshold->getDoubleValue("displ-m") * SG_METER_TO_FEET;
|
||||||
_stopway = aThreshold->getDoubleValue("stopw-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,
|
// compute the new runway center, based on the threshold lat/lon and length,
|
||||||
// and any displaced threshold.
|
double offsetFt = (0.5 * _length);
|
||||||
double offsetFt = (0.5 * _length) - _displ_thresh;
|
|
||||||
SGGeod newCenter;
|
SGGeod newCenter;
|
||||||
double dummy;
|
double dummy;
|
||||||
SGGeodesy::direct(newThreshold, _heading, offsetFt * SG_FEET_TO_METER, newCenter, dummy);
|
SGGeodesy::direct(newThreshold, _heading, offsetFt * SG_FEET_TO_METER, newCenter, dummy);
|
||||||
|
|
|
@ -49,6 +49,8 @@
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <boost/algorithm/string/compare.hpp>
|
||||||
|
#include <boost/algorithm/string/predicate.hpp>
|
||||||
|
|
||||||
#include <simgear/constants.h>
|
#include <simgear/constants.h>
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
|
@ -135,6 +137,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
|
using namespace boost::algorithm;
|
||||||
|
|
||||||
extern const char *default_root;
|
extern const char *default_root;
|
||||||
|
|
||||||
|
@ -553,7 +556,7 @@ static string fgFindAircraftPath( const SGPath &path, const string &aircraft,
|
||||||
n->setStringValue(path.str().c_str());
|
n->setStringValue(path.str().c_str());
|
||||||
n->setAttribute(SGPropertyNode::USERARCHIVE, true);
|
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();
|
result = path.str();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -636,7 +639,7 @@ bool fgInitConfig ( int argc, char **argv ) {
|
||||||
vector<SGPropertyNode_ptr> cache = cache_root->getChildren("aircraft");
|
vector<SGPropertyNode_ptr> cache = cache_root->getChildren("aircraft");
|
||||||
for (unsigned int i = 0; i < cache.size(); i++) {
|
for (unsigned int i = 0; i < cache.size(); i++) {
|
||||||
const char *name = cache[i]->getStringValue("file", "");
|
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", "");
|
const char *path = cache[i]->getStringValue("path", "");
|
||||||
SGPath xml(path);
|
SGPath xml(path);
|
||||||
xml.append(name);
|
xml.append(name);
|
||||||
|
|
Loading…
Add table
Reference in a new issue