Jump to content
bass

Help with the code in the statement of the flight!

Recommended Posts

Prompt how to report (pirep_viewreport.tpl) on the flight of the log page to display a pitch angle of (...) deg.?

Share this post


Link to post
Share on other sites

is it recorded from your acars ?

[16:34] - Flaps to position 3 at 2067ft and 156kts

[16:34] - Flaps to position 4 at 2041ft and 153kts

[16:37] - Landed at -306fpm. With 2266kgs of fuel onboard and a pitch angle of 2deg.

[16:37] - Wind Heading 90 | Wind Speed 12kts | Temperature 33 deg

........

Edited by bass

Share this post


Link to post
Share on other sites

<?php

$string = "$pirep->log";

if($string!=str_replace("a pitch angle of 2deg","",$string)) echo "<font color='red'>Pitch of 2 deg!</font> </br>";

?>

But you get only a message, if the pitch angle was 2deg. If you want to have it for other values, you can copy it and change the angle of pitch here

("a pitch angle of 2deg",
Edited by CedGauche

Share this post


Link to post
Share on other sites

But you get only a message, if the pitch angle was 2deg. If you want to have it for other values, you can copy it and change the angle of pitch here

Here I made an example code, maybe there is some other way? (Is too large code....)

<?php
  $string = "$pirep->log";
  if($string!=str_replace("-1deg","",$string))
  echo "<font color='red'>Strike the front of the chassis!</font> </br>";
  elseif($string!=str_replace("-2deg","",$string))
  echo "<font color='red'>Strike the front of the chassis!</font> </br>";
  elseif($string!=str_replace("-3deg","",$string))
  echo "<font color='red'>Strike the front of the chassis!</font> </br>";
  elseif($string!=str_replace("-4deg","",$string))
  echo "<font color='red'>Strike the front of the chassis!</font> </br>";
  elseif($string!=str_replace("-5deg","",$string))
  echo "<font color='red'>Strike the front of the chassis!</font> </br>";
  elseif($string!=str_replace("-6deg","",$string))
  echo "<font color='red'>Strike the front of the chassis!</font> </br>";
  elseif($string!=str_replace("-7deg","",$string))
  echo "<font color='red'>Strike the front of the chassis!</font> </br>";
  elseif($string!=str_replace("-8deg","",$string))
  echo "<font color='red'>Strike the front of the chassis!</font> </br>";
  elseif($string!=str_replace("-9deg","",$string))
  echo "<font color='red'>Strike the front of the chassis!</font> </br>";
  elseif($string!=str_replace("-10deg","",$string))
  echo "<font color='red'>Strike the front of the chassis!</font> </br>";
  elseif($string!=str_replace("-11deg","",$string))
  echo "<font color='red'>Hard touch the front!</font> </br>";
  elseif($string!=str_replace("-12deg","",$string))
  echo "<font color='red'>Hard touch the front!</font> </br>";
  elseif($string!=str_replace("-13deg","",$string))
  echo "<font color='red'>Hard touch the front!</font> </br>";
  elseif($string!=str_replace("-14deg","",$string))
  echo "<font color='red'>Hard touch the front!</font> </br>";
  elseif($string!=str_replace("-15deg","",$string))
  echo "<font color='red'>Hard touch the front!</font> </br>";
  elseif($string!=str_replace("-16deg","",$string))
  echo "<font color='red'>Broken front landing gear!!!</font> </br>";
  elseif($string!=str_replace("-17deg","",$string))
  echo "<font color='red'>Broken front landing gear!!!</font> </br>";
  elseif($string!=str_replace("-18deg","",$string))
  echo "<font color='red'>Broken front landing gear!!!</font> </br>";
  elseif($string!=str_replace("-19deg","",$string))
  echo "<font color='red'>Broken front landing gear!!!</font> </br>";
  elseif($string!=str_replace("-20deg","",$string))
  echo "<font color='red'>Broken front landing gear!!!</font> </br>";
  ?>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×