channel package#

Submodules#

channel.channel module#

channel.py

file

sturdr/channel/channel.py

brief

Abstract class for GNSS channel definitions.

date

October 2024

refs

  1. “Understanding GPS/GNSS Principles and Applications”, 3rd Edition, 2017
    • Kaplan & Hegarty

  2. “A Software-Defined GPS and Galileo Receiver: A Single-Frequency Approach”, 2007
    • Borre, Akos, Bertelsen, Rinder, Jensen

class channel.channel.Channel(config: dict, cid: str, rfbuffer: RfDataBuffer, queue: Queue, num: int)#

Bases: ABC, Process

Abstract class for Channel object definitions.

Attributes:
authkey
buffer_ptr
channelID
channel_status
config
daemon

Return whether process is a daemon

event_done
event_start
exitcode

Return exit code of process or None if it has yet to stop

ident

Return identifier (PID) of process or None if it has yet to start

name
pid

Return identifier (PID) of process or None if it has yet to start

queue
rfbuffer
sentinel

Return a file descriptor (Unix) or handle (Windows) suitable for waiting for process termination.

Methods

Acquire()

Trys to acquire the set satellite

NCO()

Runs the carrier and code numerically controlled oscillators

SetSatellite(satelliteID)

Set the GNSS signal and satellite tracked by the channel.

Track()

Runs the tracking correlation and loop filter updates!

close()

Close the Process object.

is_alive()

Return whether process is alive

join([timeout])

Wait until child process terminates

kill()

Terminate process; sends SIGKILL signal or uses TerminateProcess()

run()

Method to be run in sub-process; can be overridden in sub-class

start()

Start child process

terminate()

Terminate process; sends SIGTERM signal or uses TerminateProcess()

Decode

abstract Acquire()#

Trys to acquire the set satellite

abstract Decode()#
abstract NCO()#

Runs the carrier and code numerically controlled oscillators

abstract SetSatellite(satelliteID: uint8)#

Set the GNSS signal and satellite tracked by the channel.

abstract Track()#

Runs the tracking correlation and loop filter updates!

buffer_ptr: int#
channelID: str#
channel_status: ChannelStatus#
config: dict#
event_done: Event#
event_start: Event#
queue: Queue#
rfbuffer: RfDataBuffer#
abstract run()#

Method to be run in sub-process; can be overridden in sub-class

class channel.channel.ChannelStatus(ChannelNum: int = -1, Constellation: sturdr.utils.enums.GnssSystem = 0, Signal: sturdr.utils.enums.GnssSignalTypes = 0, ID: str = '', week: int = nan, TOW: numpy.float64 = nan, State: sturdr.utils.enums.ChannelState = 0, CodeLock: bool = False, CarrierLock: bool = False, DataLock: bool = False, Ephemeris: bool = False, Doppler: numpy.float64 = nan, CN0: numpy.float64 = nan, IP: numpy.float64 = nan, QP: numpy.float64 = nan)#

Bases: object

Attributes:
CN0
CarrierLock
ChannelNum
CodeLock
Constellation
DataLock
Doppler
Ephemeris
ID
IP
QP
Signal
State
TOW
week
CN0: float64#
CarrierLock: bool#
ChannelNum: int#
CodeLock: bool#
Constellation: GnssSystem#
DataLock: bool#
Doppler: float64#
Ephemeris: bool#
ID: str#
IP: float64#
QP: float64#
Signal: GnssSignalTypes#
State: ChannelState#
TOW: float64#
week: int#

channel.gps_l1ca_channel module#

gps_l1ca_channel.py

file

sturdr/channel/gps_l1ca_channel.py

brief

Implementation of channel.py for GPS L1 C/A signals.

date

October 2024

refs

  1. “Understanding GPS/GNSS Principles and Applications”, 3rd Edition, 2017
    • Kaplan & Hegarty

  2. “Global Positioning System: Signals, Measurements, and Performance”, 2nd Edition, 2006
    • Misra & Enge

  3. “A Software-Defined GPS and Galileo Receiver: A Single-Frequency Approach”, 2007
    • Borre, Akos, Bertelsen, Rinder, Jensen

class channel.gps_l1ca_channel.GpsL1caChannel(config: dict, cid: str, rfbuffer: RfDataBuffer, queue: Queue, num: int)#

Bases: Channel

Attributes:
IE
IL
IN
IP
IP_1
IP_2
IP_memory
QE
QL
QN
QP
QP_1
QP_2
QP_memory
T
amp_memory
authkey
bit_sync
buffer_ptr
carrier_doppler
carrier_jitter
carrier_replica
channelID
channel_status
cn0_mag
code
code_doppler
code_replica
config
daemon

Return whether process is a daemon

event_done
event_start
exitcode

Return exit code of process or None if it has yet to stop

half_samples
ident

Return identifier (PID) of process or None if it has yet to start

kf
name
noise_memory
pid

Return identifier (PID) of process or None if it has yet to start

preamble_found
queue
rem_carrier_phase
rem_code_phase
rfbuffer
samples_per_chip
samples_per_ms
samples_since_tow
sentinel

Return a file descriptor (Unix) or handle (Windows) suitable for waiting for process termination.

tap_spacing
total_samples

Methods

Acquire()

Trys to acquire the set satellite

NCO()

Runs the carrier and code numerically controlled oscillators

SetSatellite(satelliteID)

Set the GNSS signal and satellite tracked by the channel.

Track()

Runs the tracking correlation and loop filter updates!

close()

Close the Process object.

is_alive()

Return whether process is alive

join([timeout])

Wait until child process terminates

kill()

Terminate process; sends SIGKILL signal or uses TerminateProcess()

run()

Method to be run in sub-process; can be overridden in sub-class

start()

Start child process

terminate()

Terminate process; sends SIGTERM signal or uses TerminateProcess()

Decode

Acquire()#

Trys to acquire the set satellite

Decode()#
IE: float64#
IL: float64#
IN: float64#
IP: float64#
IP_1: float64#
IP_2: float64#
IP_memory: float64#
NCO()#

Runs the carrier and code numerically controlled oscillators

QE: float64#
QL: float64#
QN: float64#
QP: float64#
QP_1: float64#
QP_2: float64#
QP_memory: float64#
SetSatellite(satelliteID: uint8)#

Set the GNSS signal and satellite tracked by the channel.

T: float64#
Track()#

Runs the tracking correlation and loop filter updates!

amp_memory: float64#
bit_sync: bool#
carrier_doppler: float64#
carrier_jitter: float64#
carrier_replica: ndarray[float64]#
cn0_mag: float64#
code: ndarray[int8]#
code_doppler: float64#
code_replica: ndarray[float64]#
half_samples: int#
kf: TrackingKF#
lnav_parser: GpsLnavParser#
noise_memory: float64#
preamble_found: bool#
rem_carrier_phase: float64#
rem_code_phase: float64#
run()#

Method to be run in sub-process; can be overridden in sub-class

samples_per_chip: int#
samples_per_ms: int#
samples_since_tow: int#
tap_spacing: int#
total_samples: int#
w0d: float64#
w0f: float64#
w0p: float64#
channel.gps_l1ca_channel.gps_l1ca_code(prn: uint8)#

Generates the GPS L1 C/A code based on the requested PRN

Parameters:
prnnp.uint8

Satellite ID

Returns:
xnp.ndarray[np.int8]

Requested C/A code

Module contents#