Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fpsdk.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -222,14 +222,14 @@
},
"workbench.remoteIndicator.showExtensionRecommendations": true,
"yaml.extension.recommendations": false,
"peacock.remoteColor": "#f9e64f",
"workbench.colorCustomizations": {
"commandCenter.border": "#15202b99",
"titleBar.activeBackground": "#f9e64f",
"titleBar.activeForeground": "#15202b",
"titleBar.inactiveBackground": "#f9e64f99",
"titleBar.inactiveForeground": "#15202b99"
},
"peacock.remoteColor": "#f9e64f"
}
},
"extensions": {
"recommendations": [
Expand Down
51 changes: 51 additions & 0 deletions fpsdk_common/include/fpsdk_common/gnss.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,46 @@ enum class SatOrb : uint8_t // clang-format off
OTHER = 0x10, //!< Other, unspecified orbit source
}; // clang-format on

/**
* @brief OR-operator for SatOrb bits
*
* @param[in] a Operand 1
* @param[in] b Operand 2
*
* @returns a OR b
*/
inline SatOrb operator|(const SatOrb a, const SatOrb b)
{
return static_cast<SatOrb>(static_cast<uint8_t>(a) | static_cast<uint8_t>(b));
}

/**
* @brief OR assignment operator for SatOrb bits
*
* @param[in] lhs Left-hand side
* @param[in] rhs Right-hand side
*
* @returns lhs ORed by b
*/
inline SatOrb& operator|=(SatOrb& lhs, const SatOrb rhs)
{
lhs = static_cast<SatOrb>(static_cast<uint8_t>(lhs) | static_cast<uint8_t>(rhs));
return lhs;
}

/**
* @brief AND-operator for SatOrb bits
*
* @param[in] a Operand 1
* @param[in] b Operand 2
*
* @returns a AND b
*/
inline SatOrb operator&(const SatOrb a, const SatOrb b)
{
return static_cast<SatOrb>(static_cast<uint8_t>(a) & static_cast<uint8_t>(b));
}

/**
* @brief Stringify satellite orbit source
*
Expand Down Expand Up @@ -553,6 +593,17 @@ Sat NmeaSystemIdSvIdToSat(const parser::nmea::NmeaSystemId systemId, const uint8
*/
Signal NmeaSignalIdToSignal(const parser::nmea::NmeaSignalId signalId);

// ---------------------------------------------------------------------------------------------------------------------

/**
* @brief Convert SBF SVID to Satellite
*
* @param[in] SVID SBF SVID
*
* @returns the satellite, INVALID_SAT for invalid SVID
*/
Sat SbfSvidToSat(const uint16_t SVID);

/* ****************************************************************************************************************** */
} // namespace gnss
} // namespace common
Expand Down
Loading
Loading