begin hw4
This commit is contained in:
1608
brdc0930.26n
Normal file
1608
brdc0930.26n
Normal file
File diff suppressed because it is too large
Load Diff
56
hw4.Rmd
Normal file
56
hw4.Rmd
Normal file
@@ -0,0 +1,56 @@
|
||||
# HW 4
|
||||
Write an R script to calculate the output of the Klobuchar model.
|
||||
Provide a GUI means for entering input data, and the name and the
|
||||
path to navigation message file with coefficients of the Klobuchar
|
||||
model. Load the coefficients of the Klobuchar model from the given
|
||||
RINEX n file using a dedicated function in the R script. Provide a
|
||||
feature to calculate the value of the ionospheric delay of the GPS
|
||||
signal during 24 hours of a given day, in 1-minute increments, with
|
||||
the given coefficients of the ionospheric model. Verify the correctness
|
||||
of the algorithm implementation with a given numerical example. After
|
||||
that, conduct a 24-hour simulation of the GPS ionospheric delay in 1-
|
||||
minute increments for the position φu = 45.33709°, λu = 14.42496°, E
|
||||
= 90°, A = 180°. Store the estimated 24-hour simulation data set in a
|
||||
dedicated file on the local disc.
|
||||
|
||||
The problem description, method, R script and implementation results
|
||||
should be presented in a single HTML document, which should be
|
||||
sent to the subject teacher's e-mail by May 21, 2026 at 23:59 CEST.
|
||||
|
||||
|
||||
```{r read-file}
|
||||
# Function to extract Klobuchar parameters from a RINEX navigation file
|
||||
extract_klobuchar_parameters <- function(rinex_file) {
|
||||
ion_alpha <- numeric(4)
|
||||
ion_beta <- numeric(4)
|
||||
|
||||
# Read the file line by line
|
||||
con <- file(rinex_file, "r")
|
||||
while (length(line <- readLines(con, n = 1)) > 0) {
|
||||
if (grepl("ION ALPHA", line, fixed = TRUE)) {
|
||||
# Extract the 4 numeric values from the line
|
||||
ion_alpha <- unlist(strsplit(line, "\\s+"))[2:5]
|
||||
}
|
||||
if (grepl("ION BETA", line, fixed = TRUE)) {
|
||||
# Extract the 4 numeric values from the line
|
||||
ion_beta <- unlist(strsplit(line, "\\s+"))[2:5]
|
||||
}
|
||||
# Stop reading if we've reached the end of the header (END OF HEADER)
|
||||
if (grepl("END OF HEADER", line, fixed = TRUE)) {
|
||||
break
|
||||
}
|
||||
}
|
||||
close(con)
|
||||
|
||||
# Return the parameters as a named list
|
||||
list(
|
||||
ION_ALPHA = ion_alpha,
|
||||
ION_BETA = ion_beta
|
||||
)
|
||||
}
|
||||
|
||||
rinex_file <- "brdc0930.26n"
|
||||
klobuchar_params <- extract_klobuchar_parameters(rinex_file)
|
||||
|
||||
print(klobuchar_params)
|
||||
```
|
||||
5
notes.md
Normal file
5
notes.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# SDR
|
||||
## Software
|
||||
https://gnss-sdr.org/docs/overview/
|
||||
https://gage.upc.edu/en/learning-materials/software-tools/glab-tool-suite
|
||||
RTKLib
|
||||
34
renv.lock
34
renv.lock
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"R": {
|
||||
"Version": "4.5.2",
|
||||
"Version": "4.6.0",
|
||||
"Repositories": [
|
||||
{
|
||||
"Name": "CRAN",
|
||||
@@ -59,7 +59,7 @@
|
||||
},
|
||||
"bslib": {
|
||||
"Package": "bslib",
|
||||
"Version": "0.10.0",
|
||||
"Version": "0.11.0",
|
||||
"Source": "Repository",
|
||||
"Title": "Custom 'Bootstrap' 'Sass' Themes for 'shiny' and 'rmarkdown'",
|
||||
"Authors@R": "c( person(\"Carson\", \"Sievert\", , \"carson@posit.co\", role = c(\"aut\", \"cre\"), comment = c(ORCID = \"0000-0002-4958-2844\")), person(\"Joe\", \"Cheng\", , \"joe@posit.co\", role = \"aut\"), person(\"Garrick\", \"Aden-Buie\", , \"garrick@posit.co\", role = \"aut\", comment = c(ORCID = \"0000-0002-7111-0077\")), person(\"Posit Software, PBC\", role = c(\"cph\", \"fnd\")), person(, \"Bootstrap contributors\", role = \"ctb\", comment = \"Bootstrap library\"), person(, \"Twitter, Inc\", role = \"cph\", comment = \"Bootstrap library\"), person(\"Javi\", \"Aguilar\", role = c(\"ctb\", \"cph\"), comment = \"Bootstrap colorpicker library\"), person(\"Thomas\", \"Park\", role = c(\"ctb\", \"cph\"), comment = \"Bootswatch library\"), person(, \"PayPal\", role = c(\"ctb\", \"cph\"), comment = \"Bootstrap accessibility plugin\") )",
|
||||
@@ -96,7 +96,7 @@
|
||||
"magrittr",
|
||||
"rappdirs",
|
||||
"rmarkdown (>= 2.7)",
|
||||
"shiny (>= 1.11.1)",
|
||||
"shiny (>= 1.11.1.9000)",
|
||||
"testthat",
|
||||
"thematic",
|
||||
"tools",
|
||||
@@ -107,12 +107,12 @@
|
||||
"Config/Needs/deploy": "BH, chiflights22, colourpicker, commonmark, cpp11, cpsievert/chiflights22, cpsievert/histoslider, dplyr, DT, ggplot2, ggridges, gt, hexbin, histoslider, htmlwidgets, lattice, leaflet, lubridate, markdown, modelr, plotly, reactable, reshape2, rprojroot, rsconnect, rstudio/shiny, scales, styler, tibble",
|
||||
"Config/Needs/routine": "chromote, desc, renv",
|
||||
"Config/Needs/website": "brio, crosstalk, dplyr, DT, ggplot2, glue, htmlwidgets, leaflet, lorem, palmerpenguins, plotly, purrr, rprojroot, rstudio/htmltools, scales, stringr, tidyr, webshot2",
|
||||
"Config/roxygen2/version": "8.0.0",
|
||||
"Config/testthat/edition": "3",
|
||||
"Config/testthat/parallel": "true",
|
||||
"Config/testthat/start-first": "zzzz-bs-sass, fonts, zzz-precompile, theme-*, rmd-*",
|
||||
"Encoding": "UTF-8",
|
||||
"RoxygenNote": "7.3.3",
|
||||
"Collate": "'accordion.R' 'breakpoints.R' 'bs-current-theme.R' 'bs-dependencies.R' 'bs-global.R' 'bs-remove.R' 'bs-theme-layers.R' 'bs-theme-preset-bootswatch.R' 'bs-theme-preset-brand.R' 'bs-theme-preset-builtin.R' 'bs-theme-preset.R' 'utils.R' 'bs-theme-preview.R' 'bs-theme-update.R' 'bs-theme.R' 'bslib-package.R' 'buttons.R' 'card.R' 'deprecated.R' 'files.R' 'fill.R' 'imports.R' 'input-code-editor.R' 'input-dark-mode.R' 'input-submit.R' 'input-switch.R' 'layout.R' 'nav-items.R' 'nav-update.R' 'navbar_options.R' 'navs-legacy.R' 'navs.R' 'onLoad.R' 'page.R' 'popover.R' 'precompiled.R' 'print.R' 'shiny-devmode.R' 'sidebar.R' 'staticimports.R' 'toast.R' 'tooltip.R' 'utils-deps.R' 'utils-shiny.R' 'utils-tags.R' 'value-box.R' 'version-default.R' 'versions.R'",
|
||||
"Collate": "'accordion.R' 'breakpoints.R' 'bs-current-theme.R' 'bs-dependencies.R' 'bs-global.R' 'bs-remove.R' 'bs-theme-layers.R' 'bs-theme-preset-bootswatch.R' 'bs-theme-preset-brand.R' 'bs-theme-preset-builtin.R' 'bs-theme-preset.R' 'utils.R' 'bs-theme-preview.R' 'bs-theme-update.R' 'bs-theme.R' 'bslib-package.R' 'buttons.R' 'card.R' 'deprecated.R' 'files.R' 'fill.R' 'imports.R' 'input-code-editor.R' 'input-dark-mode.R' 'input-submit.R' 'input-switch.R' 'layout.R' 'nav-items.R' 'nav-update.R' 'navbar_options.R' 'navs-legacy.R' 'navs.R' 'onLoad.R' 'page.R' 'popover.R' 'precompiled.R' 'print.R' 'shiny-devmode.R' 'sidebar.R' 'staticimports.R' 'toast.R' 'toolbar.R' 'tooltip.R' 'utils-deps.R' 'utils-shiny.R' 'utils-tags.R' 'value-box.R' 'version-default.R' 'versions.R'",
|
||||
"NeedsCompilation": "no",
|
||||
"Author": "Carson Sievert [aut, cre] (ORCID: <https://orcid.org/0000-0002-4958-2844>), Joe Cheng [aut], Garrick Aden-Buie [aut] (ORCID: <https://orcid.org/0000-0002-7111-0077>), Posit Software, PBC [cph, fnd], Bootstrap contributors [ctb] (Bootstrap library), Twitter, Inc [cph] (Bootstrap library), Javi Aguilar [ctb, cph] (Bootstrap colorpicker library), Thomas Park [ctb, cph] (Bootswatch library), PayPal [ctb, cph] (Bootstrap accessibility plugin)",
|
||||
"Maintainer": "Carson Sievert <carson@posit.co>",
|
||||
@@ -146,10 +146,10 @@
|
||||
},
|
||||
"cli": {
|
||||
"Package": "cli",
|
||||
"Version": "3.6.5",
|
||||
"Version": "3.6.6",
|
||||
"Source": "Repository",
|
||||
"Title": "Helpers for Developing Command Line Interfaces",
|
||||
"Authors@R": "c( person(\"Gábor\", \"Csárdi\", , \"gabor@posit.co\", role = c(\"aut\", \"cre\")), person(\"Hadley\", \"Wickham\", role = \"ctb\"), person(\"Kirill\", \"Müller\", role = \"ctb\"), person(\"Salim\", \"Brüggemann\", , \"salim-b@pm.me\", role = \"ctb\", comment = c(ORCID = \"0000-0002-5329-5987\")), person(\"Posit Software, PBC\", role = c(\"cph\", \"fnd\")) )",
|
||||
"Authors@R": "c( person(\"Gábor\", \"Csárdi\", , \"gabor@posit.co\", role = c(\"aut\", \"cre\")), person(\"Hadley\", \"Wickham\", role = \"ctb\"), person(\"Kirill\", \"Müller\", role = \"ctb\"), person(\"Salim\", \"Brüggemann\", , \"salim-b@pm.me\", role = \"ctb\", comment = c(ORCID = \"0000-0002-5329-5987\")), person(\"Posit Software, PBC\", role = c(\"cph\", \"fnd\"), comment = c(ROR = \"03wc8by49\")) )",
|
||||
"Description": "A suite of tools to build attractive command line interfaces ('CLIs'), from semantic elements: headings, lists, alerts, paragraphs, etc. Supports custom themes via a 'CSS'-like language. It also contains a number of lower level 'CLI' elements: rules, boxes, trees, and 'Unicode' symbols with 'ASCII' alternatives. It support ANSI colors and text styles as well.",
|
||||
"License": "MIT + file LICENSE",
|
||||
"URL": "https://cli.r-lib.org, https://github.com/r-lib/cli",
|
||||
@@ -184,10 +184,11 @@
|
||||
],
|
||||
"Config/Needs/website": "r-lib/asciicast, bench, brio, cpp11, decor, desc, fansi, prettyunits, sessioninfo, tidyverse/tidytemplate, usethis, vctrs",
|
||||
"Config/testthat/edition": "3",
|
||||
"Config/usethis/last-upkeep": "2025-04-25",
|
||||
"Encoding": "UTF-8",
|
||||
"RoxygenNote": "7.3.2",
|
||||
"RoxygenNote": "7.3.2.9000",
|
||||
"NeedsCompilation": "yes",
|
||||
"Author": "Gábor Csárdi [aut, cre], Hadley Wickham [ctb], Kirill Müller [ctb], Salim Brüggemann [ctb] (<https://orcid.org/0000-0002-5329-5987>), Posit Software, PBC [cph, fnd]",
|
||||
"Author": "Gábor Csárdi [aut, cre], Hadley Wickham [ctb], Kirill Müller [ctb], Salim Brüggemann [ctb] (ORCID: <https://orcid.org/0000-0002-5329-5987>), Posit Software, PBC [cph, fnd] (ROR: <https://ror.org/03wc8by49>)",
|
||||
"Maintainer": "Gábor Csárdi <gabor@posit.co>",
|
||||
"Repository": "CRAN"
|
||||
},
|
||||
@@ -313,7 +314,7 @@
|
||||
},
|
||||
"fs": {
|
||||
"Package": "fs",
|
||||
"Version": "1.6.7",
|
||||
"Version": "2.1.0",
|
||||
"Source": "Repository",
|
||||
"Title": "Cross-Platform File System Operations Based on 'libuv'",
|
||||
"Authors@R": "c( person(\"Jim\", \"Hester\", role = \"aut\"), person(\"Hadley\", \"Wickham\", role = \"aut\"), person(\"Gábor\", \"Csárdi\", role = \"aut\"), person(\"Jeroen\", \"Ooms\", , \"jeroenooms@gmail.com\", role = \"cre\"), person(\"libuv project contributors\", role = \"cph\", comment = \"libuv library\"), person(\"Joyent, Inc. and other Node contributors\", role = \"cph\", comment = \"libuv library\"), person(\"Posit Software, PBC\", role = c(\"cph\", \"fnd\"), comment = c(ROR = \"03wc8by49\")) )",
|
||||
@@ -340,7 +341,7 @@
|
||||
"withr"
|
||||
],
|
||||
"VignetteBuilder": "knitr",
|
||||
"ByteCompile": "true",
|
||||
"SystemRequirements": "libuv: libuv-devel (rpm) or libuv1-dev (deb). Alternatively to build the vendored libuv 'cmake' is required. GNU make.",
|
||||
"Config/Needs/website": "tidyverse/tidytemplate",
|
||||
"Config/testthat/edition": "3",
|
||||
"Config/usethis/last-upkeep": "2025-04-23",
|
||||
@@ -348,7 +349,6 @@
|
||||
"Encoding": "UTF-8",
|
||||
"Language": "en-US",
|
||||
"RoxygenNote": "7.3.3",
|
||||
"SystemRequirements": "GNU make",
|
||||
"NeedsCompilation": "yes",
|
||||
"Author": "Jim Hester [aut], Hadley Wickham [aut], Gábor Csárdi [aut], Jeroen Ooms [cre], libuv project contributors [cph] (libuv library), Joyent, Inc. and other Node contributors [cph] (libuv library), Posit Software, PBC [cph, fnd] (ROR: <https://ror.org/03wc8by49>)",
|
||||
"Maintainer": "Jeroen Ooms <jeroenooms@gmail.com>",
|
||||
@@ -723,7 +723,7 @@
|
||||
},
|
||||
"rlang": {
|
||||
"Package": "rlang",
|
||||
"Version": "1.1.7",
|
||||
"Version": "1.2.0",
|
||||
"Source": "Repository",
|
||||
"Title": "Functions for Base Types and Core R and 'Tidyverse' Features",
|
||||
"Description": "A toolbox for working with base types, core R features like the condition system, and core 'Tidyverse' features like tidy evaluation.",
|
||||
@@ -751,7 +751,7 @@
|
||||
"pkgload",
|
||||
"rmarkdown",
|
||||
"stats",
|
||||
"testthat (>= 3.2.0)",
|
||||
"testthat (>= 3.3.2)",
|
||||
"tibble",
|
||||
"usethis",
|
||||
"vctrs (>= 0.2.3)",
|
||||
@@ -774,7 +774,7 @@
|
||||
},
|
||||
"rmarkdown": {
|
||||
"Package": "rmarkdown",
|
||||
"Version": "2.30",
|
||||
"Version": "2.31",
|
||||
"Source": "Repository",
|
||||
"Type": "Package",
|
||||
"Title": "Dynamic Documents for R",
|
||||
@@ -821,7 +821,7 @@
|
||||
"Config/Needs/website": "rstudio/quillt, pkgdown",
|
||||
"Config/testthat/edition": "3",
|
||||
"Encoding": "UTF-8",
|
||||
"RoxygenNote": "7.3.2",
|
||||
"RoxygenNote": "7.3.3",
|
||||
"SystemRequirements": "pandoc (>= 1.14) - http://pandoc.org",
|
||||
"NeedsCompilation": "no",
|
||||
"Author": "JJ Allaire [aut], Yihui Xie [aut, cre] (ORCID: <https://orcid.org/0000-0003-0645-5666>), Christophe Dervieux [aut] (ORCID: <https://orcid.org/0000-0003-4474-2498>), Jonathan McPherson [aut], Javier Luraschi [aut], Kevin Ushey [aut], Aron Atkins [aut], Hadley Wickham [aut], Joe Cheng [aut], Winston Chang [aut], Richard Iannone [aut] (ORCID: <https://orcid.org/0000-0003-3925-190X>), Andrew Dunning [ctb] (ORCID: <https://orcid.org/0000-0003-0464-5036>), Atsushi Yasumoto [ctb, cph] (ORCID: <https://orcid.org/0000-0002-8335-495X>, cph: Number sections Lua filter), Barret Schloerke [ctb], Carson Sievert [ctb] (ORCID: <https://orcid.org/0000-0002-4958-2844>), Devon Ryan [ctb] (ORCID: <https://orcid.org/0000-0002-8549-0971>), Frederik Aust [ctb] (ORCID: <https://orcid.org/0000-0003-4900-788X>), Jeff Allen [ctb], JooYoung Seo [ctb] (ORCID: <https://orcid.org/0000-0002-4064-6012>), Malcolm Barrett [ctb], Rob Hyndman [ctb], Romain Lesur [ctb], Roy Storey [ctb], Ruben Arslan [ctb], Sergio Oller [ctb], Posit Software, PBC [cph, fnd], jQuery UI contributors [ctb, cph] (jQuery UI library; authors listed in inst/rmd/h/jqueryui/AUTHORS.txt), Mark Otto [ctb] (Bootstrap library), Jacob Thornton [ctb] (Bootstrap library), Bootstrap contributors [ctb] (Bootstrap library), Twitter, Inc [cph] (Bootstrap library), Alexander Farkas [ctb, cph] (html5shiv library), Scott Jehl [ctb, cph] (Respond.js library), Ivan Sagalaev [ctb, cph] (highlight.js library), Greg Franko [ctb, cph] (tocify library), John MacFarlane [ctb, cph] (Pandoc templates), Google, Inc. [ctb, cph] (ioslides library), Dave Raggett [ctb] (slidy library), W3C [cph] (slidy library), Dave Gandy [ctb, cph] (Font-Awesome), Ben Sperry [ctb] (Ionicons), Drifty [cph] (Ionicons), Aidan Lister [ctb, cph] (jQuery StickyTabs), Benct Philip Jonsson [ctb, cph] (pagebreak Lua filter), Albert Krewinkel [ctb, cph] (pagebreak Lua filter)",
|
||||
@@ -866,7 +866,7 @@
|
||||
},
|
||||
"tinytex": {
|
||||
"Package": "tinytex",
|
||||
"Version": "0.58",
|
||||
"Version": "0.59",
|
||||
"Source": "Repository",
|
||||
"Type": "Package",
|
||||
"Title": "Helper Functions to Install and Maintain TeX Live, and Compile LaTeX Documents",
|
||||
|
||||
Reference in New Issue
Block a user