[Web][node]P2 2.day1-01-Node是什么

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

[107]HELLO! BOOT0 is starting! [110]BOOT0 commit : 4f5e01ed0b [113]set pll start [115]fix vccio detect value:0xc0 [122]periph0 has been enabled [125]set pll end [127][pmu]: bus read error [129]board init ok [131]get_pmu_exist() = -1 [134]DRAM BOOT DRIVE INFO: V0.33 [137]DRAM CLK = 792 MHz [139]DRAM Type = 3 (2:DDR2,3:DDR3) [143]DRAMC ZQ value: 0x7b7bfb [145]DRAM ODT value: 0x42. [148]ddr_efuse_type: 0x0 [151]DRAM SIZE =512 M [153]dram_tpr4:0x0 [155]PLL_DDR_CTRL_REG:0xf8004100 [158]DRAM_CLK_REG:0xc0000000 [161][TIMING DEBUG] MR2= 0x18 [168]DRAM simple test OK. [171]rtc standby flag is 0x0, super standby flag is 0x0 [176]dram size =512 [179]card no is 2 [180]sdcard 2 line count 4 [183][mmc]: mmc driver ver 2021-05-21 14:47 [192][mmc]: Wrong media type 0x0, but host sdc2, try mmc first [198][mmc]: ***Try MMC card 2*** [222][mmc]: RMCA OK! [224][mmc]: mmc 2 bias 0 [227][mmc]: MMC 5.1 [229][mmc]: HSSDR52/SDR25 4 bit [232][mmc]: 50000000 Hz [234][mmc]: 7456 MB [236][mmc]: ***SD/MMC 2 init OK!!!*** [332]Loading boot-pkg Succeed(index=0). [335]Entry_name = u-boot [342]Entry_name = optee [347]Entry_name = dtb [349]tunning data addr:0x430003e8 [353]Jump to second Boot. M/TC: OP-TEE version: e9372c9c-dirty (gcc version 5.3.1 20160412 (Linaro GCC 5.3-2016.05)) #2 Sat Mar 19 11:09:45 UTC 2022 arm U-Boot 2018.05-gaf00d2d (Feb 16 2023 - 11:35:33 +0000) Allwinner Technology [00.409]CPU: Allwinner Family [00.412]Model: sun8iw20 [00.414]DRAM: 512 MiB [00.417]Relocation Offset is: 1cec0000 [00.445]secure enable bit: 0 E/TC:0 tee_read_fdt:433 fine node /firmware/optee failed with FDT_ERR_NOTFOUND [00.457]smc_tee_inform_fdt failed with: -65536[00.461]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=300Mhz [00.467]gic: sec monitor mode [00.470]flash init start [00.472]workmode = 0,storage type = 2 [00.476][mmc]: mmc driver ver uboot2018:2021-08-26 16:30:00 [00.482][mmc]: SUNXI SDMMC Controller Version:0x50310 [00.507][mmc]: Best spd md: 2-HSDDR52/DDR50, freq: 2-50000000, Bus width: 4 [00.514]sunxi flash init ok [00.516]line:714 init_clocks __clk_init: clk pll_periph0x2 already initialized register fix_factor clk error [00.526]drv_disp_init request pwm success, pwm7:pwm7:0x2000c00. [00.541]drv_disp_init finish [00.543]boot_gui_init:start partno erro : can't find partition Reserve0 [00.552]Get Reserve0 partition number fail! [00.556]set disp.dev2_output_type fail. using defval=0 hdmi hpd out, force open? [00.564]boot_gui_init:finish partno erro : can't find partition bootloader 54 bytes read in 1 ms (52.7 KiB/s) [00.577]bmp_name=bootlogo.bmp size 38454 38454 bytes read in 1 ms (36.7 MiB/s) [00.593]Loading Environment from SUNXI_FLASH... OK [00.617]Item0 (Map) magic is bad [00.620]the secure storage item0 copy0 magic is bad [00.636]Item0 (Map) magic is bad [00.639]the secure storage item0 copy1 magic is bad [00.643]Item0 (Map) magic is bad [00.646]usb burn from boot delay time 0 weak:otg_phy_config [00.658]usb prepare ok [01.461]overtime [01.464]do_burn_from_boot usb : no usb exist List file under ULI/factory ** Unrecognized filesystem type ** root_partition is rootfs set root to /dev/mmcblk0p5 [01.479]update part info [01.481]update bootcmd [01.484]change working_fdt 0x5be7fe70 to 0x5be5fe70 [01.489][mmc]: no mmc-hs400-1_8v! [01.492][mmc]: delete mmc-hs200-1_8v from dtb [01.496][mmc]: get max-frequency ok 50000000 Hz [01.516]update dts Hit any key to stop autoboot: 0 [01.628]no vendor_boot partition is found Android's image name: h133-p1 [01.640]Starting kernel ... [01.643][mmc]: mmc exit start [01.662][mmc]: mmc 2 exit ok [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 5.4.61 (liuzhi@server-compile) (arm-openwrt-linux-muslgnueabi-gcc.bin (OpenWrt/Linaro GCC 6.4-2017.11 2017-11) 6.4.1, GNU ld (GNU Binutils) 2.27) #3 SMP PREEMPT Tue Oct 21 02:01:56 UTC 2025 [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d [ 0.000000] CPU: div instructions available: patching division code [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] OF: fdt: Machine model: sun8iw20 [ 0.000000] printk: bootconsole [earlycon0] enabled [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] cma: Reserved 8 MiB at 0x5f800000 [ 0.000000] On node 0 totalpages: 131072 [ 0.000000] Normal zone: 1024 pages used for memmap [ 0.000000] Normal zone: 0 pages reserved [ 0.000000] Normal zone: 131072 pages, LIFO batch:31 [ 0.000000] psci: probing for conduit method from DT. [ 0.000000] psci: PSCIv1.0 detected in firmware. [ 0.000000] psci: Using standard PSCI v0.2 function IDs [ 0.000000] psci: MIGRATE_INFO_TYPE not supported. [ 0.000000] psci: SMC Calling Convention v1.0 [ 0.000000] percpu: Embedded 15 pages/cpu s30796 r8192 d22452 u61440 [ 0.000000] pcpu-alloc: s30796 r8192 d22452 u61440 alloc=15*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 130048 [ 0.000000] Kernel command line: earlyprintk=sunxi-uart,0x02500000 clk_ignore_unused initcall_debug=0 console=ttyS0,115200 loglevel=8 root=/dev/mmcblk0p5 init=/sbin/init partitions=boot-resource@mmcblk0p1:env@mmcblk0p2:env-redund@mmcblk0p3:boot@mmcblk0p4:rootfs@mmcblk0p5:private@mmcblk0p6:recovery@mmcblk0p7:UDISK@mmcblk0p8 cma=8M snum= mac_addr= wifi_mac= bt_mac= specialstr= gpt=1 androidboot.mode=normal androidboot.hardware=sun8iw20p1 boot_type=2 androidboot.boot_type=2 gpt=1 uboot_message=2018.05-gaf00d2d(02/16/2023-11:35:33) mbr_offset=1032192 disp_reserve=8294400,0x5bee8d40 androidboot.dramsize=512 [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear) [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear) [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] Memory: 490144K/524288K available (7168K kernel code, 386K rwdata, 1900K rodata, 1024K init, 174K bss, 25952K reserved, 8192K cma-reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1 [ 0.000000] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] Tasks RCU enabled. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies. [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] random: get_random_bytes called from start_kernel+0x338/0x554 with crng_init=0 [ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys). [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns [ 0.000006] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns [ 0.008019] Switching to timer-based delay loop, resolution 41ns [ 0.014194] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns [ 0.023949] Console: colour dummy device 80x30 [ 0.028432] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000) [ 0.038804] pid_max: default: 32768 minimum: 301 [ 0.043594] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.050930] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear) [ 0.059338] CPU: Testing write buffer coherency: ok [ 0.064599] /cpus/cpu@0 missing clock-frequency property [ 0.069937] /cpus/cpu@1 missing clock-frequency property [ 0.075283] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.081572] Setting up static identity map for 0x40100000 - 0x40100060 [ 0.088263] rcu: Hierarchical SRCU implementation. [ 0.093599] smp: Bringing up secondary CPUs ... [ 0.099407] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 [ 0.099565] smp: Brought up 1 node, 2 CPUs [ 0.109377] SMP: Total of 2 processors activated (96.00 BogoMIPS). [ 0.115557] CPU: All CPU(s) started in SVC mode. [ 0.120753] devtmpfs: initialized [ 0.136209] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5 [ 0.144434] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns [ 0.154309] futex hash table entries: 512 (order: 3, 32768 bytes, linear) [ 0.161629] pinctrl core: initialized pinctrl subsystem [ 0.168285] NET: Registered protocol family 16 [ 0.174504] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.219593] rtc_ccu: sunxi ccu init OK [ 0.225744] ccu: sunxi ccu init OK [ 0.229572] r_ccu: sunxi ccu init OK [ 0.280133] iommu: Default domain type: Translated [ 0.285257] sunxi iommu: irq = 24 [ 0.289741] SCSI subsystem initialized [ 0.293934] usbcore: registered new interface driver usbfs [ 0.300010] usbcore: registered new interface driver hub [ 0.305466] usbcore: registered new device driver usb [ 0.311043] mc: Linux media interface: v0.10 [ 0.315443] videodev: Linux video capture interface: v2.00 [ 0.322270] Advanced Linux Sound Architecture Driver Initialized. [ 0.329147] Bluetooth: Core ver 2.22 [ 0.332883] NET: Registered protocol family 31 [ 0.337341] Bluetooth: HCI device and connection manager initialized [ 0.343745] Bluetooth: HCI socket layer initialized [ 0.348632] Bluetooth: L2CAP socket layer initialized [ 0.353719] Bluetooth: SCO socket layer initialized [ 0.358955] pwm module init! [ 0.363280] g2d 5410000.g2d: Adding to iommu group 0 [ 0.368805] G2D: rcq version initialized.major:250 [ 0.374297] input: sunxi-keyboard as /devices/virtual/input/input0 [ 0.381991] clocksource: Switched to clocksource arch_sys_counter [ 0.397314] sun8iw20-pinctrl 2000000.pinctrl: initialized sunXi PIO driver [ 0.418941] NET: Registered protocol family 2 [ 0.424293] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear) [ 0.432921] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear) [ 0.440708] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear) [ 0.447973] TCP: Hash tables configured (established 4096 bind 4096) [ 0.454516] UDP hash table entries: 256 (order: 1, 8192 bytes, linear) [ 0.461071] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear) [ 0.468320] NET: Registered protocol family 1 [ 0.475345] Initialise system trusted keyrings [ 0.480008] workingset: timestamp_bits=30 max_order=17 bucket_order=0 [ 0.495599] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.501649] ntfs: driver 2.1.32 [Flags: R/W]. [ 0.536001] Key type asymmetric registered [ 0.540120] Asymmetric key parser 'x509' registered [ 0.545466] io scheduler mq-deadline registered [ 0.549998] io scheduler kyber registered [ 0.554148] atomic64_test: passed [ 0.559190] [DISP]disp_module_init [ 0.563186] disp 5000000.disp: Adding to iommu group 0 [ 0.569588] display_fb_request,fb_id:0 [ 0.591601] [DISP]disp_module_init finish [ 0.596426] sunxi_sid_init()551 - insmod ok [ 0.601062] pwm-regulator: supplied by regulator-dummy [ 0.607802] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pb not found, using dummy regulator [ 0.618174] uart uart0: get regulator failed [ 0.622514] uart uart0: uart0 supply uart not found, using dummy regulator [ 0.629722] uart0: ttyS0 at MMIO 0x2500000 (irq = 34, base_baud = 1500000) is a SUNXI [ 0.637600] sw_console_setup()1808 - console setup baud 115200 parity n bits 8, flow n [ 0.645591] printk: console [ttyS0] enabled [ 0.645591] printk: console [ttyS0] enabled [ 0.654482] printk: bootconsole [earlycon0] disabled [ 0.654482] printk: bootconsole [earlycon0] disabled [ 0.666177] uart uart1: get regulator failed [ 0.670974] uart uart1: uart1 supply uart not found, using dummy regulator [ 0.679005] uart1: ttyS1 at MMIO 0x2500400 (irq = 35, base_baud = 1500000) is a SUNXI [ 0.688855] misc dump reg init [ 0.693755] sunxi-rfkill soc@3000000:rfkill@0: module version: v1.0.9 [ 0.700974] sunxi-rfkill soc@3000000:rfkill@0: devm_pinctrl_get() failed! [ 0.708615] sunxi-rfkill soc@3000000:rfkill@0: get gpio chip_en failed [ 0.715942] sunxi-rfkill soc@3000000:rfkill@0: get gpio power_en failed [ 0.723365] sunxi-rfkill soc@3000000:rfkill@0: wlan_busnum (1) [ 0.729893] sunxi-rfkill soc@3000000:rfkill@0: Missing wlan_power. [ 0.736828] sunxi-rfkill soc@3000000:rfkill@0: wlan clock[0] (32k-fanout1) [ 0.744565] sunxi-rfkill soc@3000000:rfkill@0: wlan_regon gpio=209 assert=1 [ 0.752416] sunxi-rfkill soc@3000000:rfkill@0: wlan_hostwake gpio=202 assert=1 [ 0.760513] sunxi-rfkill soc@3000000:rfkill@0: wakeup source is enabled [ 0.768198] sunxi-rfkill soc@3000000:rfkill@0: Missing bt_power. [ 0.774967] sunxi-rfkill soc@3000000:rfkill@0: bt clock[0] (32k-fanout1) [ 0.782494] sunxi-rfkill soc@3000000:rfkill@0: get gpio bt_rst failed [ 0.790533] [ADDR_MGT] addr_mgt_probe: module version: v1.0.9 [ 0.797688] [ADDR_MGT] addr_mgt_probe: success. [ 0.804256] libphy: Fixed MDIO Bus: probed [ 0.808851] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 0.816192] sunxi-ehci: EHCI SUNXI driver [ 0.821105] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 0.828111] sunxi-ohci: OHCI SUNXI driver [ 0.833247] usbcore: registered new interface driver uas [ 0.839279] usbcore: registered new interface driver usb-storage [ 0.846105] usbcore: registered new interface driver ums-alauda [ 0.852817] usbcore: registered new interface driver ums-cypress [ 0.859594] usbcore: registered new interface driver ums-datafab [ 0.866390] usbcore: registered new interface driver ums_eneub6250 [ 0.873390] usbcore: registered new interface driver ums-freecom [ 0.880163] usbcore: registered new interface driver ums-isd200 [ 0.886858] usbcore: registered new interface driver ums-jumpshot [ 0.893744] usbcore: registered new interface driver ums-karma [ 0.900322] usbcore: registered new interface driver ums-onetouch [ 0.907232] usbcore: registered new interface driver ums-realtek [ 0.914025] usbcore: registered new interface driver ums-sddr09 [ 0.920699] usbcore: registered new interface driver ums-sddr55 [ 0.927394] usbcore: registered new interface driver ums-usbat [ 0.934010] usbcore: registered new interface driver idmouse [ 0.941188] sunxi_gpadc_init,2145, success [ 0.946136] sunxi_gpadc_setup: get channel scan data failed [ 0.952672] input: sunxi-gpadc0 as /devices/virtual/input/input1 [ 0.960626] sunxi-rtc 7090000.rtc: errata__fix_alarm_day_reg_default_value(): ALARM0_DAY_REG=0, set it to 1 [ 0.972810] sunxi-rtc 7090000.rtc: registered as rtc0 [ 0.978588] sunxi-rtc 7090000.rtc: setting system clock to 1970-01-01T00:00:03 UTC (3) [ 0.987509] sunxi-rtc 7090000.rtc: sunxi rtc probed [ 0.993401] i2c /dev entries driver [ 0.997746] IR NEC protocol handler initialized [ 1.003357] sunxi cedar version 1.1 [ 1.007445] sunxi-cedar 1c0e000.ve: Adding to iommu group 0 [ 1.013728] VE: install start!!! [ 1.013728] [ 1.019293] VE: cedar-ve the get irq is 41 [ 1.019293] [ 1.025794] VE: ve_debug_proc_info:(ptrval), data:(ptrval), lock:(ptrval) [ 1.025794] [ 1.035068] VE: install end!!! [ 1.035068] [ 1.041073] sunxi-wdt 20500a0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0) [ 1.050330] usbcore: registered new interface driver btusb [ 1.056504] Bluetooth: XRadio Bluetooth LPM Mode Driver Ver 1.0.10 [ 1.063734] [XR_BT_LPM] bluesleep_probe: bt_wake polarity: 1 [ 1.070114] [XR_BT_LPM] bluesleep_probe: host_wake polarity: 1 [ 1.076675] [XR_BT_LPM] bluesleep_probe: wakeup source is disabled! [ 1.076675] [ 1.085353] [XR_BT_LPM] bluesleep_probe: uart_index(1) [ 1.093399] sun8iw20-pinctrl 2000000.pinctrl: 2000000.pinctrl supply vcc-pc not found, using dummy regulator [ 1.104667] sunxi-mmc 4022000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.23 2021-06-16 10:10) [ 1.114620] sunxi-mmc 4022000.sdmmc: ***ctl-spec-caps*** 308 [ 1.121009] sunxi-mmc 4022000.sdmmc: No vmmc regulator found [ 1.127359] sunxi-mmc 4022000.sdmmc: No vqmmc regulator found [ 1.133801] sunxi-mmc 4022000.sdmmc: No vdmmc regulator found [ 1.140231] sunxi-mmc 4022000.sdmmc: No vd33sw regulator found [ 1.146776] sunxi-mmc 4022000.sdmmc: No vd18sw regulator found [ 1.153313] sunxi-mmc 4022000.sdmmc: No vq33sw regulator found [ 1.159839] sunxi-mmc 4022000.sdmmc: No vq18sw regulator found [ 1.166421] sunxi-mmc 4022000.sdmmc: Cann't get pin bias hs pinstate,check if needed [ 1.176013] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.199721] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.210477] random: fast init done [ 1.222019] sunxi-mmc 4022000.sdmmc: detmode:alway in(non removable) [ 1.229152] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.233385] sunxi-mmc 4020000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.23 2021-06-16 10:10) [ 1.250799] sunxi-mmc 4020000.sdmmc: ***ctl-spec-caps*** 8 [ 1.251806] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.257022] sunxi-mmc 4020000.sdmmc: No vmmc regulator found [ 1.269944] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 400000Hz bm OD pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.274929] sunxi-mmc 4020000.sdmmc: No vqmmc regulator found [ 1.292986] sunxi-mmc 4020000.sdmmc: No vdmmc regulator found [ 1.299422] sunxi-mmc 4020000.sdmmc: No vd33sw regulator found [ 1.305988] sunxi-mmc 4020000.sdmmc: No vd18sw regulator found [ 1.312538] sunxi-mmc 4020000.sdmmc: No vq33sw regulator found [ 1.319085] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 400000Hz bm OD pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.319088] sunxi-mmc 4020000.sdmmc: No vq18sw regulator found [ 1.319570] sunxi-mmc 4020000.sdmmc: Got CD GPIO [ 1.330808] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 400000Hz bm OD pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.354222] sunxi-mmc 4020000.sdmmc: set cd-gpios as 24M fail [ 1.360912] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.361957] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 400000Hz bm OD pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.372108] sunxi-mmc 4020000.sdmmc: no vqmmc,Check if there is regulator [ 1.403255] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.403797] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.426544] sunxi-mmc 4020000.sdmmc: failed to get DS26_SDR12 used default [ 1.445644] sunxi-mmc 4022000.sdmmc: avoid to switch power_off_notification to POWERED_ON(0x01) [ 1.447112] sunxi-mmc 4020000.sdmmc: detmode:gpio irq [ 1.455431] sunxi-mmc 4022000.sdmmc: avoid to switch power_off_notification to POWERED_ON(0x01) [ 1.461612] sunxi-mmc 4021000.sdmmc: SD/MMC/SDIO Host Controller Driver(v4.23 2021-06-16 10:10) [ 1.471035] sunxi-mmc 4022000.sdmmc: avoid to switch power_off_notification to POWERED_ON(0x01) [ 1.480786] sunxi-mmc 4021000.sdmmc: ***ctl-spec-caps*** 8 [ 1.490378] sunxi-mmc 4022000.sdmmc: avoid to switch power_off_notification to POWERED_ON(0x01) [ 1.496561] sunxi-mmc 4021000.sdmmc: No vmmc regulator found [ 1.512610] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing MMC-HS(SDR20) dt B [ 1.512613] sunxi-mmc 4021000.sdmmc: No vqmmc regulator found [ 1.512620] sunxi-mmc 4021000.sdmmc: No vdmmc regulator found [ 1.530662] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 1 timing MMC-HS(SDR20) dt B [ 1.537097] sunxi-mmc 4021000.sdmmc: No vd33sw regulator found [ 1.555443] sunxi-mmc 4021000.sdmmc: No vd18sw regulator found [ 1.555452] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing MMC-HS(SDR20) dt B [ 1.573871] sunxi-mmc 4022000.sdmmc: sdc set ios:clk 50000000Hz bm PP pm ON vdd 21 width 4 timing MMC-DDR52 dt B [ 1.573874] sunxi-mmc 4021000.sdmmc: No vq33sw regulator found [ 1.573881] sunxi-mmc 4021000.sdmmc: No vq18sw regulator found [ 1.598481] sunxi-mmc 4021000.sdmmc: Cann't get pin bias hs pinstate,check if needed [ 1.598486] mmc0: new DDR MMC card at address 0001 [ 1.599792] mmcblk0: mmc0:0001 8GTF4R 7.28 GiB [ 1.618170] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm UP vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.629374] mmcblk0rpmb: mmc0:0001 8GTF4R partition 3 512 KiB, chardev (244:0) [ 1.629589] sunxi-mmc 4021000.sdmmc: no vqmmc,Check if there is regulator [ 1.646419] mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 [ 1.652068] sunxi-mmc 4020000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B [ 1.663196] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.663287] sunxi-mmc 4021000.sdmmc: failed to get DS26_SDR12 used default [ 1.695313] sunxi-mmc 4021000.sdmmc: detmode:manually by software [ 1.702472] sunxi-mmc 4021000.sdmmc: smc 2 p1 err, cmd 52, RE !! [ 1.703404] usbcore: registered new interface driver usbhid [ 1.715504] usbhid: USB HID core driver [ 1.715773] sunxi-mmc 4021000.sdmmc: smc 2 p1 err, cmd 52, RE !! [ 1.719800] exFAT: Version 1.3.0 [ 1.730188] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.741941] sunxi-mmc 4021000.sdmmc: failed to get DS26_SDR12 used default [ 1.744285] usbcore: registered new interface driver snd-usb-audio [ 1.757904] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 400000Hz bm PP pm ON vdd 21 width 1 timing LEGACY(SDR12) dt B [ 1.758693] sunxi-daudio 2034000.daudio: regulator missing or invalid [ 1.770024] sunxi-mmc 4021000.sdmmc: failed to get DS26_SDR12 used default [ 1.777754] [AUDIOCODEC][sunxi_codec_parse_params][2412]:digital_vol:0, lineout_vol:26, mic1gain:31, mic2gain:31 pa_msleep:120, pa_level:1, pa_pwr_level:1 [ 1.777754] [ 1.801741] sunxi-mmc 4021000.sdmmc: smc 2 p1 err, cmd 5, RE !! [ 1.808453] sunxi-mmc 4021000.sdmmc: smc 2 p1 err, cmd 5, RE !! [ 1.815112] sunxi-mmc 4021000.sdmmc: smc 2 p1 err, cmd 5, RE !! [ 1.821759] sunxi-mmc 4021000.sdmmc: smc 2 p1 err, cmd 5, RE !! [ 1.821789] sunxi-mmc 4021000.sdmmc: sdc set ios:clk 0Hz bm PP pm OFF vdd 0 width 1 timing LEGACY(SDR12) dt B [ 1.828421] [AUDIOCODEC][sunxi_codec_parse_params][2448]:adcdrc_cfg:0, adchpf_cfg:1, dacdrc_cfg:0, dachpf:0 [ 1.828471] sun8iw20-pinctrl 2000000.pinctrl: pin PF2 already requested by 4020000.sdmmc; cannot claim for 2000000.pinctrl:162 [ 1.863205] sun8iw20-pinctrl 2000000.pinctrl: pin-162 (2000000.pinctrl:162) status -22 [ 1.872084] [AUDIOCODEC][sunxi_codec_parse_params][2463]:gpio-spk set failed, SPK not work! [ 1.881461] sun8iw20-pinctrl 2000000.pinctrl: pin PF4 already requested by 4020000.sdmmc; cannot claim for 2000000.pinctrl:164 [ 1.894240] sun8iw20-pinctrl 2000000.pinctrl: pin-164 (2000000.pinctrl:164) status -22 [ 1.903130] [AUDIOCODEC][sunxi_codec_parse_params][2482]:gpio-spk-pwr set failed, SPK not work! [ 1.913349] [AUDIOCODEC][sunxi_internal_codec_probe][2609]:codec probe finished [ 1.922743] debugfs: Directory '203034c.dummy_cpudai' with parent 'audiocodec' already present! [ 1.932576] [SNDCODEC][sunxi_card_init][583]:card init finished [ 1.939801] sunxi-codec-machine 2030340.sound: 2030000.codec <-> 203034c.dummy_cpudai mapping ok [ 1.950943] input: audiocodec sunxi Audio Jack as /devices/platform/soc@3000000/2030340.sound/sound/card0/input2 [ 1.963065] [SNDCODEC][sunxi_card_dev_probe][832]:register card finished [ 1.972356] NET: Registered protocol family 10 [ 1.978445] Segment Routing with IPv6 [ 1.982624] [SNDCODEC][sunxi_hs_init_work][259]:resume-->report switch [ 1.990093] NET: Registered protocol family 17 [ 1.995160] 8021q: 802.1Q VLAN Support v1.8 [ 2.000619] Registering SWP/SWPB emulation handler [ 2.006401] Loading compiled-in X.509 certificates [ 2.014094] HDMI 2.0 driver init start! [ 2.018416] boot_hdmi=false [ 2.021591] ERROR: can not get hdmi_cts_compatibility [ 2.027294] ERROR: pinctrl_get for HDMI2.0 DDC fail [ 2.034365] HDMI2.0 module init end [ 2.058130] sun8iw20-pinctrl 2000000.pinctrl: pin PF4 already requested by 4020000.sdmmc; cannot claim for 2000000.pinctrl:164 [ 2.070945] sun8iw20-pinctrl 2000000.pinctrl: pin-164 (2000000.pinctrl:164) status -22 [ 2.086212] cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 1008000 KHz [ 2.094668] cpu cpu0: dev_pm_opp_set_rate: failed to find current OPP for freq 1008000000 (-34) [ 2.136291] cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed to: 912000 KHz [ 2.147105] debugfs: Directory '2034000.daudio' with parent 'sndhdmi' already present! [ 2.156620] sunxi-audio-card 20340a0.sounddaudio2: 20340a4.hdmiaudio <-> 2034000.daudio mapping ok [ 2.168117] get ehci0-controller wakeup-source is fail. [ 2.174176] sunxi ehci0-controller don't init wakeup source [ 2.180440] [sunxi-ehci0]: probe, pdev->name: 4101000.ehci0-controller, sunxi_ehci: 0xc0c816a0, 0x:e08d6000, irq_no:36 [ 2.192477] [sunxi-ehci0]: Not init ehci0 [ 2.197413] get ohci0-controller wakeup-source is fail. [ 2.203428] sunxi ohci0-controller don't init wakeup source [ 2.209690] [sunxi-ohci0]: probe, pdev->name: 4101400.ohci0-controller, sunxi_ohci: 0xc0c81930 [ 2.219373] [sunxi-ohci0]: Not init ohci0 [ 2.224323] get ehci1-controller wakeup-source is fail. [ 2.230304] sunxi ehci1-controller don't init wakeup source [ 2.236609] [sunxi-ehci1]: probe, pdev->name: 4200000.ehci1-controller, sunxi_ehci: 0xc0c81bc0, 0x:e08df000, irq_no:38 [ 2.248952] sunxi-ehci 4200000.ehci1-controller: 4200000.ehci1-controller supply hci not found, using dummy regulator [ 2.262468] sunxi-ehci 4200000.ehci1-controller: EHCI Host Controller [ 2.269731] sunxi-ehci 4200000.ehci1-controller: new USB bus registered, assigned bus number 1 [ 2.279758] sunxi-ehci 4200000.ehci1-controller: irq 56, io mem 0x04200000 [ 2.312015] sunxi-ehci 4200000.ehci1-controller: USB 2.0 started, EHCI 1.00 [ 2.319836] sunxi-ehci 4200000.ehci1-controller: ehci_irq: highspeed device connect [ 2.329084] hub 1-0:1.0: USB hub found [ 2.333405] hub 1-0:1.0: 1 port detected [ 2.338828] get ohci1-controller wakeup-source is fail. [ 2.344862] sunxi ohci1-controller don't init wakeup source [ 2.351129] [sunxi-ohci1]: probe, pdev->name: 4200400.ohci1-controller, sunxi_ohci: 0xc0c81e50 [ 2.361124] sunxi-ohci 4200400.ohci1-controller: 4200400.ohci1-controller supply hci not found, using dummy regulator [ 2.373522] sunxi-ohci 4200400.ohci1-controller: OHCI Host Controller [ 2.380800] sunxi-ohci 4200400.ohci1-controller: new USB bus registered, assigned bus number 2 [ 2.390815] sunxi-ohci 4200400.ohci1-controller: irq 57, io mem 0x04200400 [ 2.467039] hub 2-0:1.0: USB hub found [ 2.471307] hub 2-0:1.0: 1 port detected [ 2.476591] sun8iw20-pinctrl 2000000.pinctrl: pin PF4 already requested by 4020000.sdmmc; cannot claim for 2000000.pinctrl:164 [ 2.489410] sun8iw20-pinctrl 2000000.pinctrl: pin-164 (2000000.pinctrl:164) status -22 [ 2.498967] sun8iw20-pinctrl 2000000.pinctrl: pin PF4 already requested by 4020000.sdmmc; cannot claim for 2000000.pinctrl:164 [ 2.511813] sun8iw20-pinctrl 2000000.pinctrl: pin-164 (2000000.pinctrl:164) status -22 [ 2.524430] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 2.533387] sun8iw20-pinctrl 2000000.pinctrl: pin PF4 already requested by 4020000.sdmmc; cannot claim for 2000000.pinctrl:164 [ 2.545398] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 2.546218] sun8iw20-pinctrl 2000000.pinctrl: pin-164 (2000000.pinctrl:164) status -22 [ 2.553815] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 2.562966] clk: Not disabling unused clocks [ 2.572190] cfg80211: failed to load regulatory.db [ 2.576966] ALSA device list: [ 2.585676] #0: audiocodec [ 2.588910] #1: sndhdmi [ 2.591863] alloc_fd: slot 0 not NULL! [ 2.600261] VFS: Mounted root (squashfs filesystem) readonly on device 179:5. [ 2.612762] devtmpfs: mounted [ 2.618215] Freeing unused kernel memory: 1024K [ 2.652032] [HDMI receive params]: tv mode: 0xa format:0x0 data bits:0x0 eotf:0x4 cs:0x101 dvi_hdmi:2 range:2 scan:0 aspect_ratio:8 [ 2.665531] Run /sbin/init as init process [ 2.732070] usb 1-1: new high-speed USB device number 2 using sunxi-ehci [ 2.945257] sun8iw20-pinctrl 2000000.pinctrl: pin PF4 already requested by 4020000.sdmmc; cannot claim for 2000000.pinctrl:164 [ 2.958279] sun8iw20-pinctrl 2000000.pinctrl: pin-164 (2000000.pinctrl:164) status -22 [ 2.958594] init: Console is alive [ 2.971312] init: - watchdog - [ 2.974936] init: - preinit - /dev/by-name/UDISK already format by ext4 [ 3.451478] mount_root: mounting /dev/root [ 3.456814] mount_root: loading kmods from internal overlay [ 3.520695] block: attempting to load /etc/config/fstab [ 3.748208] disp_al_manager_apply ouput_type:0 [ 3.753590] disp_al_hdmi_cfg [ 3.756836] [DISP] disp_device_attached_and_enable,line:233: [ 3.756841] attached ok, mgr0<-->dev0 [ 3.767347] [DISP] disp_device_attached_and_enable,line:236: [ 3.767356] type:4,mode:10,fmt:rgb,bits:8bits,eotf:4,cs:257 dvi_hdmi:2, range:2 scan:0 ratio:8 e2fsck 1.42.12 (29-Aug-2014) /dev/by-name/UDISK: recovering journal Setting free blocks count to 1823993 (was 1823994) /dev/by-name/UDISK: clean, 50/473280 files, 66670/1890663[ 3.909609] random: procd: uninitialized urandom read (4 bytes read) blocks [ 3.911152] EXT4-fs (mmcblk0p8): mounted filesystem with ordered data mode. Opts: [ 3.930966] block: extroot: UUID match (root: 7b6709b9-ccc4c4ae-e8b740a9-30e51a3e, overlay: 7b6709b9-ccc4c4ae-e8b740a9-30e51a3e) [ 3.955677] mount_root: switched to extroot [ 3.970003] procd: - early - [ 3.973449] procd: - watchdog - [ 4.034437] random: procd: uninitialized urandom read (4 bytes read) [ 4.167578] procd: - watchdog - [ 4.171419] procd: - ubus - [ 4.175260] procd (1): /proc/1185/oom_adj is deprecated, please use /proc/1185/oom_score_adj instead. [ 4.215925] random: ubusd: uninitialized urandom read (4 bytes read) [ 4.278566] procd: - init - Please press Enter to activate this console. [ 4.938628] fuse: init (API version 7.31) \FF
12-04
//*********************************************************************************** //Filename: SatellitePosition.cpp // //Date Author Revison History //05/08/2017 Guled Sheikh version 1 // //*********************************************************************************** // //Copyright 2017~2018. All Rights Reserved // //*********************************************************************************** #include "SatellitePosition.h" //Computes the Euclidean distance double SatellitePosition::EucldNorm(double x, double y, double z) { double norm = sqrt(pow(x, 2) + pow(y, 2) + pow(z, 2)); return norm; } // Fucntion that returns satellite positions corrected for Earth rotation errors vector<double> SatellitePosition::EarthRot_Corr(double time, vector<double> pos) { /*...Returns rotated satellite ECEF coordinates due to Earth rotation during signal travel time /*....time represents the travel time...*/ /*....WGS 84 value of the earth's rotation rate (rad/sec)...*/ double OMEGA_e = 7.2921151467e-5; double OMEGA_tau = OMEGA_e*time; Eigen::Matrix3d R3; Eigen::Vector3d POS_ROT; Eigen::Vector3d POS(pos[0], pos[1], pos[2]); vector <double> POSITION; double R11, R12, R13, R21, R22, R23, R31, R32, R33; R11 = cos(OMEGA_tau); R21 = -sin(OMEGA_tau); R31 = 0; R12 = sin(OMEGA_tau); R22 = cos(OMEGA_tau); R32 = 0; R13 = 0; R23 = 0; R33 = 1; R3 << R11, R12, R13, R21, R22, R23, R31, R32, R33; POS_ROT = R3*POS; POSITION.push_back(POS_ROT[0]); POSITION.push_back(POS_ROT[1]); POSITION.push_back(POS_ROT[2]); return POSITION; } // Function that corrects for tropospheric effects double SatellitePosition::Tropo_Corr(vector<double> pos, vector<double> ini_pos) { Eigen::Vector3d POS(pos[0], pos[1], pos[2]); Eigen::Vector3d INI_POS(ini_pos[0], ini_pos[1], ini_pos[2]); double dtrop; double tot_p = 1013; // Mbar double pwv = 16; //Mbar double pd = tot_p - pwv; // Mbar double T = 300; // Kelvins double R = 6371e3; double sat_pos_norm = EucldNorm(pos[0], pos[1], pos[2]); double rec_pos_norm = EucldNorm(ini_pos[0], ini_pos[1], ini_pos[2]); double g = acos((POS.dot(INI_POS)) / (sat_pos_norm*rec_pos_norm)); double e = atan((sat_pos_norm*cos(g) - R) / (sat_pos_norm*sin(g))); //cout << (e*180)/ PI << endd; //cin.get(); double z = (PI / 2) - e; if (z == 0) { dtrop = (0.002277 / cos(z))*(pd + (((1255 / T) + 0.05)*pwv)); } else { dtrop = (0.002277 / cos(z))*(pd + (((1255 / T) + 0.05)*pwv) - (1.16*(pow(tan(z), 2)))); } return dtrop; } // This function removes effects of ionosphere based on the iono-free model double SatellitePosition::iono_free(double count) { double gamma = pow((1575.42 / 1227.6), 2); double P1_temp = 0.0, P2_temp = 0.0, PR_temp = 0.0, C1_temp = 0.0; // Finding the pseudoranges if (find(RinexFile->head.obstype.begin(), RinexFile->head.obstype.end(), "P1") - RinexFile->head.obstype.begin() != 0) { ptrdiff_t pos_P1 = find(RinexFile->head.obstype.begin(), RinexFile->head.obstype.end(), "P1") - RinexFile->head.obstype.begin(); if (pos_P1 == RinexFile->head.obstype.size()) { } else { P1_temp = RinexFile->obs.record[count][pos_P1]; } } if (find(RinexFile->head.obstype.begin(), RinexFile->head.obstype.end(), "P2") - RinexFile->head.obstype.begin() != 0) { ptrdiff_t pos_P2 = find(RinexFile->head.obstype.begin(), RinexFile->head.obstype.end(), "P2") - RinexFile->head.obstype.begin(); if (pos_P2 == RinexFile->head.obstype.size()) { } else { P2_temp = RinexFile->obs.record[count][pos_P2]; } } if (P2_temp != 0 && P1_temp != 0) { PR_temp = (P2_temp - (gamma*P1_temp)) / (1 - gamma); } else { ptrdiff_t pos_PR = find(RinexFile->head.obstype.begin(), RinexFile->head.obstype.end(), "C1") - RinexFile->head.obstype.begin(); PR_temp = RinexFile->obs.record[count][pos_PR]; } return PR_temp; } // This function removes effects of ionosphere based on the Klobuchar model double SatellitePosition::klobuchar(double fi, double lambda, double elev, double azimuth, double tow) { VectorXd alfa; VectorXd beta; alfa << 9.3132e-09, 1.4901e-08, -5.9605e-08, -1.1921e-07; beta << 8.8064e+04, 4.9152e+04, -1.3107e+05, -3.2768e+05; double c = 299792458, deg2semi = 1.0 / 180.0, semi2rad = PI, deg2rad = PI / 180.0, dIon1; double a = azimuth*deg2rad; // asimuth in radians double e = elev*deg2semi; // elevation angle in semicircles double psi = 0.0137 / (e + 0.11) - 0.022; //Earth Centered angle double lat_i = fi*deg2semi + psi*cos(a); // Subionospheric lat if (lat_i > 0.416) { lat_i = 0.416; } else if (lat_i < -0.416) { lat_i = -0.416; } //Subionospheric long double long_i = lambda*deg2semi + (psi*sin(a) / cos(lat_i*semi2rad)); // Geomagnetic latitude double lat_m = lat_i + 0.064*cos((long_i - 1.617)*semi2rad); double t = 4.32e4*long_i + tow; t = fmod(t, 86400.0); // Seconds of day if (t > 86400.0) { t = t - 86400.0; } if (t < 86400.0) { t = t + 86400.0; } double sF = 1.0 + 16.0* pow((0.53 - e), 3); // Slant factor // Period of model double PER = beta(0) + beta(1)*lat_m + beta(2)* pow(lat_m, 2) + beta(3)* pow(lat_m, 3); if (PER < 72000.0) { PER = 72000.0; } double x = 2.0*PI*(t - 50400.0) / PER; // Phase of the model double AMP = alfa(0) + alfa(1) *lat_m + alfa(2) * pow(lat_m, 2) + alfa(3) * pow(lat_m, 3); // Amplitud of the model if (AMP < 0.0) { AMP = 0.0; } if (abs(x) > 1.57) { dIon1 = sF * (5.0e-9); } else { dIon1 = sF * (5.0e-9 + AMP*(1.0 - x*x / 2.0 + x*x*x*x / 24.0)); } return dIon1; } // This function computes the gps time in seconds double SatellitePosition::gpstimeCalc(double year, double month, double day, double hour, double min, double sec) { double y, m, JD, gps_week, gps_seconds; double secs_per_week = 604800; // Seconds in one week //Converts the two digit year to a four digit year. //Two digit year represents a year in the range 1980 - 2079. if (year >= 80 && year <= 99) { year = 1900 + year; } if (year >= 0 && year <= 79) { year = 2000 + year; } //Calculates the 'm' term used below from the given calendar month. if (month <= 2) { y = year - 1; m = month + 12; } if (month > 2) { y = year; m = month; } //Computes the Julian date corresponding to the given calendar date. JD = floor((365.25 * y)) + floor((30.6001 * (m + 1))) + day + ((hour + min / 60 + sec / 3600) / 24) + 1720981.5; //Computes the GPS week corresponding to the given calendar date. gps_week = floor((JD - 2444244.5) / 7); //Computes the GPS seconds corresponding to the given calendar date. gps_seconds = round(((((JD - 2444244.5) / 7) - gps_week)*secs_per_week) / 0.5)*0.5; return gps_seconds; } //This functions corrects for tropospheric effects based on initial values given in the navigation file double SatellitePosition::NMF_hyd(double sat_elev) { double A = 33.748; double B = -0.782; double A1 = 38.079; double B1 = -0.8088; double Y1 = A*pow(sat_elev, B); double Y2 = A1*pow(sat_elev, B1); double Y = Y1 + Y2; return Y; } // This function initializes the observation and navigation filenames void SatellitePosition::SetFilenames(const char * ObsFile, const char * NavFile) { size_t obs_size = strlen(ObsFile); size_t nav_size = strlen(NavFile); if (ObsFile != NULL) { strcpy(obsFile, ObsFile); } if (NavFile != NULL) { strcpy(navFile, NavFile); } obsFile[obs_size] = '\0'; navFile[nav_size] = '\0'; RinexFile = new reader(SatellitePosition::obsFile, SatellitePosition::navFile); RinexFile->rinexNAVReader(RinexFile->SV_data); } //This function opens the observation and navigation files from the environment file void SatellitePosition::OpenEnvFile(ENVI_FILE & envi_records, SatellitePosition & object1, SatellitePosition & object2) { Env_File = fopen("EnvFileGMIS.txt", "rt"); if (Env_File == NULL) perror("Error opening file"); char line[MAX_STRLEN]; fgets(line, MAX_STRLEN, Env_File); while (!feof(Env_File)) { if (sizeof(line) >= 61) { if (strstr(line, "VERSION / TYPE")) { string sline(line); // convert the line (char) to string class type sLine string token = sline.substr(4, 4); // from 4th character and 4 spaces envi_records.version = token; } if (strstr(line, "BASE FILE(OBS/NAV)")) { std::istringstream iss(line); std::vector<std::string> results((std::istream_iterator<std::string>(iss)), std::istream_iterator<std::string>()); Filename1_Obs = results[0]; Filename1_Nav = results[1]; object1.SetFilenames(Filename1_Obs.c_str(), Filename1_Nav.c_str()); } if (strstr(line, "ROVER FILE(OBS/NAV)")) { std::istringstream iss2(line); std::vector<std::string> results2((std::istream_iterator<std::string>(iss2)), std::istream_iterator<std::string>()); Filename2_Obs = results2[0]; Filename2_Nav = results2[1]; object2.SetFilenames(Filename2_Obs.c_str(), Filename2_Nav.c_str()); } if (strstr(line, "BASE FINAL COORDINATES")) { string sline(line); // convert the line (char) to string class type sLine string token = sline.substr(4, 56); // from 4th character upto 56 char cline[MAX_BYTE]; // cline is a char line strncpy(cline, token.c_str(), sizeof(cline)); cline[sizeof(cline) - 1] = 0; for (char * r = strtok(cline, " "); r; r = strtok(NULL, " ")) { double rr = atof(r); envi_records.base_final_coord.push_back(rr); } } } //......... Get a new line....................... fgets(line, MAX_STRLEN, Env_File); } } // This function computes the satellite positions and stores them in a global file void SatellitePosition::Sat_Pos(SATPOS_struct &EPOCH_DATA) { RinexFile->rinexOBSReader(RinexFile->head, RinexFile->obs, RinexFile->SENTINEL); // Read the observation file epoch_count = epoch_count + 1; vector< vector<double> > pos_rot_epoch_temp; vector< vector<double> > initial_satpos_temp; vector <double> pr_epoch_temp; vector <double> P1_epoch_temp; vector <double> P2_epoch_temp; vector <double> C1_epoch_temp; vector <double> L1_epoch_temp; vector <double> L2_epoch_temp; vector <double> pr_epoch_Iono_temp; vector <double> sat_offset_epoch_temp; vector<double> sat_elev_temp; double Tropo; reader::NAVRECORDS storer; if (RinexFile->obs.NumOfSat != 0) { double count = 0; for (int j = 0; j < RinexFile->obs.NumOfSat; j++) { // Each satellite double gamma = pow((1575.42 / 1227.6), 2); double c = 299792458; double P1_temp = 0.0, P2_temp = 0.0, PR_temp = 0.0, L1_temp = 0.0, L2_temp = 0.0, C1_temp = 0.0, TIME_temp; //reader::NAVRECORDS storer; int curPrn = RinexFile->obs.prn[count]; // Current observation satelite vehicle double time_LOGGER = std::numeric_limits<double>::max(); //search through the navigation file for (size_t k = 0; k < RinexFile->SV_data.size(); k++) { if (RinexFile->SV_data[k].PRN == curPrn) { //Compare obs prn with nav prn if (time_LOGGER > abs(RinexFile->SV_data[k].gpstime - RinexFile->obs.time)) { time_LOGGER = abs(RinexFile->SV_data[k].gpstime - RinexFile->obs.time); storer = RinexFile->SV_data[k]; } } } // Finding the pseudoranges P1 code if (find(RinexFile->head.obstype.begin(), RinexFile->head.obstype.end(), "P1") - RinexFile->head.obstype.begin() != RinexFile->head.nobstype) { ptrdiff_t pos_P1 = find(RinexFile->head.obstype.begin(), RinexFile->head.obstype.end(), "P1") - RinexFile->head.obstype.begin(); if (pos_P1 == RinexFile->head.obstype.size()) { } else { P1_temp = RinexFile->obs.record[j][pos_P1]; } } // Finding the pseudoranges P2 code if (find(RinexFile->head.obstype.begin(), RinexFile->head.obstype.end(), "P1") - RinexFile->head.obstype.begin() != RinexFile->head.nobstype) { ptrdiff_t pos_P2 = find(RinexFile->head.obstype.begin(), RinexFile->head.obstype.end(), "P1") - RinexFile->head.obstype.begin(); if (pos_P2 == RinexFile->head.obstype.size()) { } else { P2_temp = RinexFile->obs.record[j][pos_P2]; } } // Finding the pseudoranges L1 carrier if (find(RinexFile->head.obstype.begin(), RinexFile->head.obstype.end(), "L1") - RinexFile->head.obstype.begin() != RinexFile->head.nobstype) { ptrdiff_t pos_L1 = find(RinexFile->head.obstype.begin(), RinexFile->head.obstype.end(), "L1") - RinexFile->head.obstype.begin(); if (pos_L1 == RinexFile->head.obstype.size()) { } else { L1_temp = RinexFile->obs.record[j][pos_L1]; } } // Finding the pseudoranges L2 carrier if (find(RinexFile->head.obstype.begin(), RinexFile->head.obstype.end(), "L2") - RinexFile->head.obstype.begin() != RinexFile->head.nobstype) { ptrdiff_t pos_L2 = find(RinexFile->head.obstype.begin(), RinexFile->head.obstype.end(), "L2") - RinexFile->head.obstype.begin(); if (pos_L2 == RinexFile->head.obstype.size()) { } else { L2_temp = RinexFile->obs.record[j][pos_L2]; } } // Finding the pseudoranges C1 code if (find(RinexFile->head.obstype.begin(), RinexFile->head.obstype.end(), "C1") - RinexFile->head.obstype.begin() != RinexFile->head.nobstype) { ptrdiff_t pos_C1 = find(RinexFile->head.obstype.begin(), RinexFile->head.obstype.end(), "C1") - RinexFile->head.obstype.begin(); if (pos_C1 == RinexFile->head.obstype.size()) { } else { C1_temp = RinexFile->obs.record[j][pos_C1]; } } PR_temp = iono_free(j); TIME_temp = RinexFile->obs.time - (PR_temp / c); //GPS system time at time of transmission corrected for transit time // SATELLITE POSITIONING // Constants //WGS 84 value of the earth's gravitational constant for GPS user double mu = 3.986005e14; //WGS 84 value of the earth's rotation rate (rad/sec) double OMEGA_e = 7.2921151467e-5; // Initialize necessary variables from NAV double A = pow(storer.Sqrta, 2); //Semi-major axis double toe = storer.Toe; //toe = Time of Ephemeris double deltaN = storer.DeltaN; //Delta n double Mo = storer.Mo; // Mo angle double e = storer.Eccentricity; //Orbit Eccentricity double omega = storer.omega; //omega Angle // Second Harmonic Perturbations double Cus = storer.Cus; //Latitude Correction Sinus Component double Cuc = storer.Cuc; //Latitude Correction Cosinus Component double Crs = storer.Crs; //Radius Correction Sinus Component double Crc = storer.Crc; //Radius Correction Cosinus Component double Cis = storer.Cis; //Angular Velocity double Cic = storer.Cic; //Inclination Correction Cosinus Component double IDOT = storer.IDOT; //Inclination Rate double Io = storer.Io; //Initial Inclination double OMEGA = storer.OMEGA; //OMEGA Angle double OMEGADOT = storer.OMEGADOT; //Angular Velocity double SVCB = storer.SVClockBias; //SVClockBias (sec) double SVCD = storer.SVClockDrift; //SVClockDrift (sec) double SVCDR = storer.SVClockDriftRate; //SVClockDriftRate (sec) double SAT_TIME = storer.gpstime; //double SAT_TIME = storer.SEC; double tk = TIME_temp - toe; //Time from ephemeris reference epoch // Correct tk within range of -302400 to 302400 if (tk > 302400) { tk = tk - 604800; } else if (tk < -302400) { tk = tk + 604800; } // Computed mean motion (rad/sec) double n0 = sqrt(mu / (pow(A, 3))); // Corrected mean motion double n = n0 + deltaN; //Mean anomaly double Mk = Mo + n*tk; // Keep Mk with in 360 degrees ....// Mk = rem(Mk+2*pi,2*pi); // Kepler's Equation for Eccentric Anomaly (may be solved by iteration)(radians) double Ek = Mk; double Ek0 = Mk + e*sin(Ek); double limit = 1e-11; // limit while (abs(Ek - Ek0) > limit) { Ek0 = Ek; Ek = Mk + e*sin(Ek0); } // Keep Ek with in 360 degrees.....// Ek = rem(Ek + 2 * pi, 2 * pi); // True Anomaly double Y = (sqrt(1 - pow(e, 2))*sin(Ek)) / (1 - e*cos(Ek)); double X = (cos(Ek) - e) / (1 - e*cos(Ek)); double vk = atan2(Y, X); //Argument of Latitude double Phi_k = vk + omega; double del_uk = Cus*sin(2 * Phi_k) + Cuc*cos(2 * Phi_k); // Argument of Latitude Correction double del_rk = Crs*sin(2 * Phi_k) + Crc*cos(2 * Phi_k); //Radius Correction double del_ik = Cis*sin(2 * Phi_k) + Cic*cos(2 * Phi_k); //Inclination Correction //Corrected Argument of Latitude double uk = Phi_k + del_uk; //Corrected Radius double rk = A*(1 - e*cos(Ek)) + del_rk; //Corrected Inclination double ik = Io + del_ik + IDOT*tk; //Positions in orbital plane. double xk_prime = rk*cos(uk); double yk_prime = rk*sin(uk); //Corrected longitude of ascending node double OMEGA_k = OMEGA + (OMEGADOT - OMEGA_e)*tk - OMEGA_e*toe; //Earth-fixed coordinates double xk = xk_prime*cos(OMEGA_k) - yk_prime*cos(ik)*sin(OMEGA_k); double yk = xk_prime*sin(OMEGA_k) + yk_prime*cos(ik)*cos(OMEGA_k); double zk = yk_prime*sin(ik); // Satellite position without tropo, iono and Earth rotation corrections vector <double> POSITION; //Store the Earth-fixed coordinates (satellite position xk,yk,zk of satellite k) POSITION.push_back(xk); POSITION.push_back(yk); POSITION.push_back(zk); // Satellite elevation angle calculation //--------------------------------------------------------------------------------------------------------------// Eigen::Vector3d POS(POSITION[0], POSITION[1], POSITION[2]); Eigen::Vector3d INI_POS(RinexFile->head.antpos[0], RinexFile->head.antpos[1], RinexFile->head.antpos[2]); double R = 6371e3; double sat_pos_norm = EucldNorm(POSITION[0], POSITION[1], POSITION[2]); double rec_pos_norm = EucldNorm(RinexFile->head.antpos[0], RinexFile->head.antpos[1], RinexFile->head.antpos[2]); double g = acos((POS.dot(INI_POS)) / (sat_pos_norm*rec_pos_norm)); double sat_elev = (atan((sat_pos_norm*cos(g) - R) / (sat_pos_norm*sin(g))))*(180 / PI); // in degrees sat_elev_temp.push_back(sat_elev); // store the current satellite elevation //----------------------------------------------------------------------------------------------------------------// // CUT_OFF ANGLE OF 15 DEGREES if (sat_elev >= 15) { // Realativistic Correction Term (sec) double F = -4.442807633e-10; double Del_tr = F*e*sqrt(A)*sin(Ek); // Realativistic Correction Term(sec) // Satellite Clock Errors (sec) double Del_tsv = SVCB + SVCD*(SAT_TIME - toe) + SVCDR*(pow((SAT_TIME - toe), 2)) + Del_tr; // CORRECTIONS // Range before earth rotation correction double geom_range = EucldNorm((POSITION[0] - RinexFile->head.antpos[0]), (POSITION[1] - RinexFile->head.antpos[1]), (POSITION[2] - RinexFile->head.antpos[2])); double t = (geom_range) / c; // CORRECTIONS // Earth rotation correction vector <double> POSITION_ROT = EarthRot_Corr(t, POSITION); double geom_range_corr = EucldNorm((POSITION_ROT[0] - RinexFile->head.antpos[0]), (POSITION_ROT[1] - RinexFile->head.antpos[1]), (POSITION_ROT[2] - RinexFile->head.antpos[2])); pos_rot_epoch_temp.push_back(POSITION_ROT); double check_pseudo = (PR_temp - geom_range_corr) + c*(Del_tsv); // Tropo correction //double dtropo = NMF_hyd(sat_elev); // Niell Mapping Function double dtropo = Tropo_Corr(POSITION_ROT, RinexFile->head.antpos); // SAASTAMOINEN //Tropo = dtropo; // Corrected pseudorange for iono only pr_epoch_Iono_temp.push_back(PR_temp); // Corrected pseudorange for iono and tropo //double Corr_Pseudo = PR_temp - dtropo; doing tropo correc in kalman!!!!! double Corr_Pseudo = PR_temp - dtropo; pr_epoch_temp.push_back(Corr_Pseudo); P1_epoch_temp.push_back(P1_temp); P2_epoch_temp.push_back(P2_temp); C1_epoch_temp.push_back(C1_temp); L1_epoch_temp.push_back(L1_temp); L2_epoch_temp.push_back(L2_temp); sat_offset_epoch_temp.push_back(Del_tsv); initial_satpos_temp.push_back(POSITION); count = count + 1; } else { //remove the satellite from the prn vector count = count; RinexFile->obs.prn.erase(RinexFile->obs.prn.begin() + count); } } EPOCH_DATA.Sat_elev = sat_elev_temp; // Satellite elevations for the epoch EPOCH_DATA.pos_rot_epoch = pos_rot_epoch_temp; // corrected satellite positions for the epoch EPOCH_DATA.Initial_SatPos = initial_satpos_temp; EPOCH_DATA.pr_epoch = pr_epoch_temp; // Corrected pseudorange EPOCH_DATA.P1_epoch = P1_epoch_temp; EPOCH_DATA.P2_epoch = P2_epoch_temp; EPOCH_DATA.C1_epoch = C1_epoch_temp; EPOCH_DATA.L1_epoch = L1_epoch_temp; EPOCH_DATA.L2_epoch = L2_epoch_temp; EPOCH_DATA.pr_epoch_iono = pr_epoch_Iono_temp; EPOCH_DATA.sat_offset_epoch = sat_offset_epoch_temp; // satellite clock offset } } 讲解该代码
08-24
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值