Skip to content

Commit 699699a

Browse files
committed
2.8: atmospheric refractive index
1 parent e7b4945 commit 699699a

File tree

10 files changed

+57
-43
lines changed

10 files changed

+57
-43
lines changed

man/man1/geodeform500.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "GeoDeform500" 1 2.7 "22 Nov 2021" "User Manual"
1+
.TH "GeoDeform500" 1 2.8 "15 Dec 2021" "User Manual"
22

33
.SH NAME
44
geodeform500
@@ -67,8 +67,8 @@ report-file
6767
geodeform500 doc/gps.dat gpsout.dat
6868

6969
.SH COPYRIGHT
70-
Copyright 2018-2021 zvezdochiot.
71-
All rights reserved.
70+
Public Domain Mark 1.0
71+
No Copyright
7272

7373
.SH SEE ALSO
7474
geoeasy

man/man1/geofindkey.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "GeoFindKey" 1 2.7 "22 Nov 2021" "User Manual"
1+
.TH "GeoFindKey" 1 2.8 "15 Dec 2021" "User Manual"
22

33
.SH NAME
44
geofindkey
@@ -69,8 +69,8 @@ report-file
6969
geofindkey doc/data.dat report.dat
7070

7171
.SH COPYRIGHT
72-
Copyright 2018-2021 zvezdochiot.
73-
All rights reserved.
72+
Public Domain Mark 1.0
73+
No Copyright
7474

7575
.SH SEE ALSO
7676
geoeasy

man/man1/geofindkey2p.1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "GeoFindKey2Pow" 1 2.7 "22 Nov 2021" "User Manual"
1+
.TH "GeoFindKey2Pow" 1 2.8 "15 Dec 2021" "User Manual"
22

33
.SH NAME
44
geofindkey2p
@@ -12,7 +12,7 @@ geofindkey2p [option] input-file report-file
1212
.SH OPTIONS
1313
.TP
1414
-d N
15-
number of decimals in the result coordinates, default 4
15+
number of decimals in the result coordinates, default=4
1616
.TP
1717
-h
1818
help
@@ -66,8 +66,8 @@ report-file
6666
geofindkey2p doc/data.dat report.dat
6767

6868
.SH COPYRIGHT
69-
Copyright 2018-2021 zvezdochiot.
70-
All rights reserved.
69+
Public Domain Mark 1.0
70+
No Copyright
7171

7272
.SH SEE ALSO
7373
geoeasy

man/man1/geositer500.1

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "GeoSIter500" 1 2.7 "22 Nov 2021" "User Manual"
1+
.TH "GeoSIter500" 1 2.8 "15 Dec 2021" "User Manual"
22

33
.SH NAME
44
geositer500
@@ -11,6 +11,9 @@ geositer500 [option] input-file report-file
1111

1212
.SH OPTIONS
1313
.TP
14+
-a N.N
15+
atmospheric refractive index, default=0.0
16+
.TP
1417
-d N
1518
number of decimals in the result coordinates, default=4
1619
.TP
@@ -63,8 +66,8 @@ report-file
6366
geositer500 doc/szbunknow.dat szb.dat
6467

6568
.SH COPYRIGHT
66-
Copyright 2018-2021 zvezdochiot.
67-
All rights reserved.
69+
Public Domain Mark 1.0
70+
No Copyright
6871

6972
.SH SEE ALSO
7073
geoeasy

man/man1/geoszbtoyxh.1

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH "GeoSZBtoYXH" 1 2.7 "22 Nov 2021" "User Manual"
1+
.TH "GeoSZBtoYXH" 1 2.8 "15 Dec 2021" "User Manual"
22

33
.SH NAME
44
geoszbtoyxh
@@ -11,8 +11,11 @@ geoszbtoyxh [options] [input-file [report-file]]
1111

1212
.SH OPTIONS
1313
.TP
14+
-a N.N
15+
atmospheric refractive index, default=0.0
16+
.TP
1417
-d N
15-
number of decimals in the result coordinates, default 4
18+
number of decimals in the result coordinates, default=4
1619
.TP
1720
-r N.N
1821
radius Earth, default=6370009.0
@@ -63,8 +66,8 @@ report-file optional, default stdout
6366
geoszbtoyxh doc/szb.dat yxh.dat
6467

6568
.SH COPYRIGHT
66-
Copyright 2018-2021 zvezdochiot.
67-
All rights reserved.
69+
Public Domain Mark 1.0
70+
No Copyright
6871

6972
.SH SEE ALSO
7073
geoeasy

src/geodeform500.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Name: geodeform500.c
3-
Version: 2.7
4-
Date: 2021-11-22
3+
Version: 2.8
4+
Date: 2021-12-15
55
Author: zvezdochiot (https://github.com/zvezdochiot)
66
*
77
build:
@@ -57,7 +57,7 @@ C* 2748.8080 5314.0580 109.8550 2749.1000 5314.5570 110.5850
5757
#include <unistd.h>
5858

5959
#define PNAME "GeoDeform500"
60-
#define PVERSION "2.7"
60+
#define PVERSION "2.8"
6161

6262
#define defEps 0.000001
6363
#define defMode "CONST"

src/geofindkey.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*
22
Name: geofindkey.c
33
OldName: findkey.c
4-
Version: 2.7
5-
Date: 2021-11-22
4+
Version: 2.8
5+
Date: 2021-12-15
66
Author: Игорь Белов (https://gis-lab.info/forum/memberlist.php?mode=viewprofile&u=10457)
77
Author: zvezdochiot (https://github.com/zvezdochiot)
88
Author: Zoltan Siki (https://github.com/zsiki)
@@ -62,7 +62,7 @@ output file report.dat:
6262
#include <unistd.h>
6363

6464
#define PNAME "GeoFindKey"
65-
#define PVERSION "2.7"
65+
#define PVERSION "2.8"
6666

6767
#define defMScale "NORM"
6868
#define defREarth 6370009.0

src/geofindkey2p.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Name: geofindkey2p.c
3-
Version: 2.7
4-
Date: 2021-11-22
3+
Version: 2.8
4+
Date: 2021-12-15
55
Author: zvezdochiot (https://github.com/zvezdochiot)
66
*
77
build:
@@ -61,7 +61,7 @@ output file report.dat:
6161
#include <unistd.h>
6262

6363
#define PNAME "GeoFindKey2Pow"
64-
#define PVERSION "2.7"
64+
#define PVERSION "2.8"
6565

6666
void geofindkey2ptitle()
6767
{

src/geositer500.c

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Name: geositer500.c
3-
Version: 2.7
4-
Date: 2021-11-22
3+
Version: 2.8
4+
Date: 2021-12-15
55
Author: zvezdochiot (https://github.com/zvezdochiot)
66
Author: Zoltan Siki (https://github.com/zsiki)
77
*
@@ -54,7 +54,7 @@ OKD-12 3.8890 288.39138889 133.60805556
5454
#include <unistd.h>
5555

5656
#define PNAME "GeoSIter500"
57-
#define PVERSION "2.7"
57+
#define PVERSION "2.8"
5858

5959
#define defREarth 6370009.0
6060
#define defUnits "DEG"
@@ -68,6 +68,7 @@ void geositer500usage()
6868
{
6969
fprintf(stderr, "usage: geositer500 [option] input-file report-file\n");
7070
fprintf(stderr, "options:\n");
71+
fprintf(stderr, " -a N.N atmospheric refractive index, default=0.0\n");
7172
fprintf(stderr, " -d N decimal after comma, default=4\n");
7273
fprintf(stderr, " -r N.N radius Earth, default=6370009.0\n");
7374
fprintf(stderr, " -u str units angles {RAD,DEG,GON,DMS}, default=DEG\n");
@@ -152,20 +153,23 @@ int main(int argc, char *argv[])
152153
FILE *fp0, *fp1;
153154

154155
int opt;
155-
double RE = defREarth;
156156
int decimals = 4; /* number of decimals in the calculated coordinates */
157+
double atmospheric = 0.0, RE = defREarth;
157158
int fhelp = 0;
158159
units = defUnits;
159-
while ((opt = getopt(argc, argv, "d:r:u:h")) != -1)
160+
while ((opt = getopt(argc, argv, "a:d:r:u:h")) != -1)
160161
{
161162
switch(opt)
162163
{
163-
case 'h':
164-
fhelp = 1;
164+
case 'a':
165+
atmospheric = atof(optarg);
165166
break;
166167
case 'd':
167168
decimals = atoi(optarg);
168169
break;
170+
case 'h':
171+
fhelp = 1;
172+
break;
169173
case 'r':
170174
RE = atof(optarg);
171175
break;
@@ -247,7 +251,7 @@ int main(int argc, char *argv[])
247251
j++;
248252
}
249253
x[1] = ANGLEtoRAD(x[1], units);
250-
x[1] -= (RE > 0.0) ? (x[0] * sin(x[1]) * 0.5 / RE) : 0.0;
254+
x[1] -= (RE > 0.0) ? (x[0] * sin(x[1]) * 0.5 / RE * (1.0 - atmospheric)) : 0.0;
251255
x[2] = ANGLEtoRAD(x[2], units);
252256
y[2] = x[0] * cos(x[1]);
253257
x[0] *= sin(x[1]);
@@ -287,7 +291,7 @@ int main(int argc, char *argv[])
287291
j++;
288292
}
289293
x[1] = ANGLEtoRAD(x[1], units);
290-
x[1] -= (RE > 0.0) ? (x[0] * sin(x[1]) * 0.5 / RE) : 0.0;
294+
x[1] -= (RE > 0.0) ? (x[0] * sin(x[1]) * 0.5 / RE * (1.0 - atmospheric)) : 0.0;
291295
x[2] = ANGLEtoRAD(x[2], units);
292296
y[2] = x[0] * cos(x[1]);
293297
x[0] *= sin(x[1]);

src/geoszbtoyxh.c

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
Name: geoszbtoyxh.c
3-
Version: 2.7
4-
Date: 2021-11-22
3+
Version: 2.8
4+
Date: 2021-12-15
55
Author: zvezdochiot (https://github.com/zvezdochiot)
66
Author: Zoltan Siki (https://github.com/zsiki)
77
*
@@ -55,7 +55,7 @@ OKD-12 -2.6721 2.5453 1.2270
5555
#include <unistd.h>
5656

5757
#define PNAME "GeoSZBtoYXH"
58-
#define PVERSION "2.7"
58+
#define PVERSION "2.8"
5959

6060
#define defREarth 6370009.0
6161
#define defUnits "DEG"
@@ -69,6 +69,7 @@ void geoszbtoyxhusage()
6969
{
7070
fprintf(stderr, "usage: geoszbtoyxh [option] [input-file [report-file]]\n");
7171
fprintf(stderr, "options:\n");
72+
fprintf(stderr, " -a N.N atmospheric refractive index, default=0.0\n");
7273
fprintf(stderr, " -d N decimal after comma, default=4\n");
7374
fprintf(stderr, " -r N.N radius Earth, default=6370009.0\n");
7475
fprintf(stderr, " -u str units angles {RAD,DEG,GON,DMS}, default=DEG\n");
@@ -151,19 +152,22 @@ int main(int argc, char *argv[])
151152

152153
int opt;
153154
int decimals = 4; /* number of decimals in the calculated coordinates */
154-
double RE = defREarth;
155+
double atmospheric = 0.0, RE = defREarth;
155156
int fhelp = 0; /* default no help*/
156157
units = defUnits;
157-
while ((opt = getopt(argc, argv, "d:r:u:h")) != -1)
158+
while ((opt = getopt(argc, argv, "a:d:r:u:h")) != -1)
158159
{
159160
switch(opt)
160161
{
161-
case 'h':
162-
fhelp = 1;
162+
case 'a':
163+
atmospheric = atof(optarg);
163164
break;
164165
case 'd':
165166
decimals = atoi(optarg);
166167
break;
168+
case 'h':
169+
fhelp = 1;
170+
break;
167171
case 'r':
168172
RE = atof(optarg);
169173
break;
@@ -225,7 +229,7 @@ int main(int argc, char *argv[])
225229
if (np >= 4)
226230
{
227231
x[1] = ANGLEtoRAD(x[1], units);
228-
x[1] -= (RE > 0.0) ? (x[0] * sin(x[1]) * 0.5 / RE) : 0.0;
232+
x[1] -= (RE > 0.0) ? (x[0] * sin(x[1]) * 0.5 / RE * (1.0 - atmospheric)) : 0.0;
229233
x[2] = ANGLEtoRAD(x[2], units);
230234
y[2] = x[0] * cos(x[1]);
231235
x[0] *= sin(x[1]);

0 commit comments

Comments
 (0)