Class Orion::SimSatClient¶
ClassList > Orion > SimSatClient
#include <SimSatClient.hpp>
Public Static Functions¶
| Type | Name |
|---|---|
| bool | fetchMapboxImage (uint8_t * rgbOut, uint32_t outWidth, uint32_t outHeight) |
| bool | fetchPosition (double & lat, double & lon, double & alt) |
Private Static Functions¶
| Type | Name |
|---|---|
| const char * | getBaseUrl () |
| size_t | headerCallback (char * buffer, size_t size, size_t nitems, void * userp) libcurl header callback: captures the mapbox_metadata header value. |
| size_t | writeCallback (void * contents, size_t size, size_t nmemb, void * userp) libcurl write callback: appends received data to a std::string buffer. |
Detailed Description¶
Plain C++ utility wrapping libcurl to fetch data from the SimSat REST API. Not an F-Prime component; hence, called directly by NavTelemetry and CameraManager. Uses standard C++ types to avoid depending on F-Prime headers.
Public Static Functions Documentation¶
function fetchMapboxImage¶
static bool Orion::SimSatClient::fetchMapboxImage (
uint8_t * rgbOut,
uint32_t outWidth,
uint32_t outHeight
)
Fetch a Mapbox image for the current satellite position from SimSat, decode the PNG, resize to outWidth x outHeight, and write RGB bytes into the caller's buffer. GET /data/current/image/mapbox -> PNG bytes + mapbox_metadata header Returns true on success (image available and decoded), false otherwise.
function fetchPosition¶
static bool Orion::SimSatClient::fetchPosition (
double & lat,
double & lon,
double & alt
)
Fetch the current satellite position from SimSat. GET /data/current/position -> {"lon-lat-alt": [lon, lat, alt], ...} Returns true on success, false on HTTP or parse failure.
Private Static Functions Documentation¶
function getBaseUrl¶
static const char * Orion::SimSatClient::getBaseUrl ()
Returns the SimSat base URL from env var ORION_SIMSAT_URL, defaulting to "http://localhost:9005".
function headerCallback¶
libcurl header callback: captures the mapbox_metadata header value.
static size_t Orion::SimSatClient::headerCallback (
char * buffer,
size_t size,
size_t nitems,
void * userp
)
function writeCallback¶
libcurl write callback: appends received data to a std::string buffer.
static size_t Orion::SimSatClient::writeCallback (
void * contents,
size_t size,
size_t nmemb,
void * userp
)
The documentation for this class was generated from the following file flight_segment/orion/Orion/Utils/SimSatClient.hpp