Skip to content

Commit

Permalink
Make Construction of Altitude and GeoLocation public
Browse files Browse the repository at this point in the history
  • Loading branch information
muthenberg committed Dec 16, 2024
1 parent 50dc4ca commit e73516e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions Sources/DataCapturing/Model/Altitude.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Sources/DataCapturing/Model/GeoLocation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e73516e

Please sign in to comment.