Last change
on this file since 2980 was 2270, checked in by mervart, 15 years ago |
* empty log message *
|
-
Property svn:executable
set to
*
|
File size:
1.0 KB
|
Line | |
---|
1 | #!/usr/bin/perl -w
|
---|
2 |
|
---|
3 | use strict;
|
---|
4 |
|
---|
5 | use lib "$ENV{HOME}/gpss_src/perl";
|
---|
6 | use geotools;
|
---|
7 |
|
---|
8 | my($inFile, $outFile) = @ARGV;
|
---|
9 | if (!defined($outFile)) {
|
---|
10 | die "Usage: gen_rtk_neu.pl inFile outFile\n";
|
---|
11 | }
|
---|
12 |
|
---|
13 | open(inFile , $inFile);
|
---|
14 | open(outFile, ">$outFile");
|
---|
15 |
|
---|
16 | ###my $xApr = 0.0;
|
---|
17 | ###my $yApr = 0.0;
|
---|
18 | ###my $zApr = 0.0;
|
---|
19 |
|
---|
20 | # JOS20
|
---|
21 | #my $xApr = 3664880.4923;
|
---|
22 | #my $yApr = 1409190.6728;
|
---|
23 | #my $zApr = 5009618.5192;
|
---|
24 |
|
---|
25 | # FFMJ1
|
---|
26 | my $xApr = 4053455.8174;
|
---|
27 | my $yApr = 617729.7434;
|
---|
28 | my $zApr = 4869395.7728;
|
---|
29 |
|
---|
30 | while ( my $line=<inFile> ) {
|
---|
31 |
|
---|
32 | if ($line =~ /PPP/) {
|
---|
33 |
|
---|
34 | my @p = split(/\s+/, $line);
|
---|
35 |
|
---|
36 | my $time = $p[4];
|
---|
37 | my $x = $p[6];
|
---|
38 | my $y = $p[9];
|
---|
39 | my $z = $p[12];
|
---|
40 |
|
---|
41 | if ($xApr == 0.0 && $yApr == 0.0 && $zApr == 0.0) {
|
---|
42 | $xApr = $x;
|
---|
43 | $yApr = $y;
|
---|
44 | $zApr = $z;
|
---|
45 | }
|
---|
46 |
|
---|
47 | my $dx = $x - $xApr;
|
---|
48 | my $dy = $y - $yApr;
|
---|
49 | my $dz = $z - $zApr;
|
---|
50 |
|
---|
51 | my ($n, $e, $u) = get_neu($dx, $dy, $dz, $xApr, $yApr, $zApr);
|
---|
52 |
|
---|
53 | printf(outFile "%s %8.4f %8.4f %8.4f\n", $time, $n, $e, $u);
|
---|
54 | }
|
---|
55 | }
|
---|
56 |
|
---|
57 | close inFile;
|
---|
58 | close outFile;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.