midgard.parsers.gnss_antex
A parser for reading ANTEX format 1.4 data
Example:
from midgard import parsers
p = parsers.parse_file(parser_name='gnss_antex', file_path='igs14.atx')
data = p.as_dict()
Description:
Reads data from files in the GNSS Antenna Exchange (ANTEX) file format version 1.4 (see :cite:antex
).
AntexParser
AntexParser(file_path:Union[str, pathlib.Path], encoding:Union[str, NoneType]=None, logger:Union[Callable[[str], NoneType], NoneType]=<built-in function print>) -> None
A parser for reading ANTEX file
The parser reads GNSS ANTEX format 1.4 (see :cite:antex
).
The 'data' attribute is a dictionary with GNSS satellite PRN or receiver antenna as key. The GNSS satellite antenna corrections are time dependent and saved with "valid from" datetime object entry. The dictionary looks like:
dout = { <prn> : { <valid from>: { cospar_id: <value>,
sat_code: <value>,
sat_type: <value>,
valid_until: <value>,
azimuth: <list with azimuth values>,
elevation: <list with elevation values>,
<frequency>: { azi: [<list with azimuth-elevation dependent corrections>],
neu: [north, east, up],
noazi: [<list with elevation dependent corrections>] }}},
<receiver antenna> : { azimuth: <list with azimuth values>,
elevation: <list with elevation values>,
<frequency>: { azi: [<array with azimuth-elevation dependent corrections>],
neu: [north, east, up],
noazi: [<list with elevation dependent corrections>] }}}
with following entries:
Value | Type | Description |
---|---|---|
azi | numpy.ndarray | Array with azimuth-elevation dependent antenna correction in [mm] with |
the shape: number of azimuth values x number of elevation values. | ||
azimuth | numpy.ndarray | List with azimuth values in [rad] corresponding to antenna corrections |
given in azi . |
||
cospar_id | str | COSPAR ID |
orbit, xxx -> sequential satellite number for that year, a -> alpha | ||
numeric sequence number within a launch | ||
elevation | numpy.ndarray | List with elevation values in [rad] corresponding to antenna |
corrections given in azi or noazi . |
||
str | Frequency identifier (e.g. G01 - GPS L1) | |
neu | list | North, East and Up eccentricities in [m]. The eccentricities of the |
mean antenna phase center is given relative to the antenna reference | ||
point (ARP) for receiver antennas or to the center of mass of the | ||
satellite in X-, Y- and Z-direction. | ||
noazi | numpy.ndarray | List with elevation dependent (non-azimuth-dependent) antenna |
correction in [mm]. | ||
str | Satellite code e.g. GPS PRN, GLONASS slot or Galileo SVID number | |
str | Receiver antenna name together with radome code | |
sat_code | str | Satellite code e.g. GPS SVN, GLONASS number or Galileo GSAT number |
sat_type | str | Satellite type (e.g. BLOCK IIA) |
valid_from | datetime.datetime | Start of validity period of satellite in GPS time |
valid_until | datetime.datetime | End of validity period of satellite in GPS time |
The 'meta' attribute is a dictionary with following entries:
Value | Type | Description |
---|---|---|
comment | list | Header commments given in list line by line |
pcv_type | str | Phase center variation type |
ref_antenna | str | Reference antenna type for relative antenna |
ref_serial_num | str | Serial number of the reference antenna |
sat_sys | str | Satellite system |
version | str | Format version |
Attributes:
data
: (dict), Contains the (observation) data read from file.data_available
: (bool), Indicator of whether data are available.file_path
: (pathlib.Path), File path.parser_name
: (str), Parser name.meta
: (dict), Contains metainformation read from file.
AntexParser.parse_comment()
parse_comment(self, line:Dict[str, str], _:Dict[str, Any]) -> None
Parse comment lines in ANTEX header.
AntexParser.parse_correction()
parse_correction(self, line:Dict[str, str], cache:Dict[str, Any]) -> None
Parse antenna corrections entries of ANTEX antenna section.
AntexParser.parse_default_meta()
parse_default_meta(self, line:Dict[str, str], _:Dict[str, Any]) -> None
Add the contents of line to meta
Args:
line
: Dict containing the fields of a line.
AntexParser.parse_num_of_frequencies()
parse_num_of_frequencies(self, line:Dict[str, str], cache:Dict[str, Any]) -> None
Parse '# OF FREQUENCIES' entry of ANTEX antenna section.
AntexParser.parse_section_float()
parse_section_float(self, line:Dict[str, str], cache:Dict[str, Any]) -> None
Parse float entries of ANTEX header.
AntexParser.parse_section_string()
parse_section_string(self, line:Dict[str, str], cache:Dict[str, Any]) -> None
Parse string entries of ANTEX header.
AntexParser.parse_string()
parse_string(self, line:Dict[str, str], _:Dict[str, Any]) -> None
Parse string entries of ANTEX header.
AntexParser.parse_valid_from()
parse_valid_from(self, line:Dict[str, str], cache:Dict[str, Any]) -> None
Parse 'VALID FROM' entries of ANTEX antenna section.
AntexParser.parse_valid_until()
parse_valid_until(self, line:Dict[str, str], cache:Dict[str, Any]) -> None
Parse 'VALID UNTIL' entries of ANTEX antenna section.
AntexParser.save_correction()
save_correction(self, line:Dict[str, str], cache:Dict[str, Any]) -> None
Save antenna correction in data structures.
The antenna corrections are saved after reading of corrections for one frequency. Antenna correction data are saved in following data structure, whereby satellite antenna corrections are time dependent:
self.data = { <prn> : { <valid from>: { cospar_id: <value>,
sat_code: <value>,
sat_type: <value>,
valid_until: <value>,
azimuth: <list with azimuth values>,
elevation: <list with elevation values>,
<frequency>: { azi: [<list with azimuth-elevation dependent corrections>],
neu: [north, east, up],
noazi: [<list with elevation dependent corrections>] }}},
<receiver antenna> : { azimuth: <list with azimuth values>,
elevation: <list with elevation values>,
<frequency>: { azi: [<array with azimuth-elevation dependent corrections>],
neu: [north, east, up],
noazi: [<list with elevation dependent corrections>] }}
}
AntexParser.setup_parser()
setup_parser(self) -> Iterable[midgard.parsers._parser_chain.ParserDef]
Parsers defined for reading ANTEX file line by line.
First the ANTEX header information are read and afterwards the ANTEX corrections.