From 8c11d003b195cf4bb5bd2dc1b2a848f4f8e504f9 Mon Sep 17 00:00:00 2001 From: eneller Date: Tue, 19 May 2026 19:34:43 +0200 Subject: [PATCH] hw4 --- hw4.Rmd | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/hw4.Rmd b/hw4.Rmd index ef02c45..a05dc42 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()`" --- @@ -201,6 +201,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 +220,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 +246,9 @@ 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 +``` + +# 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