android-taranis-smartport-telemetry icon indicating copy to clipboard operation
android-taranis-smartport-telemetry copied to clipboard

Proposal - refering to: [Feature request] Add waypoints and an option to save missions #73

Open ChrisOhara57 opened this issue 3 years ago • 1 comments

I have the same request and did some thinking about a possible, flexibel and easy to programm solution.

Proposal:

  • do design points, lines, polygons (shaded, and transparent) in Google Earth
  • export objects in KML-File.
  • this file is readable an can be edited to define correct coordinates
  • there is a function in the Maps SDK "val layer = KmlLayer(map, R.raw.geojson_file, context)" which can import a KML-File and display it on top of the map.

A friend of mine did a test-version for me (quick and dirty) on release 1.8.5 Advantage: It is total flexible nearly everything can be displayed as long as you can define it in the KML-File

In this "quick and dirty" solution Telemetry Viewer is looking for a certain file (triangle.kml) If it doesn't exist it creates a folder GPS-Racing (and goes on with normal behavior). In this folder I put all my KML files and do rename the one I want to be displayed to "triangle.kml". All following starts of the App - it will find the KML-file and display on top of the Google map.

I'm testing at the moment. It would be nice if I could select the file to be displayed in the settings of Telemetry Viewer but otherwise it does the job.

I attached some files:

  • KML-file (had to rename extension to .txt instead of .kml)
  • Code ( shows changed function OnMapReady() in file GoogleMapWrapper.kl)
  • photo (shows GPS-Wayracing triangle and route (here display with logfile)

triangle-100.txt onMapReady.txt WhatsApp Image 2021-05-17 at 08 59 24

ChrisOhara57 avatar May 17 '21 07:05 ChrisOhara57

While testing I found one flaw in my "quick and dirty" solution.

If the settings of the smartphone is "auto-rotating = on" and the smartphone is switching from portrait to landscape then KMLlayer is called a second time. This will close the App.

So I will have to make sure that the function is called only once. In the meantime I do switch "auto-rotate off" Otherwise it seems to work.

ChrisOhara57 avatar May 19 '21 11:05 ChrisOhara57