Difference between revisions of "Telewave"
Jump to navigation
Jump to search
Line 13: | Line 13: | ||
?> | ?> | ||
− | Here is a [[ | + | Here is a [[media:Telewave RM.zip|Zip]] of all the converted files, please place the .ant files into the directory of radio mobile and restart the program. |
Revision as of 10:04, 27 January 2016
Telewave gives out their patterns in a few formats. I've convert the Planet formatted .pat files to radio mobile format using this php code. It will produce a output of exactly 720 lines matching the V3 .ant file format radio mobile uses.
<? if (!isset($argv[1]) ) { echo "usage: php convert.php patfile\n"; return; } else { $pat=$argv[1]; } $s=file_get_contents($pat); $r = preg_split('/\R/', $s); if (count($r)<1) echo "Invalid file type\n"; $p=1; foreach ($r as $l=>$k) { $ln=$l+1; if($ln==547 || $ln==727) {continue;} if (preg_match("/((?:-){0,1}\d{1,3},((?:-){0,1}\d{1,3}\.\d{2}))/s", $k,$mt)) { $p=0; echo $mt[2] . "\r\n"; } } if ($p==1) echo ("Invalid file type\n"); ?>
Here is a Zip of all the converted files, please place the .ant files into the directory of radio mobile and restart the program.