0.3.0
Loading...
Searching...
No Matches
RINEXUtilities.cpp
Go to the documentation of this file.
1// This file is part of INSTINCT, the INS Toolkit for Integrated
2// Navigation Concepts and Training by the Institute of Navigation of
3// the University of Stuttgart, Germany.
4//
5// This Source Code Form is subject to the terms of the Mozilla Public
6// License, v. 2.0. If a copy of the MPL was not distributed with this
7// file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
9#include "RINEXUtilities.hpp"
10
11#include <sstream>
12#include <locale>
13
14#include <boost/date_time/posix_time/posix_time.hpp> // TODO: Remove 'boost.dateTime' from conan as soon as 'std::chrono::utc_clock' becomes available
15#include <fmt/chrono.h>
16#include <fmt/format.h>
17using namespace fmt::literals; // NOLINT(google-build-using-namespace)
18
19#include "internal/Version.hpp"
21#include "util/Logger.hpp"
22
23namespace NAV
24{
26{
27
29{
31 systemObsTypes.clear();
32 interval = 1e9;
33 timeFirstObs.reset();
34 timeLastObs.reset();
35 satellites.clear();
37}
38
39bool ObsHeader::addObsType(const Code& code, ObsType type)
40{
41 auto& obsDescriptions = systemObsTypes[code.getFrequency().getSatSys()];
42 if (std::ranges::find_if(obsDescriptions, [&code, &type](const auto& obsDesc) {
43 return obsDesc.code == code && obsDesc.type == type;
44 })
45 == obsDescriptions.end())
46 {
47 obsDescriptions.push_back(ObservationDescription{ .type = type, .code = code });
48 return true;
49 }
50 return false;
51}
52
53std::string ObsHeader::generateHeader() const
54{
55 std::string str;
56
68 // ANTENNA: DELTA X/Y/Z (optional)
69 // ANTENNA:PHASECENTER (optional)
70 // ANTENNA: B.SIGHT XYZ (optional)
71 // ANTENNA: ZERODIR AZI (optional)
72 // ANTENNA: ZERODIR XYZ (optional)
73 // CENTER OF MASS: XYZ (optional)
79 // RCV CLOCK OFFS APPL (optional)
80 // SYS / DCBS APPLIED (optional)
81 // SYS / PCVS APPLIED (optional)
82 // SYS / SCALE FACTOR (optional)
84 // GLONASS SLOT / FRQ # (is mandatory, but a lot of receivers also do not write it. So we leave it out. Would require NAV information)
88 // PRN / # OF OBS (optional)
90
91 return str;
92}
94{
95 std::string longSatSysString;
96 switch (static_cast<SatelliteSystem_>(satSys))
97 {
98 case GPS:
99 longSatSysString = "GPS";
100 break;
101 case GAL:
102 longSatSysString = "GALILEO";
103 break;
104 case GLO:
105 longSatSysString = "GLONASS";
106 break;
107 case BDS:
108 longSatSysString = "BEIDOU";
109 break;
110 case QZSS:
111 longSatSysString = "QZSS";
112 break;
113 case IRNSS:
114 longSatSysString = "IRNSS";
115 break;
116 default:
117 longSatSysString = "MIXED";
118 break;
119 }
120
121 return fmt::format("{version: 9.2f}{X:11}{fileType:<20}{satSys:1}: {satSysTxt:<17}{label:<20}\n", "X"_a = "", "label"_a = "RINEX VERSION / TYPE",
122 "version"_a = version,
123 "fileType"_a = "OBSERVATION DATA",
124 "satSys"_a = satSys.toChar(),
125 "satSysTxt"_a = longSatSysString);
126}
128{
129 std::stringstream ss;
130 ss.imbue(std::locale{ ss.getloc(), new boost::posix_time::time_facet{ "%Y%m%d %H%M%S" } });
131 ss << boost::posix_time::second_clock::universal_time();
132 return fmt::format("{pgm:20}{runBy:20}{date} UTC {label:20}\n", "label"_a = "PGM / RUN BY / DATE",
133 "pgm"_a = "INSTINCT " + PROJECT_VERSION_STRING,
134 "runBy"_a = runBy.substr(0, 20),
135 "date"_a = ss.str()); // std::chrono::floor<std::chrono::seconds>(std::chrono::utc_clock::now())
136}
138{
139 std::string str;
140 for (const auto& comment : comments)
141 {
142 str += fmt::format("{comment:60}{label:<20}\n", "label"_a = "COMMENT",
143 "comment"_a = comment.substr(0, 60));
144 }
145 return str;
146}
148{
149 return fmt::format("{markerName:60}{label:<20}\n", "label"_a = "MARKER NAME",
150 "markerName"_a = markerName.substr(0, 60));
151}
153{
154 if (!markerNumber.empty())
155 {
156 return fmt::format("{markerNumber:60}{label:<20}\n", "label"_a = "MARKER NUMBER",
157 "markerNumber"_a = markerNumber.substr(0, 60));
158 }
159 return "";
160}
162{
163 return fmt::format("{markerType:20}{X:40}{label:<20}\n", "X"_a = "", "label"_a = "MARKER TYPE",
164 "markerType"_a = (markerType == MarkerTypes::USER_DEFINED
165 ? markerTypeUser.substr(0, 20)
167}
169{
170 return fmt::format("{observer:20}{agency:40}{label:<20}\n", "label"_a = "OBSERVER / AGENCY",
171 "observer"_a = observer.substr(0, 20),
172 "agency"_a = agency.substr(0, 40));
173}
175{
176 return fmt::format("{rec:20}{type:20}{vers:20}{label:<20}\n", "label"_a = "REC # / TYPE / VERS",
177 "rec"_a = receiverNumber.substr(0, 20),
178 "type"_a = receiverType.substr(0, 20),
179 "vers"_a = receiverVersion.substr(0, 20));
180}
182{
183 return fmt::format("{ant:20}{type:20}{X:20}{label:<20}\n", "X"_a = "", "label"_a = "ANT # / TYPE",
184 "ant"_a = antennaNumber.substr(0, 20),
185 "type"_a = antennaType.substr(0, 20));
186}
188{
190 {
191 return fmt::format("{x:14.4f}{y:14.4f}{z:14.4f}{X:18}{label:<20}\n", "X"_a = "", "label"_a = "APPROX POSITION XYZ",
192 "x"_a = approxPositionXYZ.x(),
193 "y"_a = approxPositionXYZ.y(),
194 "z"_a = approxPositionXYZ.z());
195 }
196 return "";
197}
199{
200 return fmt::format("{antH:14.4f}{antE:14.4f}{antN:14.4f}{X:18}{label:<20}\n", "X"_a = "", "label"_a = "ANTENNA: DELTA H/E/N",
201 "antH"_a = antennaDeltaHeightEastNorth[0],
202 "antE"_a = antennaDeltaHeightEastNorth[1],
203 "antN"_a = antennaDeltaHeightEastNorth[2]);
204}
206{
207 std::string str;
208 for (const auto& [satSys, types] : systemObsTypes) // SYS / # / OBS TYPES
209 {
210 bool firstLine = true;
211 for (size_t i = 0; i < types.size(); ++i)
212 {
213 const auto& obsDesc = types.at(i);
214 if (i % 13 == 0)
215 {
216 if (firstLine)
217 {
218 str += fmt::format("{sys:1}{X:2}{num:3}", "X"_a = "",
219 "sys"_a = satSys.toChar(),
220 "num"_a = types.size());
221 firstLine = false;
222 }
223 else { str += fmt::format("{X:6}", "X"_a = ""); }
224 }
225
226 str += fmt::format("{X:1}{desc:3}", "X"_a = "",
227 "desc"_a = vendor::RINEX::obsTypeToChar(obsDesc.type)
228 + fmt::format("{}", obsDesc.code).substr(1, 2));
229
230 if ((i + 1) % 13 == 0 || i == types.size() - 1)
231 {
232 str += fmt::format("{X:{w}}{label:<20}\n", "X"_a = "", "label"_a = "SYS / # / OBS TYPES",
233 "w"_a = 54 - 4 * ((i % 13) + 1));
234 }
235 }
236 }
237 return str;
238}
240{
241 return fmt::format("{sigUnit:20}{X:40}{label:<20}\n", "X"_a = "", "label"_a = "SIGNAL STRENGTH UNIT",
242 "sigUnit"_a = "DBHZ");
243}
245{
246 if (interval == 1e9) { return fmt::format("{X:60}{label:<20}\n", "X"_a = "", "label"_a = "INTERVAL"); }
247 return fmt::format("{interval:10.3f}{X:50}{label:<20}\n", "X"_a = "", "label"_a = "INTERVAL",
248 "interval"_a = interval);
249}
251{
252 auto firstObsYMDHMS = timeFirstObs.toYMDHMS(timeSys, 7);
253 return fmt::format("{y:6d}{m:6d}{d:6d}{h:6d}{min:6d}{sec:13.7f}{X:5}{sys:3}{X:9}{label:<20}\n", "X"_a = "", "label"_a = "TIME OF FIRST OBS",
254 "y"_a = firstObsYMDHMS.year,
255 "m"_a = firstObsYMDHMS.month,
256 "d"_a = firstObsYMDHMS.day,
257 "h"_a = firstObsYMDHMS.hour,
258 "min"_a = firstObsYMDHMS.min,
259 "sec"_a = static_cast<double>(firstObsYMDHMS.sec),
261}
263{
264 auto lastObsYMDHMS = timeLastObs.toYMDHMS(timeSys, 7);
265 return fmt::format("{y:6d}{m:6d}{d:6d}{h:6d}{min:6d}{sec:13.7f}{X:5}{sys:3}{X:9}{label:<20}\n", "X"_a = "", "label"_a = "TIME OF LAST OBS",
266 "y"_a = lastObsYMDHMS.year,
267 "m"_a = lastObsYMDHMS.month,
268 "d"_a = lastObsYMDHMS.day,
269 "h"_a = lastObsYMDHMS.hour,
270 "min"_a = lastObsYMDHMS.min,
271 "sec"_a = static_cast<double>(lastObsYMDHMS.sec),
273}
275{
276 return fmt::format("{X:60}{label:<20}\n", "X"_a = "", "label"_a = "SYS / PHASE SHIFT");
277}
279{
280 return fmt::format("{X:60}{label:<20}\n", "X"_a = "", "label"_a = "GLONASS COD/PHS/BIS");
281}
283{
284 return fmt::format("{leap:6d}{X:54}{label:<20}\n", "X"_a = "", "label"_a = "LEAP SECONDS",
285 "leap"_a = timeFirstObs.leapGps2UTC());
286}
288{
289 return fmt::format("{nSat:6d}{X:54}{label:<20}\n", "X"_a = "", "label"_a = "# OF SATELLITES",
290 "nSat"_a = satellites.size());
291}
293{
294 return fmt::format("{X:60}{label:<20}\n", "X"_a = "", "label"_a = "END OF HEADER");
295}
296
297std::string ObsHeader::epochRecordLine(const InsTime& epochTime, size_t nSatellites) const
298{
299 auto timeYMDHMS = epochTime.toYMDHMS(timeSys, 7);
300 return fmt::format("> {y:4d} {m:2d} {d:2d} {h:2d} {min:2d}{sec:11.7f} 0{numSat:3d}{X:6}{X:15}\n", "X"_a = "",
301 "y"_a = timeYMDHMS.year,
302 "m"_a = timeYMDHMS.month,
303 "d"_a = timeYMDHMS.day,
304 "h"_a = timeYMDHMS.hour,
305 "min"_a = timeYMDHMS.min,
306 "sec"_a = static_cast<double>(timeYMDHMS.sec),
307 "numSat"_a = nSatellites);
308}
309
310void to_json(json& j, const ObsHeader& obj)
311{
312 j = json{
313 { "version", obj.version },
314 { "runBy", obj.runBy },
315 { "comments", obj.comments },
316 { "markerName", obj.markerName },
317 { "markerNumber", obj.markerNumber },
318 { "markerType", obj.markerType },
319 { "markerTypeUser", obj.markerTypeUser },
320 { "observer", obj.observer },
321 { "agency", obj.agency },
322 { "receiverNumber", obj.receiverNumber },
323 { "receiverType", obj.receiverType },
324 { "receiverVersion", obj.receiverVersion },
325 { "antennaNumber", obj.antennaNumber },
326 { "antennaType", obj.antennaType },
327 { "approxPositionEnabled", obj.approxPositionEnabled },
328 { "approxPositionXYZ", obj.approxPositionXYZ },
329 { "antennaDeltaHeightEastNorth", obj.antennaDeltaHeightEastNorth },
330 };
331}
332
333void from_json(const json& j, ObsHeader& obj)
334{
335 if (j.contains("version")) { j.at("version").get_to(obj.version); }
336 if (j.contains("runBy")) { j.at("runBy").get_to(obj.runBy); }
337 if (j.contains("comments")) { j.at("comments").get_to(obj.comments); }
338 if (j.contains("markerName")) { j.at("markerName").get_to(obj.markerName); }
339 if (j.contains("markerNumber")) { j.at("markerNumber").get_to(obj.markerNumber); }
340 if (j.contains("markerType")) { j.at("markerType").get_to(obj.markerType); }
341 if (j.contains("markerTypeUser")) { j.at("markerTypeUser").get_to(obj.markerTypeUser); }
342 if (j.contains("observer")) { j.at("observer").get_to(obj.observer); }
343 if (j.contains("agency")) { j.at("agency").get_to(obj.agency); }
344 if (j.contains("receiverNumber")) { j.at("receiverNumber").get_to(obj.receiverNumber); }
345 if (j.contains("receiverType")) { j.at("receiverType").get_to(obj.receiverType); }
346 if (j.contains("receiverVersion")) { j.at("receiverVersion").get_to(obj.receiverVersion); }
347 if (j.contains("antennaNumber")) { j.at("antennaNumber").get_to(obj.antennaNumber); }
348 if (j.contains("antennaType")) { j.at("antennaType").get_to(obj.antennaType); }
349 if (j.contains("approxPositionEnabled")) { j.at("approxPositionEnabled").get_to(obj.approxPositionEnabled); }
350 if (j.contains("approxPositionXYZ")) { j.at("approxPositionXYZ").get_to(obj.approxPositionXYZ); }
351 if (j.contains("antennaDeltaHeightEastNorth")) { j.at("antennaDeltaHeightEastNorth").get_to(obj.antennaDeltaHeightEastNorth); }
352}
354{
355 switch (c)
356 {
357 case 'C':
358 return ObsType::C;
359 case 'L':
360 return ObsType::L;
361 case 'D':
362 return ObsType::D;
363 case 'S':
364 return ObsType::S;
365 case 'I':
366 return ObsType::I;
367 case 'X':
368 return ObsType::X;
369 default:
370 return ObsType::Error;
371 }
372}
373
375{
376 switch (type)
377 {
378 case ObsType::C:
379 return 'C';
380 case ObsType::L:
381 return 'L';
382 case ObsType::D:
383 return 'D';
384 case ObsType::S:
385 return 'S';
386 case ObsType::I:
387 return 'I';
388 case ObsType::X:
389 return 'X';
390 default:
391 return '\0';
392 }
393}
394
395std::string timeSystemString(TimeSystem timeSys)
396{
397 switch (static_cast<TimeSystem_>(timeSys))
398 {
399 case GPST:
400 return "GPS";
401 case GST:
402 return "GAL";
403 case GLNT:
404 return "GLO";
405 case BDT:
406 return "BDT";
407 case QZSST:
408 return "QZS";
409 case IRNSST:
410 return "IRN";
411 case UTC:
412 case TimeSys_None:
413 default:
414 break;
415 }
416 return "GPS";
417}
418
420{
421 switch (static_cast<SatelliteSystem_>(satSys))
422 {
423 case GPS:
424 return GPST;
425 case GAL:
426 return GST;
427 case GLO:
428 return GLNT;
429 case BDS:
430 return BDT;
431 case QZSS:
432 return QZSST;
433 case IRNSS:
434 return IRNSST;
435 default:
436 break;
437 }
438 return GPST;
439}
440
442{
443 switch (band)
444 {
445 case 1:
446 // 1 = L1 (GPS, QZSS, SBAS, BDS)
447 // G1 (GLO)
448 // E1 (GAL)
449 // B1 (BDS)
450 if (satSys == GPS)
451 {
452 return Frequency_::G01;
453 }
454 if (satSys == QZSS)
455 {
456 return Frequency_::J01;
457 }
458 if (satSys == SBAS)
459 {
460 return Frequency_::S01;
461 }
462 if (satSys == BDS)
463 {
464 return Frequency_::B01;
465 }
466 if (satSys == GLO)
467 {
468 return Frequency_::R01;
469 }
470 if (satSys == GAL)
471 {
472 return Frequency_::E01;
473 }
474 break;
475 case 2:
476 // 2 = L2 (GPS, QZSS)
477 // G2 (GLO)
478 // B1-2 (BDS)
479 if (satSys == GPS)
480 {
481 return Frequency_::G02;
482 }
483 if (satSys == QZSS)
484 {
485 return Frequency_::J02;
486 }
487 if (satSys == GLO)
488 {
489 return Frequency_::R02;
490 }
491 if (satSys == BDS)
492 {
493 return Frequency_::B02;
494 }
495 break;
496 case 3:
497 // 3 = G3 (GLO)
498 if (satSys == GLO)
499 {
500 return Frequency_::R03;
501 }
502 break;
503 case 4:
504 // 4 = G1a (GLO)
505 if (satSys == GLO)
506 {
507 return Frequency_::R04;
508 }
509 break;
510 case 5:
511 // 5 = L5 (GPS, QZSS, SBAS, IRNSS)
512 // E5a (GAL)
513 // B2/B2a (BDS)
514 if (satSys == GPS)
515 {
516 return Frequency_::G05;
517 }
518 if (satSys == QZSS)
519 {
520 return Frequency_::J05;
521 }
522 if (satSys == SBAS)
523 {
524 return Frequency_::S05;
525 }
526 if (satSys == IRNSS)
527 {
528 return Frequency_::I05;
529 }
530 if (satSys == GAL)
531 {
532 return Frequency_::E05;
533 }
534 if (satSys == BDS)
535 {
536 return Frequency_::B05;
537 }
538 break;
539 case 6:
540 // 6 = E6 (GAL)
541 // L6 (QZSS)
542 // B3 (BDS)
543 // G2a (GLO)
544 if (satSys == GAL)
545 {
546 return Frequency_::E06;
547 }
548 if (satSys == QZSS)
549 {
550 return Frequency_::J06;
551 }
552 if (satSys == BDS)
553 {
554 return Frequency_::B06;
555 }
556 if (satSys == GLO)
557 {
558 return Frequency_::R06;
559 }
560 break;
561 case 7:
562 // 7 = E5b (GAL)
563 // B2/B2b (BDS)
564 if (satSys == GAL)
565 {
566 return Frequency_::E07;
567 }
568 if (satSys == BDS)
569 {
570 return Frequency_::B07;
571 }
572 break;
573 case 8:
574 // 8 = E5a+b (GAL)
575 // B2a+b (BDS)
576 if (satSys == GAL)
577 {
578 return Frequency_::E08;
579 }
580 if (satSys == BDS)
581 {
582 return Frequency_::B08;
583 }
584 break;
585 case 9:
586 // 9 = S (IRNSS)
587 if (satSys == IRNSS)
588 {
589 return Frequency_::I09;
590 }
591 break;
592 case 0:
593 // 0 for type X (all)
594 break;
595 default:
596 break;
597 }
598
599 LOG_ERROR("Cannot find frequency for satellite system '{}' and band '{}'", satSys, band);
600 return Freq_None;
601}
602
603} // namespace vendor::RINEX
604
606{
608 switch (markerType)
609 {
610 case MarkerTypes::GEODETIC:
611 return "GEODETIC";
612 case MarkerTypes::NON_GEODETIC:
613 return "NON_GEODETIC";
614 case MarkerTypes::NON_PHYSICAL:
615 return "NON_PHYSICAL";
616 case MarkerTypes::SPACEBORNE:
617 return "SPACEBORNE";
618 case MarkerTypes::GROUND_CRAFT:
619 return "GROUND_CRAFT";
620 case MarkerTypes::WATER_CRAFT:
621 return "WATER_CRAFT";
622 case MarkerTypes::AIRBORNE:
623 return "AIRBORNE";
624 case MarkerTypes::FIXED_BUOY:
625 return "FIXED_BUOY";
626 case MarkerTypes::FLOATING_BUOY:
627 return "FLOATING_BUOY";
628 case MarkerTypes::FLOATING_ICE:
629 return "FLOATING_ICE";
630 case MarkerTypes::GLACIER:
631 return "GLACIER";
632 case MarkerTypes::BALLISTIC:
633 return "BALLISTIC";
634 case MarkerTypes::ANIMAL:
635 return "ANIMAL";
636 case MarkerTypes::HUMAN:
637 return "HUMAN";
638 case MarkerTypes::USER_DEFINED:
639 return "USER_DEFINED";
640 case MarkerTypes::COUNT:
641 return "";
642 }
643 return "";
644}
645
647{
649 switch (markerType)
650 {
651 case MarkerTypes::GEODETIC:
652 return "Earth-fixed, high-precision monument";
653 case MarkerTypes::NON_GEODETIC:
654 return "Earth-fixed, low-precision monument";
655 case MarkerTypes::NON_PHYSICAL:
656 return "Generated from network processing";
657 case MarkerTypes::SPACEBORNE:
658 return "Orbiting space vehicle";
659 case MarkerTypes::GROUND_CRAFT:
660 return "Mobile terrestrial vehicle";
661 case MarkerTypes::WATER_CRAFT:
662 return "Mobile water craft";
663 case MarkerTypes::AIRBORNE:
664 return "Aircraft, balloon, etc.";
665 case MarkerTypes::FIXED_BUOY:
666 return "'Fixed' on water surface";
667 case MarkerTypes::FLOATING_BUOY:
668 return "Floating on water surface";
669 case MarkerTypes::FLOATING_ICE:
670 return "Floating ice sheet, etc.";
671 case MarkerTypes::GLACIER:
672 return "'Fixed' on a glacier";
673 case MarkerTypes::BALLISTIC:
674 return "Rockets, shells, etc";
675 case MarkerTypes::ANIMAL:
676 return "Animal carrying a receiver";
677 case MarkerTypes::HUMAN:
678 return "Human being";
679 case MarkerTypes::USER_DEFINED:
680 return "Users may define other project-dependent keywords";
681 case MarkerTypes::COUNT:
682 return "";
683 }
684 return "";
685}
686
687} // namespace NAV
nlohmann::json json
json namespace
Utility class for logging to console and file.
#define LOG_ERROR
Error occurred, which stops part of the program to work, but not everything.
Definition Logger.hpp:73
Simple Math functions.
Functions to work with RINEX.
Provides the version of the project.
#define PROJECT_VERSION_STRING
Project Version String in the form "major.minor.patch".
Definition Version.hpp:32
Enumerate for GNSS Codes.
Definition Code.hpp:89
Frequency getFrequency() const
Returns the frequency for the code.
Definition Code.cpp:611
Frequency definition for different satellite systems.
Definition Frequency.hpp:59
SatelliteSystem getSatSys() const
Get the satellite system for which this frequency is defined.
The class is responsible for all time-related tasks.
Definition InsTime.hpp:710
constexpr InsTime_YMDHMS toYMDHMS(TimeSystem timesys=UTC, int digits=-1) const
Converts this time object into a different format.
Definition InsTime.hpp:871
Time System defintions.
void from_json(const json &j, ObsHeader &obj)
Converts the provided json object into a struct.
ObsType
Observation types of the 'SYS / # / OBS TYPES' header.
@ X
Receiver channel numbers.
@ S
Raw signal strength(carrier to noise ratio)
@ I
Ionosphere phase delay.
std::string timeSystemString(TimeSystem timeSys)
Converts the satellite system(s) to 3 characters representation of the time system.
char obsTypeToChar(ObsType type)
Converts an ObsType to char.
void to_json(json &j, const ObsHeader &obj)
Converts the provided struct into a json object.
TimeSystem timeSystem(SatelliteSystem satSys)
Converts the satellite system(s) to the time system.
Frequency getFrequencyFromBand(SatelliteSystem satSys, int band)
Get the Frequency from the provided satellite system and band in the 'SYS / # / OBS TYPES' header.
ObsType obsTypeFromChar(char c)
Converts a character to an ObsType.
TimeSystem_
List of all time systems.
@ IRNSST
Indian Regional Navigation Satellite System Time.
@ GST
Galileo System Time.
@ BDT
BeiDou Time.
@ GLNT
GLONASS Time (GLONASST)
@ TimeSys_None
No Time system.
@ QZSST
Quasi-Zenith Satellite System Time.
@ GPST
GPS Time.
@ UTC
Coordinated Universal Time.
@ E07
Galileo E5b (1207.14 MHz).
Definition Frequency.hpp:34
@ R03
GLONASS, "G3" (1202.025 MHz).
Definition Frequency.hpp:38
@ J01
QZSS L1 (1575.42 MHz).
Definition Frequency.hpp:47
@ B02
Beidou B1-2 (B1I) (1561.098 MHz).
Definition Frequency.hpp:42
@ S01
SBAS L1 (1575.42 MHz).
Definition Frequency.hpp:53
@ E06
Galileo E6 (1278.75 MHz).
Definition Frequency.hpp:33
@ Freq_None
None.
Definition Frequency.hpp:27
@ I09
IRNSS S (2492.028 MHz).
Definition Frequency.hpp:52
@ B05
Beidou B2a (1176.45 MHz).
Definition Frequency.hpp:43
@ I05
IRNSS L5 (1176.45 MHz).
Definition Frequency.hpp:51
@ R02
GLONASS, "G2" (1246 MHz).
Definition Frequency.hpp:37
@ B08
Beidou B2 (B2a + B2b) (1191.795MHz).
Definition Frequency.hpp:46
@ R06
GLONASS, "G2a" (1248.06 MHz).
Definition Frequency.hpp:40
@ E01
Galileo, "E1" (1575.42 MHz).
Definition Frequency.hpp:31
@ B06
Beidou B3 (1268.52 MHz).
Definition Frequency.hpp:44
@ E05
Galileo E5a (1176.45 MHz).
Definition Frequency.hpp:32
@ S05
SBAS L5 (1176.45 MHz).
Definition Frequency.hpp:54
@ G02
GPS L2 (1227.6 MHz).
Definition Frequency.hpp:29
@ R01
GLONASS, "G1" (1602 MHZ).
Definition Frequency.hpp:36
@ G01
GPS L1 (1575.42 MHz).
Definition Frequency.hpp:28
@ B01
Beidou B1 (1575.42 MHz).
Definition Frequency.hpp:41
@ J05
QZSS L5 (1176.45 MHz).
Definition Frequency.hpp:49
@ J02
QZSS L2 (1227.6 MHz).
Definition Frequency.hpp:48
@ B07
Beidou B2b (B2I) (1207.14 MHz).
Definition Frequency.hpp:45
@ R04
GLONASS, "G1a" (1600.995 MHZ).
Definition Frequency.hpp:39
@ E08
Galileo E5 (E5a + E5b) (1191.795MHz).
Definition Frequency.hpp:35
@ J06
QZSS L6 / LEX (1278.75 MHz).
Definition Frequency.hpp:50
@ G05
GPS L5 (1176.45 MHz).
Definition Frequency.hpp:30
const char * to_string(gui::widgets::PositionWithFrame::ReferenceFrame refFrame)
Converts the enum to a string.
const char * tooltip(vendor::RINEX::ObsHeader::MarkerTypes markerType)
Converts the enum to a string tooltip.
SatelliteSystem_
Satellite System enumeration.
@ GPS
Global Positioning System.
@ QZSS
Quasi-Zenith Satellite System.
@ GLO
Globalnaja nawigazionnaja sputnikowaja sistema (GLONASS)
@ GAL
Galileo.
@ SBAS
Satellite Based Augmentation System.
@ BDS
Beidou.
@ SatSys_None
No Satellite system.
@ IRNSS
Indian Regional Navigation Satellite System.
Satellite System type.
Rinex Observation File Header information.
std::string headerLineApproxPositionXYZ() const
Generates the Header line 'APPROX POSITION XYZ'.
Eigen::Vector3d approxPositionXYZ
Geocentric approximate marker position (Units: Meters, System: ITRS recommended) Optional for moving ...
MarkerTypes markerType
Type of the marker.
std::map< SatelliteSystem, std::vector< ObservationDescription > > systemObsTypes
Observation types for each satellite system.
InsTime timeFirstObs
Time of first observation record.
std::string headerLineComments() const
Generates the Header line 'COMMENT'.
std::string headerLineRinexVersionType() const
Generates the Header line 'RINEX VERSION / TYPE'.
std::string headerLineTimeOfFirstObs() const
Generates the Header line 'TIME OF FIRST OBS'.
std::string markerTypeUser
User-defined Marker Type [A20].
std::string headerLineMarkerNumber() const
Generates the Header line 'MARKER NUMBER'.
double version
Format version.
std::string headerLineNumSatellites() const
Generates the Header line '# OF SATELLITES'.
std::string observer
Name of observer [A20].
std::string runBy
Name of agency creating current file [A20].
SatelliteSystem satSys
Satellite System.
std::vector< std::string > comments
Comment line(s) [A60] (Optional)
std::string headerLineMarkerType() const
Generates the Header line 'MARKER TYPE'.
std::string markerNumber
Number of antenna marker [A20] (Optional)
std::string headerLineLeapSeconds() const
Generates the Header line 'LEAP SECONDS'.
std::string agency
Name of agency [A40].
std::string headerLineTimeOfLastObs() const
Generates the Header line 'TIME OF LAST OBS'.
std::string markerName
Name of antenna marker [A60].
std::string antennaNumber
Antenna number [A20].
std::string headerLineAntNumType() const
Generates the Header line 'ANT # / TYPE'.
MarkerTypes
Available marker types.
@ USER_DEFINED
Users may define other project-dependent keywords.
std::string receiverVersion
Receiver version (e.g. Internal Software Version) [A20].
bool approxPositionEnabled
Whether the approx position should be written.
static std::string headerLineGlonassCodPhsBis()
Generates the Header line 'GLONASS COD/PHS/BIS'.
std::string headerLineInterval() const
Generates the Header line 'INTERVAL'.
std::string headerLineSysNumObsType() const
Generates the Header line 'SYS / # / OBS TYPES'.
void reset()
Reset all dynamic data.
std::string headerLineRecNumTypeVers() const
Generates the Header line 'REC # / TYPE / VERS'.
std::array< double, 3 > antennaDeltaHeightEastNorth
Antenna height and horizontal eccentricity of ARP relative to the marker (east/north) in (meters) [F1...
std::unordered_set< SatId > satellites
Satellites observed.
std::string headerLineAntennaDeltaHEN() const
Generates the Header line 'ANTENNA: DELTA H/E/N'.
TimeSystem timeSys
Time system used.
std::string epochRecordLine(const InsTime &epochTime, size_t nSatellites) const
Generates the epoch line.
std::string headerLineObserverAgency() const
Generates the Header line 'OBSERVER / AGENCY'.
double interval
Observation interval in seconds.
std::string generateHeader() const
Generates the RINEX observation header.
std::string headerLinePgmRunByDate() const
Generates the Header line 'PGM / RUN BY / DATE'.
std::string receiverNumber
Receiver number [A20].
std::string receiverType
Receiver type [A20].
static std::string headerLineSysPhaseShift()
Generates the Header line 'SYS / PHASE SHIFT'.
static std::string headerLineEndOfHeader()
Generates the Header line 'END OF HEADER'.
InsTime timeLastObs
Time of last observation record.
std::string antennaType
Antenna type [A20].
static std::string headerLineSignalStrengthUnit()
Generates the Header line 'SIGNAL STRENGTH UNIT'.
bool addObsType(const Code &code, ObsType type)
Adds the obs type if not existing already.
std::string headerLineMarkerName() const
Generates the Header line 'MARKER NAME'.
Description of the observations from the 'SYS / # / OBS TYPES' header.