source: ntrip/trunk/BNC/gen_rtk_neu.pl@ 2235

Last change on this file since 2235 was 2115, checked in by mervart, 15 years ago

* empty log message *

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