From e73516e2a12b5110993799924cae0b2b2d1d6604 Mon Sep 17 00:00:00 2001 From: Klemens Muthmann Date: Mon, 16 Dec 2024 16:50:50 +0100 Subject: [PATCH] Make Construction of Altitude and GeoLocation public --- Sources/DataCapturing/Model/Altitude.swift | 6 ++---- Sources/DataCapturing/Model/GeoLocation.swift | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Sources/DataCapturing/Model/Altitude.swift b/Sources/DataCapturing/Model/Altitude.swift index 5708d6f..cd1b9c3 100644 --- a/Sources/DataCapturing/Model/Altitude.swift +++ b/Sources/DataCapturing/Model/Altitude.swift @@ -24,8 +24,6 @@ import CoreData A struct to wrap all the information associated with a measured altitude provided by an altimeter. - Author: Klemens Muthmann - - version: 1.0.0 - - Since: 12.0.0 */ public class Altitude: CustomStringConvertible { /// The relative altitude change since the last measured value, in meters. @@ -39,11 +37,11 @@ public class Altitude: CustomStringConvertible { return "Altitude (relativeAltitude: \(relativeAltitude), pressure: \(pressure), timestamp: \(time.debugDescription))" } - convenience init(managedObject: AltitudeMO) { + public convenience init(managedObject: AltitudeMO) { self.init(relativeAltitude: managedObject.altitude, time: managedObject.time!) } - init(relativeAltitude: Double, pressure: Double = 0.0, time: Date) { + public init(relativeAltitude: Double, pressure: Double = 0.0, time: Date) { self.relativeAltitude = relativeAltitude self.pressure = pressure self.time = time diff --git a/Sources/DataCapturing/Model/GeoLocation.swift b/Sources/DataCapturing/Model/GeoLocation.swift index 7e27775..6f190d3 100644 --- a/Sources/DataCapturing/Model/GeoLocation.swift +++ b/Sources/DataCapturing/Model/GeoLocation.swift @@ -58,7 +58,7 @@ public class GeoLocation: CustomStringConvertible { - Parameters - managedObject: The CoreData managed object to populate this object from. */ - convenience init(managedObject: GeoLocationMO) { + public convenience init(managedObject: GeoLocationMO) { self.init( latitude: managedObject.lat, longitude: managedObject.lon,