Results 1 to 2 of 2
  1. #1
    500+ This must be a daytime job 737NUT's Avatar
    Join Date
    Feb 2006
    Location
    Indianapolis, IN
    Posts
    761
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Stumped on this one, Need ideas please

    Below is the code for Airspeed gauge. It is non linear hence the reason for 2 different ranges. It stops at 250knots and never updates above 250 0 to 250 it works greta and is dead on accurate. What am I missing here? hope it is something simple
    Thanks,
    Rob

    Code:
    Var 1000, name IASservo
    
    Var 1001, name IASREAL
    
    Var 3301, name IAS, Link IOCP, Offset 3301     // Pilot airspped in Knots
    {
      &IASREAL = &IAS / 10000
      IF &IASREAL < 60
      {
        &IASservo = 10    
      }
      IF &IASREAL > 60
      {
        IF &IASREAL < 252
        {
          CALL &IAS250
        }
      }
      ELSE
      {
        IF &IASREAL > 252
        {
          CALL &IAS300
        }
      }
    }
    
    Var 1002, name IAS250, Link SUBRUTINE
    {
      L0 = &IASREAL * 16.617
      L1 = L0 - 1054.36
      &IASservo = L1    
    }
    
    Var 1003, name IAS300, Link SUBRUTINE
    {
      L0 = &IASREAL * 7
      L1 = L0 + 1350
      &IASservo = L1    
    }

  2. #2
    500+ This must be a daytime job 737NUT's Avatar
    Join Date
    Feb 2006
    Location
    Indianapolis, IN
    Posts
    761
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Stumped on this one, Need ideas please

    Figured it out