Jump to content

Adding custom chart database


jantorre

Recommended Posts

I know most of you would get this working yourself, but for you who dont here is a sample of the code I use to display custom chart snapshots and links in the pilot briefing page. Also included are the links we use for weather:

First of all I gathered all the links for the airports we fly to, based the charts on the lokal vacc at vatsim because many AIP sites require you to log in:

I placed snaphost of the ground layout with format ICAO.gif in folder named images/charts . Image size 387*594. It is a bit of work, but I think the result is good. Have only received possitve feedback so far ;D

Links placed in the airporttable under 'chartlink' and added a row for link to local VACC aswell('vacc'):

From schedule_briefing.tpl starting somewhere close to line 115(Procedures and Information):

<h3>Procedures and Information</h3>
<table width="98%" align="center">

<tr style="background-color: #333; color: #FFF;">
	<td>Charts for <?php echo $schedule->depicao?></td>
	<td>Charts for <?php echo $schedule->arricao?></td>
</tr>
<tr align="center">
	<td width="50%" valign="top">
		<a href="<?php $data = OperationsData::GetAirportInfo($schedule->depicao); echo $data->chartlink; ?>" target="_blank">
		<img border="0" src="http://www.yoursite.com/images/charts/<?php echo $schedule->depicao?>.gif"
			width="387px" height="594px" alt="No chart available" /></a><br>
		<a href="<?php $data = OperationsData::GetAirportInfo($schedule->depicao); echo $data->vacc; ?>" target="_blank">Local VACC</a>	
	</td>
	<td width="50%" valign="top">
		<a href="<?php $data = OperationsData::GetAirportInfo($schedule->arricao); echo $data->chartlink; ?>" target="_blank">
		<img border="0" src="http://www.yoursite.com/images/charts/<?php echo $schedule->arricao?>.gif" 
			width="387px" height="594px" alt="No chart available" /></a><br>
			<a href="<?php $data = OperationsData::GetAirportInfo($schedule->arricao); echo $data->vacc; ?>" target="_blank">Local VACC</a>	
	</td>

</tr>
</table>

and here our weather stuff:

<h3>Weather</h3>
<div align="center">
<B>Weather chart: 24hr Surface Prognosis</B>
<p><img src="http://131.54.120.150/gifImages/21OWS_EUROPE_FITL_PROG-BRIEFING_24.gif" /></p>
<B>Forecast significant WX for time 12Z:</B>  <a href="http://www.flyingineurope.be/aviation_weather_maps.htm" target="_blank">For other times</a>
<p><img src="https://www.aro.lfv.se/fpc/Tor/SWC_1200.gif" width="826px" height="583px" alt="No chart available" /></p>
<B>Europe FL100 Wind, Temp and Icing Forecast</B>  <a href="http://www.jetplan.com/jeppesen/weatherServlet?&action=show&graphicType=wxMapWT&img=euwt100m" target="_blank">For other times</a>
<p><img src="http://www.jetplan.com/weather/data/maps/euwt10024.gif" /></p>
<B>Winds @ FL340  12hrZ: </B>
<p><img src="http://ows.public.sembach.af.mil/gifImages/21OWS_EUROPE_MODEL-DATA_UKMO-GLOBAL_WIND-TEMP_FL340_12_00Z.png" /></p>
<B>Winds @ FL390  12hrZ: </B>
<p><img src="http://ows.public.sembach.af.mil/gifImages/21OWS_EUROPE_MODEL-DATA_UKMO-GLOBAL_WIND-TEMP_FL390_12_00Z.png" /></p>
<B>Precipitation predicts for today:(rain/snow etc)</B>
<p><img src="http://www.usatoday.com/weather/TWC_Images/eur_precip_440_dmy_y.jpg" /></p>
<B>12HR Icing:</B>
<p><img src="http://131.54.120.150/gifImages/21OWS_EUROPE_FITL_ICING-STANDARD_12.gif" /></p>

<a href="http://www.flyingineurope.be" target="_blank">View additional weather graphs</a> or use <a href="http://www.ippc.no" target="_blank">Avinor Internet Pilot Planning Center</a>
</div>
<div align="right" style="font-size: small;">Data Courtesy of <a href="http://www.flyingineurope.be" target="_new">flyingineurope</a></div>
<br />

The weather links are for 12 zulu, but there is link to the other times aswell.

Results:

folders.jpg

result.jpg

Regards,

JT

  • Like 1
Link to comment
Share on other sites

it would be possible i think but that needs some adjustments to the database. otherwise you could also write it into the "notes" field.

jantorre: well the problem is, that there is a picture of the ground charts. i just removed that. that makes it easier because i have more than 300 airports in my virtual airline and it would take a looong loong time until i make screens for every airport. so for me, there is only something like a "Download" button to the pdf charts on my server. i print those with a pdf printer from jeppview. thats all :D

Link to comment
Share on other sites

  • 5 months later...

In relation to this post, i have used tebinu's method to add the weather charts, The present flightaware airport diagrams only cover the US so it seems,can anyone make a quick code snippet, so that if the charts are not available then it looks in a skin/lib/images/charts folder for one i have already downloaded?

Link to comment
Share on other sites

  • Administrators

In relation to this post, i have used tebinu's method to add the weather charts, The present flightaware airport diagrams only cover the US so it seems,can anyone make a quick code snippet, so that if the charts are not available then it looks in a skin/lib/images/charts folder for one i have already downloaded?

Well you can change the path and put them all into one folder, without having to check one folder, then check another.

Moving this to Code Snippets

Link to comment
Share on other sites

  • 1 month later...

after some gremlins in my system i'm trying to get the arrival and departure airport plans to display on the schedules briefing template.

I'm using this code, (as from this topic, but all i can get displayed is the link to the chart,(which works fine).

I actually want the image to display rather than the link.

I know the chart link in the admin side of things is filled correctly, but does this need to be left blank?

<table width="98%" align="center">

       <tr style="background-color: #333; color: #FFF;">
               <td>Charts for <?php echo $schedule->depicao?></td>
               <td>Charts for <?php echo $schedule->arricao?></td>
       </tr>
       <tr align="center">
               <td width="50%" valign="top">
                       <a href="<?php $data = OperationsData::GetAirportInfo($schedule->depicao); echo $data->chartlink; ?>" target="_blank">
                       <img border="0" src="http://www.atlasvirtualairlines.com/images/charts/<?php echo $schedule->depicao?>.png"
                               width="387px" height="594px" alt="View Charts" /></a> 
               </td>
               <td width="50%" valign="top">
                       <a href="<?php $data = OperationsData::GetAirportInfo($schedule->arricao); echo $data->chartlink; ?>" target="_blank">
                       <img border="0" src="http://www.atlasvirtualairlines.com/images/charts/<?php echo $schedule->arricao?>.png" 
                               width="387px" height="594px" alt="View Charts" /></a>

Link to comment
Share on other sites

Guest lorathon

If you look at your folder holding the charts

http://www.atlasvirtualairlines.com/images/charts/

I think you need to change the file names. You are attempting to display the image as.....

<?php echo $schedule->depicao?>.png

Which would translate to ICAO.png. It looks like only KJFK should show. All the other charts are lower case.

I would try to make all uppercase.

Link to comment
Share on other sites

  • 6 months later...

Hi

I have placed the coding in for showing the charts. All Irish charts such as EIDW-EINN-EICK work fine. However I have tried EGLL once you click on the placement image it transfers back to the pilot briefing. Could someone give me a few pointers regarding this please code below. As you can see I am using Gif format

<h3>Procedures and Information</h3>
<table width="98%" align="center">

       <tr style="background-color: #333; color: #FFF;">
               <td>Charts for <?php echo $schedule->depicao?></td>
               <td>Charts for <?php echo $schedule->arricao?></td>
       </tr>
       <tr align="center">
               <td width="50%" valign="top">
                       <a href="<?php $data = OperationsData::GetAirportInfo($schedule->depicao); echo $data->chartlink; ?>" target="_blank">
                       <img border="0" src="http://www.aerlingus-virtual.net/images/charts/<?php echo $schedule->depicao?>.gif"
                               width="387px" height="594px" alt="No chart available" /></a><br>
                       <a href="<?php $data = OperationsData::GetAirportInfo($schedule->depicao); echo $data->vacc; ?>" target="_blank">Local VACC</a> 
               </td>
               <td width="50%" valign="top">
                       <a href="<?php $data = OperationsData::GetAirportInfo($schedule->arricao); echo $data->chartlink; ?>" target="_blank">
                       <img border="0" src="http://www.aerlingus-virtual.net/images/charts/<?php echo $schedule->arricao?>.gif" 
                               width="387px" height="594px" alt="No chart available" /></a><br>
                               <a href="<?php $data = OperationsData::GetAirportInfo($schedule->arricao); echo $data->vacc; ?>" target="_blank">Local VACC</a> 
               </td>

       </tr>
</table>

Link to comment
Share on other sites

  • 2 months later...
Guest lorathon

I agree. But I suppose you could do it. You would have to write a check for one file and if absent open the other file type.

Something like the following would check both (UN-TESTED)

public function displayChart($icao)
{
   $chart = SITE_ROOT.'/images/charts/'.$icao.'.png';		

   if(!file_exists($chart))
   {
// PNG image Does NOT exist so look for GIF image
$chart = SITE_ROOT.'/images/charts/'.$icao.'.gif';

if(!file_exists($chart))
{
               // GIF image does not exist either
	return false;
}
   }

   // Return image path
   return $chart;
}

Link to comment
Share on other sites

I agree. But I suppose you could do it. You would have to write a check for one file and if absent open the other file type.

Something like the following would check both (UN-TESTED)

public function displayChart($icao)
{
   $chart = SITE_ROOT.'/images/charts/'.$icao.'.png';		

   if(!file_exists($chart))
   {
// PNG image Does NOT exist so look for GIF image
$chart = SITE_ROOT.'/images/charts/'.$icao.'.gif';

if(!file_exists($chart))
{
               // GIF image does not exist either
	return false;
}
   }

   // Return image path
   return $chart;
}

Thank You So Much! Where do I put the code though? Thanks!

I mean i know its in schedule_brief.tpl but where exactly do i put it. In img url???

Edited by Thomas Rozanov
Link to comment
Share on other sites

  • 5 months later...
  • 7 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...