Diamond Jet; Undifferentiated
Flight Crew Air Transport Pilot (ATP)
Flight Crew Last 90 Days 60; Flight Crew Total 4100; Flight Crew Type 450
Situational Awareness
ATC Issue All Types; Aircraft Equipment Problem Less Severe; Airspace Violation All Types; Conflict NMAC
Air Traffic Control Issued New Clearance; Flight Crew Became Reoriented
Aircraft; Human Factors
I was conducting a functional test flight under VFR rules. When cleared for takeoff on Runway XXR; Tower cleared us to fly runway heading at or below 5000 feet. As soon as we rotated and weight off wheels; the cabin overpressurized and we leveled off at 2;200 feet MSL. Tower handed us off to approach control. I indicated that we needed to return and requested to re-enter the traffic pattern. Approach Control directed us to turn left heading 040 so that he could coordinate a downwind back into the traffic pattern with Tower. We did not declare an emergency due to the plane was flying safely and we were handling the pressurization issue. While on heading of 040 assigned by ATC at 2;200 feet; we got a traffic alert on TCAS. As soon as we looked up a T-6 was banking over the top of us with about 400 feet separation. At that time I realized we had flown through [an] AFB's traffic pattern. Then Approach Control realized what had happened and turned us to a heading of 300 to direct us away from [the AFB]. I then asked Approach Control if that was our fault since we were flying a vector given by them. I was told that everything would be worked out and we were ok. When I landed I called the TRACON and spoke to a controller; explained the situation. He told me that we were in the right and they had got busy trying to coordinate with the Tower while the traffic conflict had happened.
Diamond Jet Captain reported an NMAC with a T-6 after entering an Air Force Base's airspace while following an ATC clearance.