Fixed issue with MLT and L values not being written correctly. Bad GPS values were causing the data to compress to the beginning fo the file.
Filtered out repeated values from the output file containg magnetic coordinates