Skip to content

Commit

Permalink
Add Configuration-Driven NOAA Enhancements
Browse files Browse the repository at this point in the history
Add the ability to drive configuration-driven NOAA enhancements.
  • Loading branch information
jekhokie committed Feb 18, 2021
1 parent 4665074 commit 34bed26
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 4 deletions.
2 changes: 2 additions & 0 deletions ansible/roles/common/templates/noaa-v2.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ IMAGE_ANNOTATION_LOCATION={{ image_annotation_location }}
GROUND_STATION_LOCATION='{{ ground_station_location }}'
SHOW_SUN_ELEVATION={{ show_sun_elevation|lower }}
SHOW_PASS_DIRECTION={{ show_pass_direction|lower }}
NOAA_DAY_ENHANCEMENTS='{{ noaa_daytime_enhancements }}'
NOAA_NIGHT_ENHANCEMENTS='{{ noaa_nighttime_enhancements }}'
ENABLE_EMAIL_PUSH={{ enable_email_push|lower }}
EMAIL_PUSH_ADDRESS={{ email_push_address }}
ENABLE_EMAIL_SCHEDULE_PUSH={{ enable_email_schedule_push|lower }}
Expand Down
4 changes: 4 additions & 0 deletions ansible/roles/webserver/templates/Config.php.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ class Config {

# how many captures to list on admin page for management
const ADMIN_CAPTURES_PER_PAGE = 100;

# which enhancements to display for day/night
const NOAA_DAY_ENHANCEMENTS = '{{ noaa_daytime_enhancements }}';
const NOAA_NIGHT_ENHANCEMENTS = '{{ noaa_nighttime_enhancements }}';
}

?>
6 changes: 6 additions & 0 deletions config/settings.yml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ delete_audio: false
# annotation (leave blank if you wish to exclude the ground station annotation)
# show_sun_elevation - whether to show sun elevation in annotation
# show_pass_direction - show which direction the satellite is moving in the image annotation
# noaa_daytime_enhancements - list of enhancements to create images using during daytime captures
# (note: default value is total list of supported image processors)
# noaa_nighttime_enhancements - list of enhancements to create images using during nighttime captures
# (note: default value is total list of supported image processors)
flip_meteor_image: true
produce_spectrogram: true
noaa_crop_telemetry: false
Expand All @@ -54,6 +58,8 @@ produce_noaa_pristine_image: false
ground_station_location: ''
show_sun_elevation: false
show_pass_direction: false
noaa_daytime_enhancements: 'ZA MCIR MCIR-precip MSA MSA-precip HVC-precip HVCT-precip HVC HVCT therm'
noaa_nighttime_enhancements: 'ZA MCIR MCIR-precip therm'

# thresholds for scheduling captures - enables avoiding an attempt
# to capture imagery if objects are lower than these degree elevation thresholds
Expand Down
10 changes: 7 additions & 3 deletions scripts/receive_noaa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,13 @@ $WXMAP -T "${SAT_NAME}" -H "${TLE_FILE}" -p 0 ${extra_map_opts} -o "${epoch_adju

# run all enhancements all the time - any that cannot be produced will
# simply be left out/not included, so there is no harm in running all of them
ENHANCEMENTS="ZA MCIR MCIR-precip MSA MSA-precip HVC-precip HVCT-precip HVC HVCT therm"
daylight=0
if [ "${SUN_ELEV}" -gt "${SUN_MIN_ELEV}" ]; then daylight=1; fi
if [ "${SUN_ELEV}" -gt "${SUN_MIN_ELEV}" ]; then
ENHANCEMENTS="${NOAA_DAY_ENHANCEMENTS}"
daylight=1
else
ENHANCEMENTS="${NOAA_NIGHT_ENHANCEMENTS}"
daylight=0
fi

# build images based on enhancements defined
for enhancement in $ENHANCEMENTS; do
Expand Down
6 changes: 5 additions & 1 deletion webpanel/App/Models/Capture.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ public function getEnhancements($id) {
$enhancements = ['-122-rectified.jpg','-col-122-rectified.jpg','-ir-122-rectified.jpg'];
break;
case 1: // NOAA
$enhancements = ['-ZA.jpg','-MCIR.jpg','-MCIR-precip.jpg','-MSA.jpg','-MSA-precip.jpg','-HVC.jpg','-HVC-precip.jpg','-HVCT.jpg','-HVCT-precip.jpg','-therm.jpg'];
if ($pass['daylight_pass'] == 1) {
$enhancements = array_map(function($x) { return "-" . $x . ".jpg"; }, explode(' ', Config::NOAA_DAY_ENHANCEMENTS));
} else {
$enhancements = array_map(function($x) { return "-" . $x . ".jpg"; }, explode(' ', Config::NOAA_NIGHT_ENHANCEMENTS));
}
break;
}

Expand Down

0 comments on commit 34bed26

Please sign in to comment.