Profile image

Question

2,264 Aviatorloke  8 months ago

If possible, how do I make a machmeter?

  • Log in to leave a comment
  • Profile image
    2,264 Aviatorloke

    @Aviatorloke oh nvm I read your response wrong sorry

    8 months ago
  • Profile image
    2,264 Aviatorloke

    @Eggplant oh, what is it?

    8 months ago
  • Profile image
    12.5k Eggplant

    @Aviatorloke np <3 I'm sure there's a more elegant solution but I tested it and it works

    8 months ago
  • Profile image
    2,264 Aviatorloke

    @Eggplant thank you

    8 months ago
  • Profile image
    12.5k Eggplant

    A more accurate representation of the gauge in the image is

    (TAS / 343) < 0.5 ? clamp((TAS / 343) * 0.5 * 6, 0, 6) : clamp((10 * (TAS / 343) * 35) - 175, 6, 356)

    It puts the zero at 0 degrees, .5 at 6 degrees, and 1.5 and 356, with 35 degrees between each 0.1 mach.

    8 months ago
  • Profile image
    12.5k Eggplant

    There aren't a lot of options for gauge faces, so that will be the most annoying part. Based off of the image you provided, you should use the generic gauge face and nudge labels in for each number, as well as the "mach number" label. There is no mach number variable, so the best you can get to my knowledge will be (TAS / s), where s is the speed of sound in m/s, which is ~343.
    The input will be something like 10 * (TAS / 343) * [number of degrees you want the needle to move per mach number increment]
    The 10 is there if each increment is 0.1 mach, so TAS / 343 = 0.1 mach * 10 will equal the full number of degrees of needle movement for a 0.1 mach speed.
    To prevent the needle from going past 1.5 mach, you can clamp the needle between the zero reading (or 0.5 mach) and 1.5:
    clamp([equation above ^^], 0, 355)
    0 is where the needle zero is and 355 is wherever 1.5 mach is.

    8 months ago