pygnss 0.2.0__cp310-cp310-musllinux_1_2_i686.whl → 0.3.0__cp310-cp310-musllinux_1_2_i686.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pygnss might be problematic. Click here for more details.

pygnss/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.2.0"
1
+ __version__ = "0.3.0"
Binary file
pygnss/geodetic.py CHANGED
@@ -701,7 +701,7 @@ def body_to_enu(yaw_deg, pitch_deg, roll_deg, x, y, z, matrix=None):
701
701
  BODY_TO_ENU_MATRIX IS ACTUALLY IMPLEMENTING BODY2NED_MATRIX!!!!!!
702
702
 
703
703
  >>> body_to_enu(0, 0, 0, 1, 1, 1)
704
- (np.float64(1.0), np.float64(1.0), np.float64(-1.0))
704
+ (1.0, 1.0, -1.0)
705
705
 
706
706
  >>> enu = body_to_enu(90, 0, 0, 1, 1, 1)
707
707
  >>> np.round(enu)
@@ -809,11 +809,11 @@ def enu_to_ecef(longitude_deg, latitude_deg, e, n, u, matrix=None):
809
809
 
810
810
  >>> enu = (0.5, 0.5, 1.0)
811
811
  >>> enu_to_ecef(0, 0, *enu)
812
- (np.float64(1.0), np.float64(0.5), np.float64(0.5))
812
+ (1.0, 0.5, 0.5)
813
813
 
814
814
  >>> enu = (0.0, 0.0, 1.0)
815
815
  >>> enu_to_ecef(0, 0, *enu)
816
- (np.float64(1.0), np.float64(0.0), np.float64(0.0))
816
+ (1.0, 0.0, 0.0)
817
817
 
818
818
  >>> lons = [90, 180, 270]
819
819
  >>> lats = [0, 0, 0]
@@ -822,23 +822,23 @@ def enu_to_ecef(longitude_deg, latitude_deg, e, n, u, matrix=None):
822
822
  >>> us = [1, -1, -1]
823
823
  >>> dxyz = enu_to_ecef(lons, lats, es, ns, us)
824
824
  >>> round(dxyz[0][0], 8)
825
- np.float64(1.0)
825
+ 1.0
826
826
  >>> round(dxyz[0][1], 8)
827
- np.float64(1.0)
827
+ 1.0
828
828
  >>> round(dxyz[0][2], 8)
829
- np.float64(1.0)
829
+ 1.0
830
830
  >>> round(dxyz[1][0], 8)
831
- np.float64(1.0)
831
+ 1.0
832
832
  >>> round(dxyz[1][1], 8)
833
- np.float64(1.0)
833
+ 1.0
834
834
  >>> round(dxyz[1][2], 8)
835
- np.float64(1.0)
835
+ 1.0
836
836
  >>> round(dxyz[2][0], 8)
837
- np.float64(1.0)
837
+ 1.0
838
838
  >>> round(dxyz[2][1], 8)
839
- np.float64(1.0)
839
+ 1.0
840
840
  >>> round(dxyz[2][2], 8)
841
- np.float64(1.0)
841
+ 1.0
842
842
  """
843
843
 
844
844
  if matrix is None:
@@ -860,12 +860,12 @@ def xyz_to_enu(ref_pos, x, y, z, a=WGS84_A, e=WGS84_E):
860
860
  >>> dxyz = (1.0, 0.0, 0.0) # Deviation relative to reference position
861
861
  >>> enu = xyz_to_enu(xyz, *dxyz) # Conversion to ENU at reference position
862
862
  >>> enu
863
- (np.float64(0.0), np.float64(0.0), np.float64(1.0))
863
+ (0.0, 0.0, 1.0)
864
864
 
865
865
  >>> enu = (0.5, 0.5, 1.0)
866
866
  >>> dxyz = enu_to_ecef(0, 0, *enu)
867
867
  >>> dxyz
868
- (np.float64(1.0), np.float64(0.5), np.float64(0.5))
868
+ (1.0, 0.5, 0.5)
869
869
  >>> xyz_to_enu(xyz, *dxyz) == enu
870
870
  True
871
871
  """
@@ -886,16 +886,16 @@ def ecef_to_enu(longitude_deg, latitude_deg, x, y, z, matrix=None):
886
886
 
887
887
  >>> dxyz = (1, 0, 0)
888
888
  >>> ecef_to_enu(0, 0, *dxyz)
889
- (np.float64(0.0), np.float64(0.0), np.float64(1.0))
889
+ (0.0, 0.0, 1.0)
890
890
 
891
891
  >>> dxyz = (1, 0.5, 0.5)
892
892
  >>> ecef_to_enu(0, 0, *dxyz)
893
- (np.float64(0.5), np.float64(0.5), np.float64(1.0))
893
+ (0.5, 0.5, 1.0)
894
894
 
895
895
  >>> enu = (0.5, 0.5, 1)
896
896
  >>> dxyz = enu_to_ecef(0, 0, *enu)
897
897
  >>> dxyz
898
- (np.float64(1.0), np.float64(0.5), np.float64(0.5))
898
+ (1.0, 0.5, 0.5)
899
899
  >>> ecef_to_enu(0, 0, *dxyz) == enu
900
900
  True
901
901
  """
pygnss/nequick.py ADDED
@@ -0,0 +1,133 @@
1
+ import datetime
2
+ import math
3
+ from typing import List
4
+
5
+ import numpy as np
6
+
7
+ import nequick
8
+
9
+
10
+ class GimIonexHandler(nequick.GimHandler):
11
+ """
12
+ A handler that accumulates GIMs and then generates an IONEX file
13
+ """
14
+
15
+ def __init__(self, coeffs: nequick.Coefficients):
16
+ self._coeffs = coeffs
17
+ self._gims: List[nequick.gim.Gim] = []
18
+
19
+ def process(self, gim: nequick.Gim):
20
+ """
21
+ Store the incoming gim for later process
22
+ """
23
+
24
+ # Check that the latitude and longitude values are
25
+ # the same as the last appended gim
26
+ if len(self._gims) > 0:
27
+ last_gim = self._gims[-1]
28
+ if np.array_equal(last_gim.latitudes, gim.latitudes) == False:
29
+ raise ValueError("Latitude values do not match")
30
+ if np.array_equal(last_gim.longitudes, gim.longitudes) == False:
31
+ raise ValueError("Longitude values do not match")
32
+
33
+ self._gims.append(gim)
34
+
35
+ def to_ionex(self, pgm: str = "pygnss", runby: str = "pygnss") -> str:
36
+
37
+ EXPONENT = -1
38
+
39
+ # Sort the IONEX files by epoch
40
+ self._gims.sort(key=lambda gim: gim.epoch)
41
+
42
+ first_epoch = self._gims[0].epoch
43
+ last_epoch = self._gims[-1].epoch
44
+ n_maps = len(self._gims)
45
+
46
+ lat_0 = self._gims[0].latitudes[0]
47
+ lat_1 = self._gims[0].latitudes[-1]
48
+ dlat = self._gims[0].latitudes[1] - self._gims[0].latitudes[0]
49
+
50
+ # We will print the map from North to South, therefore check if the
51
+ # latitudes need to be reversed
52
+ latitude_reversal = lat_0 < lat_1
53
+ if latitude_reversal:
54
+ lat_0 = self._gims[0].latitudes[-1]
55
+ lat_1 = self._gims[0].latitudes[0]
56
+ dlat = self._gims[0].latitudes[0] - self._gims[0].latitudes[1]
57
+
58
+ lon_0 = self._gims[0].longitudes[0]
59
+ lon_1 = self._gims[0].longitudes[-1]
60
+ dlon = self._gims[0].longitudes[1] - self._gims[0].longitudes[0]
61
+
62
+ doc = ""
63
+
64
+ # Header
65
+ today = datetime.datetime.now()
66
+ epoch_str = today.strftime('%d-%b-%y %H:%M')
67
+
68
+ doc +=" 1.0 IONOSPHERE MAPS NEQUICK IONEX VERSION / TYPE\n"
69
+ doc +=f"{pgm[:20]:<20}{runby[:20]:<20}{epoch_str[:20]:<20}PGM / RUN BY / DATE\n"
70
+ doc +="Maps computed using the NeQuick model with the following COMMENT\n"
71
+ doc +="coefficients: COMMENT\n"
72
+ doc += f"{EXPONENT:>6} EXPONENT\n"
73
+ doc +=f"a0={self._coeffs.a0:<17.6f}a1={self._coeffs.a1:<17.8f}a2={self._coeffs.a2:<17.11f}COMMENT\n"
74
+ doc += first_epoch.strftime(" %Y %m %d %H %M %S EPOCH OF FIRST MAP\n")
75
+ doc += last_epoch.strftime(" %Y %m %d %H %M %S EPOCH OF LAST MAP\n")
76
+ doc += " 0 INTERVAL\n"
77
+ doc += f"{n_maps:>6} # OF MAPS IN FILE\n"
78
+ doc += " NONE MAPPING FUNCTION\n"
79
+ doc += " 0.0 ELEVATION CUTOFF\n"
80
+ doc += " OBSERVABLES USED\n"
81
+ doc += " 6371.0 BASE RADIUS\n"
82
+ doc += " 2 MAP DIMENSION\n"
83
+ doc += " 450.0 450.0 0.0 HGT1 / HGT2 / DHGT\n"
84
+ doc += f" {lat_0:6.1f}{lat_1:6.1f}{dlat:6.1f} LAT1 / LAT2 / DLAT\n"
85
+ doc += f" {lon_0:6.1f}{lon_1:6.1f}{dlon:6.1f} LON1 / LON2 / DLON\n"
86
+ doc += " END OF HEADER\n"
87
+
88
+ # Body: For each GIM file, write the VTEC values
89
+ for i, gim in enumerate(self._gims):
90
+
91
+ doc += f"{i+1:>6} START OF TEC MAP\n"
92
+ doc += gim.epoch.strftime(" %Y %m %d %H %M %S EPOCH OF CURRENT MAP\n")
93
+
94
+ n_latitudes = len(gim.latitudes)
95
+
96
+ for i_lat, lat in enumerate(gim.latitudes):
97
+
98
+ if latitude_reversal:
99
+ i_lat = n_latitudes - 1 - i_lat
100
+
101
+ lat = gim.latitudes[i_lat]
102
+ doc += f" {lat:6.1f}{lon_0:6.1f}{lon_1:6.1f}{dlon:6.1f} 450.0 LAT/LON1/LON2/DLON/H"
103
+
104
+ lat_row = gim.vtec_values[i_lat]
105
+ for i_lon, _ in enumerate(gim.longitudes):
106
+
107
+ if i_lon % 16 == 0:
108
+ doc += "\n"
109
+
110
+ vtec = lat_row[i_lon] / math.pow(10, EXPONENT)
111
+ doc += f"{int(vtec):>5d}"
112
+
113
+ doc += "\n"
114
+
115
+ doc += f"{i+1:>6} END OF TEC MAP\n"
116
+
117
+ # Tail
118
+ doc += " END OF FILE\n"
119
+
120
+ return doc
121
+
122
+ def to_ionex(coeffs: nequick.Coefficients, dates: List[datetime.datetime]) -> str:
123
+
124
+ doc = None
125
+
126
+ gim_handler = GimIonexHandler(coeffs)
127
+
128
+ for date in dates:
129
+ nequick.to_gim(coeffs, date, gim_handler=gim_handler)
130
+
131
+ doc = gim_handler.to_ionex()
132
+
133
+ return doc
pygnss/stats.py CHANGED
@@ -70,6 +70,6 @@ def rms(values: Iterable) -> float:
70
70
 
71
71
  >>> array = [1, 2, 3, 4, 5]
72
72
  >>> rms(array)
73
- np.float64(3.3166247903554)
73
+ 3.3166247903554
74
74
  """
75
75
  return np.sqrt(np.mean(np.square(values)))
@@ -1,12 +1,13 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: pygnss
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: Package with utilities and tools for GNSS data processing
5
5
  Author-email: Miquel Garcia-Fernandez <miquel@mgfernan.com>
6
6
  License: MIT
7
7
  Requires-Python: >=3.10
8
8
  Description-Content-Type: text/markdown
9
9
  License-File: LICENSE
10
+ Requires-Dist: nequick
10
11
  Requires-Dist: numpy
11
12
  Requires-Dist: pandas>=2.2
12
13
  Requires-Dist: pyarrow>=18.0.0
@@ -17,6 +18,7 @@ Requires-Dist: pytest-mocha>=0.4.0; extra == "test"
17
18
  Requires-Dist: flake8>=7.0.0; extra == "test"
18
19
  Provides-Extra: release
19
20
  Requires-Dist: python-semantic-release>=9.4.0; extra == "release"
21
+ Dynamic: license-file
20
22
 
21
23
  # GNSS and Navigation modules
22
24
 
@@ -1,36 +1,37 @@
1
- pygnss-0.2.0.dist-info/LICENSE,sha256=Wwany6RAAZ9vVHjFLA9KBJ0HE77d52s2NOUA1CPAEug,1067
2
- pygnss-0.2.0.dist-info/WHEEL,sha256=s59Ahp8cWRUA5Ovk-CMAn28LPoIpJSf8JKZA-2Q_1eA,110
3
- pygnss-0.2.0.dist-info/METADATA,sha256=Hak3b6_DXaFefbHOylzU0BfjjErmA7MxzZhbTqzSdks,1614
4
- pygnss-0.2.0.dist-info/top_level.txt,sha256=oZRSR-qOv98VW2PRRMGCVNCJmewcJjyJYmxzxfeimtg,7
5
- pygnss-0.2.0.dist-info/RECORD,,
6
- pygnss-0.2.0.dist-info/entry_points.txt,sha256=mCuKrljB_wh9ZQVROiId9m68EDbTiY1oef_L1N3IDDA,262
7
- pygnss/_c_ext.cpython-310-i386-linux-gnu.so,sha256=Byi5EAc9Q2ukAIQx1pf3Y5U_DMIhIBJuLaw8LsJ1sQY,79880
8
- pygnss/sinex.py,sha256=nErOmGCFFmGSnmWGNTJhaj3yZ6IIB8GgtW5WPypJc6U,3057
9
- pygnss/file.py,sha256=kkMBWjoTPkxJD1UgH0mXJT2fxnhU8u7_l2Ph5Xz2-hY,933
10
- pygnss/__init__.py,sha256=Zn1KFblwuFHiDRdRAiRnDBRkbPttWh44jKa5zG2ov0E,22
11
- pygnss/geodetic.py,sha256=gfVsOeEKLn2RaJYpaCk0OrQpYz6QiDPMX6PoJHEaP9Q,34029
1
+ pygnss/__init__.py,sha256=VrXpHDu3erkzwl_WXrqINBm9xWkcyUy53IQOj042dOs,22
2
+ pygnss/_c_ext.cpython-310-i386-linux-gnu.so,sha256=naP54luFlM5URiGMrl9GO76MvtUFL22sZundy9GLCXk,80356
12
3
  pygnss/cl.py,sha256=ISmd2RjikUMmj3nLPN0VSjvQLG5rLizp2X2ajeBkoDE,4509
13
4
  pygnss/constants.py,sha256=1hF6K92X6E6Ofo0rAuCBCgrwln9jxio26RV2a6vyURk,133
14
5
  pygnss/decorator.py,sha256=ldlZuvwuIlJf2pkoWteyXyp5tLds8KRkphrPsrURw9U,491
15
- pygnss/tensorial.py,sha256=aA0-0WK2MXhDUg0_8HMbECOt9cXmp3EnKFQXjdYMBXA,1598
16
- pygnss/time.py,sha256=YdMNs2xA43LrSgEOgB7jpEq0dCWv89fUBF5syDLjbu0,11178
6
+ pygnss/file.py,sha256=kkMBWjoTPkxJD1UgH0mXJT2fxnhU8u7_l2Ph5Xz2-hY,933
7
+ pygnss/geodetic.py,sha256=3q8Rpl4b5CxGlhdn1nQRBHHSW1v-0PBFz54zOeVyO74,33633
17
8
  pygnss/hatanaka.py,sha256=P9XG6bZwUzfAPYn--6-DXfFQIEefeimE7fMJm_DF5zE,1951
18
- pygnss/stats.py,sha256=mDiY0K-VTndlFEkbxTzq9PYxCOjYDYsY3ZQV0PuMREM,1924
19
- pygnss/rinex.py,sha256=LsOOh3Fc263kkM8KOUBNeMeIAmbOn2ASSBO4rAUJWj8,68783
20
9
  pygnss/logger.py,sha256=4kvcTWXPoiG-MlyP6B330l4Fu7MfCuDjuIlIiLA8f1Y,1479
21
- pygnss/gnss/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
- pygnss/gnss/types.py,sha256=lmL15KRckRiTwVkYvGzF4c1BrojnQlegrYCXSz1hGaI,10377
23
- pygnss/gnss/observables.py,sha256=0x0NLkTjxf8cO9F_f_Q1b-1hEeoNjWB2x-53ecUEv0M,1656
24
- pygnss/gnss/edit.py,sha256=T1r0WbJmt8tLJpG_IIsy4Atej6cy0IStBaSGxw0S5ho,1884
25
- pygnss/gnss/residuals.py,sha256=8qKGNOYkrqxHGOSjIfH21K82PAqEh2068kf78j5usL8,1244
26
- pygnss/filter/ukf.py,sha256=koaal4aLyYtYwPhVIvjn4uXsmSDDOQnnFEv4xenryqo,10646
10
+ pygnss/nequick.py,sha256=ewtccKH1tdh8z6iuM6yEvDCakOKbzgkMnEWh3jWg6R4,5490
11
+ pygnss/rinex.py,sha256=LsOOh3Fc263kkM8KOUBNeMeIAmbOn2ASSBO4rAUJWj8,68783
12
+ pygnss/sinex.py,sha256=nErOmGCFFmGSnmWGNTJhaj3yZ6IIB8GgtW5WPypJc6U,3057
13
+ pygnss/stats.py,sha256=GYZfcyDvbM9xamWIyVlqyN5-DPJzTLJrybRrcNV6Z6o,1912
14
+ pygnss/tensorial.py,sha256=aA0-0WK2MXhDUg0_8HMbECOt9cXmp3EnKFQXjdYMBXA,1598
15
+ pygnss/time.py,sha256=YdMNs2xA43LrSgEOgB7jpEq0dCWv89fUBF5syDLjbu0,11178
16
+ pygnss/_c_ext/src/hatanaka.c,sha256=YNWaMzQQQnTNls5J6TMNuyhlq505NGDfzU-MJAHab8Q,2520
17
+ pygnss/_c_ext/src/helpers.c,sha256=gINr73ktRgox_S7fYdFR58lLqAUACRpJfog4M5BW1-Q,364
18
+ pygnss/_c_ext/src/mtable_init.c,sha256=5w869E6PX-ca9UHhKBxLFRW694-VaNwGlMs0I5v99mk,1132
27
19
  pygnss/filter/__init__.py,sha256=0gGBaZZgaFSiTxt0Mycn0oGZjJyATo8AAAgXhxh9k6c,1850
28
20
  pygnss/filter/ekf.py,sha256=D-qtalFRguVj4HcOtCtE0lGGXtVibC7qg-AZhKjmwgM,2017
29
21
  pygnss/filter/models.py,sha256=gXq7-YBcAoDq4-7Wr0ChNWxwXr9m1EEhUnlLtKVlsAQ,2165
22
+ pygnss/filter/ukf.py,sha256=koaal4aLyYtYwPhVIvjn4uXsmSDDOQnnFEv4xenryqo,10646
23
+ pygnss/gnss/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
+ pygnss/gnss/edit.py,sha256=T1r0WbJmt8tLJpG_IIsy4Atej6cy0IStBaSGxw0S5ho,1884
25
+ pygnss/gnss/observables.py,sha256=0x0NLkTjxf8cO9F_f_Q1b-1hEeoNjWB2x-53ecUEv0M,1656
26
+ pygnss/gnss/residuals.py,sha256=8qKGNOYkrqxHGOSjIfH21K82PAqEh2068kf78j5usL8,1244
27
+ pygnss/gnss/types.py,sha256=lmL15KRckRiTwVkYvGzF4c1BrojnQlegrYCXSz1hGaI,10377
30
28
  pygnss/orbit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
29
  pygnss/orbit/kepler.py,sha256=QORTgg5yBtsQXxLWSzoZ1pmh-CwPiZlFdIYqhQhv1a0,1745
32
30
  pygnss/orbit/tle.py,sha256=6CIEielPgui3DXNv46XxOGlig31ROIwjH42xLGaeE5M,5905
33
- pygnss/_c_ext/src/hatanaka.c,sha256=YNWaMzQQQnTNls5J6TMNuyhlq505NGDfzU-MJAHab8Q,2520
34
- pygnss/_c_ext/src/helpers.c,sha256=gINr73ktRgox_S7fYdFR58lLqAUACRpJfog4M5BW1-Q,364
35
- pygnss/_c_ext/src/mtable_init.c,sha256=5w869E6PX-ca9UHhKBxLFRW694-VaNwGlMs0I5v99mk,1132
36
31
  pygnss/parsers/rtklib/stats.py,sha256=YV6yadxMeQMQYZvsUCaSf4ZTpK8Bbv3f2xgu0l4PekA,5449
32
+ pygnss-0.3.0.dist-info/METADATA,sha256=kDz5U4Y1CzGww42HgE5Fkj05KGNXZOs1SkYhuiHmPL8,1659
33
+ pygnss-0.3.0.dist-info/WHEEL,sha256=jUtiY_FpDXzE1gj-Bw548k9m-xJORiWhDK-vIohHdUY,110
34
+ pygnss-0.3.0.dist-info/entry_points.txt,sha256=mCuKrljB_wh9ZQVROiId9m68EDbTiY1oef_L1N3IDDA,262
35
+ pygnss-0.3.0.dist-info/top_level.txt,sha256=oZRSR-qOv98VW2PRRMGCVNCJmewcJjyJYmxzxfeimtg,7
36
+ pygnss-0.3.0.dist-info/RECORD,,
37
+ pygnss-0.3.0.dist-info/licenses/LICENSE,sha256=Wwany6RAAZ9vVHjFLA9KBJ0HE77d52s2NOUA1CPAEug,1067
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.0)
2
+ Generator: setuptools (77.0.3)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp310-cp310-musllinux_1_2_i686
5
5