OSMeta icon indicating copy to clipboard operation
OSMeta copied to clipboard

Application start Parameter, Native & Web-App

Open DerKarlos opened this issue 2 years ago • 3 comments

(This is a first draft of the issue)

The user wants to start our application at a certain geo-position. We have to provide this and others by parameters, either while starting the native app or the WebApp page:

  • OSMeta.exe lat 47.237 lon 11.244
  • https//:osmeta.osm.org/?lat=47.237&lon=11.244

The given position is not the position of the camera but a view-spot the camera is looking at. The spot usually is on the Ground or in exe height but may get elevated. The camera is mostly and orbit rotation camera, but can also rotate around its own position, if the control is a VR device or a plane etc.

Intended parameters:

  • [x] lat/lon: geo-position on the globe
  • [ ] dir: The (compas) direction, the camera (user, player) is looking
  • [ ] view: The up/down angle, the camera is looking
  • [ ] dist: NEW Distance between the focus and the camera, the radius of the camera orbit
  • [ ] ele: The height of the spot, the camera is looking at.
  • [ ] zoom: The frustum angle of the camera, positiv zoom or negative fish eye view
  • [ ] place: Select one of a prepared list of spots, like “London”, “Paris”
  • [ ] find: A string is used for an OSM geo search, the first findig will be used
  • [ ] osm: An OSM type and ID will be used to get the geo-position, i.E.: “w764636653"

Test-Parameters:

  • [ ] x/y: tile indices for zoom 15
  • [ ] range: How much Meters away is the SkyDome
  • [ ] sha: Shadows visible or not

More Ideas:

  • [ ] card: Cardboard-Mode side by side
  • [ ] con: Control select (Segway, plane, jetpack)
  • [ ] fps: Set the minimum FPS (frames per second) Next to this limit some functions get disabled
  • [ ] gps: To simulate some GPS coordinates: &gps=1
  • [ ] hud: Head-Up-Display with diagnostic data on, also "frames per second": &hud=1
  • [ ] mdl: Don't show 3D-Models from www.3dmr.eu and inline by mdl=0
  • [ ] dbg: Debug-output level: &dbg=0 means all console.log off

DerKarlos avatar Nov 26 '23 19:11 DerKarlos

how do I compute the tile x,y coordinates from lat/lon?

The web-app already supports ?x,y for tile coordinates, but we should switch to a key=value system

oli-obk avatar Nov 26 '23 20:11 oli-obk

It is geo_view.geo_pos.calc_tile_name(PBF_ZOOM); in https://github.com/DerKarlos/OSMeta/blob/70e754bbd19425904374b21dae814fe124b8cb43/src/cam_map/geopos.rs

I would be happy, if you use my geo_view.rs and geo_pos.rs for calculations and handling for Earth and GPU positions. May be also types, alike I defined to make the code self explaining: TileName=Ivec2, ScenePos. See: https://github.com/DerKarlos/OSMeta/blob/70e754bbd19425904374b21dae814fe124b8cb43/src/cam_map/utils.rs

DerKarlos avatar Nov 26 '23 20:11 DerKarlos

That worked great! I removed everything that I didn't need again afterwards, but since it's an explicit removal commit, we can revert it whenever we need something from it.

oli-obk avatar Nov 26 '23 23:11 oli-obk