A CHP aircraft caught motorcyclist Corey McDonah riding at speeds up to 120 miles per hour on April 2, 2014. (CBS)

SAN LEANDRO (KPIX 5) — The story of how Corey McDonah ended up in the Hayward Hall of Justice is a high-tech tale that is equal parts dumb luck, bad choices, and good police work.

With sweaty palms, and a bewildered look, he pleaded no contest to reckless driving and received a lecture from the judge.

“As bad as all this seems right now, this might be one of those things that might save your life,” the judge said.

On April 2nd, Air-37 was on routine patrol over the East Bay. It flies at any time of day, with a gyro-stabilized thermal camera, and lens capable of zooming in from several miles away.

Something caught California Highway Patrol Officer Tony Jackson’s eye: a tiny speck blowing past traffic. It was McDonah on a motorcycle, weaving in and out of the cars, at nearly double the speed limit.

“The bike is stupid fast,” McDonah said. “I’m not saying I couldn’t help myself but, you know, you buy a bike for a certain reason. Sometimes it gets you in trouble.”

Jackson shot the video from more than a mile away.

“When you’re pulling stunt like this, you never know when we’re gonna be overhead,” the officer told KPIX 5.

The plane followed him for several miles to his home in San Leandro.

At 2,000 feet and a mile away, that airplane is a speck in the sky. But with their high-tech cameras, they can see fine detail, down to the color of your shoes.

“They called me out and asked me if they knew why they were there. And then I said ‘No’ and then they pointed to the plane. And then I knew,” McDonah said.

McDonah was arrested. He said he was rushing home to go to the bathroom.

This is not the first high-profile arrest using the CHP airplane. In 2010, Sacramento Kings star Tyreke Evans was caught on camera driving 130 mph, and arrested at gunpoint.

After McDonah’s arrest, motorcycle chat forums have lit up with comments like, ‘Wow, could have been me’ and ‘That has got to suck. Make it home, crack a beer, get arrested’.

“In this case, there was video evidence to document it and certainly helped make the case strong,” said Alameda County Deputy District Attorney Tim Wellman. “Like I said, his driving at that speed put himself and others at risk. And that’s why he got the sentence he got today.”

As for McDonah, he was still smug, and somewhat apologetic.

KPIX 5: Are you sorry?

McDonah: Yeah.

KPIX 5: What lessons did you learn?

McDonah: That Big Brother is always watching. I don’t know.

McDonah was sentenced to three years of probation, 20 days with the sheriff’s work squad, and 40 hours of community service. He also must pay a $500 fine. McDonah must take a safety class or sell his motorcycle.

More Coverage You Might Like: