Difference between revisions of "Eyesis Panorama Database"

From ElphelWiki
Jump to: navigation, search
Line 22: Line 22:
  
 
==PHP Methods==
 
==PHP Methods==
 +
 +
 +
==Notes==
 +
 +
function distance ($lat1,$long1,$lat2,$long2) {
 +
  $earthRadius=6378100; //meters
 +
  $dlat= $lat2- $lat1;
 +
  $dlong=$long2-$long1;
 +
  $lat=($lat1+$lat2)/2;
 +
  $dlong*= cos(deg2rad($lat));
 +
  return pi()*$earthRadius/180* sqrt($dlat*$dlat+$dlong*$dlong);
 +
}

Revision as of 09:47, 7 July 2011

MySQL DB Structure

Nodes Table:

ID
Name
Description
Longitude
Latitude
Timestamp
Altitude
Heading
Tilt
Roll
Panorama URL
Visibility3d -  list of ranges [from,to] - which nodes are visible from the current one. from, to are both relative to the current node, so merging several segments should not break visibility (not so easy in the map that is not linear path, but we'll think of something  - adding new nodes (importing KML) should not change the relative sequence of indices (kml "name" tag).

Routes Table

ID
Name
Description
Nodes List

PHP Methods

Notes

function distance ($lat1,$long1,$lat2,$long2) {
 $earthRadius=6378100; //meters
 $dlat= $lat2- $lat1;
 $dlong=$long2-$long1;
 $lat=($lat1+$lat2)/2;
 $dlong*= cos(deg2rad($lat));
 return pi()*$earthRadius/180* sqrt($dlat*$dlat+$dlong*$dlong);
}