camelCase identifier in code and hyphenated property names. Suffix "-sec" is used because it complies to other timestamp properties in the property tree. Suffix "utc" is not used because the property just reflects an internal value used by the AI system. Whether it is UTC (currently it is) is up to the AI system and cannot be defined by the property name.
This commit is contained in:
parent
94f82c47ef
commit
3dcac53952
2 changed files with 5 additions and 5 deletions
|
@ -359,7 +359,7 @@ void FGAIAircraft::ProcessFlightPlan( double dt, time_t now ) {
|
|||
|
||||
announcePositionToController();
|
||||
if (fp) {
|
||||
props->getChild("arrivaltime", 0, true)->setIntValue(fp->getArrivalTime());
|
||||
props->getChild("arrival-time-sec", 0, true)->setIntValue(fp->getArrivalTime());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -384,13 +384,13 @@ bool FGAISchedule::createAIAircraft(FGScheduledFlight* flight, double speedKnots
|
|||
aiAircraft->FGAIBase::setFlightPlan(std::move(fp));
|
||||
globals->get_subsystem<FGAIManager>()->attach(aiAircraft);
|
||||
if (aiAircraft->_getProps()) {
|
||||
SGPropertyNode *nodeofaircraft = aiAircraft->_getProps();
|
||||
SGPropertyNode *nodeForAircraft = aiAircraft->_getProps();
|
||||
if (dep) {
|
||||
nodeofaircraft->getChild("departureairport", 0, true)->setStringValue(dep->getId());
|
||||
nodeofaircraft->getChild("departuretime", 0, true)->setIntValue(deptime);
|
||||
nodeForAircraft->getChild("departure-airport-id", 0, true)->setStringValue(dep->getId());
|
||||
nodeForAircraft->getChild("departure-time-sec", 0, true)->setIntValue(deptime);
|
||||
}
|
||||
if (arr) {
|
||||
nodeofaircraft->getChild("arrivalairport", 0, true)->setStringValue(arr->getId());
|
||||
nodeForAircraft->getChild("arrival-airport-id", 0, true)->setStringValue(arr->getId());
|
||||
// arrival time not known here
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue