Results 1 to 2 of 2
  1. #1
    25+ Posting Member lasseh's Avatar
    Join Date
    Mar 2010
    Location
    Copenhagen
    Posts
    36
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Localiser capture (SIOC)

    Hello. Hope you're all enjoying the summer out there!

    I'm trying to get an annunciator to illuminate when my aircraft is capturing a localiser, and so far I've learned that the offsets I'm going to use are 0C4A bit 1 for the localiser tuned in, and then 0C48 to adjust when the localiser is actually captured. But which bit-number am I going to use for the needle?

    I've tried to write a script here:
    ---------------------------------------------------------------------
    Var 0001, name loc_tuned, Link FSUIPC_INOUT, Offset $0C4A, Length 1
    {
    IF &loc_tuned = 1
    {
    &loc_tuned_ind = 1
    }
    IF &loc_tuned = 0
    {
    &loc_tuned_ind = 0
    }
    }

    Var 0002, name loc_tuned_ind, Link IOCARD_OUT, Device 1, Output 41
    --------------------------------------------------------------------

    This light up the LED when the localiser is tuned in at the NAV1 radio as anticipated. But how do I implement the needle offset, so that the LED will only illuminate when the localiser is tuned in, AND captured?

    Thanks!
    Lasse

  2. #2
    500+ This must be a daytime job kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    698
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Localiser capture (SIOC)

    Hi Lasse,

    Here example SIOC code to display the GS needle and Localiser needle values -if alive- at four digit
    displays (most left digit blank or minus and then 3 digit value), and two leds for GS alive and loc
    tuned in indicators.

    You have to update the digit and output numbers to your hardware.
    I have not tested it, but this is how one should do it in SIOC...

    Code:
    // Glide-slope
    
    Var 1 name gs_alive Link FSUIPC_IN Offset $0C4C Length 1
    {  
      CALL &OUTGS
    }
    
    Var 2 name gs Link FSUIPC_IN Offset $0C49 Length 1
    {
      CALL &OUTGS
    }
    
    Var 3 name  OUTGS LINK SUBRUTINE
    {
      IF &gs_alive = 1
      {
            gs_ind = 1
            &D_gs = &gs
            IF &gs < 0
            {
              D_gss = -999998  // minus sign
            }
            ELSE
            {
              D_gss = -999999  // blank
            }
      }  ELSE
      {
            gs_ind = 0
            &D_gs = -999999  // blank
            &D_gss = -999999  // blank
      }
    }
    
    Var 4 name D_gs Link IOCARD_DISPLAY Digit 1 Numbers 3
    Var 5 name D_gss Link IOCARD_DISPLAY Digit 4 Numbers 1
    Var 6 name gs_ind Link IOCARD_OUT Device 1 Output 40
    
    
    // Localiser 
    
    Var 10 name loc_tuned Link FSUIPC_IN Offset $0C4A Length 1
    {
      &loc_tuned_in = TESTBIT &loc_tuned 1
    }
    
    Var 11 name loc_tuned_in
    {
      CALL &OUTLOC
    }
    
    Var 12 name loc Link FSUIPC_IN Offset $0C48 Length 1
    {
      CALL &OUTLOC
    }
    
    Var 13 name  OUTLOC LINK SUBRUTINE
    {
      IF &loc_tuned_in = 1
      {
            loc_tuned_ind = 1
            &D_LOC = &loc
            IF &loc < 0
            {
              D_locs = -999998  // minus sign
            }
            ELSE
            {
              D_locs = -999999  // blank
            }
      }
      ELSE
      {
            loc_tuned_ind = 0
            &D_loc = -999999  // blank
            &D_locs = -999999  // blank
      }
    }
    
    Var 14 name D_loc Link IOCARD_DISPLAY Digit 5 Numbers 3
    Var 15 name D_locs Link IOCARD_DISPLAY Digit 8 Numbers 1
    Var 16 name loc_tuned_ind Link IOCARD_OUT Device 1 Output 41
    Rgrs,
    nico
    Last edited by kiek; 08-03-2012 at 02:33 AM.