Project

General

Profile

Paste
Download (1.28 KB) Statistics
| Branch: | Revision:

root / class / index.php @ 0bd646e4

1
<!DOCTYPE html>
2
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
3
<head>
4
  <meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
5
  <title>Test des classes</title>
6
  <link rel="stylesheet" media="screen" href="css/all.css" />
7
  <script src="js/pano.js"></script>
8
</head>
9
<body>
10
  <h1>Test des classes</h1>   
11
  <?php
12
   require 'site_point.class.php';
13
   require 'sites_dir.class.php';
14

    
15
   $base_dir = '../tiles';
16
   $dir = new sites_dir($base_dir);
17

    
18
   foreach($dir->get_sites() as $pt) {
19
     printf("<h2>Nom : <em>%s</em></h2>\n", $pt->get_name());
20
     echo '<pre>';
21
     print_r($pt->get_params());
22
     print_r($pt->get_magnifications());
23
     echo '</pre>';
24
     $lat = 43.61034;
25
     $lon = 1.45553;
26
     $alt = 200;
27
     $res = $pt->coordsToCap($lat, $lon, $alt);
28
     printf("<h3>Cap vers %lf, %lf, %lf = (dist : %lf, cap : %lf, élévation : %lf)</h3>\n", $lat, $lon, $alt, $res[0], $res[1], $res[2]);
29
     $lat = 43.60698;
30
     $lon = 1.46725;
31
     $alt = 300;
32
     $res = $pt->coordsToCap($lat, $lon, $alt);
33
     printf("<h3>Cap vers %lf, %lf, %lf = (dist : %lf, cap : %lf, élévation : %lf)</h3>\n", $lat, $lon, $alt, $res[0], $res[1], $res[2]);
34
   }
35
  ?>
36
  <p><a href="http://validator.w3.org/check?uri=referer">page xHTML validé !</a></p>
37
</body>
38
</html>