Jump to content

CarlosGarcia

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by CarlosGarcia

  1. Using XAcars with X-plane 9.70

    Dont work for me :( I can get the Time remaining <%=flight.timeremaining%> and Bar Graphics to work. The Distance Reaming works good.

    I replace core/modules/ACARS acars.php (In your post says ASCARS.PHP but i think is not the right file name) file with the code you post, Add the css to my liv/skyns/CGA ( the name of my Skyn is CGA)css and add the Gif files to lib/images directory.. and acarsmap.tpl to the core/templates.

    Any idea,

    Carlos Garcia Acevedo SKBQ Barranquilla Colombia

  2. acarsmap.tpl

    Trying to convert KIAS to KTAS :

    ( Ground Speed is what the aircraft travels over the ground. Basically, it is your TAS, plus the effect of the head/tail wind component.) I dont have into account the head/tail wind component... So I really calculating KTAS

    Ok trying this but dont work :

    I cant use another formula like : A good rule for true airspeed is to add 2% to your KIAS for every 1000ft of altitude. So 100KIAS at 5000ft MLS would be about 110 KTAS.

    <?php $alt="<%=flight.alt%>" ;?>
    <?php
    if ($alt >=1 and $alt <=4999) { 
    $F =1;
    } elseif ($alt >=5000 and $alt <=9999) {
    $F=1.08;
    } elseif ($alt >=10000 and $alt <=14999) {
    $F=1.17;
    } elseif ($alt >=15000 and $alt <=19999) {
    $F=1.26;
    } elseif ($alt >=20000 and $alt <=24999) {
    $F=1.37;
    } elseif ($alt >=25000 and $alt <=29999) {
    $F=1.50;
    } elseif ($alt >=30000 and $alt <=34999) {
    $F=1.64;
    } elseif ($alt >=35000 and $alt <=34999) {
    $F=1.79;
    } else {
    $F=2.02;
    }
    ?>
    
    <!-- Aprox Ground Speed - KTAS -->
    <?php $speed ="<%=flight.gs* $F %>";?>
    <td> <?php echo $speed ;?> </td>
    </tr>
    </script>
    
    

    If I only use :

    <?php $speed ="<%=flight.gs%>";?>
    <td> <?php echo $speed ;?> </td>
    

    I can see the Fly speed of the plane, But I cant make any calculation with $speed

    $speed is a PHP String so I try to Convert to integer This way $speed=$speed + 0 This way $speed now is a Integer value but I cant make any Calculation... ?? Here Im a little Lost.

    Any Ideas ?

    Regards

    Carlos

  3. Hello Thanks for answer and sorry for my late reply.

    Jeff : Yes I know that I can change this values in the Config files. But the Idea is to make some Calculation in the Acars Map, so I can Give the users Altitude Both in meters and Feets.

    Kyle . Thanks for you code. But I was trying to assign the value to a variable, I think the way to make it its something like <?php $altmts = round(<%=flight.alt%>/3.28);?> Then I can use the $altmts variable to make another calculations.

    Kyle : Yes the code must be in the acarsmap.tpl

    The altitude was just a example, im using Xacars so the plane Speed is in Knots, I will try to change this value to Ground Speed so I can Calculate the ETA. Well here I not shure if this works this way, But I will try.

    I will give it a try and post my comments Thanks and Sorry again for the late reply.

    Carlos Garcia Acevedo

    SKBQ Barranquilla Colombia

  4. Good Day.

    I want to know how can I take some data from acarmaps.tpl to make a PHP Formula to make a calculation.

    Something like I want to convert Plane Altitude to Meters.

    The Formula is very simple AltitudeMts = AltitudeFeets / 3.28 (Aprox).

    acarmaps.tpl Give me <%=flight.alt%> I think this is the plane Actual Altitude. And can be show in the Html Table using <td><%=flight.alt%></td>.

    Now The question, How can i assign the <%=flight.alt%> Value ta a PHP variable so I can make the formula using PHP and siplay in a new Row in the html table. ?

    Thanks and sorry for my poor english I speak Spanish.

    Regards

    Carlos Garcia

×
×
  • Create New...