gnss_qc/report/summary/
nav_post.rs

1use crate::prelude::QcContext;
2use maud::{html, Markup, Render};
3//use rinex::prelude::{GroundPosition, TimeScale};
4
5pub struct QcNavPostSummary {
6    /// Navigation compatible
7    pub nav_compatible: bool,
8    /// CPP compatible
9    pub cpp_compatible: bool,
10    /// PPP compatible
11    pub ppp_compatible: bool,
12    /// PPP ultra compatible
13    pub ppp_ultra_compatible: bool,
14}
15
16impl QcNavPostSummary {
17    pub fn new(context: &QcContext) -> Self {
18        Self {
19            nav_compatible: context.is_navigation_compatible(),
20            cpp_compatible: context.is_cpp_navigation_compatible(),
21            ppp_compatible: context.is_ppp_navigation_compatible(),
22            ppp_ultra_compatible: context.is_ppp_ultra_navigation_compatible(),
23        }
24    }
25}
26
27impl Render for QcNavPostSummary {
28    fn render(&self) -> Markup {
29        html! {
30            table class="table is-bordered" {
31                tbody {
32                    tr {
33                        td {
34                            @if self.nav_compatible {
35                                span class="icon" style="color:green" {
36                                    i class="fa-solid fa-circle-check" {}
37                                }
38                                button aria-label="Post processed navigation is feasible" data-balloon-pos="up" {
39                                    "NAVI"
40                                }
41                            } @else {
42                                span class="icon" style="color:red"{
43                                    i class="fa-solid fa-circle-xmark" {}
44                                }
45                                button aria-label="Post processed navigation is not feasible. You must provide at least Pseudo Range + NAV (BRDC) RINEX and SP3 if desired." data-balloon-pos="up" {
46                                    "NAVI"
47                                }
48                            }
49                        }
50                        td {
51                            @if self.cpp_compatible {
52                                span class="icon" style="color:green" {
53                                    i class="fa-solid fa-circle-check" {}
54                                }
55                                button aria-label="Code Based Precise Positioning. Direct IONOD cancelling." data-balloon-pos="up" {
56                                    "CPP"
57                                }
58                            } @else {
59                                span class="icon" style="color:red"{
60                                    i class="fa-solid fa-circle-xmark" {}
61                                }
62                                button aria-label="Code Based Precise Positioning not feasible. Missing secondary frequency." data-balloon-pos="up" {
63                                    "CPP"
64                                }
65                            }
66                        }
67                        td {
68                            @if self.ppp_compatible {
69                                span class="icon" style="color:green" {
70                                    i class="fa-solid fa-circle-check" {}
71                                }
72                                button aria-label="Precise Point Positioning is feasible. Dual PR+PH navigation with direct IONOD cancelling." data-balloon-pos="up" {
73                                    "PPP"
74                                }
75                            } @else {
76                                span class="icon" style="color:red" {
77                                    i class="fa-solid fa-circle-xmark" {}
78                                }
79                                button aria-label="Precise Point Positioning is not feasible. Missing Phase Data and/or secondary frequency and/or SP3 and/or CLK RINEX." data-balloon-pos="up" {
80                                    "PPP"
81                                }
82                            }
83                        }
84                        td {
85                            @if self.ppp_ultra_compatible {
86                                span class="icon" style="color:green" {
87                                    i class="fa-solid fa-circle-check" {}
88                                }
89                                button aria-label="Ultimate PPP: CLK RINEX synchronous to OBS RINEX" data-balloon-pos="up" {
90                                    "PPP (Ultra)"
91                                }
92                            } @else {
93                                span class="icon" style="color:red" {
94                                    i class="fa-solid fa-circle-xmark" {}
95                                }
96                                button aria-label="Ultimate PPP: CLK RINEX is not synchronous to OBS RINEX" data-balloon-pos="up" {
97                                    "PPP (Ultra)"
98                                }
99                            }
100                        }
101                    }
102                }
103            }
104        }
105    }
106}