Commit 453ca572 authored by luroth's avatar luroth
Browse files

Complete refactoring

parent 08a38d41
......@@ -39,6 +39,34 @@
"t_max": 8000,
"ISO_max": 3200
}
},
{
"name": "Parrot Sequoia monochrome (4 bands)",
"sensor_values": {
"d_sensor_x": 4.8,
"d_sensor_y": 3.6,
"n_pix_x": 1280,
"n_pix_y": 960,
"default_lens_aperture": 2.2,
"focal_lenght": 3.98,
"t_max": 5000,
"ISO_max": 800
}
},
{
"name": "Parrot Sequoia RGB",
"sensor_values": {
"d_sensor_x": 6.17472,
"d_sensor_y": 4.63104,
"n_pix_x": 4608,
"n_pix_y": 3456,
"default_lens_aperture": 2.2,
"focal_lenght": 4.88,
"t_max": 5000,
"ISO_max": 800
}
}
}
......
......@@ -777,17 +777,21 @@ server_ <- function(input, output, session) {
req(input$mapping_area_x, input$mapping_area_y, derived_values$field_of_view_x, derived_values$field_of_view_y,
derived_values$spacing_between_flight_lines, derived_values$spacing_between_exposures,
input$plot_size_x, input$plot_size_y,
input$n_pix_x, input$n_pix_y, input$positioning_precision, derived_values$ground_sampling_distance)
input$n_pix_x, input$n_pix_y, input$positioning_precision, derived_values$ground_sampling_distance,
input$flip_camera)
withProgress(message = 'Calculating pixel frequency', {
incProgress(0.0)
# Init parameters
no_of_lanes_x <- ceiling((input$mapping_area_x + derived_values$field_of_view_x) / derived_values$spacing_between_flight_lines)
no_of_lanes_y <- ceiling((input$mapping_area_y + derived_values$field_of_view_y) / derived_values$spacing_between_exposures)
n_pix_x <- ifelse(input$flip_camera, input$n_pix_y, input$n_pix_x)
n_pix_y <- ifelse(input$flip_camera, input$n_pix_x, input$n_pix_y)
incProgress(0.3)
# Calculate frequencies
ret_list <- calc_pixel_freq_xy(input$plot_size_x, input$plot_size_y, derived_values$spacing_between_flight_lines, derived_values$spacing_between_exposures,
no_of_lanes_x, no_of_lanes_y, input$n_pix_x, input$n_pix_y, input$positioning_precision, derived_values$ground_sampling_distance)
no_of_lanes_x, no_of_lanes_y, n_pix_x, n_pix_y, input$positioning_precision, derived_values$ground_sampling_distance)
incProgress(1)
return(ret_list)
......
......@@ -25,7 +25,7 @@ default_position_edge2_long <- 8.682089627868457
default_starting_point_lat <- 47.450163
default_starting_point_long <- 8.682736
aperture_values <- c(0.9, 1, 1.1, 1.2, 1.3, 1.4, 1.6, 1.7, 1.8, 2, 2.4, 2.5, 2.8, 3.2, 3.4, 4, 4.5, 4.8, 5, 5.7, 6.3, 6.7, 7.1, 8, 9, 9.5, 10.1, 11.3, 12.7, 13.5, 14.3, 16, 18, 19)
aperture_values <- c(0.9, 1, 1.1, 1.2, 1.3, 1.4, 1.6, 1.7, 1.8, 2, 2.2, 2.4, 2.5, 2.8, 3.2, 3.4, 4, 4.5, 4.8, 5, 5.7, 6.3, 6.7, 7.1, 8, 9, 9.5, 10.1, 11.3, 12.7, 13.5, 14.3, 16, 18, 19)
names(aperture_values) <- paste0("f/", aperture_values)
ui_ <- fluidPage(
......
Supports Markdown
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