Defines | Functions
Single Difference Observations

Defines

#define GPS_L1_LAMBDA   (GPS_C / GPS_L1_HZ)

Functions

bool _contains_prn (u8 len, u8 *prns, u8 prn)
void almanacs_to_single_diffs (u8 n, almanac_t *alms, gps_time_t timestamp, sdiff_t *sdiffs)
s8 copy_sdiffs_put_ref_first (u8 ref_prn, u8 num_sdiffs, sdiff_t *sdiffs, sdiff_t *sdiffs_with_ref_first)
void double_diff (u8 n, sdiff_t *sds, sdiff_t *dds, u8 ref_idx)
u8 filter_sdiffs (u8 num_sdiffs, sdiff_t *sdiffs, u8 num_sats_to_drop, u8 *sats_to_drop)
u8 make_propagated_sdiffs (u8 n_local, navigation_measurement_t *m_local, u8 n_remote, navigation_measurement_t *m_remote, double *remote_dists, double remote_pos_ecef[3], ephemeris_t *es, gps_time_t t, sdiff_t *sds)
u8 propagate (u8 n, double ref_ecef[3], navigation_measurement_t *m_in_base, gps_time_t *t_base, navigation_measurement_t *m_in_rover, gps_time_t *t_rover, navigation_measurement_t *m_out_base)
int sdiff_search_prn (const void *a, const void *b)
u8 single_diff (u8 n_a, navigation_measurement_t *m_a, u8 n_b, navigation_measurement_t *m_b, sdiff_t *sds)

Detailed Description

Functions for storing and manipulating single difference observations.


Define Documentation

#define GPS_L1_LAMBDA   (GPS_C / GPS_L1_HZ)

Definition at line 26 of file single_diff.c.


Function Documentation

bool _contains_prn ( u8  len,
u8 prns,
u8  prn 
)

Definition at line 284 of file single_diff.c.

void almanacs_to_single_diffs ( u8  n,
almanac_t alms,
gps_time_t  timestamp,
sdiff_t sdiffs 
)

Convert a list of almanacs to a list of single differences. This only fills the position, velocity and prn.

It's only useful for using functions that need a sdiff_t when you have almanac_t.

Definition at line 228 of file single_diff.c.

s8 copy_sdiffs_put_ref_first ( u8  ref_prn,
u8  num_sdiffs,
sdiff_t sdiffs,
sdiff_t sdiffs_with_ref_first 
)

Definition at line 264 of file single_diff.c.

void double_diff ( u8  n,
sdiff_t sds,
sdiff_t dds,
u8  ref_idx 
)

Definition at line 250 of file single_diff.c.

u8 filter_sdiffs ( u8  num_sdiffs,
sdiff_t sdiffs,
u8  num_sats_to_drop,
u8 sats_to_drop 
)

Definition at line 294 of file single_diff.c.

u8 make_propagated_sdiffs ( u8  n_local,
navigation_measurement_t m_local,
u8  n_remote,
navigation_measurement_t m_remote,
double *  remote_dists,
double  remote_pos_ecef[3],
ephemeris_t es,
gps_time_t  t,
sdiff_t sds 
)

Propagates remote measurements to a local time and makes sdiffs. When we get two sets of observations that aren't time matched to each other (but are internally time matched within each set), we need to adjust one set of measurements to be our best guess of what it would have been had we measured it at the other set's time. This function does that and differences those measurements from sats present in both sets.

It returns the number of sats common in both.

Remarks:
This is actually using the sat positions at the time the receiver got the signal. You can backtrack to the sat position at the time the signal was sent. At the very least, if you backtrack assuming sat constant velocity, the difference is miniscule.
Todo:
Integrate this with single_diff via a higher order function.
Parameters:
n_localThe number of measurements taken locally.
m_localThe measurements taken locally (sorted by prn).
n_remoteThe number of measurements taken remotely.
m_remoteTHe measurements taken remotely (sorted by prn).
remote_distsThe distances from the remote receiver to each satellite at the time the remote measurements were taken (i-th element of this list must correspond to the i-th element of m_remote).
remote_pos_ecefThe position of the remote receiver (presumed constant in ecef).
sdsThe single differenced propagated measurements.
Returns:
The number of sats common in both local and remote sdiffs.

Definition at line 162 of file single_diff.c.

u8 propagate ( u8  n,
double  ref_ecef[3],
navigation_measurement_t m_in_base,
gps_time_t t_base,
navigation_measurement_t m_in_rover,
gps_time_t t_rover,
navigation_measurement_t m_out_base 
)

Definition at line 28 of file single_diff.c.

int sdiff_search_prn ( const void *  a,
const void *  b 
)

Definition at line 128 of file single_diff.c.

u8 single_diff ( u8  n_a,
navigation_measurement_t m_a,
u8  n_b,
navigation_measurement_t m_b,
sdiff_t sds 
)

Calculate single difference observations. Undifferenced input observations are assumed to be both taken at the same time, `t`.

SNR in the output is the lesser of the SNRs of inputs a and b.

`sat_pos` and `sat_vel` are taken from input a.

Parameters:
n_aNumber of measurements in `m_a` m_a Array of undifferenced observations, sorted by PRN
n_bNumber of measurements in `m_b` m_new Array of b navigation measurements, sorted by PRN
sdsSingle difference observations
Returns:
The number of observations written to `sds`

Definition at line 99 of file single_diff.c.



swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:57:01