Skip to content

Commit 2c5db99

Browse files
committed
Added more tutorials
1 parent ec56c42 commit 2c5db99

File tree

8 files changed

+174
-11
lines changed

8 files changed

+174
-11
lines changed

docs/community/authors.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ GeodePy is developed and maintained by the Geoscience Australia National Geodesy
77
* **Josh Batchelor** - Initial Work, Geodesy and Surveying - `BatchelorJ <https://github.com/BatchelorJ>`_
88
* **Jonathan Mettes** - Testing, Integration and Development - `jmettes <https://github.com/jmettes>`_
99
* **Jack McCubbine** - Height Module - `JackMcCubbineGA <https://github.com/JackMcCubbineGA>`_
10-
* **Kyran Cook** - Documentation and Uplift - `KyranCookGA <https://github.com/KyranCookGA>`_
10+
* **Kyran Cook** - Documentation and Uplift - `Kyran-Cook <https://github.com/Kyran-Cook>`_
1111

1212
See also the list of `contributors <https://github.com/GeoscienceAustralia/geodepy/graphs/contributors>`_ who have participated in this project.

docs/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
'custom.js',
5959
]
6060
html_favicon = '_static/favicon.ico'
61-
html_title = "GeodePy: Geodesy in Python -- v" + release + " Documentation"
61+
em_dash_char = chr(8212)
62+
html_title = "GeodePy: Geodesy in Python " + em_dash_char+ " v" + release + " Documentation"
6263
ogp_site_name = "GeodePy: Geodesy in Python"
6364
html_extra_path = ["_static/robots.txt", "_static/sitemap.xml"]

docs/index.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,7 @@ This section contains information for contributors to the GeodePy project.
6464
community/authors
6565

6666
.. meta::
67-
:google-site-verification: i5FHdaluOAMrReuJqp3xes1IEXOpwgcMMBriCqpU0lE
67+
:google-site-verification: i5FHdaluOAMrReuJqp3xes1IEXOpwgcMMBriCqpU0lE
68+
:description lang=en:
69+
GeodePy: A Python library for geodetic computations, coordinate transformations,
70+
and surveying tools. Includes tutorials, installation guides, and examples for geospatial professionals.
Lines changed: 93 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,96 @@
11
.. _tutorials/edm:
22

33
EDM Corrections
4-
================
4+
================
5+
6+
Within GeodePy, EDM corrections can be completed. To complete an EDM correction the following data is needed.
7+
8+
- Carrier wavelength of instrument
9+
- Modulation frequency and unit length or reference refractive index
10+
- Distance measured
11+
- Zentith angle
12+
- Temperature
13+
- Pressure
14+
- Relative humidity
15+
- (Optional) Co2 ppm
16+
17+
Using these we can calculate the first velocity correction and reduce to a horizontal distance.
18+
19+
First the variables need to be defined. Below is the values for a Lecia Viva
20+
21+
.. code:: python
22+
23+
import geodepy.survey
24+
25+
wavelength = 0.658 #micrometers
26+
modFreq = 9.9902213*10e6 #hz
27+
unitLength = 1.5 #m
28+
dist = 145.265 #m
29+
zAngle = 91.15678 #dec
30+
temp = 26 #°c
31+
pressure = 1010.8 #hPa
32+
relHum = 37 #%
33+
co2ppm = 345 #ppm
34+
35+
First Velocity Parameters
36+
-------------------------
37+
38+
Now we can calculate the first velocity parameters
39+
40+
.. code:: python
41+
42+
params = first_vel_params(wavelength, modFreq, None, unitLength)
43+
44+
print(params)
45+
46+
>>(286.3433 80.6752)
47+
48+
First Velocity Correction
49+
-------------------------
50+
51+
Using these parameters we can calculate the first velocity correction.
52+
53+
.. code:: python
54+
55+
correction = geodepy.survey.first_vel_corrn(dist, params, temp, pressure, relHum)
56+
57+
print(correction)
58+
59+
>>0.0020656
60+
61+
Now this an be applied to the distance to get a corrected distance.
62+
63+
.. code:: python
64+
65+
corrDist = dist + correction
66+
67+
print(corrDist)
68+
69+
>>145.2670656
70+
71+
The first velocity correction can also be calculated using the Co2 ppm.
72+
This gives a more accurate result but requires the co2 ppm and the wavelength.
73+
74+
.. code:: python
75+
76+
correction2 = geodepy.survey.first_vel_corrn(dist, params, temp, pressure, relHum,
77+
wavelength=wavelength, CO2_ppm=co2ppm)
78+
79+
print(correction2)
80+
81+
print(dist + correction2)
82+
83+
>>0.0020756
84+
>>145.2670756
85+
86+
Now the horizontal distacne can be found. The first correctedditance will be used for this.
87+
88+
.. code:: python
89+
90+
horzDist = geodepy.survey.va_conv(zAngle, corrDist)
91+
92+
print(horzDist)
93+
94+
>>(-1.15678, 145.2670656, 145.2374597, -2.9326875)
95+
96+
Where the third value in the tuple is the horizontal distance and the last value is the change in height.

docs/tutorials/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ Tutorials
88

99
anglestut
1010
coordtut
11+
vincentytut
1112
edmcorrectiontut
1213
errortut
1314
sinextut
1415
transformtut
1516
timedeptranstut
16-
verticaldatumtut
17-
vincentytut
17+
verticaldatumtut

docs/tutorials/vincentytut.rst

Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,69 @@
11
.. _tutorials/vincenty:
22

3-
Vincenty Formula
4-
================
3+
Connecting Two Points
4+
=====================
5+
6+
GeodePy has the ability to calculate the relationship between two points in two different ways, either on a flat plane or curved plane.
7+
8+
Flat plane
9+
----------
10+
11+
To calculate the distance and bearing between two points the following command can be used.
12+
13+
.. code:: python
14+
15+
import geodepy.survey
16+
import geodepy.angles
17+
18+
connection = geodepy.survey.joins(696053.337, 6086610.13, 696770.781, 6086089.772)
19+
bearing = connection[1]
20+
bearing = geodepy.angles.dec2dms(bearing)
21+
22+
print(f"The connection is: {connection[0]:.4f} @ {bearing}")
23+
24+
>>The connection is: 886.2834 @ 125 57 11.37834570
25+
26+
Here the first number is distance while the second is the bearing. It might look clearer when converting the bearng to DMS
27+
28+
You can also determine the coordinate of a second point given first coordinate and a bearing and distance.
29+
30+
.. code:: python
31+
32+
coord = geodepy.survey.radiations(696053.337, 6086610.13, bearing.dec(), 886.2834)
33+
print(f"The point 2 coord is: {coord[0]:.3f} {coord[1]:.3f}")
34+
35+
>>The point 2 coord is: 696770.781 6086089.772
36+
37+
As can be seen this value matches the coordinate of the second point entered in the joins function.
38+
39+
Curved Plane
40+
------------
41+
42+
To calculate the joins between two points on a curved plan vincenty's formula can be used. In this example we will
43+
use the utm vincenty functions but tihs same process can be undertaken using the normal formulas and lat and longs.
44+
45+
.. code:: python
46+
47+
import geodepy.geodesy
48+
import geodepy.angles
49+
50+
connection2 = geodepy.geodesy.vincinv_utm(55, 696053.337, 6086610.13, 55, 696770.781, 6086089.772)
51+
bearing2 = connection2[1]
52+
bearing2 = geodepy.angles.dec2dms(bearing2)
53+
54+
print(f"The connection is: {connection2[0]:.4f} @ {bearing2}")
55+
56+
>>The connection is: 886.2839 @ 125 57 11.1186109
57+
58+
As seen here the connection is slightly different between the flat and curved plane.
59+
60+
The coordinate of a second point can also be calculated.
61+
62+
.. code:: python
63+
64+
coord2 = geodepy.geodesy.vincdir_utm(55, 696053.337, 6086610.13, bearing2.dec(), 886.2839)
65+
print(f"The point 2 coord is: {coord2[1]:.3f} {coord2[2]:.3f}")
66+
67+
>>The point 2 coord is: 696770.781 6086089.772
68+
69+
Again it can be seen that this coordinate matches what was entered earlier.

geodepy/statistics.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,9 @@ def error_ellipse(vcv):
119119
def relative_error(lat, lon, var1, var2, cov12):
120120
"""
121121
Function to compute relative error between two 3D stations:
122-
- 2D relative error ellipse [semi-major axis, semi-minor axis, bearing]
123-
- 1D relative 'up' error
122+
123+
* 2D relative error ellipse [semi-major axis, semi-minor axis, bearing]
124+
* 1D relative 'up' error
124125
125126
Adapted from Harvey B.R. (1998) Practical least squares and statistics for surveyors,
126127
Monograph 13, Section 4.4, p.135

geodepy/survey.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def part_h2o_vap_press(dry_temp, pressure, rel_humidity=None, wet_temp=None):
5353
:param pressure: Observed Pressure (hectopascals or millibars)
5454
:param rel_humidity: Observed Relative Humidity (percentage) - Optional if wet_temp supplied
5555
:param wet_temp: Observed Wet Temperature (degrees Celsius) - Optional if rel_humidity supplied
56+
:return: Partial water vapour pressure
5657
5758
"""
5859

@@ -96,7 +97,7 @@ def first_vel_corrn(
9697
:param temp: Observed Temperature (degrees Celsius)
9798
:param pressure: Observed Pressure (hectopascals or millibars)
9899
:param rel_humidity: Observed Relative Humidity (percentage)
99-
:return: Slope Distance with First Velocity Correction applied
100+
:return: First Velocity Correction
100101
"""
101102
param_c = first_vel_param[0]
102103
if not CO2_ppm:

0 commit comments

Comments
 (0)