I have a VATSIM module working on my devlopment site to gather and sort current Vatsim pilot data, which includes the lat/long of their location. It would just take the coding to apply that lat/long and pilot info to the map. I am not sure if Virtual Skies offers a data feed as Vatsim does.
Just looked at it and you are correct - It looks exactly the same as vatsim, wonder how they got away with that? I will see what happens to my module if I use the vsn page as a data source…
Just looked at it and you are correct - It looks exactly the same as vatsim, wonder how they got away with that? I will see what happens to my module if I use the vsn page as a data source…
Got the data feed working on my development site - Not much to see right now - Only 2 ATC online, but it is there if you want to see the data returned. Have to do some work ro figure out how to apply the data to the acars map…
Dave, it will basically be an event listener for “refresh_acars”.
This will work with the next beta:
<?php
class test extends CodonModule
{
public function __construct()
{
parent::__construct();
CodonEvent::addListener('test');
}
public function EventListener($eventinfo)
{
if($eventinfo[0] == 'refresh_acars')
{
// This gets the current instance of the ACARS controller so we can
// manipulate it
$acars = MainController::getInstance('ACARS');
//$acars->acarsflights This has all of the ACARS flights currently
// This presumabley would be in a loop
//foreach($flight as $flight)
//{
// Populate this array below with all of the data we need
// Ignore the fields in it right now, I just pulled it from the acars now
$acarsflight = array('pilotid'=>$pilotid,
'flightnum'=>$_GET['IATA'],
'pilotname'=>'',
'aircraft'=>$_GET['Regist'],
'lat'=>$_GET['lat'],
'lng'=>$_GET['long'],
'heading'=>'',
'alt'=>$_GET['Alt'],
'gs'=>$_GET['GS'],
'depicao'=>$_GET['depaptICAO'],
'depapt'=>$_GET['depapt'],
'arricao'=>$_GET['destaptICAO'],
'arrapt'=>$_GET['destapt'],
'deptime'=>'',
'arrtime'=>'',
'distremain'=>$_GET['disdestapt'],
'timeremaining'=>$_GET['timedestapt'],
'phasedetail'=>$phase_detail[$_GET['detailph']],
'online'=>$_GET['Online'],
'client'=>'FSACARS');
// Now add the above data structure to our total acars flights
$acars->acarsflights[] = $acarsflight;
//} // end loop
}
}
}
Just looked at it and you are correct - It looks exactly the same as vatsim, wonder how they got away with that? I will see what happens to my module if I use the vsn page as a data source…
We use the same base server networking server as them. As default it outputs to a text file called whazzup.txt - You will find the same for IVAO too.
it seems as though most if not all Online Websites for flying use this text file. I asked about it at Realworldatc.com and they use the very same text doc as well.
What peeves me is that XML is a standardized format, but they all refuse to use it… instead we have to do this inane parsing and picking apart data because it’s in a dumb proprietary format. If XML is too verbose, they can use JSON, but they’re both standardized and all languages have build in libraries to parse them… blah
I have gotten the feeds for Vatsim, IVAO, Virtual Skies, and Real World ATC working on my development site. They all have a similar format but do have small items that are different so each data feed needs it’s own module. I am working on transfering the data to the live map, right now all it does is count the data and can display all the info for each Pilot or ATC, as well as sort out a certain airline call sign. Does anyone know the admins on any of these sites other than Vatsim? Vatsim has a detailed written policy about using their data which I have made the Vatsim datafeed adhere to, but the others seem to lack much if anything in regards to the use of their data. I have had some tell me “yeah it’s ok” but nothing as far as a policy.
If it’s minor differences, you might be able to just do it in one module, and have settings within the file (like:
<?php
class ACARS_Remote extends CodonModule{
public $parse_vatsim = true;
public $parse_ivao = false;
public function index()
{
if($this->parse_vatsim == true)
{
$this->parse_vatsim_list();
}
// etc
}
}
Then different functions with each parsing. What are the differences? Maybe they can be compensated for within the code? But that would be the cleaner option in the end, IMO.
Also, did you see my sample for adding the data to the live map?