MRTKLIB 0.7.14
Modernized GNSS Positioning Library
Loading...
Searching...
No Matches
mrtk_antenna.c File Reference

MRTKLIB Antenna Module — Implementation. More...

#include "mrtklib/mrtk_antenna.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "mrtklib/mrtk_mat.h"
#include "mrtklib/mrtk_trace.h"
Include dependency graph for mrtk_antenna.c:

Go to the source code of this file.

Macros

#define PI   3.1415926535897932 /* pi */
#define D2R   (PI / 180.0) /* deg to rad */
#define R2D   (180.0 / PI) /* rad to deg */

Functions

int satid2no (const char *id)
int satsys (int sat, int *prn)
int freq_num2ant_idx (int sys, int freq_num)
static int decodef (char *p, int n, double *v)
static void addpcv (const pcv_t *pcv, pcvs_t *pcvs)
static int readngspcv (const char *file, pcvs_t *pcvs)
static int readantex (const char *file, pcvs_t *pcvs)
static double interpvar (double ang, const double *var)
int readpcv (const char *file, pcvs_t *pcvs)
 Read antenna parameters from file (ANTEX or NGS format).
pcv_t * searchpcv (int sat, const char *type, gtime_t time, const pcvs_t *pcvs)
 Search antenna parameter by satellite number or antenna type.
void antmodel (const pcv_t *pcv, const double *del, const double *azel, int opt, double *dant)
 Compute receiver antenna offset by antenna phase center parameters.
void antmodel_s (const pcv_t *pcv, double nadir, double *dant)
 Compute satellite antenna phase center parameters.

Detailed Description

MRTKLIB Antenna Module — Implementation.

All functions and static data in this file are cut-and-paste extractions from the legacy rtkcmn.c with zero algorithmic changes.

Definition in file mrtk_antenna.c.

Macro Definition Documentation

◆ D2R

#define D2R   (PI / 180.0) /* deg to rad */

Definition at line 48 of file mrtk_antenna.c.

◆ PI

#define PI   3.1415926535897932 /* pi */

Definition at line 47 of file mrtk_antenna.c.

◆ R2D

#define R2D   (180.0 / PI) /* rad to deg */

Definition at line 49 of file mrtk_antenna.c.

Function Documentation

◆ addpcv()

void addpcv ( const pcv_t * pcv,
pcvs_t * pcvs )
static

Definition at line 68 of file mrtk_antenna.c.

References free, pcvs_t::n, pcvs_t::nmax, pcvs_t::pcv, and trace().

Referenced by readantex(), and readngspcv().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ antmodel()

void antmodel ( const pcv_t * pcv,
const double * del,
const double * azel,
int opt,
double * dant )
extern

Compute receiver antenna offset by antenna phase center parameters.

Parameters
[in]pcvAntenna phase center parameters
[in]delAntenna delta {e,n,u} (m)
[in]azelAzimuth/elevation for receiver {az,el} (rad)
[in]optOption (0:only offset, 1:offset+pcv)
[out]dantRange offsets for each frequency (m)
Note
Current version does not support azimuth dependent terms

Definition at line 481 of file mrtk_antenna.c.

References dot(), interpvar(), NFREQPCV, pcv_t::off, R2D, trace(), and pcv_t::var.

Referenced by clas_osr_corrmeas(), ppp_res(), zdres(), and zdres().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ antmodel_s()

void antmodel_s ( const pcv_t * pcv,
double nadir,
double * dant )
extern

Compute satellite antenna phase center parameters.

Parameters
[in]pcvAntenna phase center parameters
[in]nadirNadir angle for satellite (rad)
[out]dantRange offsets for each frequency (m)

Definition at line 507 of file mrtk_antenna.c.

References interpvar(), NFREQPCV, R2D, trace(), and pcv_t::var.

Referenced by satantpcv().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ decodef()

int decodef ( char * p,
int n,
double * v )
static

Definition at line 56 of file mrtk_antenna.c.

Referenced by readantex(), and readngspcv().

Here is the caller graph for this function:

◆ freq_num2ant_idx()

int freq_num2ant_idx ( int sys,
int freq_num )
extern

Definition at line 710 of file mrtk_nav.c.

Referenced by readantex().

Here is the caller graph for this function:

◆ interpvar()

double interpvar ( double ang,
const double * var )
static

Definition at line 230 of file mrtk_antenna.c.

Referenced by antmodel(), and antmodel_s().

Here is the caller graph for this function:

◆ readantex()

int readantex ( const char * file,
pcvs_t * pcvs )
static

Definition at line 138 of file mrtk_antenna.c.

References addpcv(), pcv_t::code, decodef(), freq_num2ant_idx(), NFREQPCV, pcv_t::off, pcv_t::sat, satid2no(), satsys(), str2time(), pcv_t::te, trace(), pcv_t::ts, pcv_t::type, and pcv_t::var.

Referenced by readpcv().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readngspcv()

int readngspcv ( const char * file,
pcvs_t * pcvs )
static

Definition at line 85 of file mrtk_antenna.c.

References addpcv(), decodef(), pcv_t::off, trace(), pcv_t::type, and pcv_t::var.

Referenced by readpcv().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readpcv()

int readpcv ( const char * file,
pcvs_t * pcvs )
extern

Read antenna parameters from file (ANTEX or NGS format).

Parameters
[in]fileAntenna parameter file
[in,out]pcvsAntenna parameters
Returns
Status (1:ok, 0:file open error)
Note
File with extension .atx/.ATX is recognized as ANTEX format; other files are recognized as NGS format. Only supports non-azimuth-dependent parameters.

Definition at line 255 of file mrtk_antenna.c.

References pcv_t::code, matcpy(), pcvs_t::n, NFREQPCV, norm(), pcv_t::off, pcvs_t::pcv, readantex(), readngspcv(), pcv_t::sat, trace(), pcv_t::type, and pcv_t::var.

Referenced by openses(), and readsap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ satid2no()

int satid2no ( const char * id)
extern

Definition at line 753 of file mrtk_nav.c.

Referenced by readantex().

Here is the caller graph for this function:

◆ satsys()

int satsys ( int sat,
int * prn )
extern

Definition at line 117 of file mrtk_nav.c.

Referenced by readantex().

Here is the caller graph for this function:

◆ searchpcv()

pcv_t * searchpcv ( int sat,
const char * type,
gtime_t time,
const pcvs_t * pcvs )
extern

Search antenna parameter by satellite number or antenna type.

Parameters
[in]satSatellite number (0: receiver antenna)
[in]typeAntenna type for receiver antenna
[in]timeTime to search parameters (GPST)
[in]pcvsAntenna parameters
Returns
Antenna parameter (NULL: no antenna found)

Definition at line 416 of file mrtk_antenna.c.

References MAXANT, pcvs_t::n, pcvs_t::pcv, pcv_t::sat, pcv_t::te, gtime_t::time, timediff(), trace(), pcv_t::ts, and pcv_t::type.

Referenced by readsap(), and setpcv().

Here is the call graph for this function:
Here is the caller graph for this function: