From 1520fd648e07bdca40a799f5a381939122512456 Mon Sep 17 00:00:00 2001 From: daveluff Date: Fri, 5 Sep 2003 10:22:18 +0000 Subject: [PATCH] Output a few properties for AI code devel convienience - probably temporary --- src/ATC/tower.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ATC/tower.cxx b/src/ATC/tower.cxx index 972d59d10..4819cfe20 100644 --- a/src/ATC/tower.cxx +++ b/src/ATC/tower.cxx @@ -483,6 +483,18 @@ void FGTower::Update(double dt) { if(ii >= ii_max) { ii = 0; } + + if(ident == "KEMT") { + // For AI debugging convienience - may be removed + Point3D user_pos; + user_pos.setlon(user_lon_node->getDoubleValue()); + user_pos.setlat(user_lat_node->getDoubleValue()); + user_pos.setelev(user_elev_node->getDoubleValue()); + Point3D user_ortho_pos = ortho.ConvertToLocal(user_pos); + fgSetDouble("/AI/user/ortho-x", user_ortho_pos.x()); + fgSetDouble("/AI/user/ortho-y", user_ortho_pos.y()); + fgSetDouble("/AI/user/elev", user_elev_node->getDoubleValue()); + } }