Skip to content

Commit

Permalink
Merge branch 'release/1.0.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
mchalgarra committed Sep 2, 2022
2 parents 7b67b30 + ae3e610 commit ae479a6
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 6 deletions.
31 changes: 28 additions & 3 deletions lib/entities/kml/tour_entity.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,32 @@ class TourEntity {
String updates = '';

double heading = 0;
double? last;

int changedIterations = 0;

for (var coord in coordinates) {
if (heading >= 360) {
heading -= 360;
}

final lng = coord['lng'];
double? lng = coord['lng'];
final lat = coord['lat'];
final alt = coord['altitude'];

bool changed = false;

if (last != null && (lng! - last).abs() > 20 && changedIterations == 0) {
changed = true;
}

if (last != null &&
((lng! < 0 && last > 0) || (lng > 0 && last < 0)) &&
lat!.abs() > 70) {
changedIterations++;
heading += (heading >= 180 ? -180 : 180);
}

heading += 1;
updates += '''
<gx:FlyTo>
Expand All @@ -70,12 +87,12 @@ class TourEntity {
<heading>$heading</heading>
<tilt>30</tilt>
<range>10000000</range>
<gx:altitudeMode>relativeToGround</gx:altitudeMode>
<gx:altitudeMode>absolute</gx:altitudeMode>
</LookAt>
</gx:FlyTo>
<gx:AnimatedUpdate>
<gx:duration>0.7</gx:duration>
<gx:duration>${changed ? 0 : 0.7}</gx:duration>
<Update>
<targetHref/>
<Change>
Expand All @@ -88,6 +105,14 @@ class TourEntity {
</Update>
</gx:AnimatedUpdate>
''';

if (changedIterations > 0 && changedIterations < 11) {
changedIterations++;
} else {
changedIterations = 0;
}

last = lng;
}

updates += '''
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
class App {
/// Property that defines the app version.
///
/// 1.0.5
static const version = '1.0.5';
/// 1.0.6
static const version = '1.0.6';
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.5
version: 1.0.6

environment:
sdk: ">=2.16.1 <3.0.0"
Expand Down
Binary file renamed releases/SVT-v1.0.4.aab → releases/SVT-v1.0.6.aab
Binary file not shown.
Binary file renamed releases/SVT-v1.0.4.apk → releases/SVT-v1.0.6.apk
Binary file not shown.

0 comments on commit ae479a6

Please sign in to comment.