RadioLib
Universal wireless communication library for Arduino
APRSClient Class Reference

Client for APRS communication. More...

#include <APRS.h>

Public Member Functions

 APRSClient (AX25Client *ax)
 Constructor for "classic" mode using AX.25/AFSK. More...
 
 APRSClient (PhysicalLayer *phy)
 Constructor for LoRa mode. More...
 
int16_t begin (char sym, char *callsign=NULL, uint8_t ssid=0, bool alt=false)
 Initialization method. More...
 
int16_t sendPosition (char *destCallsign, uint8_t destSSID, char *lat, char *lon, char *msg=NULL, char *time=NULL)
 Transmit position. More...
 
int16_t sendMicE (float lat, float lon, uint16_t heading, uint16_t speed, uint8_t type, uint8_t *telem=NULL, size_t telemLen=0, char *grid=NULL, char *status=NULL, int32_t alt=RADIOLIB_APRS_MIC_E_ALTITUDE_UNUSED)
 Transmit position using Mic-E encoding. More...
 
int16_t sendFrame (char *destCallsign, uint8_t destSSID, char *info)
 Transmit generic APRS frame. More...
 
void useRepeaters (char **repeaterCallsigns, uint8_t *repeaterSSIDs, uint8_t numRepeaters)
 Set the repeater callsigns and SSIDs to be used by the frames sent by sendPosition, sendMicE or sendFrame. More...
 
void dropRepeaters ()
 Stop using repeaters. More...
 

Detailed Description

Client for APRS communication.

Constructor & Destructor Documentation

◆ APRSClient() [1/2]

APRSClient::APRSClient ( AX25Client ax)
explicit

Constructor for "classic" mode using AX.25/AFSK.

Parameters
axPointer to the instance of AX25Client to be used for APRS.

◆ APRSClient() [2/2]

APRSClient::APRSClient ( PhysicalLayer phy)
explicit

Constructor for LoRa mode.

Parameters
phyPointer to the wireless module providing PhysicalLayer communication.

Member Function Documentation

◆ begin()

int16_t APRSClient::begin ( char  sym,
char *  callsign = NULL,
uint8_t  ssid = 0,
bool  alt = false 
)

Initialization method.

Parameters
symAPRS symbol to be displayed.
callsignSource callsign. Required and only used for APRS over LoRa, ignored in classic mode.
ssidSource SSID. Only used for APRS over LoRa, ignored in classic mode, defaults to 0.
altWhether to use the primary (false) or alternate (true) symbol table. Defaults to primary table.
Returns
Status Codes

◆ dropRepeaters()

void APRSClient::dropRepeaters ( )

Stop using repeaters.

Returns
Status Codes

◆ sendFrame()

int16_t APRSClient::sendFrame ( char *  destCallsign,
uint8_t  destSSID,
char *  info 
)

Transmit generic APRS frame.

Parameters
destCallsignDestination station callsign.
destSSIDDestination station SSID.
infoAX.25 info field contents.
Returns
Status Codes

◆ sendMicE()

int16_t APRSClient::sendMicE ( float  lat,
float  lon,
uint16_t  heading,
uint16_t  speed,
uint8_t  type,
uint8_t *  telem = NULL,
size_t  telemLen = 0,
char *  grid = NULL,
char *  status = NULL,
int32_t  alt = RADIOLIB_APRS_MIC_E_ALTITUDE_UNUSED 
)

Transmit position using Mic-E encoding.

Parameters
latGeographical latitude, positive for north, negative for south.
lonGeographical longitude, positive for east, negative for west.
headingHeading in degrees.
speedSpeed in knots.
typeMic-E message type - see Mic-E message types..
telemPointer to telemetry array (either 2 or 5 bytes long). NULL when telemetry is not used.
telemLenTelemetry length, 2 or 5. 0 when telemetry is not used.
gridMaidenhead grid locator. NULL when not used.
statusStatus message to send. NULL when not used.
altAltitude to send. RADIOLIB_APRS_MIC_E_ALTITUDE_UNUSED when not used.

◆ sendPosition()

int16_t APRSClient::sendPosition ( char *  destCallsign,
uint8_t  destSSID,
char *  lat,
char *  lon,
char *  msg = NULL,
char *  time = NULL 
)

Transmit position.

Parameters
destCallsignDestination station callsign.
destSSIDDestination station SSID.
latLatitude as a null-terminated string.
lonLongitude as a null-terminated string.
msgMessage to be transmitted. Defaults to NULL (no message).
timePosition timestamp. Defaults to NULL (no timestamp).
Returns
Status Codes

◆ useRepeaters()

void APRSClient::useRepeaters ( char **  repeaterCallsigns,
uint8_t *  repeaterSSIDs,
uint8_t  numRepeaters 
)

Set the repeater callsigns and SSIDs to be used by the frames sent by sendPosition, sendMicE or sendFrame.

Parameters
repeaterCallsignsArray of repeater callsigns in the form of null-terminated C-strings.
repeaterSSIDsArray of repeater SSIDs.
numRepeatersNumber of repeaters, maximum is 8.
Returns
Status Codes

The documentation for this class was generated from the following files: