Decoder is an application that decodes the message intercepted and the position from a spaceship.
This aplication counts with three satellites that intercept the message sent from the spaceship. They are located at:
Kenobi
{ x: -500, y: -200 }
Skywalker
{ x: 100, y: -100 }
Sato
{ x: 500, y: 100 }
GET -> /secret_controller/topsecret_split
- Returns the message and position of the spacechip based on the requests persisted in the database.
POST -> /secret_controller/topsecret_split/{satelliteName} with Body like:
{
"distance": 200.0,
"message": ["este", "", "", "mensaje", ""]
}- Adds a request to the database for the satellite.
POST -> /secret_controller/topsecret with Body like:
{
"satellites":
[
{
"name": "kenobi",
"distance": 200.0,
"message": ["este", "", "", "mensaje", ""]
},
{
"name": "skywalker",
"distance": 470.4,
"message": ["", "es", "", "", "secreto"]
},
{
"name": "sato",
"distance": 880,
"message": ["este", "", "un", "", ""]
}
]
}- With this request you get a valid response with response status 200 OK with Body:
{
"position": {
"x": -367.7332,
"y": -49.98171
},
"message": "este es un mensaje secreto"
}- The message is built with Backtracking.
- The position is obtained with Trilateracion.
The application is host on: https://alliancedecoder.herokuapp.com/
It does not have a user interface but all endpoints are available.
- It was not a requirement but all the services for a Satellite and Satellite Request ABM are created, only a controller needs to be added for those endpoints.