Code Reference

wxrx.read_wxrx

wxrx.converters

wxrx.converters.gain_from_int(i: int) int

Returns the gain. A value of 0 indicates maximum gain. A value of 1 indicates calibration.

May raise a KeyError if the gain is not in the lookup table.

Parameters:

i (int) – The encoded gain value.

Returns:

The gain, or an indicator of calibration.

Return type:

int

wxrx.converters.range_from_int(i: int) int

Returns the range in nautical miles. A value of 0 indicates maximum range, 320 nautical miles.

May raise a KeyError if the range is not in the lookup table.

Parameters:

i (int) – The encoded range value.

Returns:

The range in nautical miles.

Return type:

int

wxrx.converters.scan_angle_from_int(i: int) float

Returns the scan angle from the integer representation.

Parameters:

i (int) – The integer representation of the scan angle.

Returns:

The scan angle in degrees.

Return type:

float

wxrx.converters.tilt_from_int(i: int) float

Returns the tilt angle in degrees.

Parameters:

i (int) – The encoded tilt value.

Returns:

The tilt angle in degrees.

Return type:

float

wxrx.netcdf

wxrx.timer

class wxrx.timer.Timer(logfile: str, tmpfile: str = '')

Bases: object

Provides a timer for a given logfile and tmpfile. This allows the time at which a given size was reached to be calculated. This is used to add a timestamp to the ARINC708 data, which is not timestamped.

__init__(logfile: str, tmpfile: str = '') None

Create a new Timer object.

Parameters:
  • logfile (str) – Path to the logfile to use for the timer

  • tmpfile (str) – The tmpfile to use for the timer.

property date: date

Returns the date of the first entry in the logfile.

Returns:

The date of the first entry in the logfile

Return type:

datetime.date

classmethod get_tempfiles(logfile: str) list[str]

Returns a list of tempfiles in the given logfile.

Parameters:

logfile (str) – The logfile to check

Returns:

A list of tempfiles in the given logfile

Return type:

list[str]

includes(tempfile: str) bool

Indicates whether the timer includes a reference to the given tempfile.

Parameters:

tempfile (str) – The tempfile to check for

Returns:

True if the timer includes the tempfile, False otherwise

Return type:

bool

time_at_size(size: int, tmpfile: str = '') Timestamp

Returns the time at which the given size was reached.

Parameters:
  • size (int) – The size to check for

  • tmpfile (str) – The tempfile to check for

Returns:

The nearest time to which the given size was reached.

Return type:

pd.Timestamp