Skip to content

Commit 32c3779

Browse files
committed
KISS style server UX and new features
- Add ConnectionsView for simplified server management - Add CoTDataSyncService for data synchronization - Add CoordinateConverter utility for map coordinates - Add HamburgerMenuButton and VerticalQuickActionMenu components - Update ChatCoTGenerator and ChatService - Update DataPackageImportManager and view - Update TrackListView
1 parent 8a0bf01 commit 32c3779

File tree

11 files changed

+1931
-44
lines changed

11 files changed

+1931
-44
lines changed

apps/omnitak/OmniTAKMobile.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1909,7 +1909,7 @@
19091909
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
19101910
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
19111911
CODE_SIGN_STYLE = Automatic;
1912-
CURRENT_PROJECT_VERSION = 1.4.3;
1912+
CURRENT_PROJECT_VERSION = 1.4.4;
19131913
ENABLE_PREVIEWS = YES;
19141914
FRAMEWORK_SEARCH_PATHS = (
19151915
"$(inherited)",
@@ -1932,7 +1932,7 @@
19321932
"$(inherited)",
19331933
"@executable_path/Frameworks",
19341934
);
1935-
MARKETING_VERSION = 1.4.3;
1935+
MARKETING_VERSION = 1.4.4;
19361936
PRODUCT_BUNDLE_IDENTIFIER = com.engindearing.omnitak.mobile;
19371937
PRODUCT_NAME = "$(TARGET_NAME)";
19381938
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@@ -1953,7 +1953,7 @@
19531953
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
19541954
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
19551955
CODE_SIGN_STYLE = Automatic;
1956-
CURRENT_PROJECT_VERSION = 1.4.3;
1956+
CURRENT_PROJECT_VERSION = 1.4.4;
19571957
ENABLE_PREVIEWS = YES;
19581958
FRAMEWORK_SEARCH_PATHS = (
19591959
"$(inherited)",
@@ -1976,7 +1976,7 @@
19761976
"$(inherited)",
19771977
"@executable_path/Frameworks",
19781978
);
1979-
MARKETING_VERSION = 1.4.3;
1979+
MARKETING_VERSION = 1.4.4;
19801980
PRODUCT_BUNDLE_IDENTIFIER = com.engindearing.omnitak.mobile;
19811981
PRODUCT_NAME = "$(TARGET_NAME)";
19821982
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";

apps/omnitak/OmniTAKMobile/CoT/Generators/ChatCoTGenerator.swift

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,35 @@ class ChatCoTGenerator {
5050
return xml
5151
}
5252

53+
// MARK: - Generate Location Share CoT
54+
55+
static func generateLocationShareXML(location: CLLocationCoordinate2D, senderUid: String, senderCallsign: String) -> String {
56+
let dateFormatter = ISO8601DateFormatter()
57+
dateFormatter.formatOptions = [.withInternetDateTime, .withFractionalSeconds]
58+
59+
let now = Date()
60+
let stale = now.addingTimeInterval(300) // 5 minutes stale
61+
62+
let timeStr = dateFormatter.string(from: now)
63+
let staleStr = dateFormatter.string(from: stale)
64+
65+
let uid = "share.\(senderUid).\(UUID().uuidString)"
66+
67+
let xml = """
68+
<?xml version="1.0" encoding="UTF-8"?>
69+
<event version="2.0" uid="\(uid)" type="b-m-p-s-m" time="\(timeStr)" start="\(timeStr)" stale="\(staleStr)" how="h-e">
70+
<point lat="\(location.latitude)" lon="\(location.longitude)" hae="0.0" ce="9999999" le="9999999"/>
71+
<detail>
72+
<contact callsign="\(senderCallsign)"/>
73+
<link uid="\(senderUid)" type="a-f-G" relation="p-p"/>
74+
<remarks>Location shared by \(senderCallsign)</remarks>
75+
</detail>
76+
</event>
77+
"""
78+
79+
return xml
80+
}
81+
5382
// MARK: - Parse GeoChat CoT
5483

5584
static func parseGeoChatCoT(xml: String) -> ChatMessage? {

apps/omnitak/OmniTAKMobile/Features/Chat/Services/ChatService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class ChatService: ObservableObject {
116116

117117
// Generate location-specific CoT if needed
118118
let xml = ChatCoTGenerator.generateLocationShareXML(
119-
location: location,
119+
location: location.coordinate,
120120
senderUid: currentUserId,
121121
senderCallsign: currentUserCallsign
122122
)

0 commit comments

Comments
 (0)