Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 21 additions & 2 deletions documentation/docs/05-changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
## CHANGELOG
### v.1.4.3
*05/29/2018*
##### New Features
- Added a **Feature Replacement Modifer** that allows replacement of a vector feature at a given Latitude,Longitude with a supplied prefab. Enables replacing a procedurally generated building at a given Latitude,Longitude with a custom 3D model.
- Texturing Style dropdown now allows users to select from prepackaged texture styles or custom, which allows for user-defined texturing.
- Mesh and GameObject modifiers can now be created and added to AbstractMap via `Add New` buttons.
- Example scene `LocationProvider` can be used to log GPS traces. See documentation on how to copy logs from devices.
- GPS traces can be played back in the Editor with `EditorLocationProviderLocationLog`.
- `UserHeading` and `DeviceOrientation` values can be smoothed via different smoothing algorithms.
##### Improvements
- Improvements to UV mapping for side walls of extruded polygons when using atlas textures. Enables better handling of leftover areas when creating columns.
- DeviceLocationProvider should work on devices. Tested with iPhone 7/8/X, Google Pixel 2, Samsung S8, Samsung Galaxy Note 8, OnePlus 3
##### Bug Fixes
- Fix issue with UvModifier which caused wrong roof uv positions calculations.
- Fix issue with data fetcher to handle failed connections properly, which caused IndexOutOfRangeException during tile loading/unloading.
- Fix issue with ambient file caching on Windows with .NET4.6 runtime and long file names. https://github.com/mapbox/mapbox-unity-sdk/pull/825 https://github.com/mapbox/mapbox-unity-sdk/issues/815
##### Known Issues
- ARInterface related errors and crashes on Unity 2018.1.1f1 related to bug in Unity https://issuetracker.unity3d.com/issues/vuforia-gameobject-transforms-are-not-being-disabled-when-the-player-is-stopped

### v.1.4.2
*05/14/2018*

Expand Down Expand Up @@ -26,12 +45,12 @@
- Factories register to events in DataFetchers
- `Layer Name` , `Extrusion Property Name` and `Filter Key` are now selectable dropdowns indicating the layers and properties available in the current `Data Source`. Layers and properties no longer require manual string entry.

#### Bug Fixes
##### Bug Fixes
- Added checks to prevent NRE in `GeocodeAttributeSearchWindow` when searching with an invalid token or no connection.
- Fix issue where side wall mesh generation did not work with elevated terrain.
- Fix issue with scaling prefabs for POI's. Enables correct scaling of objects with map.

#### Known Issues
##### Known Issues
- `Filters` with empty key or value parameters will exclude all features in a layer.
- SDK will throw `[Physics.PhysX] cleaning the mesh failed` error if a MapFeature is used with the following options: {Primitive Type: `Line`, LayerName: `Road`, Collider Type: `Mesh Collider`}

Expand Down
39 changes: 39 additions & 0 deletions documentation/docs/access-gps-logs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Accessing GPS log files

`LocationProvider` scene has the option to write location data into files.
Follow these steps download the logs from your device.

## Android

Log files can be accessed directly via Explorer after plugging in the device.

**Note:** If files don't show up disconnect/connect your device. Sometimes even a reboot seems to be required as folders/files only get synced on first connection.

**Alternative:** use a file manager (eg [Solid Explorer Classic](https://play.google.com/store/apps/details?id=pl.solidexplorer)) on your device and copy files to eg `<storage>/Download` that should trigger a refresh.


Location:

```
/<your-device>/<storage>/Android/data/<bundle-identifier>/files/
```

![log file location on Android](images/access-gps-logs/android-logfile-location.png)

## iOS

Open the exported project in `XCode` and add `Application supports iTunes file sharing : YES` key to `Info.plist` file:

![edit info.plist](images/access-gps-logs/info.plist.png)

Build to the device, run, log and connect device to your computer.

Select the device in `iTunes`:

![select device in itunes](images/access-gps-logs/itunes-select-device.png)

1. Click on `File Sharing`
2. Select `Bundle Identifier` eg `MBX-SDK` from the `Apps` list
3. Access log files

![get log files in itunes](images/access-gps-logs/itunes-file-sharing.png)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion documentation/docs/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@
href: windowsstore-uwp-hololens.md

- name: HoloLens Development
href: hololens-development.md
href: hololens-development.md

- name: Access GPS logs
href: access-gps-logs.md
12 changes: 8 additions & 4 deletions sdkproject/Assets/GoogleARCore/SDK/Scripts/Editor/BuildHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,13 @@ namespace GoogleARCoreInternal

[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:ElementsMustBeDocumented",
Justification = "Internal")]
public class BuildHelper : IPreprocessBuild
{
[SuppressMessage("UnityRules.UnityStyleRules", "US1000:FieldsMustBeUpperCamelCase",
#if UNITY_2018_1_OR_NEWER
public class BuildHelper : IPreprocessBuildWithReport
#else
public class BuildHelper : IPreprocessBuild
#endif
{
[SuppressMessage("UnityRules.UnityStyleRules", "US1000:FieldsMustBeUpperCamelCase",
Justification = "Overriden property.")]
public int callbackOrder
{
Expand All @@ -48,7 +52,7 @@ public void OnPreprocessBuild(BuildReport report)
#else
public void OnPreprocessBuild(BuildTarget target, string path)
{
#endif
#endif
var isARCoreRequired = ARCoreProjectSettings.Instance.IsARCoreRequired;

Debug.LogFormat("Building application with {0} ARCore support.",
Expand Down
18 changes: 9 additions & 9 deletions sdkproject/Assets/Mapbox/Core/cheap-ruler-cs/CheapRuler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,28 @@ public CheapRuler(double latitude, CheapRulerUnits outputUnits = CheapRulerUnits
switch (outputUnits)
{
case CheapRulerUnits.Kilometers:
factor = 1;
factor = 1.0d;
break;
case CheapRulerUnits.Miles:
factor = 1000 / 1609.344;
factor = 1000.0d / 1609.344;
break;
case CheapRulerUnits.NauticalMiles:
factor = 1000 / 1852;
factor = 1000.0d / 1852.0d;
break;
case CheapRulerUnits.Meters:
factor = 1000;
factor = 1000.0d;
break;
case CheapRulerUnits.Yards:
factor = 1000 / 0.9144;
factor = 1000.0d / 0.9144;
break;
case CheapRulerUnits.Feet:
factor = 1000 / 0.3048;
factor = 1000.0d / 0.3048;
break;
case CheapRulerUnits.Inches:
factor = 1000 / 0.0254;
factor = 1000.0d / 0.0254;
break;
default:
factor = 1;
factor = 1.0d;
break;
}

Expand Down Expand Up @@ -161,4 +161,4 @@ private double[] offset(double[] p, double dx, double dy)


}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ internal class CheapRulerCsTest
{


// TODO more tests ////////////////////
// see https://github.com/mapbox/cheap-ruler/blob/master/test/test.js
//////////////////////////


internal class point { public double x; public double y; }
internal class line
{
Expand All @@ -44,6 +49,8 @@ public void FixturesLoaded()
Assert.AreEqual(58, _lineFixtures.Count);
}



[Test]
public void DistanceInMiles()
{
Expand All @@ -53,10 +60,40 @@ public void DistanceInMiles()
double distKm = ruler.Distance(new double[] { 30.5, 32.8351 }, new double[] { 30.51, 32.8451 });
double distMiles = rulerMiles.Distance(new double[] { 30.5, 32.8351 }, new double[] { 30.51, 32.8451 });

Debug.LogFormat("{0} {1}", distKm, distMiles);
Assert.AreEqual(1.609344, distKm / distMiles, 1e-12, "wrong distance in miles");
}


[Test]
public void DistanceInNauticalMiles()
{
CheapRuler ruler = new CheapRuler(32.8351);
CheapRuler rulerMiles = new CheapRuler(32.8351, CheapRulerUnits.Miles);
CheapRuler rulerNauticalMiles = new CheapRuler(32.8351, CheapRulerUnits.NauticalMiles);

double distKm = ruler.Distance(new double[] { 30.5, 32.8351 }, new double[] { 30.51, 32.8451 });
double distMiles = rulerMiles.Distance(new double[] { 30.5, 32.8351 }, new double[] { 30.51, 32.8451 });
double distNauticalMiles = rulerNauticalMiles.Distance(new double[] { 30.5, 32.8351 }, new double[] { 30.51, 32.8451 });

Debug.LogFormat("{0} {1}", distKm, distNauticalMiles);
Assert.AreEqual(1.852, distKm / distNauticalMiles, 1e-12, "wrong distance km vs nautical miles");
Assert.AreEqual(1.15078, distMiles / distNauticalMiles, 1e-6, "wrong distance miles vs nautical miles");
}


[Test]
public void FromTile()
{
CheapRuler ruler1 = new CheapRuler(50.5);
CheapRuler ruler2 = CheapRuler.FromTile(11041, 15);

var p1 = new double[] { 30.5, 50.5 };
var p2 = new double[] { 30.51, 50.51 };

Assert.AreEqual(ruler1.Distance(p1, p2), ruler2.Distance(p1, p2), 3e-5, "CheapRuler.FromTile distance");
}



private List<line> loadFixtures()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ public void Clear()
}


public void ReInit() {
foreach (var cache in _caches)
{
cache.ReInit();
}
}


public IAsyncRequest Request(
string uri
, Action<Response> callback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public interface ICache
/// </summary>
uint MaxCacheSize { get; }


/// <summary>
/// Add tile data to the cache
/// </summary>
Expand Down Expand Up @@ -42,5 +43,11 @@ public interface ICache
/// </summary>
/// <param name="mapId"></param>
void Clear(string mapId);


/// <summary>
/// Reinitialize cache. Might be needed after 'Clear', eg for SQLiteCache
/// </summary>
void ReInit();
}
}
}
Loading