Merge branch 'mueller/master' of https://egit.irs.uni-stuttgart.de/KSat/fsfw into mueller/master
This commit is contained in:
commit
8dd9d6ad91
5
coordinates/CMakeLists.txt
Normal file
5
coordinates/CMakeLists.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
target_sources(${LIB_FSFW_NAME}
|
||||||
|
PRIVATE
|
||||||
|
CoordinateTransformations.cpp
|
||||||
|
Sgp4Propagator.cpp
|
||||||
|
)
|
@ -1,7 +1,9 @@
|
|||||||
#ifndef SGP4PROPAGATOR_H_
|
#ifndef SGP4PROPAGATOR_H_
|
||||||
#define SGP4PROPAGATOR_H_
|
#define SGP4PROPAGATOR_H_
|
||||||
|
|
||||||
|
#ifndef WIN32
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#endif
|
||||||
#include "../contrib/sgp4/sgp4unit.h"
|
#include "../contrib/sgp4/sgp4unit.h"
|
||||||
#include "../returnvalues/HasReturnvaluesIF.h"
|
#include "../returnvalues/HasReturnvaluesIF.h"
|
||||||
|
|
||||||
|
@ -2,7 +2,12 @@
|
|||||||
#define TIMEVALOPERATIONS_H_
|
#define TIMEVALOPERATIONS_H_
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <winsock2.h>
|
||||||
|
#else
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
timeval& operator+=(timeval& lhs, const timeval& rhs);
|
timeval& operator+=(timeval& lhs, const timeval& rhs);
|
||||||
|
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
#ifndef FRAMEWORK_OSAL_ENDINESS_H_
|
#ifndef FRAMEWORK_OSAL_ENDINESS_H_
|
||||||
#define FRAMEWORK_OSAL_ENDINESS_H_
|
#define FRAMEWORK_OSAL_ENDINESS_H_
|
||||||
|
|
||||||
/**
|
|
||||||
* @defgroup osal Operating System Abstraction Layer
|
|
||||||
* @brief Provides clean interfaces to use OS functionalities
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* BSD-style endian declaration
|
* BSD-style endian declaration
|
||||||
@ -26,9 +22,23 @@
|
|||||||
#else
|
#else
|
||||||
#error "Can't decide which end is which!"
|
#error "Can't decide which end is which!"
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <Windows.h>
|
||||||
|
#if REG_DWORD == REG_DWORD_LITTLE_ENDIAN
|
||||||
|
#define BYTE_ORDER_SYSTEM LITTLE_ENDIAN
|
||||||
|
#else
|
||||||
|
#define BYTE_ORDER_SYSTEM BIG_ENDIAN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#error __BYTE_ORDER__ not defined
|
#error __BYTE_ORDER__ not defined
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ void TcWinUdpPollingTask::setTimeout(double timeoutSeconds) {
|
|||||||
int result = setsockopt(serverUdpSocket, SOL_SOCKET, SO_RCVTIMEO,
|
int result = setsockopt(serverUdpSocket, SOL_SOCKET, SO_RCVTIMEO,
|
||||||
reinterpret_cast<const char*>(&timeoutMs), sizeof(DWORD));
|
reinterpret_cast<const char*>(&timeoutMs), sizeof(DWORD));
|
||||||
if(result == -1) {
|
if(result == -1) {
|
||||||
sif::error << "TcSocketPollingTask::TcSocketPollingTask: Setting "
|
sif::error << "TcWinUdpPollingTask::TcSocketPollingTask: Setting "
|
||||||
"receive timeout failed with " << strerror(errno) << std::endl;
|
"receive timeout failed with " << strerror(errno) << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -128,17 +128,22 @@ void TcWinUdpPollingTask::handleReadError() {
|
|||||||
int error = WSAGetLastError();
|
int error = WSAGetLastError();
|
||||||
switch(error) {
|
switch(error) {
|
||||||
case(WSANOTINITIALISED): {
|
case(WSANOTINITIALISED): {
|
||||||
sif::info << "TmTcWinUdpBridge::handleReadError: WSANOTINITIALISED: "
|
sif::info << "TcWinUdpPollingTask::handleReadError: WSANOTINITIALISED: "
|
||||||
<< "WSAStartup(...) call " << "necessary" << std::endl;
|
<< "WSAStartup(...) call " << "necessary" << std::endl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case(WSAEFAULT): {
|
case(WSAEFAULT): {
|
||||||
sif::info << "TmTcWinUdpBridge::handleReadError: WSADEFAULT: "
|
sif::info << "TcWinUdpPollingTask::handleReadError: WSADEFAULT: "
|
||||||
<< "Bad address " << std::endl;
|
<< "Bad address " << std::endl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case(WSAEINVAL): {
|
||||||
|
sif::info << "TcWinUdpPollingTask::handleReadError: WSAEINVAL: "
|
||||||
|
<< "Invalid input parameters. " << std::endl;
|
||||||
|
break;
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
sif::info << "TmTcWinUdpBridge::handleReadError: Error code: "
|
sif::info << "TcWinUdpPollingTask::handleReadError: Error code: "
|
||||||
<< error << std::endl;
|
<< error << std::endl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ protected:
|
|||||||
//! This is called when buffer becomes full. If
|
//! This is called when buffer becomes full. If
|
||||||
//! buffer is not used, then this is called every
|
//! buffer is not used, then this is called every
|
||||||
//! time when characters are put to stream.
|
//! time when characters are put to stream.
|
||||||
int overflow(int c = Traits::eof()) override;
|
int overflow(int c = std::ostream::traits_type::eof()) override;
|
||||||
|
|
||||||
//! This function is called when stream is flushed,
|
//! This function is called when stream is flushed,
|
||||||
//! for example when std::endl is put to stream.
|
//! for example when std::endl is put to stream.
|
||||||
|
@ -7,7 +7,12 @@
|
|||||||
#include "../globalfunctions/timevalOperations.h"
|
#include "../globalfunctions/timevalOperations.h"
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <winsock2.h>
|
||||||
|
#else
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
class Clock {
|
class Clock {
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user