|
|
@ -35,6 +35,7 @@ m_latitude(0.0F),
|
|
|
|
m_longitude(0.0F),
|
|
|
|
m_longitude(0.0F),
|
|
|
|
m_height(0),
|
|
|
|
m_height(0),
|
|
|
|
m_desc(),
|
|
|
|
m_desc(),
|
|
|
|
|
|
|
|
m_symbol(),
|
|
|
|
m_suffix(suffix),
|
|
|
|
m_suffix(suffix),
|
|
|
|
m_aprsAddr(),
|
|
|
|
m_aprsAddr(),
|
|
|
|
m_aprsAddrLen(0U),
|
|
|
|
m_aprsAddrLen(0U),
|
|
|
@ -63,11 +64,12 @@ CAPRSWriter::~CAPRSWriter()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CAPRSWriter::setInfo(unsigned int txFrequency, unsigned int rxFrequency, const std::string& desc)
|
|
|
|
void CAPRSWriter::setInfo(unsigned int txFrequency, unsigned int rxFrequency, const std::string& desc, const std::string& symbol)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_txFrequency = txFrequency;
|
|
|
|
m_txFrequency = txFrequency;
|
|
|
|
m_rxFrequency = rxFrequency;
|
|
|
|
m_rxFrequency = rxFrequency;
|
|
|
|
m_desc = desc;
|
|
|
|
m_desc = desc;
|
|
|
|
|
|
|
|
m_symbol = symbol;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CAPRSWriter::setStaticLocation(float latitude, float longitude, int height)
|
|
|
|
void CAPRSWriter::setStaticLocation(float latitude, float longitude, int height)
|
|
|
@ -268,17 +270,21 @@ void CAPRSWriter::sendIdFrameFixed()
|
|
|
|
::sprintf(lon, "%08.2lf", longitude);
|
|
|
|
::sprintf(lon, "%08.2lf", longitude);
|
|
|
|
|
|
|
|
|
|
|
|
std::string server = m_callsign;
|
|
|
|
std::string server = m_callsign;
|
|
|
|
|
|
|
|
std::string symbol = m_symbol;
|
|
|
|
size_t pos = server.find_first_of('-');
|
|
|
|
size_t pos = server.find_first_of('-');
|
|
|
|
if (pos == std::string::npos)
|
|
|
|
if (pos == std::string::npos)
|
|
|
|
server.append("-S");
|
|
|
|
server.append("-S");
|
|
|
|
else
|
|
|
|
else
|
|
|
|
server.append("S");
|
|
|
|
server.append("S");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (symbol.empty())
|
|
|
|
|
|
|
|
symbol.append("D&");
|
|
|
|
|
|
|
|
|
|
|
|
char output[500U];
|
|
|
|
char output[500U];
|
|
|
|
::sprintf(output, "%s>APDG03,TCPIP*,qAC,%s:!%s%cD%s%c&/A=%06.0f%s %s\r\n",
|
|
|
|
::sprintf(output, "%s>APDG03,TCPIP*,qAC,%s:!%s%c%c%s%c%c/A=%06.0f%s %s\r\n",
|
|
|
|
m_callsign.c_str(), server.c_str(),
|
|
|
|
m_callsign.c_str(), server.c_str(),
|
|
|
|
lat, (m_latitude < 0.0F) ? 'S' : 'N',
|
|
|
|
lat, (m_latitude < 0.0F) ? 'S' : 'N', symbol[0],
|
|
|
|
lon, (m_longitude < 0.0F) ? 'W' : 'E',
|
|
|
|
lon, (m_longitude < 0.0F) ? 'W' : 'E', symbol[1],
|
|
|
|
float(m_height) * 3.28F, band, desc);
|
|
|
|
float(m_height) * 3.28F, band, desc);
|
|
|
|
|
|
|
|
|
|
|
|
if (m_debug)
|
|
|
|
if (m_debug)
|
|
|
|