From c8a11289271545b558e491dc10d0a9580f4532d1 Mon Sep 17 00:00:00 2001 From: Judd West Date: Mon, 30 Jan 2023 21:08:08 +1100 Subject: [PATCH] Add NOAA D-RAP map to propagation plugin --- CHANGELOG.md | 2 ++ exts/propagation.py | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68458da..1f92f9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] +### Added +- `?drapmap` command to display NOAA D Region Absorption Predictions map. ## [2.9.1] - 2023-01-29 diff --git a/exts/propagation.py b/exts/propagation.py index 1593c49..fe02e50 100644 --- a/exts/propagation.py +++ b/exts/propagation.py @@ -24,6 +24,7 @@ class PropagationCog(commands.Cog): fof2_url = "https://prop.kc2g.com/renders/current/fof2-normal-now.svg" gl_baseurl = "https://www.fourmilab.ch/cgi-bin/uncgi/Earth?img=ETOPO1_day-m.evif&dynimg=y&opt=-p" n0nbh_sun_url = "http://www.hamqsl.com/solarsun.php" + noaa_drap_url = "https://services.swpc.noaa.gov/images/animations/d-rap/global/d-rap/latest.png" def __init__(self, bot): self.bot = bot @@ -86,6 +87,17 @@ class PropagationCog(commands.Cog): embed.set_image(url="attachment://solarweather.png") await ctx.send(file=file, embed=embed) + @commands.command(name="drapmap", aliases=["drap"], category=cmn.Cats.WEATHER) + async def drapmap(self, ctx: commands.Context): + """Gets the current D-RAP map for radio blackouts""" + embed = cmn.embed_factory(ctx) + embed.title = "D Region Absorption Predictions (D-RAP) Map" + embed.colour = cmn.colours.good + embed.description = \ + "Image from [swpc.noaa.gov](https://www.swpc.noaa.gov/products/d-region-absorption-predictions-d-rap)" + embed.set_image(url=self.noaa_drap_url) + await ctx.send(embed=embed) + def setup(bot: commands.Bot): bot.add_cog(PropagationCog(bot))