Last active
January 16, 2018 03:07
-
-
Save Cale/28fa944fd3a2a792cd08322e0ecaffd6 to your computer and use it in GitHub Desktop.
Encode an APRS packet to a wave file which is then played through standard audio out.
This file contains hidden or 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
| <?php | |
| /* This script encodes an APRS packet to a wave file which is then played | |
| through standard audio out. Connect your audio out to a VOX enabled | |
| transceiver to transmit the packet. Your audio output level should | |
| be rather high for VOX. | |
| The following AFSK/APRS Python library is required: | |
| https://github.com/casebeer/afsk (pip install afsk). | |
| PyAudio not required. | |
| */ | |
| function transmit_packet() { | |
| // Settings & variables | |
| $callsign = "Y0URCALL-6"; | |
| $comment ="Listening on 146.520."; | |
| $alt = "000633"; // Altitude, 633 feet | |
| $lat = "3548.93"; | |
| $lon = "08621.37"; | |
| $time = date('dHi'); //092345 day:hour:minute UTC/Z | |
| $course = "000"; | |
| $speed = "000"; | |
| $command = 'aprs -c '.$callsign.' -o packet.wav "/'.$time.'z'.$lat.'N/'.$lon.'W>'.$course.'/'.$speed.$comment.'/A='.$alt.'"'; | |
| echo "\n"; | |
| echo "Time: ".$time; | |
| echo "\n\n"; | |
| echo $command; | |
| echo "\n\nTransmitting APRS packet...\n"; | |
| exec($command); | |
| sleep(2); | |
| exec("aplay packet.wav"); | |
| } | |
| transmit_packet(); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment