diff --git a/lib/entities/kml/tour_entity.dart b/lib/entities/kml/tour_entity.dart
index be01606..42a2ffc 100644
--- a/lib/entities/kml/tour_entity.dart
+++ b/lib/entities/kml/tour_entity.dart
@@ -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 += '''
@@ -70,12 +87,12 @@ class TourEntity {
$heading
30
10000000
- relativeToGround
+ absolute
- 0.7
+ ${changed ? 0 : 0.7}
@@ -88,6 +105,14 @@ class TourEntity {
''';
+
+ if (changedIterations > 0 && changedIterations < 11) {
+ changedIterations++;
+ } else {
+ changedIterations = 0;
+ }
+
+ last = lng;
}
updates += '''
diff --git a/lib/utils/app.dart b/lib/utils/app.dart
index e379b1a..303bddc 100644
--- a/lib/utils/app.dart
+++ b/lib/utils/app.dart
@@ -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';
}
diff --git a/pubspec.yaml b/pubspec.yaml
index 150f6f5..7c7bae0 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -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"
diff --git a/releases/SVT-v1.0.4.aab b/releases/SVT-v1.0.6.aab
similarity index 82%
rename from releases/SVT-v1.0.4.aab
rename to releases/SVT-v1.0.6.aab
index 0ca03d3..afd17d9 100644
Binary files a/releases/SVT-v1.0.4.aab and b/releases/SVT-v1.0.6.aab differ
diff --git a/releases/SVT-v1.0.4.apk b/releases/SVT-v1.0.6.apk
similarity index 82%
rename from releases/SVT-v1.0.4.apk
rename to releases/SVT-v1.0.6.apk
index dd43326..7f7079f 100644
Binary files a/releases/SVT-v1.0.4.apk and b/releases/SVT-v1.0.6.apk differ