MPU6050 showing inconsistent angle values
Turns out that calibration requires the sensor to be in the default "z-up" position, and that even if you adjust the trig functions later, the values will still be off if you use a different orientation. I tried removing the MPU6050 from my apparatus, placing it flat, and re-running the calibration. That improved the values, but the ranges still weren't aligning correctly with my custom orientation, so I added this function to flip the X and Z axis based on the code provided in this comment:

uint8_t MPU6050::dmpGetYawPitchRollOnEnd(float *data, Quaternion *q, VectorFloat *gravity) {
    // yaw: (about X axis)
    data[0] = atan2(2*q-&gt;z * q-&gt;y - 2 * q-&gt;w * q-&gt;x, 2 * q-&gt;w * q-&gt;w + 2 * q-&gt;z * q-&gt;z - 1);
    // pitch: (nose up/down, about Y axis)
    data[1] = atan(gravity-&gt;z / sqrt(gravity-&gt;y * gravity-&gt;y + gravity-&gt;x * gravity-&gt;x));
    // roll: (tilt left/right, about Z axis)
    data[2] = atan(gravity-&gt;y / sqrt(gravity-&gt;z * gravity-&gt;z + gravity-&gt;x * gravity-&gt;x));
    return 0;
}


And then, with that and the proper calibration values, it now returns the correct 90 to -90 degree range when I change pitch by 180 degrees.