Skip to content

This Lab implements tracking satellites IIS (public endpoint) and Sentinel (needs an account and a token)

Notifications You must be signed in to change notification settings

edercarloscosta/Satellites

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Satellites

A environment for testing technologies composition

  • Leaflet
  • Flask
  • Kafka (This guy was my real motivator for this lab)

Goals

Offer a simple and dynamic (Laboratory) web application where we may run Kafka reading maps coordinates on real-time. Each 15 sec the application sends message (Producer) to Kafka topic with coordinates, those coordinates will be read (Consumer) by an endpoint on Leaflet and diplay on satellites icons.

Red satellite icon: Display coordinates on real time from where the ISS at?

Blue satellite icon:

  • Display fake coordinates from local file OR
  • In case you want to real data this application is ready for running the coordinates from Sentinel 2A satellite. Please to read the section below "Real coordinates from Sentinel 2A"

Pre-requirements

  • Docker
  • Docker Compose
  • Mapbox: You need to create an account, generate an accessToken and reference this on leaflet.js
    • This is a Mapbox requirement to rendering map on Leaflet, but it's pretty simple Access Token
  • Add Mapbox accessToken on code:
    • Go to flaskProject/app/static/js/ and open the leaflet.js file
    • Replace you_mapbox_access_token_here by your access token

Real coordinates from Sentinel 2A

Note: Keep in mind the current limit is 1000 transactions/hour

  • First of all, should access n2yo to create a register and generates API Key
  • After generates you API Key, copy that and paste into const.py file:
    • Go to flaskProject/app/service/ open the file const.py
    • Replace personal_key_here by the API Key
  • Adapting the application
    • Go to flaskProject/app/ open the file app.py
    • Follow the two simple steps on top comments
      • Import: Sentinel2A
      • Replace Worker() parameter from "" to Sentinel2A.SENTINEL2A_URI.value
    • Now just read next section "How to run step-by-step"

How to run step-by-step

  1. Clone this repo
  2. Navigate to root path flaskProject when you w'll see docker-compose.yaml and Dockerfile
  3. Compile the docker-compose with:

docker-compose build

  1. Run docker compose:

docker-compose up -d

  1. In case you want to see logs run:

docker-compose up

  1. Go to browser and type 0.0.0.0:5001

References

Leaflet

An open-source JavaScript library for mobile-friendly interactive maps

See more on Leaflet

Flask

A really fun web development framework / microframework (Python)

See more on Flask

Kafka

Apache Kafka is an open-source distributed event streaming platform used by thousands of companies for high-performance data pipelines, streaming analytics, data integration, and mission-critical applications.

See more in Apache Kafka

Bitnami containers

This guys offer all we need to use Kafka esily as possible

See more on Bitnami

About

This Lab implements tracking satellites IIS (public endpoint) and Sentinel (needs an account and a token)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published