Not an expert but:
- You can calculate where the earth is via gravity sense of accelerometer.
- Gyro is needed to detect angular speed mostly, it doesn't need to know where is the zero.
- 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.