source: ntrip/trunk/BNC/src/upload/bncrtnetuploadcaster.cpp@ 5130

Last change on this file since 5130 was 5130, checked in by mervart, 9 years ago
File size: 18.9 KB
Line 
1/* -------------------------------------------------------------------------
2 * BKG NTRIP Server
3 * -------------------------------------------------------------------------
4 *
5 * Class: bncRtnetUploadCaster
6 *
7 * Purpose: Connection to NTRIP Caster
8 *
9 * Author: L. Mervart
10 *
11 * Created: 29-Mar-2011
12 *
13 * Changes:
14 *
15 * -----------------------------------------------------------------------*/
16
17#include <math.h>
18#include "bncrtnetuploadcaster.h"
19#include "bncsettings.h"
20#include "bncephuser.h"
21#include "bncclockrinex.h"
22#include "bncsp3.h"
23
24using namespace std;
25
26// Constructor
27////////////////////////////////////////////////////////////////////////////
28bncRtnetUploadCaster::bncRtnetUploadCaster(const QString& mountpoint,
29 const QString& outHost, int outPort,
30 const QString& password,
31 const QString& crdTrafo, bool CoM,
32 const QString& sp3FileName,
33 const QString& rnxFileName,
34 int PID, int SID, int IOD, int iRow) :
35 bncUploadCaster(mountpoint, outHost, outPort, password, iRow, 0) {
36
37 if (!outHost.isEmpty()) {
38 _casterID += outHost;
39 }
40 if (!crdTrafo.isEmpty()) {
41 _casterID += " " + crdTrafo;
42 }
43 if (!sp3FileName.isEmpty()) {
44 _casterID += " " + sp3FileName;
45 }
46 if (!rnxFileName.isEmpty()) {
47 _casterID += " " + rnxFileName;
48 }
49
50 _crdTrafo = crdTrafo;
51 _CoM = CoM;
52 _PID = PID;
53 _SID = SID;
54 _IOD = IOD;
55
56 // Member that receives the ephemeris
57 // ----------------------------------
58 _ephUser = new bncEphUser();
59
60 bncSettings settings;
61 QString intr = settings.value("uploadIntr").toString();
62
63 _samplRtcmEphCorr = settings.value("uploadSamplRtcmEphCorr").toDouble();
64 int samplClkRnx = settings.value("uploadSamplClkRnx").toInt();
65 int samplSp3 = settings.value("uploadSamplSp3").toInt() * 60;
66
67 if (_samplRtcmEphCorr == 0.0) {
68 _usedEph = 0;
69 }
70 else {
71 _usedEph = new QMap<QString, t_eph*>;
72 }
73
74 // RINEX writer
75 // ------------
76 if (!rnxFileName.isEmpty()) {
77 _rnx = new bncClockRinex(rnxFileName, intr, samplClkRnx);
78 }
79 else {
80 _rnx = 0;
81 }
82
83 // SP3 writer
84 // ----------
85 if (!sp3FileName.isEmpty()) {
86 _sp3 = new bncSP3(sp3FileName, intr, samplSp3);
87 }
88 else {
89 _sp3 = 0;
90 }
91
92 // Set Transformation Parameters
93 // -----------------------------
94 if (_crdTrafo == "ETRF2000") {
95 _dx = 0.0521;
96 _dy = 0.0493;
97 _dz = -0.0585;
98 _dxr = 0.0001;
99 _dyr = 0.0001;
100 _dzr = -0.0018;
101 _ox = 0.000891;
102 _oy = 0.005390;
103 _oz = -0.008712;
104 _oxr = 0.000081;
105 _oyr = 0.000490;
106 _ozr = -0.000792;
107 _sc = 1.34;
108 _scr = 0.08;
109 _t0 = 2000.0;
110 }
111 else if (_crdTrafo == "NAD83") {
112 _dx = 0.9963;
113 _dy = -1.9024;
114 _dz = -0.5210;
115 _dxr = 0.0005;
116 _dyr = -0.0006;
117 _dzr = -0.0013;
118 _ox = -0.025915;
119 _oy = -0.009426;
120 _oz = -0.011599;
121 _oxr = -0.000067;
122 _oyr = 0.000757;
123 _ozr = 0.000051;
124 _sc = 0.78;
125 _scr = -0.10;
126 _t0 = 1997.0;
127 }
128 else if (_crdTrafo == "GDA94") {
129 _dx = -0.08468;
130 _dy = -0.01942;
131 _dz = 0.03201;
132 _dxr = 0.00142;
133 _dyr = 0.00134;
134 _dzr = 0.00090;
135 _ox = 0.0004254;
136 _oy = -0.0022578;
137 _oz = -0.0024015;
138 _oxr = -0.0015461;
139 _oyr = -0.0011820;
140 _ozr = -0.0011551;
141 _sc = 9.710;
142 _scr = 0.109;
143 _t0 = 1994.0;
144 }
145 else if (_crdTrafo == "SIRGAS2000") {
146 _dx = 0.0020;
147 _dy = 0.0041;
148 _dz = 0.0039;
149 _dxr = 0.0000;
150 _dyr = 0.0000;
151 _dzr = 0.0000;
152 _ox = 0.000170;
153 _oy = -0.000030;
154 _oz = 0.000070;
155 _oxr = 0.000000;
156 _oyr = 0.000000;
157 _ozr = 0.000000;
158 _sc = 0.000;
159 _scr = 0.000;
160 _t0 = 0000.0;
161 }
162 else if (_crdTrafo == "SIRGAS95") {
163 _dx = 0.0077;
164 _dy = 0.0058;
165 _dz = -0.0138;
166 _dxr = 0.0000;
167 _dyr = 0.0000;
168 _dzr = 0.0000;
169 _ox = 0.000000;
170 _oy = 0.000000;
171 _oz = -0.000030;
172 _oxr = 0.000000;
173 _oyr = 0.000000;
174 _ozr = 0.000000;
175 _sc = 1.570;
176 _scr = 0.000;
177 _t0 = 0000.0;
178 }
179 else if (_crdTrafo == "Custom") {
180 _dx = settings.value("trafo_dx").toDouble();
181 _dy = settings.value("trafo_dy").toDouble();
182 _dz = settings.value("trafo_dz").toDouble();
183 _dxr = settings.value("trafo_dxr").toDouble();
184 _dyr = settings.value("trafo_dyr").toDouble();
185 _dzr = settings.value("trafo_dzr").toDouble();
186 _ox = settings.value("trafo_ox").toDouble();
187 _oy = settings.value("trafo_oy").toDouble();
188 _oz = settings.value("trafo_oz").toDouble();
189 _oxr = settings.value("trafo_oxr").toDouble();
190 _oyr = settings.value("trafo_oyr").toDouble();
191 _ozr = settings.value("trafo_ozr").toDouble();
192 _sc = settings.value("trafo_sc").toDouble();
193 _scr = settings.value("trafo_scr").toDouble();
194 _t0 = settings.value("trafo_t0").toDouble();
195 }
196}
197
198// Destructor
199////////////////////////////////////////////////////////////////////////////
200bncRtnetUploadCaster::~bncRtnetUploadCaster() {
201 if (isRunning()) {
202 wait();
203 }
204 delete _rnx;
205 delete _sp3;
206 delete _ephUser;
207 delete _usedEph;
208}
209
210//
211////////////////////////////////////////////////////////////////////////////
212void bncRtnetUploadCaster::decodeRtnetStream(char* buffer, int bufLen) {
213
214 QMutexLocker locker(&_mutex);
215
216 // Append to internal buffer
217 // -------------------------
218 _rtnetStreamBuffer.append(QByteArray(buffer, bufLen));
219
220 // Select buffer part that contains last epoch
221 // -------------------------------------------
222 QStringList lines;
223 int iEpoBeg = _rtnetStreamBuffer.lastIndexOf('*'); // begin of last epoch
224 if (iEpoBeg == -1) {
225 _rtnetStreamBuffer.clear();
226 return;
227 }
228 _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iEpoBeg);
229
230 int iEpoEnd = _rtnetStreamBuffer.lastIndexOf("EOE"); // end of last epoch
231 if (iEpoEnd == -1) {
232 return;
233 }
234 else {
235 lines = _rtnetStreamBuffer.left(iEpoEnd).split('\n', QString::SkipEmptyParts);
236 _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iEpoEnd+3);
237 }
238
239 if (lines.size() < 2) {
240 return;
241 }
242
243 // Keep the last unfinished line in buffer
244 // ---------------------------------------
245 int iLastEOL = _rtnetStreamBuffer.lastIndexOf('\n');
246 if (iLastEOL != -1) {
247 _rtnetStreamBuffer = _rtnetStreamBuffer.mid(iLastEOL+1);
248 }
249
250 // Read first line (with epoch time)
251 // ---------------------------------
252 QTextStream in(lines[0].toAscii());
253 QString hlp;
254 int year, month, day, hour, min;
255 double sec;
256 in >> hlp >> year >> month >> day >> hour >> min >> sec;
257 bncTime epoTime; epoTime.set( year, month, day, hour, min, sec);
258
259 emit(newMessage("bncRtnetUploadCaster (" + _casterID.toAscii() + ") decode "
260 + lines[0].toAscii(), false));
261
262 struct ClockOrbit co;
263 memset(&co, 0, sizeof(co));
264 co.GPSEpochTime = static_cast<int>(epoTime.gpssec());
265 co.GLONASSEpochTime = static_cast<int>(fmod(epoTime.gpssec(), 86400.0))
266 + 3 * 3600 - gnumleap(year, month, day);
267 co.ClockDataSupplied = 1;
268 co.OrbitDataSupplied = 1;
269 co.SatRefDatum = DATUM_ITRF;
270 co.SSRIOD = _IOD;
271 co.SSRProviderID = _PID; // 256 .. BKG, 257 ... EUREF
272 co.SSRSolutionID = _SID;
273
274 struct Bias bias;
275 memset(&bias, 0, sizeof(bias));
276 bias.GPSEpochTime = co.GPSEpochTime;
277 bias.GLONASSEpochTime = co.GLONASSEpochTime;
278
279 // Default Update Interval
280 // -----------------------
281 int clkUpdInd = 2; // 5 sec
282 int ephUpdInd = clkUpdInd; // default
283 if (_samplRtcmEphCorr == 10.0) {
284 ephUpdInd = 3;
285 }
286 else if (_samplRtcmEphCorr == 15.0) {
287 ephUpdInd = 4;
288 }
289 else if (_samplRtcmEphCorr == 30.0) {
290 ephUpdInd = 5;
291 }
292 else if (_samplRtcmEphCorr == 60.0) {
293 ephUpdInd = 6;
294 }
295 else if (_samplRtcmEphCorr == 120.0) {
296 ephUpdInd = 7;
297 }
298 else if (_samplRtcmEphCorr == 240.0) {
299 ephUpdInd = 8;
300 }
301 else if (_samplRtcmEphCorr == 300.0) {
302 ephUpdInd = 9;
303 }
304 else if (_samplRtcmEphCorr == 600.0) {
305 ephUpdInd = 10;
306 }
307 else if (_samplRtcmEphCorr == 900.0) {
308 ephUpdInd = 11;
309 }
310
311 co.UpdateInterval = clkUpdInd;
312 bias.UpdateInterval = clkUpdInd;
313
314 for (int ii = 1; ii < lines.size(); ii++) {
315
316 QString prn;
317 ColumnVector rtnAPC;
318 ColumnVector rtnVel;
319 ColumnVector rtnCoM;
320 double rtnClk;
321
322 QTextStream in(lines[ii].toAscii());
323
324 in >> prn;
325
326 t_eph* eph = 0;
327 const bncEphUser::t_ephPair* ephPair = _ephUser->ephPair(prn);
328 if (ephPair) {
329
330 eph = ephPair->last;
331
332 // Use previous ephemeris if the last one is too recent
333 // ----------------------------------------------------
334 const int MINAGE = 60; // seconds
335 if (ephPair->prev && eph->receptDateTime().isValid() &&
336 eph->receptDateTime().secsTo(currentDateAndTimeGPS()) < MINAGE) {
337 eph = ephPair->prev;
338 }
339
340 // Make sure the clock messages refer to same IOD as orbit messages
341 // ----------------------------------------------------------------
342 if (_usedEph) {
343 if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
344 (*_usedEph)[prn] = eph;
345 }
346 else {
347 eph = 0;
348 if (_usedEph->contains(prn)) {
349 t_eph* usedEph = _usedEph->value(prn);
350 if (usedEph == ephPair->last) {
351 eph = ephPair->last;
352 }
353 else if (usedEph == ephPair->prev) {
354 eph = ephPair->prev;
355 }
356 }
357 }
358 }
359 }
360
361 if (eph) {
362
363 while (true) {
364 QString key;
365 int numVal = 0;
366 in >> key >> numVal;
367 if (in.status() != QTextStream::Ok) {
368 break;
369 }
370 if (key == "APC") {
371 rtnAPC.ReSize(3);
372 in >> rtnAPC[0] >> rtnAPC[1] >> rtnAPC[2];
373 }
374 else if (key == "Clk") {
375 in >> rtnClk;
376 }
377 else if (key == "Vel") {
378 rtnVel.ReSize(3);
379 in >> rtnVel[0] >> rtnVel[1] >> rtnVel[2];
380 }
381 else if (key == "CoM") {
382 rtnCoM.ReSize(3);
383 in >> rtnCoM[0] >> rtnCoM[1] >> rtnCoM[2];
384 }
385 else {
386 for (int ii = 0; ii < numVal; ii++) {
387 double dummy;
388 in >> dummy;
389 }
390 }
391 }
392 struct ClockOrbit::SatData* sd = 0;
393 if (prn[0] == 'G') {
394 sd = co.Sat + co.NumberOfGPSSat;
395 ++co.NumberOfGPSSat;
396 }
397 else if (prn[0] == 'R') {
398 sd = co.Sat + CLOCKORBIT_NUMGPS + co.NumberOfGLONASSSat;
399 ++co.NumberOfGLONASSSat;
400 }
401 if (sd) {
402 QString outLine;
403 processSatellite(eph, epoTime.gpsw(), epoTime.gpssec(), prn,
404 rtnAPC, rtnClk, rtnVel, rtnCoM, sd, outLine);
405 }
406
407 struct Bias::BiasSat* biasSat = 0;
408 if (prn[0] == 'G') {
409 biasSat = bias.Sat + bias.NumberOfGPSSat;
410 ++bias.NumberOfGPSSat;
411 }
412 else if (prn[0] == 'R') {
413 biasSat = bias.Sat + CLOCKORBIT_NUMGPS + bias.NumberOfGLONASSSat;
414 ++bias.NumberOfGLONASSSat;
415 }
416
417 // Coefficient of Ionosphere-Free LC
418 // ---------------------------------
419 // const static double a_L1_GPS = 2.54572778;
420 // const static double a_L2_GPS = -1.54572778;
421 // const static double a_L1_Glo = 2.53125000;
422 // const static double a_L2_Glo = -1.53125000;
423
424 if (biasSat) {
425 biasSat->ID = prn.mid(1).toInt();
426 biasSat->NumberOfCodeBiases = 3;
427 if (prn[0] == 'G') {
428 biasSat->Biases[0].Type = CODETYPEGPS_L1_Z;
429 // biasSat->Biases[0].Bias = - a_L2_GPS * xx(10);
430 biasSat->Biases[0].Bias = 0.0;
431 biasSat->Biases[1].Type = CODETYPEGPS_L1_CA;
432 // biasSat->Biases[1].Bias = - a_L2_GPS * xx(10) + xx(9);
433 biasSat->Biases[1].Bias = 0.0;
434 biasSat->Biases[2].Type = CODETYPEGPS_L2_Z;
435 // biasSat->Biases[2].Bias = a_L1_GPS * xx(10);
436 biasSat->Biases[2].Bias = 0.0;
437 }
438 else if (prn[0] == 'R') {
439 biasSat->Biases[0].Type = CODETYPEGLONASS_L1_P;
440 // biasSat->Biases[0].Bias = - a_L2_Glo * xx(10);
441 biasSat->Biases[0].Bias = 0.0;
442 biasSat->Biases[1].Type = CODETYPEGLONASS_L1_CA;
443 // biasSat->Biases[1].Bias = - a_L2_Glo * xx(10) + xx(9);
444 biasSat->Biases[1].Bias = 0.0;
445 biasSat->Biases[2].Type = CODETYPEGLONASS_L2_P;
446 // biasSat->Biases[2].Bias = a_L1_Glo * xx(10);
447 biasSat->Biases[2].Bias = 0.0;
448 }
449 }
450 }
451 }
452
453 QByteArray hlpBufferCo;
454
455 // Orbit and Clock Corrections together
456 // ------------------------------------
457 if (_samplRtcmEphCorr == 0.0) {
458 if (co.NumberOfGPSSat > 0 || co.NumberOfGLONASSSat > 0) {
459 char obuffer[CLOCKORBIT_BUFFERSIZE];
460 int len = MakeClockOrbit(&co, COTYPE_AUTO, 0, obuffer, sizeof(obuffer));
461 if (len > 0) {
462 hlpBufferCo = QByteArray(obuffer, len);
463 }
464 }
465 }
466
467 // Orbit and Clock Corrections separately
468 // --------------------------------------
469 else {
470 if (co.NumberOfGPSSat > 0) {
471 char obuffer[CLOCKORBIT_BUFFERSIZE];
472 if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
473 co.UpdateInterval = ephUpdInd;
474 int len1 = MakeClockOrbit(&co, COTYPE_GPSORBIT, 1, obuffer, sizeof(obuffer));
475 co.UpdateInterval = clkUpdInd;
476 if (len1 > 0) {
477 hlpBufferCo += QByteArray(obuffer, len1);
478 }
479 }
480 int mmsg = (co.NumberOfGLONASSSat > 0) ? 1 : 0;
481 int len2 = MakeClockOrbit(&co, COTYPE_GPSCLOCK, mmsg, obuffer, sizeof(obuffer));
482 if (len2 > 0) {
483 hlpBufferCo += QByteArray(obuffer, len2);
484 }
485 }
486 if (co.NumberOfGLONASSSat > 0) {
487 char obuffer[CLOCKORBIT_BUFFERSIZE];
488 if (fmod(epoTime.gpssec(), _samplRtcmEphCorr) == 0.0) {
489 co.UpdateInterval = ephUpdInd;
490 int len1 = MakeClockOrbit(&co, COTYPE_GLONASSORBIT, 1, obuffer, sizeof(obuffer));
491 co.UpdateInterval = clkUpdInd;
492 if (len1 > 0) {
493 hlpBufferCo += QByteArray(obuffer, len1);
494 }
495 }
496 int len2 = MakeClockOrbit(&co, COTYPE_GLONASSCLOCK, 0, obuffer, sizeof(obuffer));
497 if (len2 > 0) {
498 hlpBufferCo += QByteArray(obuffer, len2);
499 }
500 }
501 }
502
503 // Biases
504 // ------
505 QByteArray hlpBufferBias;
506 if (bias.NumberOfGPSSat > 0 || bias.NumberOfGLONASSSat > 0) {
507 char obuffer[CLOCKORBIT_BUFFERSIZE];
508 int len = MakeBias(&bias, BTYPE_AUTO, 0, obuffer, sizeof(obuffer));
509 if (len > 0) {
510 hlpBufferBias = QByteArray(obuffer, len);
511 }
512 }
513
514 _outBuffer += hlpBufferCo + hlpBufferBias;
515}
516
517//
518////////////////////////////////////////////////////////////////////////////
519void bncRtnetUploadCaster::processSatellite(t_eph* eph, int GPSweek,
520 double GPSweeks, const QString& prn,
521 const ColumnVector& rtnAPC,
522 double rtnClk,
523 const ColumnVector& rtnVel,
524 const ColumnVector& rtnCoM,
525 struct ClockOrbit::SatData* sd,
526 QString& outLine) {
527
528 // Broadcast Position and Velocity
529 // -------------------------------
530 ColumnVector xB(4);
531 ColumnVector vB(3);
532 eph->position(GPSweek, GPSweeks, xB.data(), vB.data());
533
534 // Precise Position
535 // ----------------
536 ColumnVector xP = _CoM ? rtnCoM : rtnAPC;
537
538 double dc = 0.0;
539 if (_crdTrafo != "IGS08") {
540 crdTrafo(GPSweek, xP, dc);
541 }
542
543 // Difference in xyz
544 // -----------------
545 ColumnVector dx = xB.Rows(1,3) - xP;
546 ColumnVector dv = vB - rtnVel;
547
548 // Difference in RSW
549 // -----------------
550 ColumnVector rsw(3);
551 XYZ_to_RSW(xB.Rows(1,3), vB, dx, rsw);
552
553 ColumnVector dotRsw(3);
554 XYZ_to_RSW(xB.Rows(1,3), vB, dv, dotRsw);
555
556 // Clock Correction
557 // ----------------
558 double dClk = rtnClk - (xB(4) - dc) * t_CST::c;
559
560 if (sd) {
561 sd->ID = prn.mid(1).toInt();
562 sd->IOD = eph->IOD();
563 sd->Clock.DeltaA0 = dClk;
564 sd->Orbit.DeltaRadial = rsw(1);
565 sd->Orbit.DeltaAlongTrack = rsw(2);
566 sd->Orbit.DeltaCrossTrack = rsw(3);
567 sd->Orbit.DotDeltaRadial = dotRsw(1);
568 sd->Orbit.DotDeltaAlongTrack = dotRsw(2);
569 sd->Orbit.DotDeltaCrossTrack = dotRsw(3);
570 }
571
572 outLine.sprintf("%d %.1f %s %3d %10.3f %8.3f %8.3f %8.3f\n",
573 GPSweek, GPSweeks, eph->prn().toAscii().data(),
574 eph->IOD(), dClk, rsw(1), rsw(2), rsw(3));
575
576 double relativity = -2.0 * DotProduct(xP, rtnVel) / t_CST::c;
577 double sp3Clk = (rtnClk - relativity) / t_CST::c; // in seconds
578
579 if (_rnx) {
580 _rnx->write(GPSweek, GPSweeks, prn, sp3Clk);
581 }
582 if (_sp3) {
583 _sp3->write(GPSweek, GPSweeks, prn, rtnCoM, sp3Clk);
584 }
585}
586
587// Transform Coordinates
588////////////////////////////////////////////////////////////////////////////
589void bncRtnetUploadCaster::crdTrafo(int GPSWeek, ColumnVector& xyz,
590 double& dc) {
591
592 // Current epoch minus 2000.0 in years
593 // ------------------------------------
594 double dt = (GPSWeek - (1042.0+6.0/7.0)) / 365.2422 * 7.0 + 2000.0 - _t0;
595
596 ColumnVector dx(3);
597
598 dx(1) = _dx + dt * _dxr;
599 dx(2) = _dy + dt * _dyr;
600 dx(3) = _dz + dt * _dzr;
601
602 static const double arcSec = 180.0 * 3600.0 / M_PI;
603
604 double ox = (_ox + dt * _oxr) / arcSec;
605 double oy = (_oy + dt * _oyr) / arcSec;
606 double oz = (_oz + dt * _ozr) / arcSec;
607
608 double sc = 1.0 + _sc * 1e-9 + dt * _scr * 1e-9;
609
610 // Specify approximate center of area
611 // ----------------------------------
612 ColumnVector meanSta(3);
613
614 if (_crdTrafo == "ETRF2000") {
615 meanSta(1) = 3661090.0;
616 meanSta(2) = 845230.0;
617 meanSta(3) = 5136850.0;
618 }
619 else if (_crdTrafo == "NAD83") {
620 meanSta(1) = -1092950.0;
621 meanSta(2) = -4383600.0;
622 meanSta(3) = 4487420.0;
623 }
624 else if (_crdTrafo == "GDA94") {
625 meanSta(1) = -4052050.0;
626 meanSta(2) = 4212840.0;
627 meanSta(3) = -2545110.0;
628 }
629 else if (_crdTrafo == "SIRGAS2000") {
630 meanSta(1) = 3740860.0;
631 meanSta(2) = -4964290.0;
632 meanSta(3) = -1425420.0;
633 }
634 else if (_crdTrafo == "SIRGAS95") {
635 meanSta(1) = 3135390.0;
636 meanSta(2) = -5017670.0;
637 meanSta(3) = -2374440.0;
638 }
639 else if (_crdTrafo == "Custom") {
640 meanSta(1) = 0.0; // TODO
641 meanSta(2) = 0.0; // TODO
642 meanSta(3) = 0.0; // TODO
643 }
644
645 // Clock correction proportional to topocentric distance to satellites
646 // -------------------------------------------------------------------
647 double rho = (xyz - meanSta).norm_Frobenius();
648 dc = rho * (sc - 1.0) / sc / t_CST::c;
649
650 Matrix rMat(3,3);
651 rMat(1,1) = 1.0;
652 rMat(1,2) = -oz;
653 rMat(1,3) = oy;
654 rMat(2,1) = oz;
655 rMat(2,2) = 1.0;
656 rMat(2,3) = -ox;
657 rMat(3,1) = -oy;
658 rMat(3,2) = ox;
659 rMat(3,3) = 1.0;
660
661 xyz = sc * rMat * xyz + dx;
662}
663
Note: See TracBrowser for help on using the repository browser.