mirror of
https://gitlab.com/Luci_/arduino-photometrics.git
synced 2026-04-03 03:25:36 +02:00
add changes before migration on fablab cohabit
This commit is contained in:
parent
5b5375dd9c
commit
685115ea00
File diff suppressed because it is too large
Load diff
|
|
@ -18,15 +18,15 @@ liste_data <- lapply(fichiers, read.csv, header = TRUE)
|
||||||
summary(liste_data)
|
summary(liste_data)
|
||||||
print(typeof(liste_data))
|
print(typeof(liste_data))
|
||||||
|
|
||||||
# partial_list_data <- liste_data[1:2]
|
partial_list_data <- liste_data[3:3]
|
||||||
partial_list_data <- liste_data[7:8]
|
# partial_list_data <- liste_data[7:8]
|
||||||
photo <- do.call(rbind, partial_list_data)
|
photo <- do.call(rbind, partial_list_data)
|
||||||
|
|
||||||
max_val_sensor = 254
|
max_val_sensor = 254
|
||||||
photo <- photo %>%
|
photo <- photo %>%
|
||||||
mutate(across(starts_with("Photo_sensor"), ~ {
|
mutate(across(starts_with("Photo_sensor"), ~ {
|
||||||
# .x <- sqrt(.x)
|
.x <- sqrt(.x)
|
||||||
# max_val_sensor = sqrt(max_val_sensor)
|
max_val_sensor = sqrt(max_val_sensor)
|
||||||
.x <- (.x*-1) + max_val_sensor
|
.x <- (.x*-1) + max_val_sensor
|
||||||
.x <- as.numeric(scale(.x, center = TRUE, scale = TRUE))
|
.x <- as.numeric(scale(.x, center = TRUE, scale = TRUE))
|
||||||
}))
|
}))
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
# install.packages('randomForest')
|
# install.packages('randomForest')
|
||||||
|
# install.packages(c('neuralnet','keras','tensorflow'),dependencies = T)
|
||||||
|
|
||||||
library(tidyverse)
|
library(tidyverse)
|
||||||
library(ggplot2)
|
library(ggplot2)
|
||||||
|
|
@ -6,12 +7,13 @@ library(lubridate)
|
||||||
library(dplyr)
|
library(dplyr)
|
||||||
library(randomForest)
|
library(randomForest)
|
||||||
library(suntools)
|
library(suntools)
|
||||||
|
library(neuralnet)
|
||||||
|
|
||||||
|
|
||||||
setwd("~/Documents/PlatformIO/Projects/Robot_Go_West/arduino-photometrics/exec")
|
setwd("~/Documents/PlatformIO/Projects/Robot_Go_West/arduino-photometrics/exec")
|
||||||
|
|
||||||
# Load
|
# Load
|
||||||
# solar <- read.csv("../data/solar_pos_data/solar_data_2026-01-13_to_2026-01-16.csv", header=TRUE)
|
photo <- read.csv("../data/photo_measures/merged_photo_data.csv", header=TRUE)
|
||||||
photo <- read.csv("../data/photo_measures/arduino_data_package_auto_20260116_094653.csv", header=TRUE)
|
|
||||||
|
|
||||||
# Time type changes
|
# Time type changes
|
||||||
# photo$time <- as.POSIXct(photo$Epoch)
|
# photo$time <- as.POSIXct(photo$Epoch)
|
||||||
|
|
@ -48,7 +50,6 @@ photo <- photo %>%
|
||||||
|
|
||||||
|
|
||||||
# retreive solar pos
|
# retreive solar pos
|
||||||
|
|
||||||
unix_time <- as.numeric(photo$datetime)
|
unix_time <- as.numeric(photo$datetime)
|
||||||
|
|
||||||
lat <- 44.7912
|
lat <- 44.7912
|
||||||
|
|
@ -129,3 +130,24 @@ test_random_results$predicted_azimut <- test_random_predictions
|
||||||
|
|
||||||
head(test_random_results[, c("azimut", "predicted_azimut")])
|
head(test_random_results[, c("azimut", "predicted_azimut")])
|
||||||
head(test_chrono_results[, c("azimut", "predicted_azimut")])
|
head(test_chrono_results[, c("azimut", "predicted_azimut")])
|
||||||
|
|
||||||
|
comparison_chrono <- test_chrono_results[, c("azimut", "predicted_azimut", "timestamp", "decimal_hour")]
|
||||||
|
|
||||||
|
# comparison_chrono$list = abs(comparison_chrono$azimut - comparison_chrono$predicted_azimut)
|
||||||
|
# print(length(comparison_chrono$list))
|
||||||
|
# print(as.integer(sum(comparison_chrono$list)))
|
||||||
|
# mean_before_filter <- as.integer(sum(comparison_chrono$list)) / length(comparison_chrono$list)
|
||||||
|
#
|
||||||
|
comparison_chrono <- comparison_chrono %>%
|
||||||
|
filter(decimal_hour > 7.0) %>%
|
||||||
|
filter(decimal_hour < 20.0)
|
||||||
|
|
||||||
|
|
||||||
|
comparison_chrono$comp <- abs(comparison_chrono$azimut - comparison_chrono$predicted_azimut)
|
||||||
|
|
||||||
|
mean <- sum(comparison_chrono$comp) / length(comparison_chrono$comp)
|
||||||
|
print(typeof(comparison_chrono))
|
||||||
|
|
||||||
|
|
||||||
|
print(random_model)
|
||||||
|
print(chrono_model)
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ class Storage_interface
|
||||||
private:
|
private:
|
||||||
|
|
||||||
static constexpr uint8_t OFFSET_MEASURES_SCH = 1, OFFSET_NB_PHOTO_SENSOR = 2, OFFSET_NB_TEMP_SENSOR = 3, OFFSET_PHOTO_MEASURES_SIZE = 4, OFFSET_TEMP_MEASURES_SIZE = 5, OFFSET_NB_MEASURES = 6, OFFSET_NEXT_PACKAGE = 8, OFFSET_START_DATA_MEASURES = 10; // unit in byte
|
static constexpr uint8_t OFFSET_MEASURES_SCH = 1, OFFSET_NB_PHOTO_SENSOR = 2, OFFSET_NB_TEMP_SENSOR = 3, OFFSET_PHOTO_MEASURES_SIZE = 4, OFFSET_TEMP_MEASURES_SIZE = 5, OFFSET_NB_MEASURES = 6, OFFSET_NEXT_PACKAGE = 8, OFFSET_START_DATA_MEASURES = 10; // unit in byte
|
||||||
static constexpr uint16_t MEGA_2560_EEPROM_SIZE = 4000; // bytes
|
static constexpr uint16_t MEGA_2560_EEPROM_SIZE = 4096; // bytes
|
||||||
|
|
||||||
void clear_eeprom_at(uint16_t idx);
|
void clear_eeprom_at(uint16_t idx);
|
||||||
|
|
||||||
|
|
|
||||||
BIN
photos/1768293109490.jpeg
Normal file
BIN
photos/1768293109490.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 103 KiB |
BIN
photos/PXL_20251217_135345575.jpg
Normal file
BIN
photos/PXL_20251217_135345575.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 MiB |
BIN
photos/PXL_20260113_081652912.MP.jpg
Normal file
BIN
photos/PXL_20260113_081652912.MP.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 590 KiB |
Loading…
Reference in a new issue