[Xastir] Emergency locate beacon
Curt, WE7U
curt.we7u at gmail.com
Tue May 21 01:46:39 EDT 2013
On Mon, 20 May 2013, Jason KG4WSV wrote:
> If the word "emergency" appears in any case anywhere in the packet,
> xastir flags it as an emergency station.
Looked at the code. It's only all-caps, these strings:
-----------------------
// Check for "EMERGENCY" anywhere in the line.
// APRS+SA also supports any of these in the TO: field:
//
// EMERGENCY
// ALARM
// ALERT
// WARNING
// WXALARM
// EM
//
// Snag just the TO: field from the path, used for most of the
// comparisons below. It will be pointed to by ViaCalls[0];
xastir_snprintf(tmp_path, // Make a temporary backup
sizeof(tmp_path),
"%s",
path);
split_string(tmp_path, ViaCalls, 10, ',');
if ( (strstr(backup, "EMERGENCY")) // Checks entire line
|| (strcmp(ViaCalls[0], "ALARM") == 0) // Checks to_field
|| (strcmp(ViaCalls[0], "ALERT") == 0) // Checks to_field
|| (strcmp(ViaCalls[0], "WARNING") == 0) // Checks to_field
|| (strcmp(ViaCalls[0], "WXALARM") == 0) // Checks to_field
|| (strcmp(ViaCalls[0], "EM") == 0) ) { // Checks to_field
-----------------------
--
Curt, WE7U. http://wetnet.net/~we7u
APRS Device Capabilities: http://wetnet.net/~we7u/aprs_device_capabilities.html
More information about the Xastir
mailing list