|
@@ -13,10 +13,11 @@ opts_chunk$set(tidy=TRUE)
|
13
|
13
|
library(ggplot2)
|
14
|
14
|
library(scales)
|
15
|
15
|
flight <- read.csv("flight.csv", header=T)
|
|
16
|
+flight$mission_time <- as.POSIXct(flight$mission_time, origin=Sys.Date(), tz="GMT")
|
16
|
17
|
```
|
17
|
18
|
|
18
|
19
|
```{r graph}
|
19
|
|
-baseg <- ggplot(flight, aes(x=mission_time)) + xlab("Time (seconds)") + theme_classic()
|
|
20
|
+baseg <- ggplot(flight, aes(x=mission_time)) + xlab("Time (H:M:S)") + theme_classic() + scale_x_datetime(date_labels="%H:%M:%S")
|
20
|
21
|
alt <- baseg + geom_line(aes(y=current_altitude)) + ylab("Altitude (m)") + ggtitle("Altitude")
|
21
|
22
|
vspd <- baseg + geom_line(aes(y=v_speed)) + ylab("Vertical speed (m/s)") + ggtitle("Vertical speed")
|
22
|
23
|
hspd <- baseg + geom_line(aes(y=h_speed)) + ylab("Horizontal speed (m/s)") + ggtitle("Horizontal speed")
|