FORTRAN code to read Applanix SBET file
FORTRAN code to read Applanix SBET file.
I use a Intel Fortran complier.
!! Shih-Hung, Hsu @ CHS
!! v1.0 2013/2/22
!! Show output on screen.
program sb2ascii
implicit none
!! Input
character*30 :: sb_file
!! Output
character*30 :: ascii_file
!! Data
real*8 :: time, latitude, longitude, altitude, x_vel, y_vel, z_vel, roll, pitch
real*8 :: platform_heading, wander_angle, x_acceleration, y_acceleration, z_acceleration
real*8 :: x_angular_rate, y_angular_rate, z_angular
!! Error_Control
integer :: sb_file_IO, ascii_file_IO
!! Test
character*30 :: c_test
integer :: i_test
write(*,*) "Input file name:"
read(*,*) sb_file
open(11, FILE=sb_file, IOSTAT=sb_file_IO, FORM='BINARY', ACCESS='STREAM', READONLY)
open(12, FILE=ascii_file, IOSTAT=ascii_file_IO, FORM='BINARY', ACCESS='STREAM')
do while(sb_file_IO.eq.0)
read(11, IOSTAT=sb_file_IO) time, latitude, longitude, altitude, x_vel, y_vel, z_vel, &
& roll, pitch, platform_heading, wander_angle, x_acceleration, &
&y_acceleration, z_acceleration, x_angular_rate, y_angular_rate, z_angular
write(12, IOSTAT=ascii_file_IO) time, latitude, longitude, altitude, x_vel, y_vel, z_vel, &
& roll, pitch, platform_heading, wander_angle, x_acceleration, &
&y_acceleration, z_acceleration, x_angular_rate, y_angular_rate, z_angular
!write(*, "(17(F20.10))") time, latitude, longitude, altitude, x_vel, y_vel, z_vel, &
! & roll, pitch, platform_heading, wander_angle, x_acceleration, &
! & y_acceleration, z_acceleration, x_angular_rate, y_angular_rate, z_angular
end do
close(11)
close(12)
stop
end program sb2ascii
More......