Results 1 to 2 of 2
  1. #1
    10+ Posting Member
    Join Date
    Aug 2008
    Location
    Russian Federation
    Posts
    10
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Boeing Some problems with OC servo flaps gauge

    Hi all!

    Yesterday got the Flaps Indicator.

    But there is one issue. I've programmed my sioc ( scroll down
    my post ), the synchronization is OK (for example, Flaps 5 in my FSX is
    Flap 5 on my Servo indicator). BUT! The pointer is shaking while moving.
    It's not smoothly, as it should be. I think it is so, because the pointer on
    the real servo gauge moves faster, than the simulator's one. So, when it
    indicate, for example 5degrees, the simulator gauge shows the middle of 2
    and 5 degrees. So the pointer "wants" to go back, to the middle, but in the
    sim it's already on 5degrees. So, it starts reeling from side to side. What
    do you think about it?


    And, of course, my SIOC:

    Var 0606, name LE_EXT_LED, link IOCARD_OUT, output 95
    Var 0608, name LE_TRANS_LED, link IOCARD_OUT, output 96
    Var 0612, name FLAPS_IN, Link FSUIPC_IN, Offset $0BE0, Length 4
    {
    L0 = &FLAPS_IN
    L0 = ABS L0

    IF L0 = 0
    {
    &LE_EXT_LED = 0
    &LE_TRANS_LED = 0
    }
    ELSE
    {
    L1 = 0
    &LE_TRANS_LED = 1
    IF L0 = 409
    {
    L1 = 1
    &LE_TRANS_LED = 0
    }
    IF L0 = 819
    {
    L1 = 1
    &LE_TRANS_LED = 0
    }
    IF L0 = 2047
    {
    L1 = 1
    &LE_TRANS_LED = 0
    }
    IF L0 = 4095
    {
    L1 = 1
    &LE_TRANS_LED = 0
    }
    IF L0 = 6143
    {
    L1 = 1
    &LE_TRANS_LED = 0
    }
    IF L0 = 10239
    {
    L1 = 1
    &LE_TRANS_LED = 0
    }
    IF L0 = 12287
    {
    L1 = 1
    &LE_TRANS_LED = 0
    }
    IF L0 = 16383
    {
    L1 = 1
    &LE_TRANS_LED = 0
    }
    &LE_EXT_LED = L1
    }

    L2 = L0

    C0 = L0 >= 0
    C1 = L0 <= 409
    IF C0 AND C1
    {
    // x1,x2 = FSUIPC positions, y1,y2 = Real servo-motor positions
    &x1 = 0 // between 0 and 1
    &x2 = 409
    &y1 = 1023
    &y2 = 927
    }


    C0 = L0 >= 409
    C1 = L0 <= 819
    IF C0 AND C1
    {
    &x1 = 409
    &x2 = 819
    &y1 = 927
    &y2 = 795 // between 1 and 2
    }
    C0 = L0 >= 819
    C1 = L0 <= 2047
    IF C0 AND C1
    {
    &x1 = 819
    &x2 = 2047
    &y1 = 795
    &y2 = 674 // between 2 and 5
    }
    C0 = L0 >= 2047
    C1 = L0 <= 4095
    IF C0 AND C1
    {
    &x1 = 2047
    &x2 = 4095
    &y1 = 674
    &y2 = 532 // between 5 and 10
    }
    C0 = L0 >= 4095
    C1 = L0 <= 6143
    IF C0 AND C1
    {
    &x1 = 4095
    &x2 = 6143
    &y1 = 532
    &y2 = 430 // between 10 and 15
    }
    C0 = L0 >= 6143
    C1 = L0 <= 10239
    IF C0 AND C1
    {
    &x1 = 6143
    &x2 = 10239
    &y1 = 430
    &y2 = 339 // between 15 and 25
    }
    C0 = L0 >= 10239
    C1 = L0 <= 12287
    IF C0 AND C1
    {
    &x1 = 10239
    &x2 = 12287
    &y1 = 339
    &y2 = 248 // between 25 and 30
    }
    C0 = L0 >= 12287
    C1 = L0 <= 16383
    IF C0 AND C1
    {
    &x1 = 12287
    &x2 = 16383
    &y1 = 248
    &y2 = 177 // between 30 and 40
    }
    &dy21 = &y2 - &y1
    &dx21 = &x2 - &x1
    &dx = L0 - &x1
    &dy = &dy21 * &dx
    &dy = &dy / &dx21
    L1 = &y1 + &dy
    &FLAPSERVO = L1
    }

    Var 0610, name FLAPSERVO, Link USB_SERVOS, device 3, Output 1, PosL 0, PosC 511, PosR 1023

    Var 0614, name dy
    Var 0616, name dx21
    Var 0618, name dy21
    Var 0620, name dx
    Var 0622, name x1
    Var 0624, name x2
    Var 0626, name y1
    Var 0628, name y2

  2. #2
    10+ Posting Member
    Join Date
    Aug 2008
    Location
    Russian Federation
    Posts
    10
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site


Similar Threads

  1. SIOC script for the Brake Pressure gauge with servo?
    By HondaCop in forum OpenCockpits General Discussion
    Replies: 10
    Last Post: 08-03-2009, 10:31 AM
  2. Flaps with servo script
    By Abrupto in forum OpenCockpits General Discussion
    Replies: 2
    Last Post: 07-06-2009, 08:28 AM
  3. Servo Flap Gauge Alignment
    By imported_sweker in forum FS2Phidget Users
    Replies: 7
    Last Post: 01-08-2007, 03:09 PM
  4. Servo fuel gauge
    By Frank in forum FS2Phidget Users
    Replies: 0
    Last Post: 01-11-2005, 04:25 PM