Open source project displaying live aircrafts, ships or trackers on 2D/3D map. Browse through the data based on a particular aircraft, airline, airport, tracker or vessel to search through the database or see extensive statistics. Can use ADS-B in SBS1 format (dump1090, Radarcape,...), VRS, VA (VATSIM, IVAO whazzup.txt, phpvms,...), ACARS (acarsdec, acarsdeco2), APRS, AIS as datasource.
Hi all, I'm trying to setup a FlightAirMap server with postgresql as a backend database. Let's say for example that I have a domain name example.com and a subdomain as for example fam.example.com where I would like to access my FlightAirMap server.
I've set up my apache2 (2.54.xx) virtual host like this:
<IfModule mod_ssl.c>
<VirtualHost *:443>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
ServerName fam.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/fam
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/fam_error.log
CustomLog ${APACHE_LOG_DIR}/fam_access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
RewriteEngine on
# Some rewrite rules in this file were disabled on your HTTPS site,
# because they have the potential to create redirection loops.
# RewriteCond %{HTTPS} !=on
# RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L]
#ServerName fam.radair.org
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/fam.example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/fam.example.com/privkey.pem
</VirtualHost>
</IfModule>
then I setup the apache2 serving directory as this:
...
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/html>
AllowOverride ALL
DirectoryIndex index.html index.php
</Directory>
<Directory /var/www/radairwiki>
AllowOverride ALL
DirectoryIndex index.php
</Directory>
<Directory /var/www/html/fam>
Options Indexes FollowSymLinks
AllowOverride All
DirectoryIndex index.php
Order allow,deny
Allow from all
#Require all granted
</Directory>
...
then following the installation procedure on the wiki a settings.php file was created like this:
<?php
//INSTALLED OR NOT ?
$globalInstalled = TRUE;
//GLOBAL SITE NAME
$globalName = 'radair fam';
// GLOBAL URL
$globalURL = 'https://fam.example.com';
// Logo URL
$logoURL = '/images/logo2.png';
// Activate debug
$globalDebug = TRUE;
// LANGUAGE
$globalLanguage = 'EN'; // Used only for wikipedia links for now
// MAP PROVIDER
$globalMapProvider = 'OpenStreetMap'; // Can be Mapbox, OpenStreetMap, MapQuest-OSM or MapQuest-Aerial
$globalMapboxId = 'examples.map-i86nkdio'; // Mapbox id
$globalMapboxToken = ''; // Mapbox token
$globalGoogleAPIKey = '';
$globalBingMapKey = '';
$globalHereappID = '';
$globalHereappCode = '';
$globalMapQuestKey = '';
$globalOpenWeatherMapKey = '';
// Customs layers source must be configured this way:
//$globalMapCustomLayer = array('custom' => array('url' => 'http://myownserver','maxZoom' => 18, 'minZoom' => 0,'attribution' => 'MySelf'));
// OFFLINE MODE
$globalMapOffline = FALSE; // Use Natural Earth II
$globalOffline = FALSE; // don't try to use internet for anything
// MAP 3D
$globalMap3D = TRUE; // User can choose 3D map
$globalMap3Ddefault = FALSE; // Display 3D map by default
$globalMap3DTiles = ''; // A 3D tileset
$globalMap3DLiveries = FALSE; // Use real liveries in 3D
$globalMap3DOneModel = FALSE; // Use same model for all aircrafts
$globalMap3DShadows = TRUE; // Enable sun shadow on 3D mode
//COVERAGE AREA (its based on a box model. i.e. top-left | top-right | bottom-right | bottom-left)
$globalLatitudeMax = '46.92'; //the maximum latitude (north)
$globalLatitudeMin = '42.14'; //the minimum latitude (south)
$globalLongitudeMax = '9.2'; //the maximum longitude (west)
$globalLongitudeMin = '7.0'; //the minimum longitude (east)
$globalCenterLatitude = '46.38'; //the latitude center of your coverage area
$globalCenterLongitude = '8.1';//the longitude center of your coverage area
$globalLiveZoom = '9'; //default zoom on Live Map
$globalAirportZoom = '7'; //default zoom to begin to display airports icons
// FLIGHTS MUST BE INSIDE THIS CIRCLE
$globalDistanceIgnore = array();
// ^^ example for 100km : array('latitude' => '46.38','longitide' => '5.29','distance' => '100');
// DATABASE CONNECTION LOGIN
$globalDBdriver = 'pgsql'; // PDO driver used. Tested with mysql, maybe pgsql or others work...
$globalDBhost = 'localhost'; //database connection url
$globalDBuser = 'famusr'; //database username
$globalDBpass = 'fampwd'; //database password
$globalDBname = 'famdb'; //database name
$globalDBport = '5432'; //database port
$globalTransaction = TRUE; //Activate database transaction support
//FLIGHTAWARE API INFO (not supported)
$globalFlightAware = FALSE; //set to TRUE to use FlightAware as data import
$globalFlightAwareUsername = ''; //FlightAware Username
$globalFlightAwarePassword = ''; //FlightAware Password/API key
// TIMEZONE
$globalTimezone = 'Europe/Paris';
// DAEMON
$globalDaemon = TRUE; // Run cron-sbs.php as daemon (don't work well if source is a real SBS1 device)
$globalCronEnd = '0'; //the script run for xx seconds if $globalDaemon is disable in SBS mode
// FORK
$globalFork = FALSE; // Allow cron-sbs.php to fork to fetch schedule, no more schedules fetch if set to FALSE
// MINIMUM TIME BETWEEN UPDATES FOR HTTP SOURCES (in seconds)
$globalMinFetch = '50';
// DISPLAY FLIGHT INTERVAL ON MAP (in seconds)
$globalLiveInterval = '200';
// MINIMAL CHANGE TO PUT IN DB
$globalCoordMinChange = '0.02'; // minimal change since last message for latitude/longitude (limit write to DB)
$globalCoordMinChangeTracker = '0.01'; // minimal change since last message for latitude/longitude (limit write to DB) for tracker
// LIVE MAP REFRESH (in seconds)
$globalMapRefresh = '30';
// ADD FLIGHTS THAT ARE VISIBLE (boarding box)
$globalMapUseBbox = FALSE;
// IDLE TIMEOUT (in minutes)
$globalMapIdleTimeout = '30';
// DISPLAY INFO OF FLIGHTS IN A POPUP
$globalMapPopup = FALSE;
// DISPLAY INFO OF AIRPORTS IN A POPUP
$globalAirportPopup = FALSE;
// DISPLAY ROUTE OF FLIGHT
$globalMapRoute = TRUE;
// DISPLAY REMAINING ROUTE OF FLIGHT
$globalMapRemainingRoute = TRUE;
// DISPLAY FLIGHTS PATH HISTORY
$globalMapHistory = FALSE;
// FLIGHT ESTIMATION BETWEEN UPDATES
$globalMapEstimation = TRUE;
// PUT ALL FLIGHTS IN DB (even without coordinates)
$globalAllFlights = TRUE;
// WRAP MAP OR REPEAT
$globalMapWrap = TRUE;
// ALLOW SITE TRANSLATION
$globalTranslate = TRUE;
// UNITS
$globalUnitDistance = 'km'; // km, nm or mi
$globalUnitAltitude = 'm'; // m or feet
$globalUnitSpeed = 'kmh'; // kmh, knots or mph
// CUSTOM CSS
$globalCustomCSS = '';
// *** Pilots/Owners ***
// Force the display of owners or/and pilots. Can be used for paragliding.
//$globalUseOwner = TRUE;
//$globalUsePilot = TRUE;
// *** Virtual flights ***
// Virtual Airline (generic)
$globalVA = FALSE;
//IVAO
$globalIVAO = FALSE;
//VATSIM
$globalVATSIM = FALSE;
//phpVMS
$globalphpVMS = FALSE;
//Virtual Airlien Manager
$globalVAM = FALSE;
//User can choose between IVAO, VATSIM or phpVMS
$globalMapVAchoose = FALSE;
// Use real airlines even for IVAO & VATSIM
$globalUseRealAirlines = FALSE;
// ************************
// *** Virtual marine ***
// Virtual Marine (generic)
$globalVM = FALSE;
// Sailaway email & pass
//$globalSailaway = array('email' => '', 'password' => '');
// Set custom marine pics
//$globalMarineImagePics = array('type' => array('boat type' => array('image_thumbnail' => '','image' => '', 'image_copyright' => '','image_source' => '','image_source_website' => '')));
// ************************
//ADS-B, SBS1 FORMAT
$globalSBS1 = FALSE; //set to FALSE to not use SBS1 as data import
$globalSourcesTimeOut = '15';
$globalSourcesupdate = '10'; //Put data in DB after xx seconds/flight
//DATA SOURCES
$globalSources = array(array('host' => 'myadsb.dyndns.org','port' => '30003','name' => '','format' => 'auto','sourcestats' => FALSE,'noarchive' => FALSE,'timezone' => 'UTC','callback' => FALSE));
// ^^ in the form array(array(host => 'host1', 'port' => 'port1','name' => 'first source','format' => 'sbs'),array('host' => 'host2', 'port' => 'port2','name' => 'Other source', 'format' => 'aprs'),array('host' => 'http://xxxxx/whazzup.txt'),array('host' => '123.123.123.123', 'name' => 'external', 'callback' => TRUE,'format' => 'hidnseek')); Use only sources you have the rights for.
//ACARS Listen in UDP
$globalACARS = FALSE;
$globalACARSHost = '0.0.0.0'; // Local IP to listen
$globalACARSPort = '9999';
$globalACARSArchive = array('10','80','81','82','3F'); // labels of messages to archive
$globalACARSArchiveKeepMonths = '0';
//APRS configuration (for glidernet)
$globalAPRS = FALSE;
$globalAPRSversion = $globalName.' using FlightAirMap';
$globalAPRSssid = 'FAM';
$globalAPRSfilter = 'r/'.$globalCenterLatitude.'/'.$globalCenterLongitude.'/250.0';
$globalAPRSarchive = FALSE; // archive track of APRS flights
//User can choose between APRS & SBS1
//$globalMapchoose = FALSE;
//Minimal distance to tell if a flight is arrived to airport (in km)
$globalClosestMinDist = '50';
// To display Squawk usage we need Squawk country for now
$globalSquawkCountry = 'UK';
//BIT.LY API INFO (used in the search page for a shorter URL)
$globalBitlyAccessToken = ''; //the access token from the bit.ly API
//British Airways API info
$globalBritishAirwaysKey = '';
// Lufhansa API info
$globalLufthansaKey = array('key' => '','secret' => '');
// Transavia API info
$globalTransaviaKey = '';
// Default aircraft icon color for 2D map
$globalAircraftIconColor = '1a3151';
// Display altitude in color
$globalMapAltitudeColor = TRUE;
// Size of icon on 2D map ('' for default => 30px if zoom > 7 else 15px)
$globalAircraftSize = '';
//ignore the flights during imports that have the following airports ICAO (departure/arrival) associated with them
$globalAirportIgnore = array();
//accept the flights during imports that have the following airports ICAO (departure/arrival) associated with them
$globalAirportAccept = array();
//ignore the flights that have the following airline ICAO
$globalAirlineIgnore = array();
//accept the flights that have the following airline ICAO
$globalAirlineAccept = array();
//accept the flights that have the following pilot id (only for VA)
$globalPilotIdAccept = array();
// *** Archive ***
//Archive all data
$globalArchive = FALSE;
//Archive data olders than xx months (if globalArchive enabled, else delete) (0 to disable)
$globalArchiveMonths = '0';
//Archive previous year (if globalArchive enabled, else delete)
$globalArchiveYear = FALSE;
//Keep Archive track of flight for xx months (0 to disable)
$globalArchiveKeepTrackMonths = '0';
//Keep Archive of flight for xx months (0 to disable)
$globalArchiveKeepMonths = '0';
// ************************
// Reset stats every year
$globalDeleteLastYearStats = FALSE;
//Calculate height of the geoid above the WGS84 ellipsoid (for source that give altitude based on AMSL)
$globalGeoid = TRUE;
$globalGeoidSource = 'egm96-15';
//NOTAM
$globalNOTAM = TRUE;
$globalNOTAMSource = ''; //URL of your feed from notaminfo.com
//METAR
$globalMETAR = TRUE;
$globalMETARcycle = TRUE; // If update_db.php in cron job, all METAR are downloaded from NOAA
// else put an url as METAR source, can be vatsim.
$globalMETARurl = ''; // Use {icao} to indicate where airport icao must be put in url
//Retrieve private Owner
$globalOwner = FALSE;
// *** Aircraft pics ***
//Retrieve Image from externals sources
$globalAircraftImageFetch = TRUE;
//Check by aircraft ICAO if image is not found by registration
$globalAircraftImageCheckICAO = TRUE;
//Sources for Aircraft image
$globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters','customsources');
// Custom source configuration {registration} will be replaced by aircraft registration (exif get copyright from exif data for each pic)
// example of config : $globalAircraftImageCustomSources = array('thumbnail' => 'http://pics.myurl.com/thumbnail/{registration}.jpg','original' => 'http://myurl/original/{registration}.jpg','source_website' => 'https://www.myurl.com', 'source' => 'customsite', 'copyright' => 'myself','exif' => true);
// ************************
// *** Marine pics ***
//Retrieve Image from externals sources
$globalMarineImageFetch = TRUE;
//Sources for Marine image
$globalMarineImageSources = array('wikimedia','flickr','deviantart','bing','customsources');
// Custom source configuration {mmsi} will be replaced by vessel mmsi, {name} by it's name (exif get copyright from exif data for each pic)
// example of config : $globalMarineImageCustomSources = array('thumbnail' => 'http://pics.myurl.com/thumbnail/{name}.jpg','original' => 'http://myurl/original/{name}.jpg','source_website' => 'https://www.myurl.com', 'source' => 'customsite', 'copyright' => 'myself','exif' => true);
// ************************
//Retrieve schedules from externals sources (set to FALSE for IVAO or if $globalFork = FALSE)
$globalSchedulesFetch = TRUE;
//Sources for airline schedule if not official airline site
$globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware');
//Retrieve translation from external sources (set to FALSE for IVAO)
$globalTranslationFetch = TRUE;
//Sources for translation, to find name of flight from callsign
$globalTranslationSources = array();
//Don't display upcoming page
$globalNoUpcoming = FALSE;
//Don't display idents
$globalNoIdents = FALSE;
//Don't display and try to retrieve airlines
$globalNoAirlines = FALSE;
//Display Owners
$globalUseOwner = TRUE;
//Display Pilots
$globalUsePilot = FALSE;
//Show a tooltip for each flights
$globalMapTooltip = FALSE;
//Display ground station on map
$globalMapGroundStation = TRUE;
//Display weather station on map
$globalMapWeatherStation = TRUE;
//Display lightning on map
$globalMapLightning = TRUE;
//Flights accidents support
$globalAccidents = TRUE;
//Fires support
$globalFires = FALSE;
//Display fires on map
$globalMapFires = FALSE;
//Add waypoints to DB
$globalWaypoints = TRUE;
//Support task .tsk xml files as ?tsk=http://path/toto.tsk
$globalTSK = FALSE;
//Display ground altitude
$globalGroundAltitude = FALSE;
// ****** MODES *****
// Aircraft Mode
$globalAircraft = TRUE;
// Marine Mode
$globalMarine = FALSE;
// Tracker Mode
$globalTracker = FALSE;
// Satellite Mode
$globalSatellite = FALSE;
// ************************
// Enable map matching for tracker mode
$globalMapMatching = FALSE;
// Set map matching source (can be fam, graphhopper, osmr or mapbox)
$globalMapMatchingSource = 'fam';
// Set GraphHopper API key
$globalGraphHopperKey = '';
// News feeds
$globalNewsFeeds = array();
// example: $globalNewsFeeds = array('global' => array('en' => array('http://www.mynewsfeed.com/rss')));
// Get result from archive table for search
$globalArchiveResults = TRUE;
$globalInstallPassword = 'mypassword';
$globalDisableUpdateCheck = FALSE;
$globalSailaway = array('email' => '','password' => '','key' => '');
$globalPODACCuser = '';
$globalPODACCpass = '';
$globalMapSatellites = FALSE;
$globalMarineIconColor = '43d1d8';
$globalTrackerIconColor = '1a3151';
$globalSatelliteIconColor = '1a3151';
$globalCORSproxy = 'https://galvanize-cors-proxy.herokuapp.com/';
$globalMap3DSelected = FALSE;
?>
I think there's some mistake in this setup as if I go to my domain I have the page layout broken as this:
where some map tiles are loaded and some others not and the page layout is broken, it seems that css are not correctly loaded or something is missing.
I checked apache2 access and error log files but no errors were logged. So I'm stuck at this point not understanding what's going on, maybe is a trivial error or something in my linux box is missing, I don't know.
If someone can help me it'll be really fine, thank you.
Hi all, I'm trying to setup a FlightAirMap server with postgresql as a backend database. Let's say for example that I have a domain name example.com and a subdomain as for example fam.example.com where I would like to access my FlightAirMap server.
I've set up my apache2 (2.54.xx) virtual host like this:
then I setup the apache2 serving directory as this:
then following the installation procedure on the wiki a settings.php file was created like this:
I think there's some mistake in this setup as if I go to my domain I have the page layout broken as this:
where some map tiles are loaded and some others not and the page layout is broken, it seems that css are not correctly loaded or something is missing.
I checked apache2 access and error log files but no errors were logged. So I'm stuck at this point not understanding what's going on, maybe is a trivial error or something in my linux box is missing, I don't know.
If someone can help me it'll be really fine, thank you.
Have a nice day.
-- lp