fi
AM_CONDITIONAL(ENABLE_SP_FDM, test "x$enable_sp_fdms" != "xno")
+# Specify whether we want to compile ATCDCL.
+# default to with_atcdcl=yes
+AC_ARG_ENABLE(atcdcl, [ --enable-atcdcl Compile and link the depricated atc/ai module], [enable_atcdcl="$enableval"] )
+if test "x$enable_atcdcl" != "xno"; then
+ AC_DEFINE([ENABLE_ATCDCL], 1, [Define to include old ATC/AI module])
+else
+ AC_DEFINE([ENABLE_ATCDCL], 0, [Define to include old ATC/AI module])
+fi
+AM_CONDITIONAL(ENABLE_ATCDCL, test "x$enable_atcdcl" != "xno")
+
+
dnl EXPERIMENTAL generic event driven input device
# defaults to no
AC_CHECK_HEADER(pthread.h)
AM_CONDITIONAL(WITH_THREADS, test "x$with_threads" = "xyes")
+
dnl Used by JSBSim to conditionally compile in fgfs interface code
AC_DEFINE([FGFS], 1, [Define so that JSBSim compiles in 'library' mode])
base_LIBS="$LIBS"
dnl Check for SDL or glut if enabled.
-AC_ARG_ENABLE(osgviewer, [ --enable-osgviewer Configure to use osgViewer(default)], [enable_osgviewer="$enableval"])
+AC_ARG_ENABLE(osgviewer, [ --enable-osgviewer Configure to use osgViewer(default)], [enable_osgviewer="$enableval"])
AC_ARG_ENABLE(sdl, [ --enable-sdl Configure to use SDL], [enable_sdl="$enableval"])
AC_ARG_ENABLE(glut, [ --enable-glut Configure to use GLUT], [enable_glut="$enableval"])
AM_CONDITIONAL(USE_SDL, test "x$enable_sdl" = "xyes")
echo "Include special purpose flight models: no"
fi
+if test "x$enable_atcdcl" != "xno"; then
+ echo "Build depricated ATC/AI module: yes"
+else
+ echo "Build depricated ATC/AI module: no"
+fi
case 4: //Take off tower controller
if (trafficRef->getDepartureAirport()->getDynamics()) {
controller = trafficRef->getDepartureAirport()->getDynamics()->getTowerController();
- //if (trafficRef->getDepartureAirport()->getId() == "EHAM") {
- //string trns = trafficRef->getCallSign() + " at runway " + fp->getRunway() +
- // ". Ready for departure. " + trafficRef->getFlightType() + " to " +
- // trafficRef->getArrivalAirport()->getId();
- //fgSetString("/sim/messages/atc", trns.c_str());
- // if (controller == 0) {
- //cerr << "Error in assigning controller at " << trafficRef->getDepartureAirport()->getId() << endl;
- //}
- //}
} else {
cerr << "Error: Could not find Dynamics at airport : " << trafficRef->getDepartureAirport()->getId() << endl;
}
if (other.intentions.size())
{
for (intVecIterator j = other.intentions.begin(); j != other.intentions.end(); j++)
- {
+ {
// cerr << "Current segment 1 " << (*i) << endl;
if ((*i) > 0) {
if ((opp = net->findSegment(*i)->opposite()))
// Assign SID, if necessery (TODO)
case MSG_PERMIT_ENGINE_START:
taxiFreqStr = formatATCFrequency3_2(taxiFreq);
-
+
heading = rec->getAircraft()->getTrafficRef()->getCourse();
fltType = rec->getAircraft()->getTrafficRef()->getFlightType();
rwyClass= rec->getAircraft()->GetFlightPlan()->getRunwayClassFromTrafficType(fltType);
// Display ATC message only when one of the radios is tuned
// the relevant frequency.
// Note that distance attenuation is currently not yet implemented
- //cerr << "Transmitting " << text << " at " << stationFreq;
if ((onBoardRadioFreqI0 == stationFreq) || (onBoardRadioFreqI1 == stationFreq)) {
fgSetString("/sim/messages/atc", text.c_str());
- //cerr << "Printing Message: " << endl;
}
}
return string(buffer);
}
+// TODO: Set transponder codes according to real-world routes.
+// The current version just returns a random string of four octal numbers.
string FGATCController::genTransponderCode(string fltRules) {
if (fltRules == "VFR") {
return string("1200");
class FGAIFlightPlan; // forward reference
class FGGroundNetwork; // forward reference
-//class FGAISchedule; // forward reference
class FGAIAircraft; // forward reference
/**************************************************************************************
#include "simple.hxx"
#include "runways.hxx"
#include "pavement.hxx"
-#include <ATCDCL/commlist.hxx>
+#if ENABLE_ATCDCL
+# include <ATCDCL/commlist.hxx>
+#endif
#include <iostream>
last_apt_type("")
{}
+
+#ifdef ENABLE_ATCDCL
void parseAPT(const string &aptdb_file, FGCommList *comm_list)
+#else
+ void parseAPT(const string &aptdb_file)
+#endif
{
sg_gzifstream in( aptdb_file );
pvt->addNode(pos, num == 113);
}
}
-
+#if ENABLE_ATCDCL
void parseATISLine(FGCommList *comm_list, const vector<string>& token)
{
if ( rwy_count <= 0 ) {
<< " type: " << a.type );
#endif
}
+#endif
};
+
// Load the airport data base from the specified aptdb file. The
// metar file is used to mark the airports as having metar available
// or not.
bool fgAirportDBLoad( const string &aptdb_file,
+#if ENABLE_ATCDCL
FGCommList *comm_list, const std::string &metar_file )
+#else
+ const std::string &metar_file )
+#endif
{
APTLoader ld;
-
+#if ENABLE_ATCDCL
ld.parseAPT(aptdb_file, comm_list);
-
+#else
+ ld.parseAPT(aptdb_file);
+#endif
//
// Load the metar.dat file and update apt db with stations that
// have metar data.
void FGGroundNetwork::update(int id, double lat, double lon, double heading, double speed, double alt,
double dt) {
+ // Check whether aircraft are on hold due to a preceding pushback. If so, make sure to
+ // Transmit air-to-ground "Ready to taxi request:
+ // Transmit ground to air approval / hold
+ // Transmit confirmation ...
+ // Probably use a status mechanism similar to the Engine start procedure in the startup controller.
+
+
TrafficVectorIterator i = activeTraffic.begin();
// Search search if the current id has an entry
// This might be faster using a map instead of a vector, but let's start by taking a safe route
SP_FDM_LIBS =
endif
+if ENABLE_ATCDCL
+ATCDCL_LIBS = $(top_builddir)/src/ATCDCL/libATCDCL.a
+else
+ATCDCL_LIBS =
+endif
+
+
if WITH_THREADS
THREAD_LIBS = -lsgthreads $(thread_LIBS)
else
fgfs_LDADD = \
libMain.a \
$(top_builddir)/src/Aircraft/libAircraft.a \
- $(top_builddir)/src/ATCDCL/libATCDCL.a \
+ $(ATCDCL_LIBS) \
$(top_builddir)/src/Cockpit/libCockpit.a \
$(top_builddir)/src/Cockpit/built_in/libBuilt_in.a \
$(top_builddir)/src/FDM/libFlight.a \
#include <Airports/dynamics.hxx>
#include <AIModel/AIManager.hxx>
-#include <ATCDCL/ATCmgr.hxx>
-#include <ATCDCL/AIMgr.hxx>
+
+#if ENABLE_ATCDCL
+# include <ATCDCL/ATCmgr.hxx>
+# include <ATCDCL/AIMgr.hxx>
+# include "ATCDCL/commlist.hxx"
+#endif
+
#include <Autopilot/route_mgr.hxx>
#include <Autopilot/xmlauto.hxx>
#include <Autopilot/autobrake.hxx>
#include <Cockpit/cockpit.hxx>
#include <Cockpit/panel.hxx>
#include <Cockpit/panel_io.hxx>
-#ifdef ENABLE_SP_FDM
+
+#if ENABLE_SP_FDM
#include <FDM/SP/ADA.hxx>
#include <FDM/SP/ACMS.hxx>
#include <FDM/SP/MagicCarpet.hxx>
#include "renderer.hxx"
#include "viewmgr.hxx"
#include "main.hxx"
-#include "ATCDCL/commlist.hxx"
+
#ifdef __APPLE__
# include <CoreFoundation/CoreFoundation.h>
// Initialise the frequency search map BEFORE reading
// the airport database:
+
+
+
+#if ENABLE_ATCDCL
current_commlist = new FGCommList;
current_commlist->init( globals->get_fg_root() );
fgAirportDBLoad( aptdb.str(), current_commlist, p_metar.str() );
+#else
+ fgAirportDBLoad( aptdb.str(), p_metar.str() );
+#endif
FGNavList *navlist = new FGNavList;
FGNavList *loclist = new FGNavList;
+if ENABLE_ATCDCL
+ATCDCL_DIR = ATCDCL
+else
+ATCDCL_DIR =
+endif
+
+
SUBDIRS = \
Include \
Aircraft \
Airports \
ATC \
- ATCDCL \
+ $(ATCDCL_DIR) \
Autopilot \
Cockpit \
Environment \