Skip to content
This repository was archived by the owner on Apr 13, 2021. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,11 @@ static void manage_acq()
track_count += 16*(1023.0-cp)*(1.0 + cf / GPS_L1_HZ);

/* Start the tracking channel */
//TODO: Here we need to call this with following rules:
// 1. use Mutex, because same can be called from track thread
// 2. what is the strategy for L2C? if L2C is availale for a SV
// should we initialize tracking L2C rather than L1CA? If so
// L2C capability functionality should be merged first.
tracking_channel_init(chan, acq->sid, cf, track_count, cn0,
TRACKING_ELEVATION_UNKNOWN);
/* TODO: Initialize elevation from ephemeris if we know it precisely */
Expand Down
11 changes: 11 additions & 0 deletions src/track.c
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,17 @@ void tracking_channel_update(u8 channel)
}
}

/* Handover from L1C */
if (chan->lock_detect.outo &&
chan->bit_sync.bit_phase == chan->bit_sync.bit_phase_ref) {
//TODO: 1. get code-phase and doppler
// 2. recalculate doppler
// 3. call trcking_channel_init
// 4. protect the calling with mutex, because same function
// is called from manage acquisition theread
// 5. use L2C fucking isolation mechanism
}

/* Consider moving from stage 0 (1 ms integration) to stage 1 (longer). */
if ((chan->stage == 0) &&
/* Must have (at least optimistic) phase lock */
Expand Down