hw4
This commit is contained in:
24
hw4.Rmd
24
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]")
|
||||
|
||||
```
|
||||
|
||||
# Output
|
||||
|
||||
```{r output}
|
||||
write.csv(ys, './klobuchar.csv')
|
||||
```
|
||||
# Results
|
||||
Due to the calculation for the _slant factor_ being 1, the output is a constant $5 \cdot 10^{-9} \cdot 1 $.
|
||||
Reference in New Issue
Block a user