GPS and sensor data logger only works when connected to serial connection

Thank you for the advice above. I took out a bunch of comments. I will clean up the code and add loops and other led indicators once I have the code working.

Speaking of working. I found out I had fried my arduino uno. I didnt realize I needed a voltage regulator if I wanted to power it via the usb port.

I tested the device with a new arduino board and it saves the data to the SD card when on external power, but I still dont get readings from the GPS module. All other sensors work.