IBM Community Hub

IBM Community Hub

The central place for general IBM discussions, knowledge sharing, and community updates. Explore our Topic Group List to find groups dedicated to individual IBM products and services.


#Other


#General(All)
 View Only
  • 1.  RTRT - Rationale test real time

    Posted 08/14/24 03:14 PM
    Edited by Lorraine Rizzuto 08/20/24 12:40 PM

    Hi Team,

    I have a question related to the parameter from the below function

    --------------------------------------------------------------------------------
    static float ComputeFactor(float IAS, float Alt, float Temp)
    {
        float  dpp,
               mach,
               last,
               p,
               speed_of_sound,
               TAS;

        if (Alt< -1000.0f) {
            Alt = -1000.0f;
        }
        if (Alt>65000.0f) {
            Alt = 65000.0f;
        }
        if (IAS<20.0f) {
            IAS = 20.0f;
        }
        if (IAS>650.0f) {
            IAS = 650.0f;
        }
        if (Temp<-100.0f) {
            Temp = -100.0f;
        }
        if (Temp>100.0f) {
            Temp = 100.0f;
        }

        if(Alt > ALT_TR) {
            p = P_TR_PSF * expf(-4.806346E-5f * (Alt - ALT_TR));
        }
        else {
            p = P_0_PSF * powf(1 - 6.8755856E-6f * Alt, P_LAPSE);
        }

        dpp  = (P_0_PSF * (powf(1 + 0.2f * (IAS/CS_0)*(IAS/CS_0), 3.5f) - 1) / p) + 1;
        mach = sqrtf(5 * (powf(dpp, 0.2857142857f) - 1));

        if(mach > 1.0f) {
            /* Iterate with Rayliegh's Formula to account for shock effects */
            do {
                last = mach;
                mach = 0.881285f * sqrtf(dpp * powf(1 - 1/(7*mach*mach), 2.5f));
            } while(fabsf(mach-last) > 0.005f);
        }

        speed_of_sound = 643.855f * sqrtf((Temp+273.15f)/273.15f);
        TAS            = speed_of_sound * mach;

        return(TAS/IAS);
    }
    --------------------------------------------------------------------------------

    Issue:
    When input Alt 'init = 65001' is driven then as per the functionality the output should be Alt 'ev = 65000'.
    But test report is reflecting Alt 'ev = 65001'

    Need suggestion on this behavior?

    ------------------------------
    Venkata Krishna Murty Hari
    ------------------------------



  • 2.  RE: RTRT - Rationale test real time

    Posted 08/20/24 11:00 AM

    Hi Venkata,

    Can you expose 3 digits after the decimal ''.'' to see if there are a fraction value? 

    Perhaps if the response has to be an integer 65000 then truncate or typecast to Integer...

    Enjoy!



    ------------------------------
    Jean-Claude Chami
    SIA Innovations Inc.

    ------------------------------