Skip to content

Louis-He/NAADS_CAN_Receiver

Repository files navigation

NAADS_CAN_Receiver

This is a simple CAN receiver for the NAADS project. The weather alerts and emergency alerts have a public-facing communication protocol. This project intends to unlock the potential to receive messages on any devices that can connect to the internet.

This project is written in C++ and uses the TCP/IP protocol to check messages sent from the NAAD System. The implementation is based on NAAD System - LMD User Guide - Release 10.0 . The receiver listens to incoming messages, parses them, and prints them on the console.

Keyword

Alert Ready, NAADS, Canadian Weather Alert, Emergency Alert

Getting Started

Use the CMakeLists.txt file to build the project. The project uses the pugixml library to parse incoming messages. The library is included in the project.

How to build

To build the project, you need to have CMake installed.

  1. Create a build directory:

    mkdir build
    cd build
  2. Generate the build files:

    cmake ..
  3. Build the project:

    cmake --build .

The executable will be generated in the build directory.

Running the Web GUI

A modern web interface is available to view alerts in real-time with a premium dark-themed dashboard.

Prerequisites

  • Node.js (installed via nvm or other package manager)

Setup and Run

  1. Start the Backend Server (in one terminal):

    cd web/server
    npm start

    The server will start on http://localhost:3000 and automatically launch the C++ receiver.

  2. Start the Frontend Client (in a new terminal):

    cd web/client
    npm run dev

    Open your browser to the URL shown (typically http://localhost:5173).

Features

  • Real-time Updates: Alerts appear instantly via WebSocket connection
  • Visual Severity Indicators: Color-coded cards based on alert severity (Extreme, Severe, Moderate, Minor)
  • Emergency Alerts: Red pulsing animation for wireless immediate alerts
  • Responsive Design: Works on desktop and mobile devices

Disclaimer

This project is not fully tested against all types of messages that the NAAD System can send. The project is a simple implementation that demonstrates how to receive and parse messages from the NAAD System.

Example Output

Sender: NAADS-Heartbeat
Sent: 2024-08-19T02:43:52-00:00
Status: System
Headline: 
Description: 
Urgency: 
Severity: 
Certainty: 
Broadcast Immediately: No
Wireless Immediately: No
Area Description: 
End of alert
============

Sender: cap-pac@canada.ca
Sent: 2024-08-19T02:44:28-00:00
Status: Actual
Headline: severe thunderstorm warning in effect
Description: 
At 8:44 p.m. MDT, Environment Canada meteorologists are tracking a severe thunderstorm capable of producing strong wind gusts, nickel to ping pong ball size hail and heavy rain.

###

Large hail can damage property and cause injury. Strong wind gusts can toss loose objects, damage weak buildings, break branches off trees and overturn large vehicles. Remember, severe thunderstorms can produce tornadoes.

Severe thunderstorm warnings are issued when imminent or occurring thunderstorms are likely to produce or are producing one or more of the following: large hail, damaging winds, torrential rainfall.

Urgency: Immediate
Severity: Moderate
Certainty: Likely
Broadcast Immediately: No
Wireless Immediately: No
Area Description: 
  Clearwater Co. near Rocky Mtn House and Crimson Lake
  Lacombe Co. near Eckville
  Ponoka Co. near Rimbey Bluffton and Hoadley
End of alert
============

About

A simple C++ program to retreive NAADS Canada public warning messages

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors