# NOT RUN {
# }
# NOT RUN {
# Depending on the arguments, the following spatial data sets can returned
# lp the planned launching position of the UAV.
# wp waypoints inclusive all information
# oDEM the original (input) digital surface model (DSM)
# rDEM the resampled (used) DSM
# fp optimized footprints of the camera
# fA flight area with at least 2 overlaps
# rcA area covered by the RC according to the range and line of sight
# hm a heatmap abundance of pictures/pixel (VERY SLOW, only if heatMap = TRUE)
## for visualisation and vecDraw load mapview
require(mapview)
## (1) get example DEM data
demFn <- system.file("extdata", "mrbiko.tif", package = "uavRmp")
tutorial_flightArea <- system.file("extdata", "flightarea.kml", package = "uavRmp")
## (2) simple flight, 50 meters above ground
## assuming a flat topography,
fp <- makeAP(surveyArea = tutorial_flightArea,
demFn = demFn)
## (3) typical real case scenario
## a flight altitude BELOW 50 m is extreme
## You have to use a high resulution DSM
## (here simulated with a standard DEM)
fp <- makeAP(projectDir ="~/uav/test",
locationName = "examples",
surveyArea=tutorial_flightArea,
followSurface = TRUE,
flightAltitude = 90,
demFn = demFn,
windCondition = 1,
uavType = "solo",
followSurfaceRes = 5,
altFilter = .75)
## (5) view results
mapview::mapview(fp3$wp,cex=4, lwd=0.5)+
mapview::mapview(fp3$lp,color = "red", lwd=1,cex=4)+
mapview::mapview(fp3$fA,color="blue", alpha.regions = 0.1,lwd=0.5)+
mapview::mapview(fp3$oDEM,col=terrain.colors(256))
## (4) digitize flight area using leafDraw()
## save vectors as "kml" or "json" files
## provide full filename + extension!
vecDraw(preset="uav")
# }
Run the code above in your browser using DataLab