Commit f0480104 authored by thocro's avatar thocro
Browse files

Update example_fit_to_the_cumulus.R

parent d0217b65
......@@ -23,7 +23,7 @@ cumulus$local_hour <- as.numeric(format.POSIXct(cumulus$local, "%H"))
###############################################################################
cumulus_lag <- lag(cumulus)
cumulus$distance <- geosphere::distHaversine(cumulus[,2:3],cumulus_lag[,2:3])
cumulus$distance <- geosphere::distHaversine(cumulus[,2:3],cumulus_lag[,2:3]) / 1000
cumulus$time_lag <- as.numeric(difftime(cumulus$date,cumulus_lag$date,units = "secs"))
cumulus$ship.speed <- cumulus$distance / cumulus$time_lag
cumulus$heading <- geosphere::bearing(cumulus[,2:3],cumulus_lag[,2:3])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment