Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ANTEX: PCV with azimuth, full freq range, ANTEX 2, SINEX metadata #533

Open
wants to merge 6 commits into
base: demo5
Choose a base branch
from

Conversation

ourairquality
Copy link

The ANTEX support was limited, perhaps good for GPS frequencies L1 and L2, but beyond that it was limited, and using more signals across multiple systems it was problematic. If the PCO is missing or wrong for some signals then that makes the solution difficult or throws it off, often showing up as an error in the height first. While addressing those issues, also added support for PCV azimuth, and for ANTEX 2 which in turn needed some limited support for satellite meta data SINEX files.

This helps if not using matched antennas, and if using a competent base for RTK.

It assumes the antennas are horizontal and pointing north. There is no support in the code yet to consider the rover heading.

Added interpolation for the receiver PCO an PCV across frequencies. If a low end antenna has at least a GPS L1 and L2 calibration then that will be used for other signals in the same band. Even supplying the L1 and L2 PCO can help and this is often printed on the label.

Some antennas with an otherwise tight PCO can vary a lot over frequency in the lower frequency band, 10mm+, so interpolation will not always be great particularly in the lower frequency band.

The ANTEX 2 files are at https://files.igs.org/pub/station/general/atx_alternative/atx2/ and the meta data at https://files.igs.org/pub/station/general/ ANTEX 2 adds nothing over ANTEX 1 for the solution and should give the same solution, it was just a small thing to add support while look over this code. ANTEX 2 has less redundant information, almost half the file size. Some example options for ANTEX 2:
file-satmetafile =igs_satellite_metadata.snx
file-satantfile =igs20_sat.atx2
file-rcvantfile =igs20_rcv.atx2

The windows app GUI support is not done, that just means there is no file selection for the ANTEX 2 meta data file, it should otherwise work, and ANTEX 2 adds nothing to the solution.

@ourairquality ourairquality force-pushed the antex-freq-azi branch 2 times, most recently from 4db4aa9 to 6bf6d0b Compare November 22, 2024 09:57
@ourairquality
Copy link
Author

Found it useful to split up the receiver antmodel into the delta+pco and the pcv, and since this is rewritten here it has been bundled in here too. An compatible antmodel() function is retained, but now using antpco() and antpcv() to avoid code duplication.

Exploring using this in the pntpos and rtk paths for now, and it does make the solution much more robust to a large delta from the marker to the phase center. Separating these allows the receiver antenna delta and PCO to be applied before calculating the range and line of sight to the satellite, so that these become from the receiver phase center rather than from the marker - the calculation then seems robust to even a 1km height delta.

Also the 'single' pntpos solution did not appear to even consider the delta from the marker to the ARP so was a solution for the phase center, and are people happy for the delta to be applied to the single solution so that is is also a solution for the marker position? It's a noisy solution but it is an input for the rtk solution and it appeared to be breaking the rtk solution as-is for only a few meters of height delta.

There are also some other antenna delta paths that probably need fixing, that look suspect, rinex and rtcm. Does everyone expect the solution to be to the marker, so having to take into account the delta from the marker to the ARP, not the phase center solution?

@ourairquality
Copy link
Author

Adding on antenna selection patches here, as there is a dependence on these changes, but kept as a separate patch, its all antenna related. This could be split out with some modification. To get it working properly still needs pntpos to be updated to account for the antenna delta, which will be in a separate PR. Tested the automated antenna selection in rtkrcv and rtknavi_qt, and it seems to be working well, and even in fixed mode it picks up the base and rover antenna type and the position from an RTCM. The windows app patches are not tested but should be close.

@ourairquality
Copy link
Author

The pntpos solution has been updated to also apply the antenna delta, and also the PCO and PCV fwiw, so now calculates at the phase center and returns the position of the marker.

This is a useful function for parsing the formatted files, so
move this from rinex.c into rktcmd.c and export it.
Improve the ANTEX support.

* Support PCV with azimuth. Was just NOAZI. Use linear interpolation
  between azimuth points, as well as the zenith. Satellite PCV still
  only supports NOAZI as that is most common, but all the support is
  there to extend this to vary with azimuth

* Support ZEN1, ZEN2, DZEN, and DAZI. The PHV size is also now
  variable so the smallest size array is allocated. There was a fixed
  azimuth length of 19. It now correctly handles variations of these
  parameters. Require some more memory management, to free these.

* Support the full range of frequencies, across systems. Was just GPS
  and NFREQ. The usage of the antmodel() etc functions needed to
  change. There were returning a NFREQ array with the offsets, but
  that did not work with multiple systems with different frequencies
  mapped to the frequency same indices - these functions are now
  single frequency functions.

* Support PCO and PCV interpolation between frequency entries, with
  heuristics to avoid extrapolation of noisy data, and avoid
  interpolation across frequency bands (which may well be implemented
  with separate antenna elements e.g. stacked elements).

* Add support for ANTEX 2 which avoids much redundancy. This required
  the PRN to SVN mapping in the SINEX satellite meta data.

* Add minimal SINEX satellite meta data support, just for the PRN to
  SVN mappings. Adding the file-satmetafile option.

* Support for the console apps.

* Support for the qt apps, adding the satellite meta data file to the
  GUI.

* Some windows app support, untested, and not yet the satellite meta
  data file for ANTEX 2 which needs adding to the GUI.

* Adding a new function antpcv(). Implement antmodel() using the
  existing antpco() and the this new function to avoid code duplication,
  with some repetition of code execution.

  This is intended to allow the caller to apply the receiver PCO first
  and then separately the PCV, for greater accuracy, just as these are
  currently separated for satellites.
Implement the automated antenna type selection along with the antenna
delta from the input stream, from an RTCM or raw stream, the config
options ant{1,2}-anttype="*".

Have the config options ant{1,2}-postype RTCM and raw automatically
set the position, and independently of the antenna type, and now
including for the rover when in fixed mode.

Previously only an antenna delta would be picked up as an offset to a
base position, including a RTCM height, and only when the position was
also being automatically set and only for the base and not the rover.

Also there was no separate 'raw' antenna automated position mode, this
is included under the 'rtcm' option.
Pass in the receiver index, as a 'base' argument, which is 0 for the
rover and 1 for the base, to allow the respective options to be
selected rather than just using the rover options even for the
base. Start making use of this: in rescode() this is now used to
select the respective SNR and SNR mask.

For postpos.c where a one based receiver number and zero base index
were both be used, fix an instance in antpos() of indexing into option
anttype[] with an one base index which would be OOB for a value of
2. Try to clean up this code in this regard.
This allows setpcv() to automatically set the antenna delta, rather
than having to hack that delta into the position in antpos(), and that
hack can now be removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant