How to record start and stop gps position?

I want to only record in the fit file start and stop gps position if enabled and use this coordenates to store in internal log.

There is a way to do that?  I dont need gps track in this case.

Thanks