Skip to content

Commit

Permalink
Make a new version
Browse files Browse the repository at this point in the history
  • Loading branch information
Ann-Silje committed Jun 2, 2023
1 parent 1d33b19 commit 3463eef
Show file tree
Hide file tree
Showing 9 changed files with 333 additions and 170 deletions.
3 changes: 1 addition & 2 deletions website_tools/docs/api/midgard-collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,7 @@ import numpy as np
from midgard.collections import plate_motion_models

# Get list with available plate models
models =

models = plate_motion_models.models()

# Get PlateMotionModel instance for a given tectonic name
model = plate_motion_models.get("itrf2014")
Expand Down
2 changes: 1 addition & 1 deletion website_tools/docs/api/midgard-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ individual entry, or for all entries in a configuration.

Full name: `midgard.config.config.CasedConfigParser`

Signature: `(defaults=None, dict_type=<class 'dict'>, allow_no_value=False, *, delimiters=('=', ':'), comment_prefixes=('#', ';'), inline_comment_prefixes=None, strict=True, empty_lines_in_values=True, default_section='DEFAULT', interpolation=<object object at 0x7f6bf5df63a0>, converters=<object object at 0x7f6bf5df63a0>)`
Signature: `(defaults=None, dict_type=<class 'dict'>, allow_no_value=False, *, delimiters=('=', ':'), comment_prefixes=('#', ';'), inline_comment_prefixes=None, strict=True, empty_lines_in_values=True, default_section='DEFAULT', interpolation=<object object at 0x7f173bbcaea0>, converters=<object object at 0x7f173bbcaea0>)`

ConfigParser with case-sensitive keys

Expand Down
74 changes: 2 additions & 72 deletions website_tools/docs/api/midgard-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -488,16 +488,6 @@ Signature: `(log_level: Optional[str] = None, prefix: str = '')`

Abstract class that can be specialized to create new loggers

### **all**()

Full name: `midgard.dev.log.all`

Signature: `(log_text: str, *, level: str = 'all') -> None`

partial(func, *args, **keywords) - new function with partial application
of the given arguments and keywords.


### **blank**()

Full name: `midgard.dev.log.blank`
Expand All @@ -506,36 +496,6 @@ Signature: `() -> None`

Log blank line

### **debug**()

Full name: `midgard.dev.log.debug`

Signature: `(log_text: str, *, level: str = 'debug') -> None`

partial(func, *args, **keywords) - new function with partial application
of the given arguments and keywords.


### **error**()

Full name: `midgard.dev.log.error`

Signature: `(log_text: str, *, level: str = 'error') -> None`

partial(func, *args, **keywords) - new function with partial application
of the given arguments and keywords.


### **fatal**()

Full name: `midgard.dev.log.fatal`

Signature: `(log_text: str, *, level: str = 'fatal') -> None`

partial(func, *args, **keywords) - new function with partial application
of the given arguments and keywords.


### **file_init**

Full name: `midgard.dev.log.file_init`
Expand All @@ -554,16 +514,6 @@ Log to a file, the log files can be rotated so that older files are kept
is not specified, then existing logging file is overwritten from newer ones.


### **info**()

Full name: `midgard.dev.log.info`

Signature: `(log_text: str, *, level: str = 'info') -> None`

partial(func, *args, **keywords) - new function with partial application
of the given arguments and keywords.


### **init**

Full name: `midgard.dev.log.init`
Expand All @@ -580,16 +530,6 @@ Signature: `(log_text: str, level: str) -> None`

Log text at the given level

### **none**()

Full name: `midgard.dev.log.none`

Signature: `(log_text: str, *, level: str = 'none') -> None`

partial(func, *args, **keywords) - new function with partial application
of the given arguments and keywords.


### **print_file**()

Full name: `midgard.dev.log.print_file`
Expand All @@ -598,16 +538,6 @@ Signature: `(log_path: Union[str, pathlib.Path], log_level: str = 'info', print_

Print a log file with colors, stripping away any item below log_level

### **warn**()

Full name: `midgard.dev.log.warn`

Signature: `(log_text: str, *, level: str = 'warn') -> None`

partial(func, *args, **keywords) - new function with partial application
of the given arguments and keywords.


## midgard.dev.plugins
Set up a plug-in architecture for Midgard

Expand Down Expand Up @@ -1103,15 +1033,15 @@ logger is used to report the timing. See `Timer.__init__` for more details.

Full name: `midgard.dev.timer.AccumulatedTimer`

Signature: `(text: str = 'Elapsed time:', fmt: str = '.4f', logger: Optional[Callable[[str], NoneType]] = functools.partial(<function log at 0x7f6bf7042550>, level='info')) -> None`
Signature: `(text: str = 'Elapsed time:', fmt: str = '.4f', logger: Optional[Callable[[str], NoneType]] = functools.partial(<function log at 0x7f174b56be20>, level='info')) -> None`



### **Timer**

Full name: `midgard.dev.timer.Timer`

Signature: `(text: str = 'Elapsed time:', fmt: str = '.4f', logger: Optional[Callable[[str], NoneType]] = functools.partial(<function log at 0x7f6bf7042550>, level='info')) -> None`
Signature: `(text: str = 'Elapsed time:', fmt: str = '.4f', logger: Optional[Callable[[str], NoneType]] = functools.partial(<function log at 0x7f174b56be20>, level='info')) -> None`

Class for timing running time of functions and code blocks.

Expand Down
62 changes: 50 additions & 12 deletions website_tools/docs/api/midgard-gnss.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,30 +194,68 @@ Return:
GNSS frequency in [Hz]


## midgard.gnss.rec_velocity_est
## midgard.gnss.klobuchar
Klobuchar model for computing the ionospheric time-delay correction.

**Description:**

### E_OMGA (float)
`E_OMGA = 7.2921151467e-05`
Compute the ionospheric time-delay correction for the single-frequency by
broadcast model (klobuchar model). GPS and Beidu satellite navigation systems
use this model. The implementation is based on original paper of Klobuchar
(1987). The Klobuchar model is also described in Figure 20-4 in IS-GPS-200J.


### epilog (str)
`epilog = '\n**EXAMPLE**\n rec_velocity_est.py \n args:\n NONE\n \n**COPYRIGHT**\n | Copyright 2019, by the Geodetic Institute, NMA\n | All rights reserved\n\n**AUTHORS**\n | Mohammed Ouassou \n | Geodetic Institute, NMA\n | Kartverksveien 21, N-3511\n | Hønefoss, Norway\n \n'`
**References:**

- IS-GPS-200J (2018): "Global positioning systems directorate systems engineering & integration interface
specification IS-GPS-200, Navstar GPS space Segment/Navigation user segment interfaces, 25. April 2018

### lambda_E1 (float)
`lambda_E1 = 0.19029367279836487`
- Klobuchar, J.A. (1987): "Ionospheric Time-Delay Algorithm for Single-Frequency GPS Users", IEEE Transactions
on Aerospace and Electronic Systems, Vol. AES-23, No. 3, May 1987, https://scinapse.io/papers/2058160370

- Sanz Subirana, J., Juan Zornoza, J.M. and Hernandez-Pajares, M. (2013): "GNSS data processing - Volume I:
Fundamentals and Algorithms", TM-23/1, European Space Agency, May 2013

### prolog (str)
`prolog = '\n**PROGRAM**\n rec_velocity_est.py\n \n**PURPOSE**\n "GNSS Receiver velocity estimation by Doppler measurements\n \n Doppler shift, affecting the frequency of the signal received from a GNSS satellite, is related to the user-satellite relative motion \n and is useful to study the receiver motion. Using measurements from at least four simultaneous Doppler measurements, Least Square (LS) \n or Kalman filter (KF) estimation techniques can be employed to obtain an estimate of the four unknown dx=(Vx, Vy, Vz, rate(cdt) ).\n \n FACTS:\n F.1 The design matrix H of the Doppler based velocity model is the same as the pseudorange case. Constellation geometry influences the \n velocity accuracy according to DOP.\n F.2 The measurement errors is composed of systematic errors (orbital errors, atmosphere, and so forth) and the measurement noise. \n Noting that the Doppler is the time derivative of the carrier phase, the systematic Doppler errors are the time derivative of the \n carrier phase errors and changing slowly with time. The magnitude is at the level of millimeters per seconds. \n F.3 Geometry factors influences the estimation process. \n F.4 The implementation is based on the paper of Mark Petovello (GNSS solutions).\n \n VALIDATION:\n V.1 CNES software package SPRING is used to validate the implemented SPV.\n V.2 Solution validation is based on Chi-square test and GDOP values on epoch-by-epoch basis\n \n**USAGE**\n'`


### **spvDoppler**
### **klobuchar**()

Full name: `midgard.gnss.klobuchar.klobuchar`

Signature: `(time, ion_coeffs, rec_pos, az, el, freq_l1, freq=None, logger=functools.partial(<function log at 0x7f174b56be20>, level='debug'))`

Compute the ionospheric time-delay correction for the single-frequency by broadcast model (klobuchar model)

GPS and BeiDou satellite navigation systems use this model. The implementation is based on original paper of
Klobuchar, J.A. Ionospheric Time-Delay Algorithm for Single-Frequency GPS Users
https://scinapse.io/papers/2058160370

**Args:**

- `time`: GPST
- `ion_coeffs`: iono model parameters {a0,a1,a2,a3,b0,b1,b2,b3} as vector
- `rec_pos`: receiver position {lat,lon,h} [rad, rad, m] as vector
- `az`: azimuth angle [rad]
- `el`: elevation angle [rad]
- `system`: GNSS system
- `freq_l1`: L1 frequency of given GNSS in [Hz]
- `freq`: Frequency in [Hz] for which ionospheric delay should be determined.
- `logger`: Function that logs

**Returns:**

- `iono_delay`: computed path delay for given frequency [m]
- `L1_variance`: corresponding variance [m^2]

TODO: freq_L1 should be determined in klobuchar routine and argument be replaced by system. constants needed in
Midgard.

Full name: `midgard.gnss.rec_velocity_est.spvDoppler`

Signature: `(z, H, x, dx, Qx)`
### **main**()

Full name: `midgard.gnss.klobuchar.main`

Signature: `()`



Expand Down
2 changes: 1 addition & 1 deletion website_tools/docs/api/midgard-math.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Signature: `() -> None`


### constant (Constant)
`constant = Constant('/home/kirann/miniconda3/lib/python3.9/site-packages/midgard/math/constant.txt')`
`constant = Constant('/home/kirann/miniconda3/envs/where/lib/python3.10/site-packages/midgard/math/constant.txt')`


## midgard.math.ellipsoid
Expand Down

0 comments on commit 3463eef

Please sign in to comment.