You need to rewrite your code and change your way of thinking about the issue from how you would do the task yourself and how the Arduino can do it.
First you need to remove the delay function. Try to not use it anymore in future projects. It makes your Arduino stop and waste time. Your Arduino is not human and does not need vacation.
Next the goal is to let the loop function run as often as possible and only do a little thing at a time (no delay, no while, not waiting for anything). This allows you to add new stuff to the loop without stopping everything else from working.
Have a look at the File -> Examples -> 02.Digital -> BlinkWithoutDelay this will teach you to do things in intervals when the do not need to be executed every time you run trough loop.
Next separate tasks and let them communicate with each other trough status variables.
Your loop code could look like this
- if new character from GPS store in buffer
- if character was end character e.g. new line '\n' decode NMEA and clear buffer
- if decode message valid store values in variables
- every second read sensor and store in buffer
- every minute compute average
- if new average available print
- ... add more stuff
You might want to look at the TinyGPS or TinyGPS++ library for parsing the NMEA protocol.
If you need some more hints, please post your new code. Use code tags so code appears inside the post without the need to download a file. There is a "How to post .." at the beginning of each forum section. You will get more feedback when people can just read the code in the browser. It should looks like this.