From 597f11f01f36163ec3eb2590a1a1b0e9008e9a55 Mon Sep 17 00:00:00 2001 From: eneller Date: Tue, 19 May 2026 19:34:43 +0200 Subject: [PATCH] hw4 --- hw4.Rmd | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/hw4.Rmd b/hw4.Rmd index ef02c45..237627c 100644 --- a/hw4.Rmd +++ b/hw4.Rmd @@ -1,7 +1,7 @@ --- title: "HW4" subtitle: "Software Defined Radio" -output: pdf_document +output: html_document date: "`r Sys.Date()`" --- @@ -79,11 +79,6 @@ beta <- function(index){ print(klobuchar_params) ``` -```{r select-date} -# TODO -selected_date <- as.Date("2000-1-1") -``` - \newpage @@ -201,6 +196,7 @@ X_I(1) $$ F=\left[1 - (\frac{R_E}{R_E + h} \cos E)^2\right]^{-1/2} $$ ```{r klob-9} +# with the given input this becomes constant 1 due to FP inaccuracies F = (1- (R_E/(R_E+h) * cos(E) )^2)^(-1/2) ``` @@ -219,11 +215,11 @@ $$ ```{r klob-10} I_1 <- function(tGPS){ if (abs(X_I(tGPS))< pi/2) { - I_1 = (5e-9 + A_I * cos(X_I(tGPS))) * F + I = (5e-9 + A_I * cos(X_I(tGPS))) * F }else{ - I_1 = 5e-9 * F + I = 5e-9 * F } -I_1 +I } ``` @@ -245,6 +241,14 @@ for (x in xs){ ```{r simulate-demo, echo=FALSE} head(ys) -plot(xs,ys,xlab="Time of Day [Minutes]",ylab="Delay [s]") +plot(xs[-length(xs)],ys[-length(xs)],xlab="Time of Day [Minutes]",ylab="Delay [s]") -``` \ No newline at end of file +``` + +# Output + +```{r output} +write.csv(ys, './klobuchar.csv') +``` +# Results +Due to the calculation in Section xxx the output is a constant $5 \cdot 10^{-9} \cdot 1 $. \ No newline at end of file