One way to do it is just understand how the system works on the top level. It is actually one UNIX ( Linux, Possix) operating system called NuttX. It runs on top of the Pixhawk Flight Controller Board, it starts programs with scripts that run in real time during flight or drive and control the craft or vehicle. The NuttX that we are using is not the regular open source version. But it is customized to the needs of PX4.
So if you open the boot up scripts in the github source tree, you will see which applications are started for which scenario, and then follow the source code of this applications. These applications run simultaneously in real time as i said.
All the sensors and hardware connected to the Pixhawk FC have a corresponding drivers in the NuttX in order to be available for the applications.
Imagine it as a tiny computer system with its own operating system and number of applications that interact. There is not one source code structured as you imagine. There are many source trees and many modules apps and drivers source code.
Hope it helps.