Debian Codegraph @

man/Geod3Solve.1.html

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 <?xml version="1.0" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head><link href="http://search.cpan.org/s/style.css" rel="stylesheet" type="text/css">
5 <title>Geod3Solve(1)</title>
6 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7 <link rev="made" href="mailto:root@localhost" />
8 </head>
9
10 <body>
11
12
13
14 <h1 id="NAME">NAME</h1>
15
16 <p>Geod3Solve -- perform geodesic calculations on a triaxial ellipsoid</p>
17
18 <h1 id="SYNOPSIS">SYNOPSIS</h1>
19
20 <p><b>Geod3Solve</b> [ <b>-i</b> | <b>-L</b> <i>bet1</i> <i>omg1</i> <i>alp1</i> ] [ <b>-t</b> <i>a</i> <i>b</i> <i>c</i> | <b>-e</b> <i>b</i> <i>e2</i> <i>k2</i> <i>kp2</i> | <b>-e2</b> <i>b</i> <i>f</i> ] [ <b>-u</b> ] [ <b>-d</b> | <b>-:</b> ] [ <b>-w</b> ] [ <b>-f</b> ] [ <b>-p</b> <i>prec</i> ] [ <b>--comment-delimiter</b> <i>commentdelim</i> ] [ <b>--version</b> | <b>-h</b> | <b>--help</b> ] [ <b>--input-file</b> <i>infile</i> | <b>--input-string</b> <i>instring</i> ] [ <b>--line-separator</b> <i>linesep</i> ] [ <b>--output-file</b> <i>outfile</i> ]</p>
21
22 <h1 id="DESCRIPTION">DESCRIPTION</h1>
23
24 <p>The shortest path between two points on a triaxial ellipsoid at (<i>bet1</i>, <i>omg1</i>) and (<i>bet2</i>, <i>omg2</i>) is called the geodesic. Its length is <i>s12</i> and the geodesic from point 1 to point 2 has forward azimuths <i>alp1</i> and <i>alp2</i> at the two end points. Here <i>bet</i> and <i>omg</i> denote the ellipsoidal latitude, <i>beta</i>, and longitude, <i>omega</i>; <i>alp</i> is an abbreviation of <i>alpha</i></p>
25
26 <p><b>Geod3Solve</b> operates in one of three modes:</p>
27
28 <ol>
29
30 <li><p>By default, <b>Geod3Solve</b> accepts lines on the standard input containing <i>bet1</i> <i>omg1</i> <i>alp1</i> <i>s12</i> and prints <i>bet2</i> <i>omg2</i> <i>alp2</i> on standard output. This is the direct geodesic calculation.</p>
31
32 </li>
33 <li><p>With the <b>-i</b> option, <b>Geod3Solve</b> performs the inverse geodesic calculation. It reads lines containing <i>bet1</i> <i>omg1</i> <i>bet2</i> <i>omg2</i> and prints the corresponding values of <i>alp1</i> <i>alp2</i> <i>s12</i>.</p>
34
35 </li>
36 <li><p>Command line arguments <b>-L</b> <i>bet1</i> <i>omg1</i> <i>alp1</i> specify a geodesic line. <b>Geod3Solve</b> then accepts a sequence of <i>s12</i> values (one per line) on standard input and prints <i>bet2</i> <i>omg2</i> <i>alp2</i> for each. This generates a sequence of points on a single geodesic.</p>
37
38 </li>
39 </ol>
40
41 <h1 id="OPTIONS">OPTIONS</h1>
42
43 <dl>
44
45 <dt id="i"><b>-i</b></dt>
46 <dd>
47
48 <p>perform an inverse geodesic calculation (see 2 above).</p>
49
50 </dd>
51 <dt id="L-bet1-omg1-alp1"><b>-L</b> <i>bet1</i> <i>omg1</i> <i>alp1</i></dt>
52 <dd>
53
54 <p>line mode (see 3 above); generate a sequence of points along the geodesic specified by <i>bet1</i> <i>omg1</i> <i>alp1</i>. The <b>-w</b> flag can be used to swap the default order of the 2 geographic coordinates, provided that it appears before <b>-L</b>.</p>
55
56 </dd>
57 <dt id="t-a-b-c"><b>-t</b> <i>a</i> <i>b</i> <i>c</i></dt>
58 <dd>
59
60 <p>specify the ellipsoid via its major semiaxis <i>a</i>, median semiaxis <i>b</i>, and minor semixis <i>c</i>. By default, we have <i>a</i> = 6378172 m, <i>b</i> = 6378102 m, <i>c</i> = 6356752 m, an approximate triaxial model of the earth. (With this model <i>omg</i> = 0deg, corresponds to <i>lon</i> = -14.93deg.</p>
61
62 </dd>
63 <dt id="e-b-e2-k2-kp2"><b>-e</b> <i>b</i> <i>e2</i> <i>k2</i> <i>kp2</i></dt>
64 <dd>
65
66 <p>specify the ellipsoid via the median semiaxis, <i>b</i> and the shape parameters <i>e2</i> = (<i>a</i>^2 - <i>c</i>^2)/<i>b</i>^2, <i>k2</i> = (<i>b</i>^2 - <i>c</i>^2)/(<i>a</i>^2 - <i>c</i>^2), and <i>kp2</i> = (<i>a</i>^2 - <i>b</i>^2)/(<i>a</i>^2 - <i>c</i>^2). Simple fractions are allowed for <i>e2</i>, <i>k2</i>, and <i>kp2</i>. Internally, the supplied values of <i>k2</i> and <i>kp2</i> are normalized so that <i>k2</i> + <i>kp2</i> = 1.</p>
67
68 </dd>
69 <dt id="e2-b-f"><b>-e2</b> <i>b</i> <i>f</i></dt>
70 <dd>
71
72 <p>specify a biaxial ellipsoid via its equatorial radius <i>b</i> and flattening <i>f</i>. A simple fraction, is allowed for <i>f</i>. In this mode, latitudes are interpreted as geodetic latitudes on both input and output. If <i>f</i> is negative, <i>bet</i> and <i>omg</i> are swapped so that latitude and longitude have their conventional interpretations (e.g., longitude measures the angle about the axis of symmetry).</p>
73
74 </dd>
75 <dt id="u"><b>-u</b></dt>
76 <dd>
77
78 <p>unroll the latitude and longitude. Normally, on output latitudes and longitudes are reduced to lie in [-90deg,90deg] and [-180deg,180deg) respectively. However with this option, the returned longitude <i>bet2</i> and <i>omg2</i> are &quot;unrolled&quot; so that <i>bet2</i> - <i>bet1</i> and <i>omg2</i> - <i>omg1</i> indicates how often and in what sense the geodesic has encircled the ellipsoid.</p>
79
80 </dd>
81 <dt id="d"><b>-d</b></dt>
82 <dd>
83
84 <p>output angles as degrees, minutes, seconds instead of decimal degrees.</p>
85
86 </dd>
87 <dt id="pod"><b>-:</b></dt>
88 <dd>
89
90 <p>like <b>-d</b>, except use : as a separator instead of the d, &#39;, and &quot; delimiters.</p>
91
92 </dd>
93 <dt id="w"><b>-w</b></dt>
94 <dd>
95
96 <p>toggle the longitude first flag (it starts off); if the flag is on, then on input and output, longitude precedes latitude (except that, on input, this can be overridden by a hemisphere designator, <i>N</i>, <i>S</i>, <i>E</i>, <i>W</i>).</p>
97
98 </dd>
99 <dt id="f"><b>-f</b></dt>
100 <dd>
101
102 <p>full output; each line of output consists of 7 quantities: <i>bet1</i> <i>omg1</i> <i>alp1</i> <i>bet2</i> <i>omg2</i> <i>alp2</i> <i>s12</i>.</p>
103
104 </dd>
105 <dt id="p-prec"><b>-p</b> <i>prec</i></dt>
106 <dd>
107
108 <p>set the output precision to <i>prec</i> (default 3). For distances, <i>prec</i> is the number of digits after the decimal point for ellipsoids which are approximately the same size as the Earth; for other ellipsoids the precision is adjusted to retain the same relative precision. For latitudes and longitudes (in degrees), the number of digits after the decimal point is <i>prec</i> + 5. For cartesian directions, the precision is <i>prec</i> + 7.</p>
109
110 </dd>
111 <dt id="comment-delimiter-commentdelim"><b>--comment-delimiter</b> <i>commentdelim</i></dt>
112 <dd>
113
114 <p>set the comment delimiter to <i>commentdelim</i> (e.g., &quot;#&quot; or &quot;//&quot;). If set, the input lines will be scanned for this delimiter and, if found, the delimiter and the rest of the line will be removed prior to processing and subsequently appended to the output line (separated by a space).</p>
115
116 </dd>
117 <dt id="version"><b>--version</b></dt>
118 <dd>
119
120 <p>print version and exit.</p>
121
122 </dd>
123 <dt id="h"><b>-h</b></dt>
124 <dd>
125
126 <p>print usage and exit.</p>
127
128 </dd>
129 <dt id="help"><b>--help</b></dt>
130 <dd>
131
132 <p>print full documentation and exit.</p>
133
134 </dd>
135 <dt id="input-file-infile"><b>--input-file</b> <i>infile</i></dt>
136 <dd>
137
138 <p>read input from the file <i>infile</i> instead of from standard input; a file name of &quot;-&quot; stands for standard input.</p>
139
140 </dd>
141 <dt id="input-string-instring"><b>--input-string</b> <i>instring</i></dt>
142 <dd>
143
144 <p>read input from the string <i>instring</i> instead of from standard input. All occurrences of the line separator character (default is a semicolon) in <i>instring</i> are converted to newlines before the reading begins.</p>
145
146 </dd>
147 <dt id="line-separator-linesep"><b>--line-separator</b> <i>linesep</i></dt>
148 <dd>
149
150 <p>set the line separator character to <i>linesep</i>. By default this is a semicolon.</p>
151
152 </dd>
153 <dt id="output-file-outfile"><b>--output-file</b> <i>outfile</i></dt>
154 <dd>
155
156 <p>write output to the file <i>outfile</i> instead of to standard output; a file name of &quot;-&quot; stands for standard output.</p>
157
158 </dd>
159 </dl>
160
161 <h1 id="INPUT">INPUT</h1>
162
163 <p><b>Geod3Solve</b> measures all angles in degrees and all lengths (<i>s12</i>) in meters. On input angles (latitude, longitude, azimuth) can be as decimal degrees or degrees, minutes, seconds. For example, <code>40d30</code>, <code>40d30&#39;</code>, <code>40:30</code>, <code>40.5d</code>, and <code>40.5</code> are all equivalent. By default, latitude precedes longitude for each point (the <b>-w</b> flag switches this convention); however on input either may be given first by appending (or prepending) <i>N</i> or <i>S</i> to the latitude and <i>E</i> or <i>W</i> to the longitude. Azimuths are measured clockwise from north; however this may be overridden with <i>E</i> or <i>W</i>.</p>
164
165 <p>For details on the allowed formats for angles, see the <code>GEOGRAPHIC COORDINATES</code> section of GeoConvert(1).</p>
166
167 <h1 id="ERRORS">ERRORS</h1>
168
169 <p>An illegal line of input will print an error message to standard output beginning with <code>ERROR:</code> and causes <b>Geod3Solve</b> to return an exit code of 1. However, an error does not cause <b>Geod3Solve</b> to terminate; following lines will be converted.</p>
170
171 <h1 id="EXAMPLES">EXAMPLES</h1>
172
173 <p>Route from JFK Airport to Singapore Changi Airport on a triaxial ellipsoid:</p>
174
175 <pre><code>echo 40:38:23N 073:46:44W-19.43W X 01:21:33N 103:59:22E-19.43W |
176 tr X &#39;\n&#39; |
177 tools/Cart3Convert -G | tools/Cart3Convert -E -r | tr &#39;\n&#39; &#39; &#39; |
178 tools/Geod3Solve -i -: -p 0
179 =&gt; 003:15:05.9 177:27:09.0 15339505</code></pre>
180
181 <p>The steps here are shift for longitude of major axis (-19.43d), convert to geocentric for biaxial Earth, convert to ellipsoidal for triaxial Earth, compute geodesic distance.</p>
182
183 <h1 id="SEE-ALSO">SEE ALSO</h1>
184
185 <p>Cart3Convert(1).</p>
186
187 <p>The algorithms are described in C. F. F. Karney, <i>Jacobi&#39;s solution for geodesics on a triaxial ellipsoid</i>, Technical Report, SRI International, Nov. 2025, <a href="https://arxiv.org/abs/2511.01621">https://arxiv.org/abs/2511.01621</a>.</p>
188
189 <p>The Wikipedia page, Geodesics on an ellipsoid, <a href="https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid">https://en.wikipedia.org/wiki/Geodesics_on_an_ellipsoid</a>.</p>
190
191 <h1 id="AUTHOR">AUTHOR</h1>
192
193 <p><b>Geod3Solve</b> was written by Charles Karney.</p>
194
195 <h1 id="HISTORY">HISTORY</h1>
196
197 <p><b>Geod3Solve</b> was added to GeographicLib, <a href="https://geographiclib.sourceforge.io">https://geographiclib.sourceforge.io</a>, in version 2.6.</p>
198
199
200 </body>
201
202 </html>
203
204