instantreality forum
news: Welcome to the instantreality forums!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 24, 2018, 01:10:18 pm


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Problem with Geotouchsensor  (Read 1777 times)
Chakky
Newbie
*
Posts: 7


View Profile
« on: February 09, 2015, 12:12:01 pm »

Hi,
Iím working on a 3dModell of a city with real GPS coordinates. I try to realize that with the Geotouchsensor and the value hitGeoCoord_change-but when i implement it, the value displays only four decimal place-but i need as much decimal places as possible.
Do you know a solution for this problem or another value which I can use to get the changing coordinates?
See this short example of the problem.

Code:
#VRML V2.0 utf8


DEF View_Markt Viewpoint {
  description "View_Markt"
  orientation 0 1 0 -0.3
  position -150 350 -300
  zNear 0.2
  zFar 15000
}



DEF GeoOri GeoOrigin {
geoSystem [GD]
geoCoords 50.838337 12.921189 2
#geoCoords 0 0 0

}



DEF GeoView GeoViewpoint {
geoOrigin USE GeoOri
geoSystem [GD]
position 50.838337 12.921189 2000
orientation 1 0 0 -1.57
description "View GeoMarkt"


    }


 

Group {
children [






    NavigationInfo {
      speed 1
      type [
         "EXAMINE",
         "ANY",
      ]
    }





GeoLocation {
geoSystem [GD]
geoOrigin USE GeoOri
geoCoords 50.832839 12.920155 10000 #innenstadt wirkliche koordinaten
#geoCoords 50.976602 13.758591 10000 #naehe dd gesetzt
children [
Transform {
   translation 0 0 0
   children [
      Shape {
appearance Appearance { material Material { diffuseColor 0 1 0 } }
geometry Box {
size 400 400 200
}
      }
   ]
}
]
}




   
 
DEF GEOTOUCH GeoTouchSensor {

geoOrigin USE GeoOri
geoSystem [GD]

      }  

  DEF T Transform {
   children [
      Shape {
appearance Appearance { material Material { diffuseColor 1 0 0 } }
geometry Sphere { radius 10 }
      }
      Billboard {
axisOfRotation 0 0 0
children Transform {
    translation 0 0 0
    children [
       Shape {
  appearance Appearance {
     material Material { diffuseColor 1 1 1 }
  }
  geometry DEF TXT Text {
     string "GeoTouchSensor"
     fontStyle FontStyle { size 30.0 }
  }
       }
      ]
}
      }
     ]
}

DEF SFTOMF Script {
   eventIn  SFString set_value
   eventOut MFString value_changed
   url "javascript: function set_value( value ) {
           var s = value.split(' ',3);
           var s2 = s[2]/1000;
           value_changed = new MFString( 'Lat: ' + s[0] + ' ',
                                         'Lon: ' + s[1] + ' ',
                                         'Elev: ' + s2 + ' km' );
        }"
}



]



}



ROUTE GEOTOUCH.hitGeoCoord_changed TO SFTOMF.set_value
ROUTE SFTOMF.value_changed TO TXT.string
ROUTE GEOTOUCH.hitPoint_changed TO T.translation


Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.15 | SMF © 2011, Simple Machines