* * @abstract Using junaio with LLA Markers or other references for creating highly accurate indoor experiences * * Learnings: * - receive encoded lat, long, alt positions from the LLA markers * - manually override the users positions (deactivate the GPS) * - switching POIs visible on the fly **/ require_once '../ARELLibrary/arel_xmlhelper.class.php'; //make sure to provide the lla marker tracking configuration ArelXMLHelper::start(NULL, "arel/index.html", ArelXMLHelper::TRACKING_LLA_MARKER); //first arrow $arrowObject = ArelXMLHelper::createLocationBasedModel3D("arrow1", "Arrow", "resources/arrow.zip", "resources/arrow.png", array(37.783248, -122.403244, 0), array(600, 600, 600), new ArelRotation(ArelRotation::ROTATION_EULERRAD, array(1.57, 0, 2.37))); //set the poi invisible in liveview, mapview/listview and radar $arrowObject->setVisibility(false, false, false); //move the arrow a little down $arrowObject->setTranslation(array(0, 0, -1500)); ArelXMLHelper::outputObject($arrowObject); //second arrow $arrowObject = ArelXMLHelper::createLocationBasedModel3D("arrow2", "Arrow", "resources/arrow.zip", "resources/arrow.png", array(37.783212, -122.403192, 0), array(600, 600, 600), new ArelRotation(ArelRotation::ROTATION_EULERRAD, array(1.57, 0, 2.37))); //set the poi invisible in liveview, mapview/listview and radar $arrowObject->setVisibility(false, false, false); //move the arrow a little down $arrowObject->setTranslation(array(0, 0, -1500)); ArelXMLHelper::outputObject($arrowObject); //1. Sound POI $oObject = ArelXMLHelper::createLocationBasedPOI("conf1", "Conference Room 1", array(37.783294, -122.403299, 0), "resources/1.png", "resources/1.png", "This is Conference Room 1 with many interesting sessions going on today.", array()); //set the poi invisible in liveview, mapview/listview and radar $oObject->setVisibility(false, false, false); ArelXMLHelper::outputObject($oObject); ArelXMLHelper::end();
* * Learnings: * - create two Location Based 3D Models using the Arel XML Helper * - place the metaio man and the t-rex relative to the user's current position * - use 1 obj and 1 md2 model * **/ require_once '../ARELLibrary/arel_xmlhelper.class.php'; if (!empty($_GET['l'])) { $position = explode(",", $_GET['l']); } else { trigger_error("user position (l) missing. For testing, please provide a 'l' GET parameter with your request. e.g. pois/search/?l=23.34534,11.56734,0"); } //calculate the position of T-Rex based on the position of the request. An offset is added to the latitude value. $tRexLocation = $position; $tRexLocation[0] += 4.0E-5; //metaio man location $metaioManLocation = $position; $metaioManLocation[1] += 4.0E-5; //use the Arel Helper to start the output with arel //start output ArelXMLHelper::start(NULL, NULL, ArelXMLHelper::TRACKING_GPS); //T-Rex as static obj $oObject = ArelXMLHelper::createLocationBasedModel3D("trex", "The T-Rex", "http://dev.junaio.com/publisherDownload/junaio_model_obj.zip", NULL, $tRexLocation, array(5, 5, 5), new ArelRotation(ArelRotation::ROTATION_EULERDEG, array(0, -90, 0))); ArelXMLHelper::outputObject($oObject); //metiao man md2 $oObject = ArelXMLHelper::createLocationBasedModel3D("metaioMan", "The metaio Man", "http://dev.junaio.com/publisherDownload/tutorial/metaioman.md2", "http://dev.junaio.com/publisherDownload/tutorial/metaioman.png", $metaioManLocation, array(20, 20, 20), new ArelRotation(ArelRotation::ROTATION_EULERDEG, array(0, 0, -90))); //output the object ArelXMLHelper::outputObject($oObject); //end the output ArelXMLHelper::end();