1
0
Fork 0

Maintenance: Consistent TODO: tags

This commit is contained in:
scttgs0 2023-05-21 16:18:43 -05:00
parent 88ee1ca7f7
commit 812107d87c
41 changed files with 151 additions and 151 deletions

View file

@ -796,7 +796,7 @@ void FGAIBallistic::Run(double dt) {
dynamic_friction_force_lbs = static_friction_force_lbs * 0.95;
// Ignore wind when on the ground for now
//TODO fix this
// TODO: fix this
_wind_from_north = 0;
_wind_from_east = 0;
}

View file

@ -172,7 +172,7 @@ double PerformanceData::actualPitch(FGAIAircraft* ac, double tgt_pitch, double d
double pdiff = tgt_pitch - pitch;
if (pdiff > 0.0) { // nose up
pitch += 0.005*_climbRate * dt / 3.0; //TODO avoid hardcoded 3 secs
pitch += 0.005*_climbRate * dt / 3.0; // TODO: avoid hardcoded 3 secs
if (pitch > tgt_pitch)
pitch = tgt_pitch;
@ -200,7 +200,7 @@ double PerformanceData::actualVerticalSpeed(FGAIAircraft* ac, double tgt_vs, dou
if (fabs(vs_diff) > .001) {
if (vs_diff > 0.0) {
vs += _climbRate * dt / 3.0; //TODO avoid hardcoded 3 secs to attain climb rate from level flight
vs += _climbRate * dt / 3.0; // TODO: avoid hardcoded 3 secs to attain climb rate from level flight
if (vs > tgt_vs)
vs = tgt_vs;

View file

@ -48,7 +48,7 @@ void PerformanceDB::update(double dt)
}
void PerformanceDB::registerPerformanceData(const std::string& id, PerformanceData* data) {
//TODO if key exists already replace data "inplace", i.e. copy to existing PerfData instance
// TODO: if key exists already replace data "inplace", i.e. copy to existing PerfData instance
// this updates all aircraft currently using the PerfData instance.
_db[id] = data;
}

View file

@ -17,7 +17,7 @@ class SGPath;
*
* @author Thomas F<EFBFBD>rster <t.foerster@biologie.hu-berlin.de>
*/
//TODO provide std::map interface?
// TODO: provide std::map interface?
class PerformanceDB : public SGSubsystem
{
public:

View file

@ -91,7 +91,7 @@ void FGSubmodelMgr::postinit()
while (_found_sub)
loadSubmodels();
//TODO reload submodels if an MP ac joins
// TODO: reload submodels if an MP ac joins
//_model_added_node = fgGetNode("ai/models/model-added", true);
//_model_added_node->addChangeListener(this, false);

View file

@ -334,7 +334,7 @@ void FGATCController::transmit(FGTrafficRecord * rec, FGAirportDynamics *parent,
break;
case MSG_CLEARED_TO_LAND:
activeRunway = rec->getRunway();
//TODO Weather
// TODO: Weather
text = receiver + " runway " + activeRunway + " cleared to land. " + sender;
break;
case MSG_ACKNOWLEDGE_CLEARED_TO_LAND:

View file

@ -388,7 +388,7 @@ void FGATCManager::update ( double time ) {
SG_LOG(SG_AI, SG_BULK, "Error: Could not find Dynamics at airport : " << userAircraftTrafficRef->getDepartureAirport()->getId());
}
break;
/* TODO link up with state system?
/* TODO: link up with state system?
case AILeg::APPROACH:
if (userAircraftTrafficRef->getArrivalAirport()->getDynamics()) {
controller = trafficRef->getArrivalAirport()->getDynamics()->getApproachController();

View file

@ -2067,7 +2067,7 @@ FGReplayInternal::loadTape(
);
}
m_sim_time = get_end_time(*this);
// TODO we could (re)store these too
// TODO: we could (re)store these too
m_last_mt_time = m_last_lt_time = m_sim_time;
}
/* done *********************************************************/

View file

@ -127,7 +127,7 @@ FGRunwayMap FGAirport::getRunwayMap() const
for (auto rwy : mRunways) {
// ignore unusably short runways
// TODO other methods don't check this...
// TODO: other methods don't check this...
if( rwy->lengthFt() >= minLengthFt )
map[ rwy->ident() ] = rwy;
}

View file

@ -115,7 +115,7 @@ void readInterfaceProperties( SGPropertyNode_ptr prop_root,
{
prop->setDoubleValue( val->getDoubleValue() );
// TODO should we keep the _attr_ node, as soon as the property browser is
// TODO: should we keep the _attr_ node, as soon as the property browser is
// able to cope with it?
(*it)->removeChild("_attr_", 0);
}

View file

@ -273,7 +273,7 @@ sc::WindowPtr DesktopGroup::windowAtPosition(const osg::Vec2f& screen_pos)
osg::Group *element = _scene_group->getChild(i)->asGroup();
if( !element || !element->getUserData() )
continue; // TODO warn/log?
continue; // TODO: warn/log?
sc::WindowPtr window =
dynamic_cast<sc::Window*>
@ -613,7 +613,7 @@ bool DesktopGroup::handleDrag(const sc::EventPtr& event)
drag_window->handleEvent(event->clone(sc::Event::DRAG_START));
}
// TODO dragover
// TODO: dragover
return drag_window && drag_window->handleEvent(event);
}

View file

@ -383,7 +383,7 @@ wxRadarBg::update (double delta_time_sec)
_textGeode->removeDrawables(0, _textGeode->getNumDrawables());
#if 0
//TODO FIXME Mask below (only used for ARC mode) isn't properly aligned, i.e.
// TODO: FIXME Mask below (only used for ARC mode) isn't properly aligned, i.e.
// it assumes the a/c position at the center of the display - though it's somewhere at
// bottom part for ARC mode.
// The mask hadn't worked at all for a while (probably since the OSG port) due to
@ -1011,7 +1011,7 @@ wxRadarBg::inRadarRange(double sigma, double range_nm)
// Here, we will use a normalised rcs (sigma) for a standard taget and assume that this
// will provide a maximum range of 35nm;
//
// TODO - make the maximum range adjustable at runtime
// TODO: make the maximum range adjustable at runtime
double constant = _radar_ref_rng;

View file

@ -279,7 +279,7 @@ void FGWinds::Turbulence(double h)
}
// keep values from last timesteps
// TODO maybe use deque?
// TODO: maybe use deque?
static double
xi_u_km1 = 0, nu_u_km1 = 0,
xi_v_km1 = 0, xi_v_km2 = 0, nu_v_km1 = 0, nu_v_km2 = 0,

View file

@ -402,13 +402,13 @@ FGPiston::FGPiston(FGFDMExec* exec, Element* el, int engine_number, struct Input
if (bad) {
// We can't recover from the above - don't use this supercharger speed.
BoostSpeeds--;
// TODO - put out a massive error message!
// TODO: put out a massive error message!
break;
}
// Now sanity-check stuff that is recoverable.
if (i < BoostSpeeds - 1) {
if (BoostSwitchAltitude[i] < RatedAltitude[i]) {
// TODO - put out an error message
// TODO: put out an error message
// But we can also make a reasonable estimate, as below.
BoostSwitchAltitude[i] = RatedAltitude[i] + 1000;
}

View file

@ -696,6 +696,6 @@ void FGNewEngine::Do_Prop_Calcs()
// The problem is that we're doing this calculation backwards - we're working out the thrust from the power consumed and the velocity, which becomes invalid as velocity goes to zero.
// It would be far more natural to work out the power consumed from the thrust - FIXME!!!!!.
else
prop_thrust = neta_prop * prop_power_consumed_SI / forward_velocity; //TODO - rename forward_velocity to IAS_SI
prop_thrust = neta_prop * prop_power_consumed_SI / forward_velocity; // TODO: rename forward_velocity to IAS_SI
//cout << "prop_thrust = " << prop_thrust << '\n';
}

View file

@ -188,7 +188,7 @@ void QtQuickFGCanvasItem::wheelEvent(QWheelEvent *event)
canvasEvent->time = event->timestamp() / 1000.0;
canvasEvent->type = sc::Event::WHEEL;
// TODO - check if using pixelDelta is beneficial at all.
// TODO: check if using pixelDelta is beneficial at all.
canvasEvent->delta.set(event->angleDelta().x(),
event->angleDelta().y());
}

View file

@ -224,7 +224,7 @@ KLN89::KLN89(RenderArea2D* instrument)
_mapScaleAuto = true;
// Mega-hack - hardwire airport town and state names for the FG base area since we don't have any data for these at the moment
// TODO - do this better one day!
// TODO: do this better one day!
_airportTowns["KSFO"] = "San Francisco";
_airportTowns["KSQL"] = "San Carlos";
_airportTowns["KPAO"] = "Palo Alto";
@ -308,7 +308,7 @@ void KLN89::update(double dt) {
// (i.e. nighttime), or the user covering the photocell that detects the light level.
// At the moment I don't know how to detect nighttime or actual light level, so only
// respond to the photocell being obscured.
// TODO - reduce the brightness in response to nighttime / lowlight.
// TODO: reduce the brightness in response to nighttime / lowlight.
float rgba[4] = {1.0, 0.0, 0.0, 1.0};
if(fgGetBool("/instrumentation/kln89/photocell-obscured")) {
rgba[0] -= (9 - _minDisplayBrightness) * 0.05;
@ -341,7 +341,7 @@ void KLN89::update(double dt) {
if(_messageStack.empty()) {
DrawText("No Message", 0, 5, 2);
} else {
// TODO - parse the message string for special strings that indicate degrees signs etc!
// TODO: parse the message string for special strings that indicate degrees signs etc!
DrawText(*_messageStack.begin(), 0, 0, 3);
}
return;
@ -363,7 +363,7 @@ void KLN89::update(double dt) {
}
void KLN89::CreateDefaultFlightPlans() {
// TODO - read these in from preferences.xml or similar instead!!!!
// TODO: read these in from preferences.xml or similar instead!!!!
// Create some hardwired default flightplans for testing.
std::vector<std::string> ids;
std::vector<GPSWpType> wps;
@ -594,7 +594,7 @@ void KLN89::DtoPressed() {
void KLN89::NrstPressed() {
if(_activePage != _nrst_page) {
_activePage->LooseFocus(); // TODO - check whether we should call loose focus here
_activePage->LooseFocus(); // TODO: check whether we should call loose focus here
_lastActivePage = _activePage;
_activePage = _nrst_page;
_lastMode = _mode;
@ -607,7 +607,7 @@ void KLN89::NrstPressed() {
void KLN89::AltPressed() {
if(_activePage != _alt_page) {
_activePage->LooseFocus(); // TODO - check whether we should call loose focus here
_activePage->LooseFocus(); // TODO: check whether we should call loose focus here
_lastActivePage = _activePage;
_alt_page->SetSubPage(0);
_activePage = _alt_page;
@ -638,7 +638,7 @@ void KLN89::OBSPressed() {
}
void KLN89::MsgPressed() {
// TODO - handle persistent messages such as SUA alerting.
// TODO: handle persistent messages such as SUA alerting.
// (The message annunciation flashes before first view, but afterwards remains continuously lit with the message available
// until the potential conflict no longer pertains).
if(_dispMsg && ! _messageStack.empty()) {
@ -657,7 +657,7 @@ void KLN89::DtoInitiate(const string& id) {
_curPage = 6;
_activePage = _pages[_curPage];
_activePage->SetSubPage(0);
// TODO - need to output a scratchpad message with the new course, but we don't know it yet!
// TODO: need to output a scratchpad message with the new course, but we don't know it yet!
// Call the base class to actually initiate the DTO.
DCLGPS::DtoInitiate(id);
}
@ -745,7 +745,7 @@ void KLN89::DrawMap(bool draw_avs) {
double mapScaleMeters = _mapScale * (_mapScaleUnits == 0 ? SG_NM_TO_METER : 1000);
// TODO - use an aligned projection when either DTK or TK up!
// TODO: use an aligned projection when either DTK or TK up!
AlignedProjection mapProj(SGGeod::fromRad(_gpsLon, _gpsLat), _mapHeading);
double meter_per_pix = (_mapOrientation == 0 ? mapScaleMeters / 20.0f : mapScaleMeters / 29.0f);
// SGGeod bottomLeft = mapProj.ConvertFromLocal(SGVec3d(gps_max(-57.0 * meter_per_pix, -50000), gps_max((_mapOrientation == 0 ? -20.0 * meter_per_pix : -11.0 * meter_per_pix), -25000), 0.0));
@ -878,7 +878,7 @@ void KLN89::DrawMap(bool draw_avs) {
DrawWaypoint(xvec[i], yvec[i]);
bool right_align = (qvec[i] > 2);
bool top = (qvec[i] == 1 || qvec[i] == 4);
// TODO - not sure if labels should be drawn in sequence with waypoints and flightpaths,
// TODO: not sure if labels should be drawn in sequence with waypoints and flightpaths,
// or all before or all afterwards. Doesn't matter a huge deal though.
DrawLabel(_activeFP->waypoints[i]->id, xvec[i] + (right_align ? -2 : 3), yvec[i] + (top ? 3 : -7), right_align);
}
@ -896,7 +896,7 @@ void KLN89::DrawMap(bool draw_avs) {
DrawUser2(56, 10);
} else {
// Heading up
// TODO - don't know what to do here!
// TODO: don't know what to do here!
}
// And finally, reset the clip region to stop the rest of the code going pear-shaped!
@ -1135,7 +1135,7 @@ void KLN89::DrawCDI() {
if(_cdiScaleTransition) {
double dots = (xtd / _currentCdiScale) * 5.0;
deflect = (int)(dots * 7.0 * -1.0);
// TODO - for all these I think I should add 0.5 before casting to int, and *then* multiply by -1. Possibly!
// TODO: for all these I think I should add 0.5 before casting to int, and *then* multiply by -1. Possibly!
} else {
if(0 == _currentCdiScaleIndex) { // 5.0nm FSD => 1 nm per dot => 7 pixels per nm.
deflect = (int)(xtd * 7.0 * -1.0); // The -1.0 is because we move the 'needle' indicating the course, not the plane.
@ -1236,7 +1236,7 @@ void KLN89::DrawEnt(int field, int px, int py) {
}
void KLN89::DrawMessageAlert() {
// TODO - draw the proper message indicator
// TODO: draw the proper message indicator
if(!_blink) {
int px = _xBorder + _xFieldBorder[1] + _xFieldStart[1];
int py = 1 * 9 + _yBorder + _yFieldBorder[1] + _yFieldStart[1] + 1;
@ -1453,7 +1453,7 @@ void KLN89::DrawLatitude(double d, int field, int px, int py) {
DrawChar((d >= 0 ? 'N' : 'S'), field, px, py);
d = fabs(d);
px += 1;
// TODO - sanity check input to ensure major lat field can only ever by 2 chars wide
// TODO: sanity check input to ensure major lat field can only ever by 2 chars wide
char buf[8];
// Don't know whether to zero pad the below for single digits or not?
//cout << d << ", " << (int)d << '\n';
@ -1474,7 +1474,7 @@ void KLN89::DrawLongitude(double d, int field, int px, int py) {
DrawChar((d >= 0 ? 'E' : 'W'), field, px, py);
d = fabs(d);
px += 1;
// TODO - sanity check input to ensure major lat field can only ever be 2 chars wide
// TODO: sanity check input to ensure major lat field can only ever be 2 chars wide
char buf[8];
// Don't know whether to zero pad the below for single digits or not?
//cout << d << ", " << (int)d << '\n';
@ -1533,7 +1533,7 @@ void KLN89::DrawDist(double d, int field, int px, int py) {
}
void KLN89::DrawSpeed(double v, int field, int px, int py, int decimal) {
// TODO - implement variable decimal places
// TODO: implement variable decimal places
v *= (_velUnits == GPS_VEL_UNITS_KT ? 1.0 : 0.51444444444 * 0.001 * 3600.0);
char buf[10];
snprintf(buf, 9, "%i", (int)(v + 0.5));

View file

@ -176,7 +176,7 @@ private:
// Draw an integer heading, where px specifies the position of the degrees sign at the RIGHT of the value.
void DrawHeading(int h, int field, int px, int py);
// Draw a distance spec'd as nm as an integer (TODO - may need 1 decimal place if < 100) where px specifies RHS of units.
// Draw a distance spec'd as nm as an integer (TODO: may need 1 decimal place if < 100) where px specifies RHS of units.
// Some uses definately don't want decimal place though (as at present), so would have to be arg.
void DrawDist(double d, int field, int px, int py);

View file

@ -218,7 +218,7 @@ const string& KLN89Page::GetId() {
return(_id);
}
// TODO - this function probably shouldn't be here - FG almost certainly has better handling
// TODO: this function probably shouldn't be here - FG almost certainly has better handling
// of this somewhere already.
string KLN89Page::GPSitoa(int n) {
char buf[6];

View file

@ -107,7 +107,7 @@ protected:
std::string _scratchpadLine1;
std::string _scratchpadLine2;
// TODO - remove this function from this class and use a built in method instead.
// TODO: remove this function from this class and use a built in method instead.
std::string GPSitoa(int n);
};

View file

@ -70,7 +70,7 @@ void KLN89AptPage::Update(double dt) {
bool multi; // Not set by FindFirst...
bool exact = false;
if(_apt_id.size() == 4) exact = true;
// TODO - move this search out to where the button is pressed, and cache the result!
// TODO: move this search out to where the button is pressed, and cache the result!
if(_apt_id != _last_apt_id || ap == NULL) ap = _kln89->FindFirstAptById(_apt_id, multi, exact);
//if(np == NULL) cout << "NULL... ";
//if(b == false) cout << "false...\n";
@ -175,7 +175,7 @@ void KLN89AptPage::Update(double dt) {
if(_iaps.empty()) {
_kln89->DrawText("NO APR", 2, 0, 0);
} else {
// TODO - output proper differentiation of ILS and NP APR and NP APR type eg GPS(R)
// TODO: output proper differentiation of ILS and NP APR and NP APR type eg GPS(R)
_kln89->DrawText("NP APR", 2, 0, 0);
}
} else if(_subPage == 3) {
@ -196,7 +196,7 @@ void KLN89AptPage::Update(double dt) {
_kln89->DrawText(s, 2, 5 - s.size(), 2);
_kln89->DrawText((_kln89->_altUnits == GPS_ALT_UNITS_FT ? "ft" : "m"), 2, 5, 2);
// Surface
// TODO - why not store these strings as an array?
// TODO: why not store these strings as an array?
switch(_aptRwys[i]->surface()) {
case 1:
// Asphalt - fall through
@ -246,7 +246,7 @@ void KLN89AptPage::Update(double dt) {
_kln89->DrawText(s, 2, 5 - s.size(), 0);
_kln89->DrawText((_kln89->_altUnits == GPS_ALT_UNITS_FT ? "ft" : "m"), 2, 5, 0);
// Surface
// TODO - why not store these strings as an array?
// TODO: why not store these strings as an array?
switch(_aptRwys[i]->surface()) {
case 1:
// Asphalt - fall through
@ -303,7 +303,7 @@ void KLN89AptPage::Update(double dt) {
_kln89->DrawFreq(_aptFreqs[i].freq, 2, 7, 0);
}
} else if(_subPage == 5) {
// TODO - user ought to be allowed to leave persistent remarks
// TODO: user ought to be allowed to leave persistent remarks
_kln89->DrawText("[Remarks]", 2, 2, 2);
} else if(_subPage == 6) {
// We don't have SID/STAR database yet
@ -427,7 +427,7 @@ void KLN89AptPage::Update(double dt) {
if(_kln89->_mode == KLN89_MODE_CRSR) {
if(!(_subPage == 7 && (_iafDialog || _addDialog || _replaceDialog))) {
if(_uLinePos > 0 && _uLinePos < 5) {
// TODO - blink as well
// TODO: blink as well
_kln89->Underline(2, _uLinePos, 3, 1);
}
for(unsigned int i = 0; i < _apt_id.size(); ++i) {
@ -507,7 +507,7 @@ void KLN89AptPage::UpdateAirport(const string& id) {
if(_nRwyPages < 1) _nRwyPages = 1;
// Instrument approaches
// Only non-precision for now - TODO - handle precision approaches if necessary
// Only non-precision for now - TODO: handle precision approaches if necessary
_iaps.clear();
iap_map_iterator itr = _kln89->_np_iap.find(id);
if(itr != _kln89->_np_iap.end()) {
@ -517,7 +517,7 @@ void KLN89AptPage::UpdateAirport(const string& id) {
if(_iafDialog || _addDialog || _replaceDialog) {
// Eek - major logic error if an airport details cache update occurs
// with one of these dialogs active.
// TODO - output a warning.
// TODO: output a warning.
//cout << "HELP!!!!!!!!!!\n";
} else {
_maxULinePos = 4 + _iaps.size(); // We shouldn't need to check the crsr for out-of-bounds here since we only update the airport details when the airport code is changed - ie. _uLinePos <= 4!
@ -585,7 +585,7 @@ void KLN89AptPage::ClrPressed() {
_iafDialog = true;
_maxULinePos = 1;
// Don't reset _curIaf since it is remembed.
_uLinePos = 1 + _curIaf; // TODO - make this robust to more than 3 IAF
_uLinePos = 1 + _curIaf; // TODO: make this robust to more than 3 IAF
} else {
_maxULinePos = 4 + _iaps.size();
if(_iaps.empty()) {
@ -623,7 +623,7 @@ void KLN89AptPage::EntPressed() {
_curIaf = _uLinePos - 1 + _iafStart;
}
//cout << "_curIaf = " << _curIaf << '\n';
// TODO - delete the waypoints inside _approachFP before clearing them!!!!!!!
// TODO: delete the waypoints inside _approachFP before clearing them!!!!!!!
_kln89->_approachFP->waypoints.clear();
GPSWaypoint* wp = new GPSWaypoint;
*wp = *(_approachRoutes[_curIaf]->waypoints[0]); // Need to make copies here since we're going to alter ID and type sometimes
@ -679,7 +679,7 @@ void KLN89AptPage::EntPressed() {
_kln89->_approachLoaded = true;
//_kln89->_messageStack.push_back("*Press ALT To Set Baro");
// Actually - this message is only sent when we go into appraoch-arm mode.
// TODO - check the flightplan for consistency
// TODO: check the flightplan for consistency
_kln89->OrientateToActiveFlightPlan();
_kln89->_mode = KLN89_MODE_DISP;
_kln89->_curPage = 7;
@ -687,14 +687,14 @@ void KLN89AptPage::EntPressed() {
}
}
} else if(_replaceDialog) {
// TODO - load the approach!
// TODO: load the approach!
} else if(_uLinePos > 4) {
_approachRoutes.clear();
_IAP.clear();
_curIaf = 0;
_approachRoutes = ((FGNPIAP*)(_iaps[_uLinePos-5]))->_approachRoutes;
_IAP = ((FGNPIAP*)(_iaps[_uLinePos-5]))->_IAP;
_curIap = _uLinePos - 5; // TODO - handle the start of list ! no. 1, and the end of list not sequential!
_curIap = _uLinePos - 5; // TODO: handle the start of list ! no. 1, and the end of list not sequential!
_uLinePos = 1;
if(_approachRoutes.size() > 1) {
// More than 1 IAF - display the selection dialog
@ -702,7 +702,7 @@ void KLN89AptPage::EntPressed() {
_maxULinePos = _approachRoutes.size();
} else {
// There is only 1 IAF, so load the waypoints into the approach flightplan here.
// TODO - there is nasty code duplication loading the approach FP between the case here where we have only one
// TODO: there is nasty code duplication loading the approach FP between the case here where we have only one
// IAF and the case where we must choose the IAF from a list. Try to tidy this after it is all working properly.
_kln89->_approachFP->waypoints.clear();
GPSWaypoint* wp = new GPSWaypoint;
@ -814,7 +814,7 @@ void KLN89AptPage::Knob2Left1() {
}
} else {
if(_subPage == 0) {
// TODO - set by name
// TODO: set by name
} else {
// NO-OP - to/fr is cycled by clr button
}
@ -866,7 +866,7 @@ void KLN89AptPage::Knob2Right1() {
}
} else {
if(_subPage == 0) {
// TODO - set by name
// TODO: set by name
} else {
// NO-OP - to/fr is cycled by clr button
}

View file

@ -51,15 +51,15 @@ void KLN89CalPage::Update(double dt) {
bool crsr = (_kln89->_mode == KLN89_MODE_CRSR);
bool blink = _kln89->_blink;
if(_subPage == 0) {
if(1) { // TODO - fix this hardwiring!
if(1) { // TODO: fix this hardwiring!
// Flightplan calc
_kln89->DrawText(">Fpl:", 2, 0, 3);
_kln89->DrawText("0", 2, 6, 3);// TODO - fix this hardwiring!
_kln89->DrawText("0", 2, 6, 3);// TODO: fix this hardwiring!
GPSFlightPlan* fp = _kln89->_flightPlans[_nFp0];
if(fp) {
unsigned int n = fp->waypoints.size();
if(n < 2) {
// TODO - check that this is what really happens
// TODO: check that this is what really happens
_kln89->DrawText("----", 2, 9, 3);
_kln89->DrawText("----", 2, 9, 2);
} else {
@ -83,16 +83,16 @@ void KLN89CalPage::Update(double dt) {
_kln89->DrawText(">Wpt:", 2, 0, 3);
}
_kln89->DrawText("To", 2, 6, 2);
_kln89->DrawText("ESA ----'", 2, 7, 1); // TODO - implement an ESA calc
_kln89->DrawText("ESA ----'", 2, 7, 1); // TODO: implement an ESA calc
_kln89->DrawText("ETE", 2, 7, 0);
} else if(_subPage == 1) {
_kln89->DrawText(">Fpl: 0", 2, 0, 3); // TODO - fix this hardwiring!
_kln89->DrawText(">Fpl: 0", 2, 0, 3); // TODO: fix this hardwiring!
_kln89->DrawText("FF:", 2, 0, 2);
_kln89->DrawText("Res:", 2, 7, 1);
_kln89->DrawText("Fuel Req", 2, 0, 0);
} else if(_subPage == 2) {
_kln89->DrawText("Time:", 2, 0, 3);
// TODO - hardwired to UTC at the moment
// TODO: hardwired to UTC at the moment
if(!(_uLinePos == 1 && crsr && blink)) { _kln89->DrawText("UTC", 2, 6, 3); }
if(_uLinePos == 1 && crsr) { _kln89->Underline(2, 6, 3, 3); }
string th = fgGetString("/instrumentation/clock/indicated-hour");
@ -210,7 +210,7 @@ void KLN89CalPage::Knob2Left1() {
if(_subPage == 2) {
if(_uLinePos == 1) {
// TODO - allow time zone to be changed
// TODO: allow time zone to be changed
} else if(_uLinePos == 2) {
ClockTime t(1,0);
if(_alarmAnnotate) {
@ -275,7 +275,7 @@ void KLN89CalPage::Knob2Right1() {
if(_subPage == 2) {
if(_uLinePos == 1) {
// TODO - allow time zone to be changed
// TODO: allow time zone to be changed
} else if(_uLinePos == 2) {
ClockTime t(1,0);
if(_alarmAnnotate) {

View file

@ -43,7 +43,7 @@ KLN89DirPage::~KLN89DirPage() {
}
void KLN89DirPage::Update(double dt) {
// TODO - this can apparently be "ACTIVATE:" under some circumstances
// TODO: this can apparently be "ACTIVATE:" under some circumstances
_kln89->DrawText("DIRECT TO:", 2, 2, 3);
if(_kln89->_mode == KLN89_MODE_CRSR) {

View file

@ -59,7 +59,7 @@ void KLN89FplPage::Update(double dt) {
Calc();
// NOTE - we need to draw the active leg arrow outside of this block to avoid the _delFP check.
// TODO - we really ought to merge the page 0 and other pages drawing code with a couple of lines of extra logic.
// TODO: we really ought to merge the page 0 and other pages drawing code with a couple of lines of extra logic.
if(_subPage == 0 && !_delFP) { // Note that in the _delFP case, the active flightplan gets a header, and hence the same geometry as the other fps, so we draw it there.
// active FlightPlan
// NOTE THAT FOR THE ACTIVE FLIGHT PLAN, TOP POSITION IS STILL 4 in the underline position scheme, to make
@ -236,7 +236,7 @@ void KLN89FplPage::Update(double dt) {
if(waylist.size() < 4) last_pos = waylist.size();
// Don't draw the cyclic field header if the top waypoint is the approach header
// Not sure if this also applies to the fence - don't think so but TODO - check!
// Not sure if this also applies to the fence - don't think so but TODO: check!
if(!waylist.empty() && _fplPos < waylist.size()) {
if(waylist[_fplPos].appType != GPS_HDR) {
_kln89->DrawChar('>', 2, 12, 3);
@ -369,7 +369,7 @@ void KLN89FplPage::Update(double dt) {
_kln89->DrawText(s, 2, 16-s.size(), 3-i);
}
} else if(_actFpMode == 3) { // DTK
// TODO - figure out properly what to do in DTK mode when beyond a waypoint being entered.
// TODO: figure out properly what to do in DTK mode when beyond a waypoint being entered.
// I *think* it is OK to do the same as here, but maybe not for the waypoint immediately
// beyond the one being entered - need to check.
string s = _params[_fplPos + i - 1];
@ -482,7 +482,7 @@ void KLN89FplPage::Update(double dt) {
}
if(last_pos > 0 && last_pos < waylist.size() && i > 0) {
// Draw the param
// TODO - we should also handle DTK mode params here.
// TODO: we should also handle DTK mode params here.
if(_fpMode == 0) { // DIS
if(_kln89->_mode == KLN89_MODE_CRSR && _bEntWp && _uLinePos < i+4) {
// This means that we are beyond the waypoint being entered. In DIS mode
@ -501,7 +501,7 @@ void KLN89FplPage::Update(double dt) {
}
if(i > 0) {
// Draw the param
// TODO - we should also handle DTK mode params here.
// TODO: we should also handle DTK mode params here.
if(_fpMode == 0) { // DIS
if(_kln89->_mode == KLN89_MODE_CRSR && _bEntWp && _uLinePos < i+4) {
// This means that we are beyond the waypoint being entered. In DIS mode
@ -527,7 +527,7 @@ void KLN89FplPage::DrawFpMode(int ypos) {
if(_actFpMode == 1) {
s = "ETE";
} else if(_actFpMode == 2) {
s = "UTC"; // TODO - alter depending on chosen timezone
s = "UTC"; // TODO: alter depending on chosen timezone
} else if(_actFpMode == 3) {
s = (_kln89->_obsMode ? "OBS" : "Dtk");
}
@ -560,7 +560,7 @@ void KLN89FplPage::Calc() {
cum_tot += _kln89->GetGreatCircleDistance(_kln89->_gpsLat, _kln89->_gpsLon, wv[0]->lat, wv[0]->lon);
}
for(unsigned int i=1; i<wv.size(); ++i) {
cum_tot += _kln89->GetGreatCircleDistance(wv[i-1]->lat, wv[i-1]->lon, wv[i]->lat, wv[i]->lon); // TODO - add units switch!
cum_tot += _kln89->GetGreatCircleDistance(wv[i-1]->lat, wv[i-1]->lon, wv[i]->lat, wv[i]->lon); // TODO: add units switch!
int n = (int)(cum_tot + 0.5);
_params.push_back(GPSitoa(n));
}
@ -582,7 +582,7 @@ void KLN89FplPage::Calc() {
if(0 == _fpMode) {
double cum_tot = 0.0;
for(unsigned int i=1; i<wv.size(); ++i) {
cum_tot += _kln89->GetGreatCircleDistance(wv[i-1]->lat, wv[i-1]->lon, wv[i]->lat, wv[i]->lon); // TODO - add units switch!
cum_tot += _kln89->GetGreatCircleDistance(wv[i-1]->lat, wv[i-1]->lon, wv[i]->lat, wv[i]->lon); // TODO: add units switch!
int n = (int)(cum_tot + 0.5);
_params.push_back(GPSitoa(n));
}
@ -637,7 +637,7 @@ void KLN89FplPage::ClrPressed() {
_kln89->_mode = KLN89_MODE_DISP;
} else {
if(KLN89_MODE_CRSR == _kln89->_mode) {
// TODO - see if we need to delete a waypoint
// TODO: see if we need to delete a waypoint
if(_uLinePos >= 4) {
if(_delWp) {
// If we are already displaying a clear waypoint dialog in response to the CLR button,
@ -713,7 +713,7 @@ void KLN89FplPage::ClrPressed() {
}
void KLN89FplPage::CleanUp() {
// TODO - possibly need to clean up _delWp here as well, since it goes off if dto and then ent are pressed.
// TODO: possibly need to clean up _delWp here as well, since it goes off if dto and then ent are pressed.
_bEntWp = false;
for(unsigned int i = 0; i < _kln89->_flightPlans[_subPage]->waypoints.size(); ++i) {
@ -770,7 +770,7 @@ void KLN89FplPage::EntPressed() {
}
} else if(_bEntWp) {
if(_entWp != NULL) {
// TODO - should be able to get rid of this switch I think and use the enum values.
// TODO: should be able to get rid of this switch I think and use the enum values.
switch(_entWp->type) {
case GPS_WP_APT:
_kln89->_activePage = _kln89->_pages[0];
@ -1006,7 +1006,7 @@ void KLN89FplPage::Knob2Left1() {
}
if(hdrPos) {
// TODO - not sure what we actually do in this condition
// TODO: not sure what we actually do in this condition
_changeAppr = true;
} else if(fencePos) {
// no-op?
@ -1090,7 +1090,7 @@ void KLN89FplPage::Knob2Right1() {
}
if(hdrPos) {
// TODO - not sure what we actually do in this condition
// TODO: not sure what we actually do in this condition
_changeAppr = true;
} else if(fencePos) {
// no-op?

View file

@ -76,7 +76,7 @@ void KLN89IntPage::Update(double dt) {
_fp->get_lat() * SG_DEGREES_TO_RADIANS, _fp->get_lon() * SG_DEGREES_TO_RADIANS);
_nvDist = _kln89->GetGreatCircleDistance(_nearestVor->get_lat() * SG_DEGREES_TO_RADIANS, _nearestVor->get_lon() * SG_DEGREES_TO_RADIANS,
_fp->get_lat() * SG_DEGREES_TO_RADIANS, _fp->get_lon() * SG_DEGREES_TO_RADIANS);
_refNav = _nearestVor; // TODO - check that this *always* holds - eg. when changing INT id after explicitly setting ref nav
_refNav = _nearestVor; // TODO: check that this *always* holds - eg. when changing INT id after explicitly setting ref nav
// but with no loss of focus.
} else {
_refNav = NULL;
@ -113,7 +113,7 @@ void KLN89IntPage::Update(double dt) {
_kln89->DrawText("Rad:", 2, 1, 1);
_kln89->DrawText("Dis:", 2, 1, 0);
if(_refNav) {
_kln89->DrawText(_refNav->get_ident(), 2, 9, 2); // TODO - flash and allow to change if under cursor
_kln89->DrawText(_refNav->get_ident(), 2, 9, 2); // TODO: flash and allow to change if under cursor
//_kln89->DrawHeading(_nvRadial, 2, 11, 1);
//_kln89->DrawDist(_nvDist, 2, 11, 0);
// Currently our draw heading and draw dist functions don't do as many decimal points as we want here,
@ -134,7 +134,7 @@ void KLN89IntPage::Update(double dt) {
}
}
} else {
// TODO - when we leave the page with invalid id and return it should
// TODO: when we leave the page with invalid id and return it should
// revert to showing the last valid id. Same for vor/ndb/probably apt etc.
if(_kln89->_mode != KLN89_MODE_CRSR) _kln89->DrawText(_int_id, 2, 1, 3);
if(_subPage == 0) {
@ -151,7 +151,7 @@ void KLN89IntPage::Update(double dt) {
if(_kln89->_mode == KLN89_MODE_CRSR) {
if(_uLinePos > 0 && _uLinePos < 6) {
// TODO - blink as well
// TODO: blink as well
_kln89->Underline(2, _uLinePos, 3, 1);
}
for(unsigned int i = 0; i < _int_id.size(); ++i) {
@ -163,7 +163,7 @@ void KLN89IntPage::Update(double dt) {
}
}
// TODO - fix this duplication - use _id instead of _apt_id, _vor_id, _ndb_id, _int_id etc!
// TODO: fix this duplication - use _id instead of _apt_id, _vor_id, _ndb_id, _int_id etc!
_id = _int_id;
KLN89Page::Update(dt);
@ -226,7 +226,7 @@ void KLN89IntPage::Knob2Left1() {
if(_subPage == 0) {
// NO-OP - from/to field is switched by clr button, not inner knob.
} else {
// TODO - LNR type field.
// TODO: LNR type field.
}
}
}
@ -249,7 +249,7 @@ void KLN89IntPage::Knob2Right1() {
if(_subPage == 0) {
// NO-OP - from/to field is switched by clr button, not inner knob.
} else {
// TODO - LNR type field.
// TODO: LNR type field.
}
}
}

View file

@ -98,7 +98,7 @@ void KLN89NavPage::Update(double dt) {
} else if(_cdiFormat == 1) {
_kln89->DrawText("Fly", 2, 2, 2);
double x = _kln89->CalcCrossTrackDeviation();
// TODO - check the R/L from sign of x below - I *think* it holds but not sure!
// TODO: check the R/L from sign of x below - I *think* it holds but not sure!
// Note also that we're setting Fly R or L based on the aircraft
// position only, not the heading. Not sure if this is correct or not.
_kln89->DrawText(x < 0.0 ? "R" : "L", 2, 6, 2);
@ -153,7 +153,7 @@ void KLN89NavPage::Update(double dt) {
}
// Radial to/from active waypoint.
// TODO - Not sure if this either is or should be true or mag!!!!!!!
// TODO: Not sure if this either is or should be true or mag!!!!!!!
if(!(crsr && blink && _uLinePos == 2)) {
if(0 == _vnv) {
_kln89->DrawHeading((int)_kln89->GetHeadingToActiveWaypoint(), 2, 4, 0);
@ -168,7 +168,7 @@ void KLN89NavPage::Update(double dt) {
// It seems that the floating point groundspeed must be at least 30kt
// for an ETA to be calculated. Note that this means that (integer) 30kt
// can appear in the frame 1 display both with and without an ETA displayed.
// TODO - need to switch off track (and heading bug change) based on instantaneous speed as well
// TODO: need to switch off track (and heading bug change) based on instantaneous speed as well
// since the long gps lag filter means we can still be displaying when stopped on ground.
if(_kln89->_groundSpeed_kts > 30.0) {
// Assuming eta display is always hh:mm
@ -197,7 +197,7 @@ void KLN89NavPage::Update(double dt) {
}
} else if(2 == _subPage) {
_kln89->DrawText("Time", 2, 0, 3);
// TODO - hardwired to UTC at the moment
// TODO: hardwired to UTC at the moment
_kln89->DrawText("UTC", 2, 6, 3);
string th = fgGetString("/instrumentation/clock/indicated-hour");
string tm = fgGetString("/instrumentation/clock/indicated-min");
@ -213,7 +213,7 @@ void KLN89NavPage::Update(double dt) {
the ETA to the final (destination) waypoint of the active flightplan.
If the active waypoint is not part of the active flightplan, then
display the ETA to the active waypoint. */
// TODO - implement the above properly - we haven't below!
// TODO: implement the above properly - we haven't below!
string wid = "";
if(fp->waypoints.size()) {
wid = fp->waypoints[fp->waypoints.size() - 1]->id;
@ -354,7 +354,7 @@ void KLN89NavPage::Update(double dt) {
case 0:
// DTK
_kln89->DrawLabel("DTK", -39, 6);
// TODO - check we have an active FP / dtk and draw dashes if not.
// TODO: check we have an active FP / dtk and draw dashes if not.
char buf0[4];
snprintf(buf0, 4, "%03i", (int)(_kln89->_dtkMag));
_kln89->DrawText((string)buf0, 1, 3, 0);
@ -505,7 +505,7 @@ void KLN89NavPage::Knob1Right1() {
void KLN89NavPage::Knob2Left1() {
// If the inner-knob is out on the nav4 page, the only effect is to cycle the displayed waypoint.
if(3 == _subPage && fgGetBool("/instrumentation/kln89/scan-pull")) {
if(_kln89->_activeFP->waypoints.size()) { // TODO - find out what happens when scan-pull is on on nav4 without an active FP.
if(_kln89->_activeFP->waypoints.size()) { // TODO: find out what happens when scan-pull is on on nav4 without an active FP.
// It's unlikely that we could get here without _scanWpSet, but theoretically possible, so we need to cover it.
if(!_scanWpSet) {
_scanWpIndex = _kln89->GetActiveWaypointIndex();
@ -546,7 +546,7 @@ void KLN89NavPage::Knob2Left1() {
_kln89->UpdateMapHeading();
}
} else if(_uLinePos == 3) {
// TODO - add AUTO
// TODO: add AUTO
if(_kln89->_mapScaleIndex == 0) {
_kln89->_mapScaleIndex = 20;
} else {
@ -559,7 +559,7 @@ void KLN89NavPage::Knob2Left1() {
void KLN89NavPage::Knob2Right1() {
// If the inner-knob is out on the nav4 page, the only effect is to cycle the displayed waypoint.
if(3 == _subPage && fgGetBool("/instrumentation/kln89/scan-pull")) {
if(_kln89->_activeFP->waypoints.size()) { // TODO - find out what happens when scan-pull is on on nav4 without an active FP.
if(_kln89->_activeFP->waypoints.size()) { // TODO: find out what happens when scan-pull is on on nav4 without an active FP.
// It's unlikely that we could get here without _scanWpSet, but theoretically possible, so we need to cover it.
if(!_scanWpSet) {
_scanWpIndex = _kln89->GetActiveWaypointIndex();
@ -599,7 +599,7 @@ void KLN89NavPage::Knob2Right1() {
_kln89->UpdateMapHeading();
}
} else if(_uLinePos == 3) {
// TODO - add AUTO
// TODO: add AUTO
if(_kln89->_mapScaleIndex == 20) {
_kln89->_mapScaleIndex = 0;
} else {

View file

@ -93,7 +93,7 @@ void KLN89NDBPage::Update(double dt) {
}
}
if(_subPage == 0) {
// TODO - trim VOR-DME from the name, convert to uppercase, abbreviate, etc
// TODO: trim VOR-DME from the name, convert to uppercase, abbreviate, etc
_kln89->DrawText(np->name(), 2, 0, 2);
_kln89->DrawLatitude(np->get_lat(), 2, 3, 1);
_kln89->DrawLongitude(np->get_lon(), 2, 3, 0);
@ -115,7 +115,7 @@ void KLN89NDBPage::Update(double dt) {
if(_kln89->_mode == KLN89_MODE_CRSR) {
if(_uLinePos > 0 && _uLinePos < 4) {
// TODO - blink as well
// TODO: blink as well
_kln89->Underline(2, _uLinePos, 3, 1);
}
for(unsigned int i = 0; i < _ndb_id.size(); ++i) {

View file

@ -52,7 +52,7 @@ void KLN89OthPage::Update(double dt) {
// FIXME - hardwired value.
_kln89->DrawText("NAV D", 2, 9, 3);
// TODO - add error physics to FG GPS where the alt value comes from.
// TODO: add error physics to FG GPS where the alt value comes from.
char buf[6];
int n = snprintf(buf, 5, "%i", _kln89->_altUnits == GPS_ALT_UNITS_FT ? (int)_kln89->_alt : (int)(_kln89->_alt * SG_FEET_TO_METER));
_kln89->DrawText((string)buf, 2, 13-n, 2);

View file

@ -106,13 +106,13 @@ void KLN89SetPage::Update(double dt) {
_kln89->DrawSpecialChar(5, 2, 7, 1); // +- sign.
if(_kln89->_mode == KLN89_MODE_CRSR && _uLinePos == 2) {
if(!_kln89->_blink) {
_kln89->DrawText("00300", 2, 8, 1); // TODO - fix this hardwiring!!!!
_kln89->DrawText("00300", 2, 8, 1); // TODO: fix this hardwiring!!!!
}
_kln89->Underline(2, 8, 1, 5);
} else {
_kln89->DrawText("00300", 2, 8, 1); // TODO - fix this hardwiring!!!!
_kln89->DrawText("00300", 2, 8, 1); // TODO: fix this hardwiring!!!!
}
_kln89->DrawText("ft", 2, 13, 1); // TODO - fix this hardwiring!!!!
_kln89->DrawText("ft", 2, 13, 1); // TODO: fix this hardwiring!!!!
}
break;
case 8:
@ -261,7 +261,7 @@ void KLN89SetPage::Knob2Left1() {
_kln89->SetSuaAlertEnabled(!_kln89->GetSuaAlertEnabled());
_maxULinePos = (_kln89->GetSuaAlertEnabled() ? 2 : 1);
} else if(_uLinePos == 2) {
// TODO - implement variable sua alert buffer
// TODO: implement variable sua alert buffer
}
break;
case 8:
@ -310,7 +310,7 @@ void KLN89SetPage::Knob2Right1() {
_kln89->SetSuaAlertEnabled(!_kln89->GetSuaAlertEnabled());
_maxULinePos = (_kln89->GetSuaAlertEnabled() ? 2 : 1);
} else if(_uLinePos == 2) {
// TODO - implement variable sua alert buffer
// TODO: implement variable sua alert buffer
}
break;
case 8:

View file

@ -37,7 +37,7 @@ KLN89VorPage::KLN89VorPage(KLN89* parent)
_nSubPages = 2;
_subPage = 0;
_name = "VOR";
_vor_id = "OSI"; // TODO - check a property for an initial value to allow user-override.
_vor_id = "OSI"; // TODO: check a property for an initial value to allow user-override.
np = NULL;
}
@ -93,9 +93,9 @@ void KLN89VorPage::Update(double dt) {
}
}
if(_subPage == 0) {
//// TODO - will almost certainly have to process freq below for FG
//// TODO: will almost certainly have to process freq below for FG
_kln89->DrawFreq(np->get_freq(), 2, 9, 3);
// TODO - trim VOR-DME from the name, convert to uppercase, abbreviate, etc
// TODO: trim VOR-DME from the name, convert to uppercase, abbreviate, etc
_kln89->DrawText(np->name(), 2, 0, 2);
//cout << np->lat << "... ";
_kln89->DrawLatitude(np->get_lat(), 2, 3, 1);
@ -127,7 +127,7 @@ void KLN89VorPage::Update(double dt) {
if(_kln89->_mode == KLN89_MODE_CRSR) {
if(_uLinePos > 0 && _uLinePos < 4) {
// TODO - blink as well
// TODO: blink as well
_kln89->Underline(2, _uLinePos, 3, 1);
}
for(unsigned int i = 0; i < _vor_id.size(); ++i) {

View file

@ -222,7 +222,7 @@ DCLGPS::DCLGPS(RenderArea2D* instrument) {
DCLGPS::~DCLGPS() {
delete _approachFP; // Don't need to delete the waypoints inside since they point to
// the waypoints in the approach database.
// TODO - may need to delete the approach database!!
// TODO: may need to delete the approach database!!
}
void DCLGPS::draw(osg::State& state) {
@ -273,7 +273,7 @@ void DCLGPS::update(double dt) {
_checkLon = _gpsLon;
_checkLat = _gpsLat;
// TODO - check for unit power before running this.
// TODO: check for unit power before running this.
if(!_powerOnTimerSet) {
SetPowerOnTimer();
}
@ -297,7 +297,7 @@ void DCLGPS::update(double dt) {
_departureTimeString = th + tm;
}
} else {
// TODO - check - is this prone to drift error over time?
// TODO: check - is this prone to drift error over time?
// Should we difference the departure and current times?
// What about when the user resets the time of day from the menu?
_elapsedTime += dt;
@ -321,7 +321,7 @@ void DCLGPS::update(double dt) {
if(_approachLoaded) {
if(!_approachReallyArmed && !_approachActive) {
// arm if within 30nm of airport.
// TODO - let user cancel approach arm using external GPS-APR switch
// TODO: let user cancel approach arm using external GPS-APR switch
bool multi;
const FGAirport* ap = FindFirstAptById(_approachID, multi, true);
if(ap != NULL) {
@ -348,7 +348,7 @@ void DCLGPS::update(double dt) {
//cout << "Active waypoint is FAF, id is " << _activeWaypoint.id << '\n';
if(GetGreatCircleDistance(_gpsLat, _gpsLon, _activeWaypoint.lat, _activeWaypoint.lon) <= 2.0 && !_obsMode) {
// Assume heading is OK for now
_approachArm = false; // TODO - check - maybe arm is left on when actv comes on?
_approachArm = false; // TODO: check - maybe arm is left on when actv comes on?
_approachReallyArmed = false;
_approachActive = true;
_targetCdiScaleIndex = 2;
@ -357,7 +357,7 @@ void DCLGPS::update(double dt) {
} else if(_currentCdiScaleIndex == 1) {
_sourceCdiScaleIndex = 1;
_cdiScaleTransition = true;
_cdiTransitionTime = 30.0; // TODO - compress it if time to FAF < 30sec
_cdiTransitionTime = 30.0; // TODO: compress it if time to FAF < 30sec
_currentCdiScale = _cdiScales[_currentCdiScaleIndex];
} else {
// Abort going active?
@ -409,7 +409,7 @@ void DCLGPS::update(double dt) {
// reverses to from once wp is passed).
/*
if(_fromWaypoint != NULL) {
// TODO - how do we handle the change of track with distance over long legs?
// TODO: how do we handle the change of track with distance over long legs?
_dtkTrue = GetGreatCircleCourse(_fromWaypoint->lat, _fromWaypoint->lon, _activeWaypoint->lat, _activeWaypoint->lon) * SG_RADIANS_TO_DEGREES;
_dtkMag = GetMagHeadingFromTo(_fromWaypoint->lat, _fromWaypoint->lon, _activeWaypoint->lat, _activeWaypoint->lon);
// Don't change the heading bug if speed is too low otherwise it flickers to/from at rest
@ -424,7 +424,7 @@ void DCLGPS::update(double dt) {
} else {
_dtkTrue = 0.0;
_dtkMag = 0.0;
// TODO - in DTO operation the position of initiation of DTO defines the "from waypoint".
// TODO: in DTO operation the position of initiation of DTO defines the "from waypoint".
}
*/
if(!_activeWaypoint.id.empty()) {
@ -449,16 +449,16 @@ void DCLGPS::update(double dt) {
_dist2Act = GetGreatCircleDistance(_gpsLat, _gpsLon, _activeWaypoint.lat, _activeWaypoint.lon) * SG_NM_TO_METER;
if(_groundSpeed_ms > 10.0) {
_eta = _dist2Act / _groundSpeed_ms;
if(_eta <= 36) { // TODO - this is slightly different if turn anticipation is enabled.
if(_eta <= 36) { // TODO: this is slightly different if turn anticipation is enabled.
if(_headingBugTo) {
_waypointAlert = true; // TODO - not if the from flag is set.
_waypointAlert = true; // TODO: not if the from flag is set.
}
}
if(_eta < 60) {
// Check if we should sequence to next leg.
// Perhaps this should be done on distance instead, but 60s time (about 1 - 2 nm) seems reasonable for now.
//double reverseHeading = GetGreatCircleCourse(_activeWaypoint->lat, _activeWaypoint->lon, _fromWaypoint->lat, _fromWaypoint->lon);
// Hack - let's cheat and do it on heading bug for now. TODO - that stops us 'cutting the corner'
// Hack - let's cheat and do it on heading bug for now. TODO: that stops us 'cutting the corner'
// when we happen to approach the inside turn of a waypoint - we should probably sequence at the midpoint
// of the heading difference between legs in this instance.
int idx = GetActiveWaypointIndex();
@ -480,7 +480,7 @@ void DCLGPS::update(double dt) {
// Course alteration message format is dependent on whether we are slaved HSI/CDI indicator or not.
string s;
if(fgGetBool("/instrumentation/nav[0]/slaved-to-gps")) {
// TODO - avoid the hardwiring on nav[0]
// TODO: avoid the hardwiring on nav[0]
s = "Adj Nav Crs to ";
} else {
s = "GPS Course is ";
@ -792,7 +792,7 @@ void DCLGPS::LoadApproachData() {
string rwystr;
try {
rwystr = w.id.substr(2, 2);
// TODO - sanity check the rwystr at this point to ensure we have a double digit number
// TODO: sanity check the rwystr at this point to ensure we have a double digit number
if(w.id.size() > 4) {
if(w.id[4] == 'L' || w.id[4] == 'C' || w.id[4] == 'R') {
rwystr += w.id[4];
@ -835,7 +835,7 @@ void DCLGPS::LoadApproachData() {
if(!wp_error) {
if(route_in_progress) {
if(sequence_number > last_sequence_number) {
// TODO - add a check for runway numbers
// TODO: add a check for runway numbers
// Check for the waypoint ID being the same as the previous line.
// This is often the case for the missed approach holding point.
if(wp_ident == last_wp_ident) {
@ -862,7 +862,7 @@ void DCLGPS::LoadApproachData() {
// This seems to happen once per final approach route - one of the waypoints
// is duplicated with the same sequence number - I'm not sure what information
// the second line give yet so ignore it for now.
// TODO - figure this out!
// TODO: figure this out!
} else {
// Finalise the current route and start a new one
//
@ -911,7 +911,7 @@ void DCLGPS::LoadApproachData() {
}
} else {
// Check and finalise any approaches in progress
// TODO - sanity check that the approach has all the required elements
// TODO: sanity check that the approach has all the required elements
if(iap_in_progress) {
// This is a new approach - store the last one and trigger
// starting afresh by setting the in progress flag to false.
@ -931,7 +931,7 @@ void DCLGPS::LoadApproachData() {
}
// If we get to the end of the file, load any approach that is still in progress
// TODO - sanity check that the approach has all the required elements
// TODO: sanity check that the approach has all the required elements
if(iap_in_progress) {
if(iap_error) {
//cout << "ERROR: Unable to load approach " << iap->_ident << " at " << iap->_aptIdent << '\n';
@ -984,7 +984,7 @@ double DCLGPS::GetCDIDeflection() const {
void DCLGPS::DtoInitiate(const string& s) {
const GPSWaypoint* wp = FindFirstByExactId(s);
if(wp) {
// TODO - Currently we start DTO operation unconditionally, regardless of which mode we are in.
// TODO: Currently we start DTO operation unconditionally, regardless of which mode we are in.
// In fact, the following rules apply:
// In LEG mode, start DTO as we currently do.
// In OBS mode, set the active waypoint to the requested waypoint, and then:
@ -1000,7 +1000,7 @@ void DCLGPS::DtoInitiate(const string& s) {
_fromWaypoint.id = "_DTOWP_";
delete wp;
} else {
// TODO - Should bring up the user waypoint page.
// TODO: Should bring up the user waypoint page.
_dto = false;
}
}
@ -1040,7 +1040,7 @@ void DCLGPS::ToggleOBSMode() {
_obsHeading = static_cast<int>(_dtkMag + 0.5);
//cout << "_dtkMag = " << _dtkMag << ", _dtkTrue = " << _dtkTrue << ", _obsHeading = " << _obsHeading << '\n';
} else {
// TODO - what should we really do here?
// TODO: what should we really do here?
_obsHeading = 0;
}
@ -1048,7 +1048,7 @@ void DCLGPS::ToggleOBSMode() {
if(_obsHeading > 359) _obsHeading -= 360;
if(_obsHeading < 0) _obsHeading += 360;
// TODO - the _fromWaypoint location will change as the OBS heading changes.
// TODO: the _fromWaypoint location will change as the OBS heading changes.
// Might need to store the OBS initiation position somewhere in case it is needed again.
SetOBSFromWaypoint();
}
@ -1059,7 +1059,7 @@ void DCLGPS::SetOBSFromWaypoint() {
if(!_obsMode) return;
if(_activeWaypoint.id.empty()) return;
// TODO - base the 180 deg correction on the to/from flag.
// TODO: base the 180 deg correction on the to/from flag.
_fromWaypoint = GetPositionOnMagRadial(_activeWaypoint, 10, _obsHeading + 180.0);
_fromWaypoint.type = GPS_WP_VIRT;
_fromWaypoint.id = "_OBSWP_";
@ -1104,7 +1104,7 @@ double DCLGPS::GetETE() {
if(_groundSpeed_kts < 30.0) {
return(-1.0);
} else {
// TODO - handle OBS / DTO operation appropriately
// TODO: handle OBS / DTO operation appropriately
if(_activeFP->waypoints.empty()) {
return(-1.0);
} else {
@ -1146,7 +1146,7 @@ double DCLGPS::GetTimeToWaypoint(const string& id) {
}
// Returns magnetic great-circle heading
// TODO - document units.
// TODO: document units.
float DCLGPS::GetHeadingToActiveWaypoint() {
if(_activeWaypoint.id.empty()) {
return(-888);
@ -1159,7 +1159,7 @@ float DCLGPS::GetHeadingToActiveWaypoint() {
}
// Returns magnetic great-circle heading
// TODO - what units?
// TODO: what units?
float DCLGPS::GetHeadingFromActiveWaypoint() {
if(_activeWaypoint.id.empty()) {
return(-888);
@ -1208,7 +1208,7 @@ void DCLGPS::OrientateToFlightPlan(GPSFlightPlan* fp) {
} else {
_navFlagged = false;
if(fp->waypoints.size() == 1) {
// TODO - may need to flag nav here if not dto or obs, or possibly handle it somewhere else.
// TODO: may need to flag nav here if not dto or obs, or possibly handle it somewhere else.
_activeWaypoint = *fp->waypoints[0];
_fromWaypoint.id.clear();
} else {
@ -1384,7 +1384,7 @@ GPSWaypoint* DCLGPS::FindFirstByExactId(const string& id) const
return GPSWaypoint::createFromPositioned(result);
}
// TODO - add the ASCII / alphabetical stuff from the Atlas version
// TODO: add the ASCII / alphabetical stuff from the Atlas version
FGPositioned* DCLGPS::FindTypedFirstById(const string& id, FGPositioned::Type ty, bool &multi, bool exact)
{
multi = false;
@ -1437,7 +1437,7 @@ FGNavRecord* DCLGPS::FindClosestVor(double lat_rad, double lon_rad) {
double DCLGPS::GetMagHeadingFromTo(double latA, double lonA, double latB, double lonB) {
double h = GetGreatCircleCourse(latA, lonA, latB, lonB);
h *= SG_RADIANS_TO_DEGREES;
// TODO - use the real altitude below instead of 0.0!
// TODO: use the real altitude below instead of 0.0!
//cout << "MagVar = " << sgGetMagVar(_gpsLon, _gpsLat, 0.0, _time->getJD()) * SG_RADIANS_TO_DEGREES << '\n';
double jd = globals->get_time_params()->getJD();
h -= sgGetMagVar(_gpsLon, _gpsLat, 0.0, jd) * SG_RADIANS_TO_DEGREES;

View file

@ -105,7 +105,7 @@ public:
inline bool IsEmpty() { return waypoints.empty(); }
};
// TODO - probably de-public the internals of the next 2 classes and add some methods!
// TODO: probably de-public the internals of the next 2 classes and add some methods!
// Instrument approach procedure base class
class FGIAP
{
@ -199,7 +199,7 @@ private:
// ------------------------------------------------------------------------------
// TODO - merge generic GPS functions instead and split out KLN specific stuff.
// TODO: merge generic GPS functions instead and split out KLN specific stuff.
class DCLGPS : public SGSubsystem
{
public:
@ -337,7 +337,7 @@ protected:
protected:
void LoadApproachData();
// Find first of any type of waypoint by id. (TODO - Possibly we should return multiple waypoints here).
// Find first of any type of waypoint by id. (TODO: Possibly we should return multiple waypoints here).
GPSWaypoint* FindFirstById(const std::string& id) const;
GPSWaypoint* FindFirstByExactId(const std::string& id) const;
@ -373,7 +373,7 @@ protected:
// Hack - it seems that the GPS gets initialised before FG's initial position is properly set.
// By checking for abnormal slew in the position we can force a re-initialisation of active flight
// plan leg and anything else that might be affected.
// TODO - sort FlightGear's initialisation order properly!!!
// TODO: sort FlightGear's initialisation order properly!!!
double _checkLat, _checkLon; // (Radians)
double _groundSpeed_ms; // filtered groundspeed (m/s)
double _groundSpeed_kts; // ditto in knots

View file

@ -1451,7 +1451,7 @@ void GPS::addAirportToScratch(FGAirport* aAirport)
for (unsigned int r=0; r<aAirport->numRunways(); ++r) {
SGPropertyNode* rwyNd = _scratchNode->getChild("runways", r, true);
FGRunway* rwy = aAirport->getRunwayByIndex(r);
// TODO - filter out unsuitable runways in the future
// TODO: filter out unsuitable runways in the future
// based on config again
rwyNd->setStringValue("id", rwy->ident().c_str());
@ -1459,7 +1459,7 @@ void GPS::addAirportToScratch(FGAirport* aAirport)
rwyNd->setIntValue("width-ft", rwy->widthFt());
rwyNd->setIntValue("heading-deg", rwy->headingDeg());
// map surface code to a string
// TODO - lighting information
// TODO: lighting information
if (rwy->ILS()) {
rwyNd->setDoubleValue("ils-frequency-mhz", rwy->ILS()->get_freq() / 100.0);

View file

@ -204,7 +204,7 @@ void FGProps::PropsChannel::beginNasal(const ParameterList &param)
setTerminator(eofMarker);
}
//TODO: provide support for different types of subscriptions MODES ? (child added/removed, thesholds, min/max)
// TODO: provide support for different types of subscriptions MODES ? (child added/removed, thresholds, min/max)
void FGProps::PropsChannel::valueChanged(SGPropertyNode* ptr)
{
_dirtySubscriptions.insert(ptr);

View file

@ -247,7 +247,7 @@ bool FGPgtTerrain::schedule_scenery(const SGGeod& position, double range_m, doub
void FGPgtTerrain::materialLibChanged()
{
// PSADRO: TODO - passing down new regional textures won't work. these need to be set in the
// PSADRO: TODO: passing down new regional textures won't work. these need to be set in the
// lod tree at init time, as OSGDBPager generates the load request, not the tile cache.
// _options->setMaterialLib(globals->get_matlib());