SanitaSpisokURL.php

From TORI
Revision as of 04:27, 15 October 2024 by T (talk | contribs) (Created page with "{{to}} SanitaSpisokURL.php is PHP code that reads coordinates of the Russian strategic and military objects from file SanitaSpisok.txt and generates the URL of the...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

SanitaSpisokURL.php is PHP code that reads coordinates of the Russian strategic and military objects from file SanitaSpisok.txt and generates the URL of the corresponding Google map.
The content of this article is moved here from SanitaSpisok.txt as it becomes too big.

The supplementary code SanitaSpisokLabels.php
generates the draft of labels assuming that the map with resolution "5z" is stored as picture 1800x972
with bottom at geographic latitude 41 N
and the left margin as longitude 22 E
This range covers the Buffer Zone at Russia (Санитарная Зона).

The corresponding map helps to check, qualify news about unfolding of the Putin world war in century 21 and the transfer of hostilities to aggressor territory.

SanitaSpisokURL.php


<?php
$a=file("SanitaSpisok.txt");
$N=count($a);
printf("N=%2d\n",$N);
$o="https://www.google.com/maps/dir"; //FSO anyway
for($n=0;$n<$N;$n++)
{
$b=explode(" ",trim($a[$n]));
$M=count($b);
if($M<2) break;
sscanf($b[1],"%d",$v);
printf("%2d %2d %s %1d\n",$n,$M,$b[0], $v); 
if($v<2) $o.="/".$b[0]; 
}
$o.='//@60,60,5z/data=!3m1?hl=ru'; 
echo $o,"\n";
//system("open ".$o);
?>

SanitaSpisokLabels.php

<?php
$a=file("SanitaSpisok.txt");
$N=count($a);
printf("N=%2d\n",$N);
//$o="https://www.google.com/maps/dir/55.7503,37.6218";
$o=fopen("M.txt","w");
$R=978.; // scale
$s=sin((M_PI/180.)*41.); 
$y0=.5*$R * log((1.+$s)/(1.-$s)) ; // Bottom of the map is at 41N
for($n=2;$n<$N;$n++)
{
$b=explode(" ",trim($a[$n]));
$M=count($b);
sscanf($b[1],"%d",$v); if($v>1) continue;
sscanf($b[0],"%f,%f",$L,$D);
printf("L=%7.4f D=%7.4f <br>\n",$L,$D);
$s=sin((M_PI/180.)*$L);
echo "s=$s ";
$x=$R*M_PI/180 * ($D-22.); // letf side of the map ia at 22E
$y=.5*$R * log((1.+$s)/(1.-$s)) - $y0 ;
printf("x=%8.2f y=%8.2f\n",$x,$y);
$X=intval($x-3.);
$Y=intval($y+4.);
fprintf($o,"{{put|%d|%d|10|*}}",$X,$Y);
sscanf($b[3],"%d",$U);
sscanf($b[4],"%d",$V);
sscanf($b[5],"%d",$W);
printf("XYZ= %2d %2d %2d\n",$U,$V,$W);
$X=intval($x+$U);
$Y=intval($y+$V);
fprintf($o," {{put|%d|%d|%d|%s}}\n",$X,$Y,$W,$b[2]);
}
fclose($o); 
//system("cat M.txt")
?>

Notes

References

Keywords

«Annexation of Crimea», «Budapest memorandum», «Demilitarization», «Denazification», «Designate Russia as state sponsor of terrorism», «Designate Russia as terrorist state», «Fascism», «Legitimate military target», «Moscovia», «Putin world war», «Russian invasion into Ukraine», «SanitaSpisokURL.php», «Transfer of hostilities to aggressor territory», «[[]]»,

«А нас то а что», «Аннексия Крыма», «Бавовна», «Будапештский меморандум», «Вертикаль власти», «График спецоперации», «Легитимная цель», «Московия», «Паханат», «Перенос боевых действий на территорию страны агрессора», «[[]]», «Путинская мировая война», «Российское вторжение в Украину», «Русский мир», «Санитарная Зона», «Спецоперация», «[[]]», «Требования по спасению России», «[[]]», «Фашизм», «Я бомбил Дрезден»,