-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from msalinoh/aprs_task_integration
APRS Recovery Task
- Loading branch information
Showing
12 changed files
with
440 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* timing.h | ||
* | ||
* Created on: Jul 5, 2023 | ||
* Author: Kaveet | ||
* | ||
* A library file containing helpful functions, macros and constants related to timing. This could include RTOS Software Timers, delays, etc. | ||
*/ | ||
|
||
#ifndef INC_LIB_INC_TIMING_H_ | ||
#define INC_LIB_INC_TIMING_H_ | ||
|
||
#include "tx_user.h" | ||
|
||
//A macro for converting seconds to threadX ticks. This can be used to feed into software timers, task sleeps, etc. | ||
#define tx_s_to_ticks(S) ((S) * (TX_TIMER_TICKS_PER_SECOND)) | ||
|
||
//A macro for converting milliseconds to threadX ticks. This can be used to feed into software timers, task sleeps, etc. | ||
#define tx_ms_to_ticks(MS) ((MS) * (TX_TIMER_TICKS_PER_SECOND) / 1000) | ||
|
||
//A macro for converting microseconds to threadX ticks. This can be used to feed into software timers, task sleeps, etc. | ||
#define tx_us_to_ticks(US) ((US) * (TX_TIMER_TICKS_PER_SECOND) / 1000000) | ||
|
||
#endif /* INC_LIB_INC_TIMING_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* AprsPacket.h | ||
* | ||
* Created on: Jul 5, 2023 | ||
* Author: Kaveet | ||
* | ||
* This file contains the appropriate functions and definitons to create an APRS packet. Requires the caller to pass in a buffer and the latitude and longitude. | ||
* | ||
* There are various static functions defined in the C file to help create this packet. | ||
* | ||
* The APRS task should call this after it receives its GPS data. It will then use this packet to transmit through the VHF module. | ||
*/ | ||
|
||
#ifndef INC_RECOVERY_INC_APRSPACKET_H_ | ||
#define INC_RECOVERY_INC_APRSPACKET_H_ | ||
|
||
//Library includes | ||
#include "tx_api.h" | ||
#include <stdint.h> | ||
|
||
#define APRS_FLAG 0x7e | ||
#define APRS_CONTROL_FIELD 0x03 | ||
#define APRS_PROTOCOL_ID 0xF0 | ||
|
||
#define APRS_SOURCE_CALLSIGN "J75Y" | ||
#define APRS_SOURCE_SSID 1 | ||
|
||
#define APRS_SYMBOL "/C" | ||
#define APRS_DESTINATION_CALLSIGN "APRS" | ||
#define APRS_DESTINATION_SSID 0 | ||
|
||
#define APRS_DIGI_PATH "WIDE2" | ||
#define APRS_DIGI_SSID 2 | ||
|
||
#define APRS_COMMENT "Build Demonstration" | ||
|
||
#define APRS_CALLSIGN_LENGTH 6 | ||
|
||
#define APRS_DT_POS_CHARACTER '!' | ||
#define APRS_SYM_TABLE_CHAR '1' | ||
#define APRS_SYM_CODE_CHAR 's' | ||
|
||
#define APRS_LATITUDE_LENGTH 9 | ||
#define APRS_LONGITUDE_LENGTH 10 | ||
|
||
//generates an aprs packet given the latitude and longitude | ||
void aprs_generate_packet(uint8_t * buffer, float lat, float lon); | ||
|
||
#endif /* INC_RECOVERY_INC_APRSPACKET_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.