datalog - gps - sdcard

I do not know how to record this data in sdcard.

First, you need to define what "this data" is.

Then, you need a SD card shield that you know you can write to/read from.

Next, you need to open a file, for write, and write the data of interest.

You have omitted details for three of these three items.