46
46
//! and Mapping Annual Conference. Orlando, Florida.
47
47
//! * "Transformation from Cartesian to Geodetic Coordinates Accelerated by
48
48
//! Halley’s Method", T. Fukushima (2006), Journal of Geodesy.
49
- use crate :: c_bindings;
50
49
51
50
/// WGS84 geodetic coordinates (Latitude, Longitude, Height)
52
51
///
@@ -95,7 +94,7 @@ impl LLHDegrees {
95
94
/// just the representation of the angular values.
96
95
pub fn to_radians ( & self ) -> LLHRadians {
97
96
let mut rad = LLHRadians :: default ( ) ;
98
- unsafe { c_bindings :: llhdeg2rad ( self . as_ptr ( ) , rad. as_mut_ptr ( ) ) } ;
97
+ unsafe { swiftnav_sys :: llhdeg2rad ( self . as_ptr ( ) , rad. as_mut_ptr ( ) ) } ;
99
98
rad
100
99
}
101
100
@@ -184,7 +183,7 @@ impl LLHRadians {
184
183
/// just the representation of the angular values.
185
184
pub fn to_degrees ( & self ) -> LLHDegrees {
186
185
let mut deg = LLHDegrees :: default ( ) ;
187
- unsafe { c_bindings :: llhrad2deg ( self . as_ptr ( ) , deg. as_mut_ptr ( ) ) } ;
186
+ unsafe { swiftnav_sys :: llhrad2deg ( self . as_ptr ( ) , deg. as_mut_ptr ( ) ) } ;
188
187
deg
189
188
}
190
189
@@ -193,7 +192,7 @@ impl LLHRadians {
193
192
/// (X, Y and Z).
194
193
pub fn to_ecef ( & self ) -> ECEF {
195
194
let mut ecef = ECEF :: default ( ) ;
196
- unsafe { c_bindings :: wgsllh2ecef ( self . as_ptr ( ) , ecef. as_mut_ptr ( ) ) } ;
195
+ unsafe { swiftnav_sys :: wgsllh2ecef ( self . as_ptr ( ) , ecef. as_mut_ptr ( ) ) } ;
197
196
ecef
198
197
}
199
198
}
@@ -280,7 +279,7 @@ impl ECEF {
280
279
/// longitude and height).
281
280
pub fn to_llh ( & self ) -> LLHRadians {
282
281
let mut llh = LLHRadians :: from_array ( & [ 0.0 ; 3 ] ) ;
283
- unsafe { c_bindings :: wgsecef2llh ( self . as_ptr ( ) , llh. as_mut_ptr ( ) ) } ;
282
+ unsafe { swiftnav_sys :: wgsecef2llh ( self . as_ptr ( ) , llh. as_mut_ptr ( ) ) } ;
284
283
llh
285
284
}
286
285
@@ -294,7 +293,7 @@ impl ECEF {
294
293
pub fn azel_of ( & self , point : & ECEF ) -> AzimuthElevation {
295
294
let mut azel = AzimuthElevation :: new ( 0.0 , 0.0 ) ;
296
295
unsafe {
297
- c_bindings :: wgsecef2azel ( point. as_ptr ( ) , self . as_ptr ( ) , & mut azel. az , & mut azel. el )
296
+ swiftnav_sys :: wgsecef2azel ( point. as_ptr ( ) , self . as_ptr ( ) , & mut azel. az , & mut azel. el )
298
297
} ;
299
298
azel
300
299
}
0 commit comments