How to change format time to GPS week, GPS seconds?

조회 수: 50 (최근 30일)
galaxy
galaxy 2021년 11월 19일
댓글: galaxy 2021년 11월 24일
Hi all,
How can I change:
GPS dates (NO LEAP SECONDS ACCOUNTED)
April 30th, 2018, 03:46:40 => GPS week 1999, GPS seconds 100000
April 30th, 2018, 17:40:00 => GPS week 1999, GPS seconds 150000

채택된 답변

Rik
Rik 2021년 11월 19일
The start date of this GPS epoch is probably on Wikipedia. You can simply subtract that date from your date.
Then you calculate the number of seconds of that difference. Use mod to find the remainder after division by 7*24*60*60 and use floor to find the number of weeks elapsed.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Dates and Time에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by