GPS - convert iTOW either to UTC or DATE:TIME

I have a UBLOX M8N and would prefer to feed only a single message to my controller.

Preferred binary message, UBX NAV-POSLLH, includes iTOW.

I want to convert that to DATE:TIME to name the file I'm recording on a microSD. I have been getting DATE:TIME from an rtc clock, but would like to eliminate the clock from the system and use GPS time instead.

Should this be trivial?

If not, I'll go back to a hardware solution.

Should this be trivial?

Yes.

jferguson4:
I want to convert that to DATE:TIME to name the file I'm recording on a microSD. I have been getting DATE:TIME from an rtc clock, but would like to eliminate the clock from the system and use GPS time instead.

Remember to check that the leap seconds has been updated on the GPS. Until that happens the GPS time displayed could be out by x seconds, with x being dependant on the date of the GPS firmware.

I don't need second accuracy, after all, I'm only naming a file ala DHM.CSV or 280955.csv

files are flight data written to an on-board microSD. Problem was day might have 5 or 6 flights and without this, I couldn't easily identify which record went with which flight.

While we're at it, i would think someone else would already have done the iTOW to DATE:TIME code; Paul S???

where to look, where to look??

jferg:
I don't need second accuracy, after all, I'm only naming a file ala DHM.CSV or 280955.csv

Fair enough, but remember that iTOW itself can also be invalid.

I apologize for exposing what was probably not the best solution to a simple problem; how to create distinct sequential files on a microSd automatically when the flight recorder was toggled on without overwriting any that were already there.

I hit on using time because so long as there was at least a minute between flights, problem solved. For those who can remember ideas sometimes smack of Rube Goldberg machines.

On the few occasions where my code has been looked at by someone who actually knew what he was doing, the comment has often been, "My God, Ferguson, I can see it works, but you could have done it in one tenth of what I'm looking at here if you'd done it this other way."

Ignore all that stuff above about iTOW whose content I clearly didn't understand.

Now:
Bingo, I can get what I need by telling the Ublox to send a time message in Setup, concoct the file name from that message, name the file, then tell the Ublox not to send the time message anymore, tell the Ublox to send ONLY NAV-POSLLH at 10 Hz, which is all I wanted.

Does this make more sense?

jferg:
I don't need second accuracy, after all, I'm only naming a file ala DHM.CSV or 280955.csv

files are flight data written to an on-board microSD. Problem was day might have 5 or 6 flights and without this, I couldn't easily identify which record went with which flight.

Useful inforamation to have revealed in the first post.

More details would help but if this is some form of RC model 'flight' then there would normally be enough time between 'flights' for the difference in GPS time and UTC not to be an issue.

There are several GPS libraries that provide functions to extract the time into variables etc.

srnet:
Useful inforamation to have revealed in the first post.

More details would help but if this is some form of RC model 'flight' then there would normally be enough time between 'flights' for the difference in GPS time and UTC not to be an issue.

There are several GPS libraries that provide functions to extract the time into variables etc.

Maybe you haven't had the experience of where an intelligent understanding of the problem is obscured (maybe prevented) by a poor (mine) solution.

Obviously a clear statement of the objective is where to start. You are exactly right.