deg += 1.0;
}
if (c == 'N' || c == 'S') {
- snprintf(buf, 32, "%02d* %02d'.%03d%c", int(deg), int(min), int(round((min-int(min))*1000)), c);
+ snprintf(buf, 32, "%02d* %02d'.%03d%c", int(deg), int(min), int(SGMisc<double>::round((min-int(min))*1000)), c);
} else {
- snprintf(buf, 32, "%03d* %02d'.%03d%c", int(deg), int(min), int(round((min-int(min))*1000)), c);
+ snprintf(buf, 32, "%03d* %02d'.%03d%c", int(deg), int(min), int(SGMisc<double>::round((min-int(min))*1000)), c);
}
} else {
_tiedProperties.Tie("/sim/logging/classes", getLoggingClasses, setLoggingClasses);
_tiedProperties.Tie("/sim/freeze/master", getFreeze, setFreeze);
- _tiedProperties.Tie("/sim/time/elapsed-sec", getElapsedTime_sec);
+ _tiedProperties.Tie<double>("/sim/time/elapsed-sec", getElapsedTime_sec);
_tiedProperties.Tie("/sim/time/gmt", getDateString, setDateString);
fgSetArchivable("/sim/time/gmt");
- _tiedProperties.Tie("/sim/time/gmt-string", getGMTString);
+ _tiedProperties.Tie<const char*>("/sim/time/gmt-string", getGMTString);
// Position
- _tiedProperties.Tie("/position/latitude-string", getLatitudeString);
- _tiedProperties.Tie("/position/longitude-string", getLongitudeString);
+ _tiedProperties.Tie<const char*>("/position/latitude-string", getLatitudeString);
+ _tiedProperties.Tie<const char*>("/position/longitude-string", getLongitudeString);
// Orientation
- _tiedProperties.Tie("/orientation/heading-magnetic-deg", getHeadingMag);
- _tiedProperties.Tie("/orientation/track-magnetic-deg", getTrackMag);
+ _tiedProperties.Tie<double>("/orientation/heading-magnetic-deg", getHeadingMag);
+ _tiedProperties.Tie<double>("/orientation/track-magnetic-deg", getTrackMag);
}
void
bool
-fgLoadProps (const char * path, SGPropertyNode * props, bool in_fg_root, int default_mode)
+fgLoadProps (const std::string& path, SGPropertyNode * props, bool in_fg_root, int default_mode)
{
- string fullpath;
+ SGPath fullpath;
if (in_fg_root) {
SGPath loadpath(globals->get_fg_root());
loadpath.append(path);
- fullpath = loadpath.str();
+ fullpath = loadpath;
} else {
- fullpath = path;
+ fullpath = SGPath::fromUtf8(path);
}
try {