source: ntrip/trunk/BNC/src/gen_rtk_neu.pl@ 9322

Last change on this file since 9322 was 4282, checked in by mervart, 13 years ago
  • Property svn:executable set to *
File size: 1.0 KB
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
21#my $xApr = 3664880.4923;
22#my $yApr = 1409190.6728;
23#my $zApr = 5009618.5192;
24
25# FFMJ1
26my $xApr = 4053455.8174;
27my $yApr = 617729.7434;
28my $zApr = 4869395.7728;
29
30while ( 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
57close inFile;
58close outFile;
Note: See TracBrowser for help on using the repository browser.