Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transmit Global Path Flow #269

Open
hhenry01 opened this issue Nov 24, 2023 · 0 comments · May be fixed by #464
Open

Transmit Global Path Flow #269

hhenry01 opened this issue Nov 24, 2023 · 0 comments · May be fixed by #464
Assignees
Labels
enhancement New feature or request net essential Network Systems item that must be resolved for launch net Network Systems team remote transceiver Pertaining to the Network Systems Remote Transceiver

Comments

@hhenry01
Copy link
Member

hhenry01 commented Nov 24, 2023

Purpose

Get global path waypoints from the remote server to the Iridium satellite network.

Description

Make sure to save POSTed global path to the db.

  1. Add a /global-path target in the remote transceiver HTTP server.
  2. Work with Global Pathfinding to define and parse the POST format.
  3. Write POSTed path to the database.
  4. Test by POSTing and querying the database.

Resources

How to parse json:

// You need to add two includes to the top of the file
#include <boost/property_tree/json_parser.hpp>
#include <boost/property_tree/ptree.hpp>

// after checking for application/json
std::string json_str = beast::buffers_to_string(req_.body().data());    
std::stringstream           ss(json_str);
boost::property_tree::ptree json_tree;
boost::property_tree::read_json(ss, json_tree);
std::string timestamp = json_tree.get<std::string>("timestamp");
std::cout << "timestamp: " << timestamp << std::endl;
for (const auto & waypoint : json_tree.get_child("waypoints")) {
    float lat = waypoint.second.get<float>("latitude");
    float lon = waypoint.second.get<float>("longitude");
    std::cout << "waypoint latlon: " << lat << " " << lon << std::endl;
}
@hhenry01 hhenry01 added enhancement New feature or request remote transceiver Pertaining to the Network Systems Remote Transceiver labels Nov 24, 2023
@hhenry01 hhenry01 added the net essential Network Systems item that must be resolved for launch label Dec 4, 2023
@hhenry01 hhenry01 added the net Network Systems team label Mar 9, 2024
@hhenry01 hhenry01 transferred this issue from UBCSailbot/network_systems Mar 9, 2024
@vaibhavambastha vaibhavambastha linked a pull request Nov 30, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request net essential Network Systems item that must be resolved for launch net Network Systems team remote transceiver Pertaining to the Network Systems Remote Transceiver
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

3 participants