Skip to content

Commit

Permalink
Add additional map targets and update assets
Browse files Browse the repository at this point in the history
  • Loading branch information
mcschroeder committed Oct 5, 2018
1 parent d3aca38 commit e6ea222
Show file tree
Hide file tree
Showing 24 changed files with 91 additions and 16 deletions.
9 changes: 9 additions & 0 deletions Maps/Fiji_Samoa_target/OceanCurrents/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"latest": "oscar_vel9472.nc",
"bounds": {
"latMinIndex": 273,
"latMaxIndex": 309,
"lonMinIndex": 465,
"lonMaxIndex": 519
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"lonMax":193,"uMax":0.4144628643989563,"dataset":"oscar_vel9472.nc","lonMin":175,"width":55,"time":9472,"uMin":-0.34134137630462646,"vMax":0.35838428139686584,"latMax":-23,"vMin":-0.43484574556350708,"height":37,"latMin":-11}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions Maps/Fiji_Samoa_target/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"mapWidth": 1140,
"mapHeight": 836,
"fadeOpacity": 0.93773,
"colorFactor": 2.6973,
"speedFactor": 6.27,
"dropRate": 0.0084,
"dropRateBump": 0.0204,
"resolution": 386,
"colors": ["bcdcf1","a1c2e2","86a9d3","6b8fc4","5175b6","365ba7","1b4298","002889"]
}
9 changes: 9 additions & 0 deletions Maps/Salomon_Bismarck_target/OceanCurrents/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"latest": "oscar_vel9472.nc",
"bounds": {
"latMinIndex": 243,
"latMaxIndex": 279,
"lonMinIndex": 381,
"lonMaxIndex": 432
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"lonMax":164,"uMax":0.8901907205581665,"dataset":"oscar_vel9472.nc","lonMin":147,"width":52,"time":9472,"uMin":-0.60445839166641235,"vMax":0.72206509113311768,"latMax":-13,"vMin":-0.6150825023651123,"height":37,"latMin":-1}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions Maps/Salomon_Bismarck_target/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"mapWidth": 1140,
"mapHeight": 836,
"fadeOpacity": 0.93773,
"colorFactor": 2.6973,
"speedFactor": 6.27,
"dropRate": 0.0084,
"dropRateBump": 0.0204,
"resolution": 386,
"colors": ["bcdcf1","a1c2e2","86a9d3","6b8fc4","5175b6","365ba7","1b4298","002889"]
}
14 changes: 7 additions & 7 deletions Maps/oceania/config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"mapWidth": 1140,
"mapHeight": 836,
"fadeOpacity": 0.996,
"colorFactor": 10,
"speedFactor": 20,
"dropRate": 0.003,
"dropRateBump": 0.01,
"resolution": 256,
"colors": ["3387bd", "66c2a6", "abdea3", "e6f599", "ffe18c", "fdae61", "f56e42", "d73d4f"]
"fadeOpacity": 0.93773,
"colorFactor": 2.6973,
"speedFactor": 6.27,
"dropRate": 0.0084,
"dropRateBump": 0.0204,
"resolution": 386,
"colors": ["bcdcf1","a1c2e2","86a9d3","6b8fc4","5175b6","365ba7","1b4298","002889"]
}
6 changes: 3 additions & 3 deletions Maps/oceania/touch_items.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
"height": 1535,
"items": [
{
"image": "smiley",
"image": "video",
"href": "test.mp4",
"x": 1262,
"y": 288,
"radius": 100
},
{
"image": "smiley",
"image": "photos",
"href": "nix.jpg",
"x": 389,
"y": 502,
"radius": 100
},
{
"image": "pin",
"image": "text",
"href": "blah.txt",
"x": 541,
"y": 1304,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"images" : [
{
"idiom" : "universal",
"filename" : "icons8-map-pin-100.png",
"filename" : "icon_photos_500px.png",
"scale" : "1x"
},
{
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"images" : [
{
"idiom" : "universal",
"filename" : "icons8-happy-100.png",
"filename" : "icon_text_500px.png",
"scale" : "1x"
},
{
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions OceaniAR/Assets.xcassets/video.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "icon_video_500px.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion OceaniAR/OSCAR/PODAAC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ struct PODAAC {

/// Indexes into OSCAR lat/lon arrays.
///
/// Latitude range: 0 = -80N, 420 = 80N, grid size = 1/3
/// Latitude range: 0 = 80N, 420 = -80N, grid size = 1/3.
/// To convert from latitudes to indexes use the formula `240-round(3x)`.
///
/// Longitude range: 0 = 20E, 1200 = 420E, grid size = 1/3, data repeats in overlap region
/// To convert from longitudes to indexes use the formula `round(3x)-60`.
///
struct Bounds: Codable {
let latMinIndex: Int
Expand Down
9 changes: 6 additions & 3 deletions OceaniAR/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@ class ViewController: ARViewController {
}

override func didStartAR() {
let dataSetUrl = Bundle.main.url(forResource: "maps", withExtension: "xml", subdirectory: "VuforiaDataSets")!
let dataSet = try! VuforiaDataSet(xmlurl: dataSetUrl)
self.addTargets(dataSet)
let dataSetsUrl = Bundle.main.url(forResource: "VuforiaDataSets", withExtension: nil)!
let urls = try! FileManager.default.contentsOfDirectory(at: dataSetsUrl, includingPropertiesForKeys: nil, options: [])
for url in urls.filter({ $0.pathExtension == "xml" }) {
let dataSet = try! VuforiaDataSet(xmlurl: url)
self.addTargets(dataSet)
}

for (name,target) in self.targets {
maps[name] = Map(target: target)
Expand Down
Binary file added VuforiaDataSets/Ozeanien_Kartenausschnitte.dat
Binary file not shown.
7 changes: 7 additions & 0 deletions VuforiaDataSets/Ozeanien_Kartenausschnitte.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<QCARConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="qcar_config.xsd">
<Tracking>
<ImageTarget name="Salomon_Bismarck_target" size="42.000000 29.694000" />
<ImageTarget name="Fiji_Samoa_target" size="42.000000 29.694000" />
</Tracking>
</QCARConfig>
File renamed without changes.
File renamed without changes.

0 comments on commit e6ea222

Please sign in to comment.