|
556 | 556 | "id": "3c5de62f", |
557 | 557 | "metadata": {}, |
558 | 558 | "source": [ |
559 | | - "The data required associated with precise ephemerides involves .sp3 and .clk files, which can be downloaded from [CDDIS](https://cddis.nasa.gov/Data_and_Derived_Products/GNSS/gnss_mgex.html) or [CORS](https://geodesy.noaa.gov/UFCORS/).\n", |
| 559 | + "The data required to calculate with precise ephemerides uses .sp3 and .clk files, which can be downloaded from [CDDIS](https://cddis.nasa.gov/Data_and_Derived_Products/GNSS/gnss_mgex.html) or [CORS](https://geodesy.noaa.gov/UFCORS/).\n", |
560 | 560 | "\n", |
561 | | - "The .sp3 files provides post-processed, accurate and precise information regarding the 3-D satellite position in Earth-Centered Earth-Fixed (ECEF) frame at intervals of 15mins each. \n", |
| 561 | + "The .sp3 files provide post-processed, accurate, and precise information regarding 3-D satellite position in the Earth-Centered Earth-Fixed (ECEF) frame at intervals of 15mins each. \n", |
562 | 562 | "\n", |
563 | | - "Similarly, the .clk files provides post-processed, accurate and precise information on satellite clock errors at intervals of 30secs each. \n", |
| 563 | + "Similarly, the .clk files provide post-processed, accurate and precise information on satellite clock errors at intervals of 30secs each. \n", |
564 | 564 | "\n", |
565 | | - "These .sp3 and .clk files are available for any GNSS constellation, and hence, provides a common processing platform for applications that involve multi-GNSS satellite signals (without requiring to parse the individual broadcast ephemeris in a separate, individual manner). Also, unlike broadcast ephemeris that can suffer from signal-in-space anomalies, the .sp3 and .clk files are guaranteed to provide accurate satellite information. However, note that, these files are only available in a post-processed manner, and not in real-time" |
| 565 | + "These .sp3 and .clk files are available for any GNSS constellation, and hence, provide a common processing platform for applications that involve multi-GNSS satellite signals (without requiring to parse the broadcast ephemeris from each constellation separately one at a time). Also, unlike broadcast ephemeris that can suffer from signal-in-space anomalies, the .sp3 and .clk files are guaranteed to provide accurate satellite information. However, note that, these files are only available in a post-processed manner, and not in real-time" |
566 | 566 | ] |
567 | 567 | }, |
568 | 568 | { |
569 | 569 | "cell_type": "markdown", |
570 | 570 | "id": "67fc4f2e", |
571 | 571 | "metadata": {}, |
572 | 572 | "source": [ |
573 | | - "To analyze this precise ephemerides functionality, \n", |
574 | | - "1. Load the derived data from AndroidDerived\n", |
575 | | - "2. Remove the rows in NavData class that refer to satellite information (3-D satellite position, 3-D satellite velocity, clock bias and clock drift), i.e., SV_KEYS =['x_sv_m', 'y_sv_m', 'z_sv_m', 'vx_sv_mps','vy_sv_mps','vz_sv_mps', 'b_sv_m', 'b_dot_sv_mps']\n", |
576 | | - "3. Specify the .sp3 and .clk files, as well as the desired constellations from which one intends to extract satellite information\n", |
577 | | - "4. Populate the columns of SV_KEYS with information extracted via precise ephemerides" |
| 573 | + "We show how to analyze this precise ephemerides functionality for the Android derived dataset in the following cells, \n", |
| 574 | + "1. Load the derived data from AndroidDerived" |
578 | 575 | ] |
579 | 576 | }, |
580 | 577 | { |
|
584 | 581 | "metadata": {}, |
585 | 582 | "outputs": [], |
586 | 583 | "source": [ |
587 | | - "from gnss_lib_py.parsers.precise_ephemerides import compute_multi_gnss_from_precise_eph\n", |
588 | | - "import numpy as np" |
| 584 | + "from gnss_lib_py.parsers.precise_ephemerides import multi_gnss_from_precise_eph\n", |
| 585 | + "import numpy as np\n", |
| 586 | + "\n", |
| 587 | + "# load Android Google Challenge data\n", |
| 588 | + "!wget https://raw.githubusercontent.com/Stanford-NavLab/gnss_lib_py/ramya/multiGNSS_sp3/data/unit_test/android_2021/Pixel4_derived_clkdiscnt.csv --quiet -O \"Pixel4_derived_clkdiscnt.csv\"\n", |
| 589 | + "derived_data = AndroidDerived2021(\"Pixel4_derived_clkdiscnt.csv\", remove_timing_outliers=False)" |
589 | 590 | ] |
590 | 591 | }, |
591 | 592 | { |
592 | | - "cell_type": "code", |
593 | | - "execution_count": null, |
594 | | - "id": "e62ed8ee", |
| 593 | + "cell_type": "markdown", |
| 594 | + "id": "4e4ee7c8", |
595 | 595 | "metadata": {}, |
596 | | - "outputs": [], |
597 | 596 | "source": [ |
598 | | - "# download .sp3 data file\n", |
599 | | - "!wget https://raw.githubusercontent.com/Stanford-NavLab/gnss_lib_py/ramya/multiGNSS_sp3/data/unit_test/precise_ephemeris/grg21553_short.sp3 --quiet -O \"grg21553_short.sp3\"\n", |
600 | | - "\n", |
601 | | - "# Specify .sp3 file path to extract precise ephemerides\n", |
602 | | - "sp3_path = \"grg21553_short.sp3\"" |
| 597 | + "2. Specify the paths to the .sp3 and .clk files, as well as the desired constellations from which one intends to extract satellite information" |
603 | 598 | ] |
604 | 599 | }, |
605 | 600 | { |
606 | 601 | "cell_type": "code", |
607 | 602 | "execution_count": null, |
608 | | - "id": "50467c3f", |
| 603 | + "id": "e62ed8ee", |
609 | 604 | "metadata": {}, |
610 | 605 | "outputs": [], |
611 | 606 | "source": [ |
| 607 | + "# download .sp3 data file\n", |
| 608 | + "!wget https://raw.githubusercontent.com/Stanford-NavLab/gnss_lib_py/ramya/multiGNSS_sp3/data/unit_test/precise_ephemeris/grg21553_short.sp3 --quiet -O \"grg21553_short.sp3\"\n", |
| 609 | + "# Specify .sp3 file path to extract precise ephemerides\n", |
| 610 | + "sp3_path = \"grg21553_short.sp3\"\n", |
| 611 | + "\n", |
612 | 612 | "# download .clk data file\n", |
613 | 613 | "!wget https://raw.githubusercontent.com/Stanford-NavLab/gnss_lib_py/ramya/multiGNSS_sp3/data/unit_test/precise_ephemeris/grg21553_short.clk --quiet -O \"grg21553_short.clk\"\n", |
614 | | - "\n", |
615 | 614 | "# Specify .clk file path to extract precise ephemerides\n", |
616 | | - "clk_path = \"grg21553_short.clk\"" |
| 615 | + "clk_path = \"grg21553_short.clk\"\n", |
| 616 | + "\n", |
| 617 | + "# Specify the GNSS constellations for which you want to extract precise ephemeris\n", |
| 618 | + "gnss_constellations = {'gps', 'glonass'}" |
617 | 619 | ] |
618 | 620 | }, |
619 | 621 | { |
620 | | - "cell_type": "code", |
621 | | - "execution_count": null, |
622 | | - "id": "cadb1cf1", |
| 622 | + "cell_type": "markdown", |
| 623 | + "id": "2567ff0f", |
623 | 624 | "metadata": {}, |
624 | | - "outputs": [], |
625 | 625 | "source": [ |
626 | | - "# load Android Google Challenge data\n", |
627 | | - "!wget https://raw.githubusercontent.com/Stanford-NavLab/gnss_lib_py/ramya/multiGNSS_sp3/data/unit_test/android_2021/Pixel4_derived_clkdiscnt.csv --quiet -O \"Pixel4_derived_clkdiscnt.csv\"\n", |
628 | | - "derived_data = AndroidDerived2021(\"Pixel4_derived_clkdiscnt.csv\", remove_timing_outliers=False)" |
| 626 | + "3. Remove the rows in NavData class that refer to satellite information (3-D satellite position, 3-D satellite velocity, clock bias and clock drift), \n", |
| 627 | + "\n", |
| 628 | + " i.e., `SV_KEYS =['x_sv_m', 'y_sv_m', 'z_sv_m', 'vx_sv_mps','vy_sv_mps','vz_sv_mps', 'b_sv_m', 'b_dot_sv_mps']`" |
629 | 629 | ] |
630 | 630 | }, |
631 | 631 | { |
|
641 | 641 | " 'b_sv_m', 'b_dot_sv_mps']\n", |
642 | 642 | "\n", |
643 | 643 | "for sv in SV_KEYS:\n", |
644 | | - " derived_data[sv] = 0*derived_data[sv]" |
| 644 | + " derived_data[sv] = 0" |
| 645 | + ] |
| 646 | + }, |
| 647 | + { |
| 648 | + "cell_type": "markdown", |
| 649 | + "id": "458b0a46", |
| 650 | + "metadata": {}, |
| 651 | + "source": [ |
| 652 | + "4. Populate the columns of SV_KEYS with information extracted via precise ephemerides" |
645 | 653 | ] |
646 | 654 | }, |
647 | 655 | { |
|
651 | 659 | "metadata": {}, |
652 | 660 | "outputs": [], |
653 | 661 | "source": [ |
654 | | - "# Specify the GNSS constellations for which you want to extract precise ephemeris\n", |
655 | | - "gnss_consts = {'gps', 'glonass'}\n", |
656 | | - "\n", |
657 | 662 | "# Update derived_data class with satellite information computed via precise ephemerides\n", |
658 | | - "derived_multi_gnss = compute_multi_gnss_from_precise_eph(derived_data, sp3_path, \\\n", |
659 | | - " clk_path, gnss_consts, verbose = False)" |
| 663 | + "derived_multi_gnss = multi_gnss_from_precise_eph(derived_data, sp3_path, \\\n", |
| 664 | + " clk_path, gnss_constellations, verbose = False)" |
660 | 665 | ] |
661 | 666 | }, |
662 | 667 | { |
|
668 | 673 | "source": [ |
669 | 674 | "# Check that all the desired fields related to satellite information have useful\n", |
670 | 675 | "# information, and norm of computed satellite position matches the altitude of GNSS constellation\n", |
671 | | - "norm_val = np.linalg.norm(np.transpose([derived_multi_gnss[SV_KEYS[0]][0:2],\n", |
| 676 | + "sat_alt = np.linalg.norm(np.transpose([derived_multi_gnss[SV_KEYS[0]][0:2],\n", |
672 | 677 | " derived_multi_gnss[SV_KEYS[1]][0:2], \n", |
673 | 678 | " derived_multi_gnss[SV_KEYS[2]][0:2]]), axis=1)\n", |
674 | | - "print(derived_multi_gnss[\"gnss_id\"][0:2], norm_val)\n", |
675 | | - "print(\" \")\n", |
| 679 | + "print('Distance of two satellites from the center of the Earth (expected around 26000000 m):', derived_multi_gnss[\"gnss_id\"][0:2], sat_alt)\n", |
| 680 | + "print(\"Extracted values for same satellites: \")\n", |
676 | 681 | "for sv in SV_KEYS:\n", |
677 | | - " print(sv, derived_multi_gnss[sv][0:2])" |
| 682 | + " print(sv, ':', derived_multi_gnss[sv][0:2])" |
678 | 683 | ] |
679 | 684 | } |
680 | 685 | ], |
|
0 commit comments