Gyro and Accelerometer angles

Been looking in to using a Gyro and accelerometer to measure angles on a quad copter plan to build to stabilize it . I understand most of the implementation except one thing. Once you convert the voltage to a usable value you get a change in degrees per second etc, which you then compare to your original value over time to get a current value. However how do you get the original value in the first place, would you have to calibrate, lets say for example the drone on flat ground by pressing a button every time you turned it on or am i missing something ?

Any help would be appreciated

Not an expert but:

  1. You can calculate where the earth is via gravity sense of accelerometer.
  2. Gyro is needed to detect angular speed mostly, it doesn’t need to know where is the zero.
  3. if you ask such questions, diy stabilization could be not for you at this moment, as it involves quite complicated math. Probably you could be better off looking for a working code to adopt.