Skip to content
This repository has been archived by the owner on Apr 13, 2021. It is now read-only.

Improve week roll over in tracking #592

Open
ljbade opened this issue Jan 7, 2016 · 0 comments
Open

Improve week roll over in tracking #592

ljbade opened this issue Jan 7, 2016 · 0 comments

Comments

@ljbade
Copy link
Contributor

ljbade commented Jan 7, 2016

Clean up the code at

piksi_firmware/src/track.c

Lines 310 to 316 in de6b0a6

/* Have a valid time of week - increment it. */
chan->TOW_ms += chan->short_cycle ? 1 : (chan->int_ms-1);
if (chan->TOW_ms >= 7*24*60*60*1000)
chan->TOW_ms -= 7*24*60*60*1000;
/* TODO: maybe keep track of week number in channel state, or
derive it from system time */
}

This should be made a function in libswiftnav time.c and use WEEK_SECS constant.

@henryhallam Your thoughts? Also can you explain your TODO?

@ljbade ljbade changed the title Use WEEK_SECS from improved time.h in libswiftnav Improve week roll over in tracking Jan 7, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant