Skip to content

Instantly share code, notes, and snippets.

@sdennler
Created March 26, 2023 10:51
Show Gist options
  • Save sdennler/8b3046b74ae39ac82eaaddc095aee372 to your computer and use it in GitHub Desktop.
Save sdennler/8b3046b74ae39ac82eaaddc095aee372 to your computer and use it in GitHub Desktop.
<?php
$checksum = 4;
for ($i=0; $i<10000; $i++) {
if ($checksum === array_sum(str_split($i))) {
$n = $i/28.821;
$e = $i/44.852;
echo sprintf("N47 %02.3f E08 %02.3f %04d\n", $n, $e, $i);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment