├── example ├── 171019_031603.ncom ├── Makefile └── NcomToCsv.c ├── .gitignore ├── .travis.yml ├── LICENSE.md ├── test.py ├── .README.csv ├── measurements.csv ├── README.md └── nav └── NComRxC.h /example/171019_031603.ncom: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OxfordTechnicalSolutions/NCOMdecoder/HEAD/example/171019_031603.ncom -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore all files without extension 2 | * 3 | !*.* 4 | !*/ 5 | 6 | # Ignore specific extensions 7 | *.o 8 | *.exe 9 | 10 | # Ignore csv (output) files in example folder 11 | example/*.csv 12 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | matrix: 2 | include: 3 | - os: linux 4 | language: c 5 | compiler: gcc 6 | script: 7 | - cd example 8 | - make && ./NComToCsv 171019_031603.ncom 171019_031603.csv 9 | - cd .. 10 | - python test.py 11 | 12 | - os: osx 13 | language: c 14 | compiler: gcc 15 | script: 16 | - cd example 17 | - make && ./NComToCsv 171019_031603.ncom 171019_031603.csv 18 | - cd .. 19 | - python test.py 20 | 21 | - os: windows 22 | language: c 23 | compiler: gcc 24 | cache: 25 | directories: 26 | - $HOME/AppData/Local/Temp/chocolatey 27 | before_install: 28 | - choco install python --version 3.8.6 29 | - export PATH="/c/Python38:/c/Python38/Scripts:$PATH" 30 | script: 31 | - cd example 32 | - mingw32-make.exe && ./NComToCsv.exe 171019_031603.ncom 171019_031603.csv 33 | - cd .. 34 | - python test.py 35 | -------------------------------------------------------------------------------- /example/Makefile: -------------------------------------------------------------------------------- 1 | ############################################################# 2 | # # 3 | # Make file for the NComToCsv example using the NCOMdecoder # 4 | # # 5 | ############################################################# 6 | 7 | #Directories 8 | IDIR =../nav 9 | EXAMPLE_DIR=. 10 | 11 | #Compiler settings 12 | CC =gcc 13 | CFLAGS=-I$(IDIR) -lm 14 | 15 | #NCOMdecoder dependencies 16 | _DEPS = NComRxC.h 17 | DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS)) 18 | 19 | #NCOMdecoder object files required 20 | _OBJ = NComRxC.o 21 | OBJ = $(patsubst %,$(IDIR)/%,$(_OBJ)) 22 | 23 | #Example object files required 24 | _EXAMPLE = NcomToCsv.o 25 | EXAMPLE = $(patsubst %,$(EXAMPLE_DIR)/%,$(_EXAMPLE)) 26 | 27 | #Rule for *library* object files 28 | $(IDIR)/%.o: %.c $(DEPS) 29 | $(CC) -c -o $@ $< $(CFLAGS) 30 | 31 | #Rule for the executable 32 | NComToCsv: $(OBJ) $(EXAMPLE) 33 | gcc -o $@ $^ $(CFLAGS) 34 | 35 | .PHONY: clean 36 | 37 | clean: 38 | rm $(IDIR)/*.o $(EXAMPLE_DIR)/*.o $(EXAMPLE_DIR)/*.exe 39 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The software is protected by copyright of Oxford Technical Solutions at oxts.com. 2 | © 2008 - 2020, Oxford Technical Solutions Ltd. 3 | Unauthorised use, copying or distribution is not permitted. 4 | 5 | Any redistribution of the software must reproduce the above copyright notices, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution 6 | 7 | The Oxford Technical Solutions name may not be used to endorse or promote products using this software without specific prior written permission. 8 | 9 | The software is provided by the copyright holders and contributors “as is” and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright holders or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage. 10 | -------------------------------------------------------------------------------- /test.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import print_function 3 | # A test for the CI/CD to ensure decoder is operating correctly 4 | file_path = './example/171019_031603.csv' 5 | num_lines = sum(1 for line in open(file_path)) 6 | with open(file_path) as f: 7 | # check header 8 | print("Header check...", end="\r") 9 | header = f.readline() 10 | correct_header = " Time(), Date, Local Time, Latitude(deg), Longitude(deg), Altitude(m), Distance horizontal(m), Velocity north(m/s), Velocity east(m/s), Velocity down(m/s), Velocity up(m/s), Velocity forward(m/s), Velocity lateral(m/s), ISO e.f.s. east velocity(m/s), ISO e.f.s. north velocity(m/s), ISO e.f.s. vertical velocity(m/s), ISO i.s. longitudinal velocity(m/s), ISO i.s. lateral velocity(m/s), ISO i.s. vertical velocity(m/s), ISO v.s. longitudinal velocity(m/s), ISO v.s. lateral velocity(m/s), ISO v.s. vertical velocity(m/s), Speed horizontal(m/s), Acceleration Xv(m/s²), Acceleration Yv(m/s²), Acceleration Zv(m/s²), Acceleration forward(m/s²), Acceleration lateral(m/s²), Acceleration down(m/s²), ISO e.f.s. east acceleration(m/s²), ISO e.f.s. north acceleration(m/s²), ISO e.f.s. vertical acceleration(m/s²), ISO i.s. longitudinal acceleration(m/s²), ISO i.s. lateral acceleration(m/s²), ISO i.s. vertical acceleration(m/s²), ISO v.s. longitudinal acceleration(m/s²), ISO v.s. lateral acceleration(m/s²), ISO v.s. vertical acceleration(m/s²), Heading(deg), Pitch(deg), Roll(deg), ISO yaw angle(deg), ISO pitch angle(deg), ISO roll angle(deg), Angular rate Xv(deg/s), Angular rate Yv(deg/s), Angular rate Zv(deg/s), Angular rate forward(deg/s), Angular rate lateral(deg/s), Angular rate down(deg/s), ISO e.f.s. roll velocity(deg/s), ISO e.f.s. pitch velocity(deg/s), ISO e.f.s. yaw velocity(deg/s), ISO i.s. roll velocity(deg/s), ISO i.s. pitch velocity(deg/s), ISO i.s. yaw velocity(deg/s), ISO v.s. roll velocity(deg/s), ISO v.s. pitch velocity(deg/s), ISO v.s. yaw velocity(deg/s), Angular acceleration Xv(deg/s²), Angular acceleration Yv(deg/s²), Angular acceleration Zv(deg/s²), Angular acceleration forward(deg/s²), Angular acceleration lateral(deg/s²), Angular acceleration down(deg/s²), ISO e.f.s. roll acceleration(deg/s²), ISO e.f.s. pitch acceleration(deg/s²), ISO e.f.s. yaw acceleration(deg/s²), ISO i.s. roll acceleration(deg/s²), ISO i.s. pitch acceleration(deg/s²), ISO i.s. yaw acceleration(deg/s²), ISO v.s. roll acceleration(deg/s²), ISO v.s. pitch acceleration(deg/s²), ISO v.s. yaw acceleration(deg/s²)," 11 | for i, (j, k) in enumerate(zip(header, correct_header)): 12 | assert (j == k), "Expected: {}, but got: {}".format(k, j) 13 | print("Header check... {:.2f}%".format(100 * i / len(correct_header)), end="\r") 14 | print("Header check... OK ") 15 | # check for values 16 | print("Row check...", end="\r") 17 | empty_line_len = 70 18 | for i, line in enumerate(f): 19 | print("Row check... {:.2f}%".format(100 * i / num_lines), end="\r") 20 | assert (len(line) > empty_line_len), "Line {} appears to be empty".format(i) 21 | print("Row check... OK ") 22 | -------------------------------------------------------------------------------- /.README.csv: -------------------------------------------------------------------------------- 1 | Store name,Type,Units,Format,Full name,Coordinate Frame,Alternate Coordinate Frame Name,Description 2 | Ax,double,m/s²,0,Acceleration Xv,OxTS vehicle frame,OxTS output frame (with default output displacement),OxTS output frame longitudinal (forward) IMU acceleration 3 | Ay,double,m/s²,0,Acceleration Yv,OxTS vehicle frame,OxTS output frame (with default output displacement),OxTS output frame lateral (right) IMU acceleration 4 | Az,double,m/s²,0,Acceleration Zv,OxTS vehicle frame,OxTS output frame (with default output displacement),OxTS output frame vertical (down) IMU acceleration 5 | Af,double,m/s²,0,Acceleration forward,OxTS horizontal frame,OxTS level frame,OxTS horizontal frame longitudinal (forward) IMU acceleration 6 | Al,double,m/s²,0,Acceleration lateral,OxTS horizontal frame,OxTS level frame,OxTS horizontal frame lateral (right) IMU acceleration 7 | Ad,double,m/s²,0,Acceleration down,OxTS horizontal frame,OxTS level frame,OxTS horizontal frame vertical (down) IMU acceleration 8 | FiltAx,double,m/s²,0,Acceleration filtered Xv,OxTS vehicle frame,OxTS output frame (with default output displacement),OxTS output frame longitudinal (forward) filtered IMU acceleration 9 | FiltAy,double,m/s²,0,Acceleration filtered Yv,OxTS vehicle frame,OxTS output frame (with default output displacement),OxTS output frame lateral (right) filtered IMU acceleration 10 | FiltAz,double,m/s²,0,Acceleration filtered Zv,OxTS vehicle frame,OxTS output frame (with default output displacement),OxTS output frame vertical (down) filtered IMU acceleration 11 | FiltAf,double,m/s²,0,Acceleration filtered forward,OxTS horizontal frame,OxTS level frame,OxTS horizontal frame longitudinal (forward) filtered IMU acceleration 12 | FiltAl,double,m/s²,0,Acceleration filtered lateral,OxTS horizontal frame,OxTS level frame,OxTS horizontal frame lateral (right) filtered IMU acceleration 13 | FiltAd,double,m/s²,0,Acceleration filtered down,OxTS horizontal frame,OxTS level frame,OxTS horizontal frame vertical (down) filtered IMU acceleration 14 | IsoAnX,double,m/s²,0,ISO e.f.s. east acceleration,ISO 8855 earth-fixed system,,ISO 8855 earth-fixed system east acceleration 15 | IsoAnY,double,m/s²,0,ISO e.f.s. north acceleration,ISO 8855 earth-fixed system,,ISO 8855 earth-fixed system north acceleration 16 | IsoAnZ,double,m/s²,0,ISO e.f.s. vertical acceleration,ISO 8855 earth-fixed system,,ISO 8855 earth-fixed system vertical (up) acceleration 17 | IsoAhX,double,m/s²,0,ISO i.s. longitudinal acceleration,ISO 8855 intermediate system,,ISO 8855 intermediate system longitudinal (forward) acceleration 18 | IsoAhY,double,m/s²,0,ISO i.s. lateral acceleration,ISO 8855 intermediate system,,ISO 8855 intermediate system lateral (left) acceleration 19 | IsoAhZ,double,m/s²,0,ISO i.s. vertical acceleration,ISO 8855 intermediate system,,ISO 8855 intermediate system vertical (up) acceleration 20 | IsoAoX,double,m/s²,0,ISO v.s. longitudinal acceleration,ISO 8855 vehicle system,,ISO 8855 vehicle system longitudinal (forward) acceleration 21 | IsoAoY,double,m/s²,0,ISO v.s. lateral acceleration,ISO 8855 vehicle system,,ISO 8855 vehicle system lateral (left) acceleration 22 | IsoAoZ,double,m/s²,0,ISO v.s. vertical acceleration,ISO 8855 vehicle system,,ISO 8855 vehicle system vertical (up) acceleration 23 | FiltIsoAnX,double,m/s²,0,ISO e.f.s. east filtered acceleration,ISO 8855 earth-fixed system,,ISO 8855 earth-fixed system east filtered acceleration 24 | FiltIsoAnY,double,m/s²,0,ISO e.f.s. north filtered acceleration,ISO 8855 earth-fixed system,,ISO 8855 earth-fixed system north filtered acceleration 25 | FiltIsoAnZ,double,m/s²,0,ISO e.f.s. vertical filtered acceleration,ISO 8855 earth-fixed system,,ISO 8855 earth-fixed system vertical (up) filtered acceleration 26 | FiltIsoAhX,double,m/s²,0,ISO i.s. longitudinal filtered acceleration,ISO 8855 intermediate system,,ISO 8855 intermediate system longitudinal (forward) filtered acceleration 27 | FiltIsoAhY,double,m/s²,0,ISO i.s. lateral filtered acceleration,ISO 8855 intermediate system,,ISO 8855 intermediate system lateral (left) filtered acceleration 28 | FiltIsoAhZ,double,m/s²,0,ISO i.s. vertical filtered acceleration,ISO 8855 intermediate system,,ISO 8855 intermediate system vertical (up) filtered acceleration 29 | FiltIsoAoX,double,m/s²,0,ISO v.s. longitudinal filtered acceleration,ISO 8855 vehicle system,,ISO 8855 vehicle system longitudinal (forward) filtered acceleration 30 | FiltIsoAoY,double,m/s²,0,ISO v.s. lateral filtered acceleration,ISO 8855 vehicle system,,ISO 8855 vehicle system lateral (left) filtered acceleration 31 | FiltIsoAoZ,double,m/s²,0,ISO v.s. vertical filtered acceleration,ISO 8855 vehicle system,,ISO 8855 vehicle system vertical (up) filtered acceleration 32 | Yx,double,deg/s²,0,Angular acceleration Xv,OxTS vehicle frame,OxTS output frame (with default output displacement),OxTS output frame longitudinal (forward) IMU angular acceleration 33 | Yy,double,deg/s²,0,Angular acceleration Yv,OxTS vehicle frame,OxTS output frame (with default output displacement),OxTS output frame lateral (right) IMU angular acceleration 34 | Yz,double,deg/s²,0,Angular acceleration Zv,OxTS vehicle frame,OxTS output frame (with default output displacement),OxTS output frame vertical (down) IMU angular acceleration 35 | Yf,double,deg/s²,0,Angular acceleration forward,OxTS horizontal frame,OxTS level frame,OxTS horizontal frame longitudinal (forward) IMU angular acceleration 36 | Yl,double,deg/s²,0,Angular acceleration lateral,OxTS horizontal frame,OxTS level frame,OxTS horizontal frame lateral (right) IMU angular acceleration 37 | Yd,double,deg/s²,0,Angular acceleration down,OxTS horizontal frame,OxTS level frame,OxTS horizontal frame vertical (down) IMU angular acceleration 38 | FiltYx,double,deg/s²,0,Angular acceleration filtered Xv,OxTS vehicle frame,OxTS output frame (with default output displacement),OxTS output frame longitudinal (forward) filtered IMU angular acceleration 39 | FiltYy,double,deg/s²,0,Angular acceleration filtered Yv,OxTS vehicle frame,OxTS output frame (with default output displacement),OxTS output frame lateral (right) filtered IMU angular acceleration 40 | FiltYz,double,deg/s²,0,Angular acceleration filtered Zv,OxTS vehicle frame,OxTS output frame (with default output displacement),OxTS output frame vertical (down) filtered IMU angular acceleration 41 | FiltYf,double,deg/s²,0,Angular acceleration filtered forward,OxTS horizontal frame,OxTS level frame,OxTS horizontal frame longitudinal (forward) filtered IMU angular acceleration 42 | FiltYl,double,deg/s²,0,Angular acceleration filtered lateral,OxTS horizontal frame,OxTS level frame,OxTS horizontal frame lateral (right) filtered IMU angular acceleration 43 | FiltYd,double,deg/s²,0,Angular acceleration filtered down,OxTS horizontal frame,OxTS level frame,OxTS horizontal frame vertical (down) filtered IMU angular acceleration 44 | IsoYnX,double,deg/s²,0,ISO e.f.s. roll acceleration,ISO 8855 earth-fixed system,,ISO 8855 earth-fixed system roll (east angular) acceleration 45 | IsoYnY,double,deg/s²,0,ISO e.f.s. pitch acceleration,ISO 8855 earth-fixed system,,ISO 8855 earth-fixed system pitch (north angular) acceleration 46 | IsoYnZ,double,deg/s²,0,ISO e.f.s. yaw acceleration,ISO 8855 earth-fixed system,,ISO 8855 earth-fixed system yaw (vertical angular) acceleration 47 | IsoYhX,double,deg/s²,0,ISO i.s. roll acceleration,ISO 8855 intermediate system,,ISO 8855 intermediate system roll (longitudinal angular) acceleration 48 | IsoYhY,double,deg/s²,0,ISO i.s. pitch acceleration,ISO 8855 intermediate system,,ISO 8855 intermediate system pitch (lateral angular) acceleration 49 | IsoYhZ,double,deg/s²,0,ISO i.s. yaw acceleration,ISO 8855 intermediate system,,ISO 8855 intermediate system yaw (vertical angular) acceleration 50 | IsoYoX,double,deg/s²,0,ISO v.s. roll acceleration,ISO 8855 vehicle system,,ISO 8855 vehicle system roll (longitudinal angular) acceleration 51 | IsoYoY,double,deg/s²,0,ISO v.s. pitch acceleration,ISO 8855 vehicle system,,ISO 8855 vehicle system pitch (lateral angular) acceleration 52 | IsoYoZ,double,deg/s²,0,ISO v.s. yaw acceleration,ISO 8855 vehicle system,,ISO 8855 vehicle system yaw (vertical angular) acceleration 53 | FiltIsoYnX,double,deg/s²,0,ISO e.f.s. roll filtered acceleration,ISO 8855 earth-fixed system,,ISO 8855 earth-fixed system roll (east angular) filtered acceleration 54 | FiltIsoYnY,double,deg/s²,0,ISO e.f.s. pitch filtered acceleration,ISO 8855 earth-fixed system,,ISO 8855 earth-fixed system pitch (north angular) filtered acceleration 55 | FiltIsoYnZ,double,deg/s²,0,ISO e.f.s. yaw filtered acceleration,ISO 8855 earth-fixed system,,ISO 8855 earth-fixed system yaw (vertical angular) filtered acceleration 56 | FiltIsoYhX,double,deg/s²,0,ISO i.s. roll filtered acceleration,ISO 8855 intermediate system,,ISO 8855 intermediate system roll (longitudinal angular) filtered acceleration 57 | FiltIsoYhY,double,deg/s²,0,ISO i.s. pitch filtered acceleration,ISO 8855 intermediate system,,ISO 8855 intermediate system pitch (lateral angular) filtered acceleration 58 | FiltIsoYhZ,double,deg/s²,0,ISO i.s. yaw filtered acceleration,ISO 8855 intermediate system,,ISO 8855 intermediate system yaw (vertical angular) filtered acceleration 59 | FiltIsoYoX,double,deg/s²,0,ISO v.s. roll filtered acceleration,ISO 8855 vehicle system,,ISO 8855 vehicle system roll (longitudinal angular) filtered acceleration 60 | FiltIsoYoY,double,deg/s²,0,ISO v.s. pitch filtered acceleration,ISO 8855 vehicle system,,ISO 8855 vehicle system pitch (lateral angular) filtered acceleration 61 | FiltIsoYoZ,double,deg/s²,0,ISO v.s. yaw filtered acceleration,ISO 8855 vehicle system,,ISO 8855 vehicle system yaw (vertical angular) filtered acceleration 62 | Wx,double,deg/s,0,Angular rate Xv,OxTS vehicle frame,OxTS output frame (with default output displacement),OxTS output frame longitudinal (forward) IMU angular rate 63 | Wy,double,deg/s,0,Angular rate Yv,OxTS vehicle frame,OxTS output frame (with default output displacement),OxTS output frame lateral (right) IMU angular rate 64 | Wz,double,deg/s,0,Angular rate Zv,OxTS vehicle frame,OxTS output frame (with default output displacement),OxTS output frame vertical (down) IMU angular rate 65 | Wf,double,deg/s,0,Angular rate forward,OxTS horizontal frame,OxTS level frame,OxTS horizontal frame longitudinal (forward) IMU angular rate 66 | Wl,double,deg/s,0,Angular rate lateral,OxTS horizontal frame,OxTS level frame,OxTS horizontal frame lateral (right) IMU angular rate 67 | Wd,double,deg/s,0,Angular rate down,OxTS horizontal frame,OxTS level frame,OxTS horizontal frame vertical (down) IMU angular rate 68 | IsoWnX,double,deg/s,0,ISO e.f.s. roll velocity,ISO 8855 earth-fixed system,,ISO 8855 earth-fixed system roll (east angular) velocity 69 | IsoWnY,double,deg/s,0,ISO e.f.s. pitch velocity,ISO 8855 earth-fixed system,,ISO 8855 earth-fixed system pitch (north angular) velocity 70 | IsoWnZ,double,deg/s,0,ISO e.f.s. yaw velocity,ISO 8855 earth-fixed system,,ISO 8855 earth-fixed system yaw (vertical angular) velocity 71 | IsoWhX,double,deg/s,0,ISO i.s. roll velocity,ISO 8855 intermediate system,,ISO 8855 intermediate system roll (longitudinal angular) velocity 72 | IsoWhY,double,deg/s,0,ISO i.s. pitch velocity,ISO 8855 intermediate system,,ISO 8855 intermediate system pitch (lateral angular) velocity 73 | IsoWhZ,double,deg/s,0,ISO i.s. yaw velocity,ISO 8855 intermediate system,,ISO 8855 intermediate system yaw (vertical angular) velocity 74 | IsoWoX,double,deg/s,0,ISO v.s. roll velocity,ISO 8855 vehicle system,,ISO 8855 vehicle system roll (longitudinal angular) velocity 75 | IsoWoY,double,deg/s,0,ISO v.s. pitch velocity,ISO 8855 vehicle system,,ISO 8855 vehicle system pitch (lateral angular) velocity 76 | IsoWoZ,double,deg/s,0,ISO v.s. yaw velocity,ISO 8855 vehicle system,,ISO 8855 vehicle system yaw (vertical angular) velocity 77 | HeadingAcc,double,deg,0,Heading accuracy,,,Heading Accuracy 78 | PitchAcc,double,deg,0,Pitch accuracy,,,Pitch Accuracy 79 | RollAcc,double,deg,0,Roll accuracy,,,Roll Accuracy 80 | Track,double,deg,0,Track angle,,, 81 | TrackAcc,double,deg,0,Track angle accuracy,,, 82 | Slip,double,deg,0,Slip angle,,, 83 | SlipAcc,double,deg,0,Slip angle accuracy,,, 84 | IsoYaw,double,deg,0,ISO yaw angle,,,ISO 8855 yaw angle 85 | IsoPitch,double,deg,0,ISO pitch angle,,,ISO 8855 pitch angle 86 | IsoRoll,double,deg,0,ISO roll angle,,,ISO 8855 roll angle 87 | Surf2OutHeading,double,deg,0,Heading to surface,,, 88 | Surf2OutPitch,double,deg,0,Pitch to surface,,, 89 | Surf2OutRoll,double,deg,0,Roll to surface,,, 90 | Lat,double,deg,0,Latitude,,,Latitude 91 | Lon,double,deg,0,Longitude,,,Longitude 92 | Alt,double,m,0,Altitude,,,Altitude 93 | NorthAcc,double,m,0,Position accuracy north,,,North Position Accuracy 94 | EastAcc,double,m,0,Position accuracy east,,,East Position Accuracy 95 | AltAcc,double,m,0,Position accuracy down,,,Down Position Accuracy 96 | Dist2d,double,m,0,Distance horizontal,,,Distance travelled in horizontal directions 97 | Dist3d,double,m,0,Distance 3D,,,Distance travelled in all directions 98 | GpsPosMode,int,,~GpsXModeName (#),GPS position mode,,,Position mode of the GPS receiver being used for position 99 | GpsVelMode,int,,~GpsXModeName (#),GPS velocity mode,,,Velocity mode of the GPS receiver being used for velocity 100 | GpsAttMode,int,,~GpsXModeName (#),GPS dual antenna attitude mode,,,Attitude (dual-antenna) mode of the GPS receivers 101 | GpsNumObs,int,,#,Number of GPS satellites used,,,Number of GPS satellites tracked by the Primary GPS receiver 102 | GpsDiffAge,double,s,0,Differential GPS age,,,Age of the current differential corrections 103 | "Time ",double,,,Time in seconds from start of GPS time,,,Seconds from GPS time zero (0h 1980-01-06). [s] 104 | "TimeWeekCount ",uint32_t,,,GPS time format week counter,,,GPS time format week counter. [week] 105 | "TimeWeekSecond ",double,,,GPS time format seconds into week,,,GPS time format seconds into week. [s] 106 | "TimeUtcOffset ",int,,,Offset between Coordinated Universal Time (UTC) and GPS time,,,Offset between Coordinated Universal Time (UTC) and GPS time. [s] 107 | TrigTime,double,,,Time of last trigger falling edge,,,Time of last trigger falling edge. [s] 108 | Trig2Time,double,,,Time of last trigger rising edge,,,Time of last trigger rising edge. [s] 109 | -------------------------------------------------------------------------------- /measurements.csv: -------------------------------------------------------------------------------- 1 | Store name,Type,Units,Category,Full name,Coordinate Frame,Alternate Coordinate Frame Name,Format,Units*,Description,Additional description,German 2 | Ax,double,m/s2,Acceleration,Acceleration Xv,OxTS vehicle frame,OxTS output frame (with default output displacement),0.000,m/s²,OxTS output frame longitudinal (forward) IMU acceleration,,X Beschleunigung 3 | Ay,double,m/s2,Acceleration,Acceleration Yv,OxTS vehicle frame,OxTS output frame (with default output displacement),0.000,m/s²,OxTS output frame lateral (right) IMU acceleration,,Y Beschleunigung 4 | Az,double,m/s2,Acceleration,Acceleration Zv,OxTS vehicle frame,OxTS output frame (with default output displacement),0.000,m/s²,OxTS output frame vertical (down) IMU acceleration,,Z Beschleunigung 5 | Af,double,m/s2,Acceleration,Acceleration forward,OxTS horizontal frame,OxTS level frame,0.000,m/s²,OxTS horizontal frame longitudinal (forward) IMU acceleration,,Vorwärtsbeschleunigung 6 | Al,double,m/s2,Acceleration,Acceleration lateral,OxTS horizontal frame,OxTS level frame,0.000,m/s²,OxTS horizontal frame lateral (right) IMU acceleration,,Querbeschleunigung 7 | Ad,double,m/s2,Acceleration,Acceleration down,OxTS horizontal frame,OxTS level frame,0.000,m/s²,OxTS horizontal frame vertical (down) IMU acceleration,,Vertikalbeschleunigung 8 | FiltAx,double,m/s2,Acceleration,Acceleration filtered Xv,OxTS vehicle frame,OxTS output frame (with default output displacement),0.000,m/s²,OxTS output frame longitudinal (forward) filtered IMU acceleration,, 9 | FiltAy,double,m/s2,Acceleration,Acceleration filtered Yv,OxTS vehicle frame,OxTS output frame (with default output displacement),0.000,m/s²,OxTS output frame lateral (right) filtered IMU acceleration,, 10 | FiltAz,double,m/s2,Acceleration,Acceleration filtered Zv,OxTS vehicle frame,OxTS output frame (with default output displacement),0.000,m/s²,OxTS output frame vertical (down) filtered IMU acceleration,, 11 | FiltAf,double,m/s2,Acceleration,Acceleration filtered forward,OxTS horizontal frame,OxTS level frame,0.000,m/s²,OxTS horizontal frame longitudinal (forward) filtered IMU acceleration,, 12 | FiltAl,double,m/s2,Acceleration,Acceleration filtered lateral,OxTS horizontal frame,OxTS level frame,0.000,m/s²,OxTS horizontal frame lateral (right) filtered IMU acceleration,, 13 | FiltAd,double,m/s2,Acceleration,Acceleration filtered down,OxTS horizontal frame,OxTS level frame,0.000,m/s²,OxTS horizontal frame vertical (down) filtered IMU acceleration,, 14 | IsoAnX,double,m/s2,Acceleration,ISO e.f.s. east acceleration,ISO 8855 earth-fixed system,,0.000,m/s²,ISO 8855 earth-fixed system east acceleration,, 15 | IsoAnY,double,m/s2,Acceleration,ISO e.f.s. north acceleration,ISO 8855 earth-fixed system,,0.000,m/s²,ISO 8855 earth-fixed system north acceleration,, 16 | IsoAnZ,double,m/s2,Acceleration,ISO e.f.s. vertical acceleration,ISO 8855 earth-fixed system,,0.000,m/s²,ISO 8855 earth-fixed system vertical (up) acceleration,, 17 | IsoAhX,double,m/s2,Acceleration,ISO i.s. longitudinal acceleration,ISO 8855 intermediate system,,0.000,m/s²,ISO 8855 intermediate system longitudinal (forward) acceleration,, 18 | IsoAhY,double,m/s2,Acceleration,ISO i.s. lateral acceleration,ISO 8855 intermediate system,,0.000,m/s²,ISO 8855 intermediate system lateral (left) acceleration,, 19 | IsoAhZ,double,m/s2,Acceleration,ISO i.s. vertical acceleration,ISO 8855 intermediate system,,0.000,m/s²,ISO 8855 intermediate system vertical (up) acceleration,, 20 | IsoAoX,double,m/s2,Acceleration,ISO v.s. longitudinal acceleration,ISO 8855 vehicle system,,0.000,m/s²,ISO 8855 vehicle system longitudinal (forward) acceleration,, 21 | IsoAoY,double,m/s2,Acceleration,ISO v.s. lateral acceleration,ISO 8855 vehicle system,,0.000,m/s²,ISO 8855 vehicle system lateral (left) acceleration,, 22 | IsoAoZ,double,m/s2,Acceleration,ISO v.s. vertical acceleration,ISO 8855 vehicle system,,0.000,m/s²,ISO 8855 vehicle system vertical (up) acceleration,, 23 | FiltIsoAnX,double,m/s2,Acceleration,ISO e.f.s. east filtered acceleration,ISO 8855 earth-fixed system,,0.000,m/s²,ISO 8855 earth-fixed system east filtered acceleration,, 24 | FiltIsoAnY,double,m/s2,Acceleration,ISO e.f.s. north filtered acceleration,ISO 8855 earth-fixed system,,0.000,m/s²,ISO 8855 earth-fixed system north filtered acceleration,, 25 | FiltIsoAnZ,double,m/s2,Acceleration,ISO e.f.s. vertical filtered acceleration,ISO 8855 earth-fixed system,,0.000,m/s²,ISO 8855 earth-fixed system vertical (up) filtered acceleration,, 26 | FiltIsoAhX,double,m/s2,Acceleration,ISO i.s. longitudinal filtered acceleration,ISO 8855 intermediate system,,0.000,m/s²,ISO 8855 intermediate system longitudinal (forward) filtered acceleration,, 27 | FiltIsoAhY,double,m/s2,Acceleration,ISO i.s. lateral filtered acceleration,ISO 8855 intermediate system,,0.000,m/s²,ISO 8855 intermediate system lateral (left) filtered acceleration,, 28 | FiltIsoAhZ,double,m/s2,Acceleration,ISO i.s. vertical filtered acceleration,ISO 8855 intermediate system,,0.000,m/s²,ISO 8855 intermediate system vertical (up) filtered acceleration,, 29 | FiltIsoAoX,double,m/s2,Acceleration,ISO v.s. longitudinal filtered acceleration,ISO 8855 vehicle system,,0.000,m/s²,ISO 8855 vehicle system longitudinal (forward) filtered acceleration,, 30 | FiltIsoAoY,double,m/s2,Acceleration,ISO v.s. lateral filtered acceleration,ISO 8855 vehicle system,,0.000,m/s²,ISO 8855 vehicle system lateral (left) filtered acceleration,, 31 | FiltIsoAoZ,double,m/s2,Acceleration,ISO v.s. vertical filtered acceleration,ISO 8855 vehicle system,,0.000,m/s²,ISO 8855 vehicle system vertical (up) filtered acceleration,, 32 | Yx,double,deg/s2,Angular acceleration,Angular acceleration Xv,OxTS vehicle frame,OxTS output frame (with default output displacement),0.0,deg/s²,OxTS output frame longitudinal (forward) IMU angular acceleration,, 33 | Yy,double,deg/s2,Angular acceleration,Angular acceleration Yv,OxTS vehicle frame,OxTS output frame (with default output displacement),0.0,deg/s²,OxTS output frame lateral (right) IMU angular acceleration,, 34 | Yz,double,deg/s2,Angular acceleration,Angular acceleration Zv,OxTS vehicle frame,OxTS output frame (with default output displacement),0.0,deg/s²,OxTS output frame vertical (down) IMU angular acceleration,, 35 | Yf,double,deg/s2,Angular acceleration,Angular acceleration forward,OxTS horizontal frame,OxTS level frame,0.0,deg/s²,OxTS horizontal frame longitudinal (forward) IMU angular acceleration,, 36 | Yl,double,deg/s2,Angular acceleration,Angular acceleration lateral,OxTS horizontal frame,OxTS level frame,0.0,deg/s²,OxTS horizontal frame lateral (right) IMU angular acceleration,, 37 | Yd,double,deg/s2,Angular acceleration,Angular acceleration down,OxTS horizontal frame,OxTS level frame,0.0,deg/s²,OxTS horizontal frame vertical (down) IMU angular acceleration,, 38 | FiltYx,double,deg/s2,Angular acceleration,Angular acceleration filtered Xv,OxTS vehicle frame,OxTS output frame (with default output displacement),0.0,deg/s²,OxTS output frame longitudinal (forward) filtered IMU angular acceleration,, 39 | FiltYy,double,deg/s2,Angular acceleration,Angular acceleration filtered Yv,OxTS vehicle frame,OxTS output frame (with default output displacement),0.0,deg/s²,OxTS output frame lateral (right) filtered IMU angular acceleration,, 40 | FiltYz,double,deg/s2,Angular acceleration,Angular acceleration filtered Zv,OxTS vehicle frame,OxTS output frame (with default output displacement),0.0,deg/s²,OxTS output frame vertical (down) filtered IMU angular acceleration,, 41 | FiltYf,double,deg/s2,Angular acceleration,Angular acceleration filtered forward,OxTS horizontal frame,OxTS level frame,0.0,deg/s²,OxTS horizontal frame longitudinal (forward) filtered IMU angular acceleration,, 42 | FiltYl,double,deg/s2,Angular acceleration,Angular acceleration filtered lateral,OxTS horizontal frame,OxTS level frame,0.0,deg/s²,OxTS horizontal frame lateral (right) filtered IMU angular acceleration,, 43 | FiltYd,double,deg/s2,Angular acceleration,Angular acceleration filtered down,OxTS horizontal frame,OxTS level frame,0.0,deg/s²,OxTS horizontal frame vertical (down) filtered IMU angular acceleration,, 44 | IsoYnX,double,deg/s2,Angular acceleration,ISO e.f.s. roll acceleration,ISO 8855 earth-fixed system,,0.0,deg/s²,ISO 8855 earth-fixed system roll (east angular) acceleration,, 45 | IsoYnY,double,deg/s2,Angular acceleration,ISO e.f.s. pitch acceleration,ISO 8855 earth-fixed system,,0.0,deg/s²,ISO 8855 earth-fixed system pitch (north angular) acceleration,, 46 | IsoYnZ,double,deg/s2,Angular acceleration,ISO e.f.s. yaw acceleration,ISO 8855 earth-fixed system,,0.0,deg/s²,ISO 8855 earth-fixed system yaw (vertical angular) acceleration,, 47 | IsoYhX,double,deg/s2,Angular acceleration,ISO i.s. roll acceleration,ISO 8855 intermediate system,,0.0,deg/s²,ISO 8855 intermediate system roll (longitudinal angular) acceleration,, 48 | IsoYhY,double,deg/s2,Angular acceleration,ISO i.s. pitch acceleration,ISO 8855 intermediate system,,0.0,deg/s²,ISO 8855 intermediate system pitch (lateral angular) acceleration,, 49 | IsoYhZ,double,deg/s2,Angular acceleration,ISO i.s. yaw acceleration,ISO 8855 intermediate system,,0.0,deg/s²,ISO 8855 intermediate system yaw (vertical angular) acceleration,, 50 | IsoYoX,double,deg/s2,Angular acceleration,ISO v.s. roll acceleration,ISO 8855 vehicle system,,0.0,deg/s²,ISO 8855 vehicle system roll (longitudinal angular) acceleration,, 51 | IsoYoY,double,deg/s2,Angular acceleration,ISO v.s. pitch acceleration,ISO 8855 vehicle system,,0.0,deg/s²,ISO 8855 vehicle system pitch (lateral angular) acceleration,, 52 | IsoYoZ,double,deg/s2,Angular acceleration,ISO v.s. yaw acceleration,ISO 8855 vehicle system,,0.0,deg/s²,ISO 8855 vehicle system yaw (vertical angular) acceleration,, 53 | FiltIsoYnX,double,deg/s2,Angular acceleration,ISO e.f.s. roll filtered acceleration,ISO 8855 earth-fixed system,,0.0,deg/s²,ISO 8855 earth-fixed system roll (east angular) filtered acceleration,, 54 | FiltIsoYnY,double,deg/s2,Angular acceleration,ISO e.f.s. pitch filtered acceleration,ISO 8855 earth-fixed system,,0.0,deg/s²,ISO 8855 earth-fixed system pitch (north angular) filtered acceleration,, 55 | FiltIsoYnZ,double,deg/s2,Angular acceleration,ISO e.f.s. yaw filtered acceleration,ISO 8855 earth-fixed system,,0.0,deg/s²,ISO 8855 earth-fixed system yaw (vertical angular) filtered acceleration,, 56 | FiltIsoYhX,double,deg/s2,Angular acceleration,ISO i.s. roll filtered acceleration,ISO 8855 intermediate system,,0.0,deg/s²,ISO 8855 intermediate system roll (longitudinal angular) filtered acceleration,, 57 | FiltIsoYhY,double,deg/s2,Angular acceleration,ISO i.s. pitch filtered acceleration,ISO 8855 intermediate system,,0.0,deg/s²,ISO 8855 intermediate system pitch (lateral angular) filtered acceleration,, 58 | FiltIsoYhZ,double,deg/s2,Angular acceleration,ISO i.s. yaw filtered acceleration,ISO 8855 intermediate system,,0.0,deg/s²,ISO 8855 intermediate system yaw (vertical angular) filtered acceleration,, 59 | FiltIsoYoX,double,deg/s2,Angular acceleration,ISO v.s. roll filtered acceleration,ISO 8855 vehicle system,,0.0,deg/s²,ISO 8855 vehicle system roll (longitudinal angular) filtered acceleration,, 60 | FiltIsoYoY,double,deg/s2,Angular acceleration,ISO v.s. pitch filtered acceleration,ISO 8855 vehicle system,,0.0,deg/s²,ISO 8855 vehicle system pitch (lateral angular) filtered acceleration,, 61 | FiltIsoYoZ,double,deg/s2,Angular acceleration,ISO v.s. yaw filtered acceleration,ISO 8855 vehicle system,,0.0,deg/s²,ISO 8855 vehicle system yaw (vertical angular) filtered acceleration,, 62 | Wx,double,deg/s,Angular rate,Angular rate Xv,OxTS vehicle frame,OxTS output frame (with default output displacement),0.00,deg/s,OxTS output frame longitudinal (forward) IMU angular rate,,X-Drehrate 63 | Wy,double,deg/s,Angular rate,Angular rate Yv,OxTS vehicle frame,OxTS output frame (with default output displacement),0.00,deg/s,OxTS output frame lateral (right) IMU angular rate,,Y-Drehrate 64 | Wz,double,deg/s,Angular rate,Angular rate Zv,OxTS vehicle frame,OxTS output frame (with default output displacement),0.00,deg/s,OxTS output frame vertical (down) IMU angular rate,,Z-Drehrate 65 | Wf,double,deg/s,Angular rate,Angular rate forward,OxTS horizontal frame,OxTS level frame,0.00,deg/s,OxTS horizontal frame longitudinal (forward) IMU angular rate,,Forward Angular Rate 66 | Wl,double,deg/s,Angular rate,Angular rate lateral,OxTS horizontal frame,OxTS level frame,0.00,deg/s,OxTS horizontal frame lateral (right) IMU angular rate,,Drehrate um Vorwärtsachse 67 | Wd,double,deg/s,Angular rate,Angular rate down,OxTS horizontal frame,OxTS level frame,0.00,deg/s,OxTS horizontal frame vertical (down) IMU angular rate,,Drehrate um Querachse 68 | IsoWnX,double,deg/s,Angular rate,ISO e.f.s. roll velocity,ISO 8855 earth-fixed system,,0.00,deg/s,ISO 8855 earth-fixed system roll (east angular) velocity,, 69 | IsoWnY,double,deg/s,Angular rate,ISO e.f.s. pitch velocity,ISO 8855 earth-fixed system,,0.00,deg/s,ISO 8855 earth-fixed system pitch (north angular) velocity,, 70 | IsoWnZ,double,deg/s,Angular rate,ISO e.f.s. yaw velocity,ISO 8855 earth-fixed system,,0.00,deg/s,ISO 8855 earth-fixed system yaw (vertical angular) velocity,, 71 | IsoWhX,double,deg/s,Angular rate,ISO i.s. roll velocity,ISO 8855 intermediate system,,0.00,deg/s,ISO 8855 intermediate system roll (longitudinal angular) velocity,, 72 | IsoWhY,double,deg/s,Angular rate,ISO i.s. pitch velocity,ISO 8855 intermediate system,,0.00,deg/s,ISO 8855 intermediate system pitch (lateral angular) velocity,, 73 | IsoWhZ,double,deg/s,Angular rate,ISO i.s. yaw velocity,ISO 8855 intermediate system,,0.00,deg/s,ISO 8855 intermediate system yaw (vertical angular) velocity,, 74 | IsoWoX,double,deg/s,Angular rate,ISO v.s. roll velocity,ISO 8855 vehicle system,,0.00,deg/s,ISO 8855 vehicle system roll (longitudinal angular) velocity,, 75 | IsoWoY,double,deg/s,Angular rate,ISO v.s. pitch velocity,ISO 8855 vehicle system,,0.00,deg/s,ISO 8855 vehicle system pitch (lateral angular) velocity,, 76 | IsoWoZ,double,deg/s,Angular rate,ISO v.s. yaw velocity,ISO 8855 vehicle system,,0.00,deg/s,ISO 8855 vehicle system yaw (vertical angular) velocity,, 77 | HeadingAcc,double,deg,Orientation,Heading accuracy,,,0.000,deg,Heading Accuracy,, 78 | PitchAcc,double,deg,Orientation,Pitch accuracy,,,0.000,deg,Pitch Accuracy,, 79 | RollAcc,double,deg,Orientation,Roll accuracy,,,0.000,deg,Roll Accuracy,, 80 | Track,double,deg,Orientation,Track angle,,,0.000,deg,,, 81 | TrackAcc,double,deg,Orientation,Track angle accuracy,,,0.000,deg,,, 82 | Slip,double,deg,Orientation,Slip angle,,,0.000,deg,,,Schwimmwinkel 83 | SlipAcc,double,deg,Orientation,Slip angle accuracy,,,0.000,deg,,, 84 | IsoYaw,double,deg,Orientation,ISO yaw angle,,,0.000,deg,ISO 8855 yaw angle,, 85 | IsoPitch,double,deg,Orientation,ISO pitch angle,,,0.000,deg,ISO 8855 pitch angle,, 86 | IsoRoll,double,deg,Orientation,ISO roll angle,,,0.000,deg,ISO 8855 roll angle,, 87 | Surf2OutHeading,double,deg,Orientation,Heading to surface,,,0.00,deg,,, 88 | Surf2OutPitch,double,deg,Orientation,Pitch to surface,,,0.00,deg,,, 89 | Surf2OutRoll,double,deg,Orientation,Roll to surface,,,0.00,deg,,, 90 | Lat,double,deg,Position,Latitude,,,0.00000000,deg,Latitude,,Breitengrad 91 | Lon,double,deg,Position,Longitude,,,0.00000000,deg,Longitude,,Längengrad 92 | Alt,double,m,Position,Altitude,,,0.000,m,Altitude,,Höhe 93 | NorthAcc,double,m,Position,Position accuracy north,,,0.000,m,North Position Accuracy,, 94 | EastAcc,double,m,Position,Position accuracy east,,,0.000,m,East Position Accuracy,, 95 | AltAcc,double,m,Position,Position accuracy down,,,0.000,m,Down Position Accuracy,, 96 | Dist2d,double,m,Position,Distance horizontal,,,0.000,m,Distance travelled in horizontal directions,,Distanz 97 | Dist3d,double,m,Position,Distance 3D,,,0.000,m,Distance travelled in all directions,, 98 | GpsPosMode,int,,GPS Status,GPS position mode,,,~GpsXModeName (#),,Position mode of the GPS receiver being used for position,,GPS Positions Modus 99 | GpsVelMode,int,,GPS Status,GPS velocity mode,,,~GpsXModeName (#),,Velocity mode of the GPS receiver being used for velocity,,GPS Geschwindigkeits Modus 100 | GpsAttMode,int,,GPS Status,GPS dual antenna attitude mode,,,~GpsXModeName (#),,Attitude (dual-antenna) mode of the GPS receivers,,GPS Lage Modus (Doppel Antenne) 101 | GpsNumObs,int,,GPS Status,Number of GPS satellites used,,,#,,Number of GPS satellites tracked by the Primary GPS receiver,,Anzahl der GPS Satelliten 102 | GpsDiffAge,double,s,GPS Status,Differential GPS age,,,0.0,s,Age of the current differential corrections,, 103 | "Time ",double,s,Time,Time in seconds from start of GPS time,,,,,Seconds from GPS time zero (0h 1980-01-06). [s],, 104 | "TimeWeekCount ",uint32_t,week,Time,GPS time format week counter,,,,,GPS time format week counter. [week],, 105 | "TimeWeekSecond ",double,s,Time,GPS time format seconds into week,,,,,GPS time format seconds into week. [s], , 106 | "TimeUtcOffset ",int,s,Time,Offset between Coordinated Universal Time (UTC) and GPS time,,,,,Offset between Coordinated Universal Time (UTC) and GPS time. [s],, 107 | TrigTime,double,s,Time,Time of last trigger falling edge,,,,,Time of last trigger falling edge. [s],, 108 | Trig2Time,double,s,Time,Time of last trigger rising edge,,,,,Time of last trigger rising edge. [s],, 109 | -------------------------------------------------------------------------------- /example/NcomToCsv.c: -------------------------------------------------------------------------------- 1 | //============================================================================================================ 2 | //! 3 | //! \file main.c 4 | //! 5 | //! \brief Program for converting NCom files to text. Also demonstrates how to use the C NCom libraries. 6 | //! 7 | //! 8 | //! Last edited by: HH 161005 9 | //! 10 | //============================================================================================================ 11 | 12 | #define MAIN_DEV_ID "161005" //!< Development identification. 13 | #define MPS2KMPH (3.6) //!< m/s to km/h conversion constant 14 | 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | #include "NComRxC.h" 25 | 26 | 27 | //============================================================================================================ 28 | // Prototypes for some helper functions. 29 | 30 | static void report(const NComRxC *nrx); 31 | static void print(FILE *fp, const NComRxC *nrx); 32 | 33 | 34 | //============================================================================================================ 35 | //! \brief Function where the program starts execution. 36 | //! 37 | //! Program for converting NCom files to text. 38 | //! 39 | //! \return Exit status. 40 | 41 | int main( 42 | int argc, //!< Number of arguments supplied to the program. 43 | const char *argv[] //!< Array of arguments supplied to the program. 44 | ) 45 | { 46 | setlocale(LC_CTYPE, ""); //Allows printing non-ASCII characters 47 | 48 | FILE *fpin = NULL; // input file 49 | FILE *fpout = NULL; // output file 50 | FILE *fptrig = NULL; // optional trigger file 51 | 52 | int c; // char from input file 53 | NComRxC *nrx; // NComRxC object 54 | 55 | // Output the header and the Development ID 56 | printf("NcomToCsv: Converts NCom file data to text. (ID: " MAIN_DEV_ID ")\n"); 57 | 58 | // Check the command line for 2 or 3 user parameters 59 | if(argc !=3 && argc != 4) 60 | { 61 | fprintf(stderr, "Usage: NcomToCsv []\n"); 62 | exit(EXIT_FAILURE); 63 | } 64 | 65 | // Open the input file 66 | fpin = fopen(argv[1], "rb"); 67 | if(fpin == NULL) 68 | { 69 | fprintf(stderr, "Error: Could not open input file '%s'.\n", argv[1]); 70 | exit(EXIT_FAILURE); 71 | } 72 | 73 | // Open the output file 74 | fpout = fopen(argv[2], "wt"); 75 | if(fpout == NULL) 76 | { 77 | fprintf(stderr, "Error: Could not open output file '%s'.\n", argv[2]); 78 | if(fpin != NULL) fclose(fpin); 79 | exit(EXIT_FAILURE); 80 | } 81 | 82 | // Open the (optional) output trigger text file 83 | if(argc >= 4) 84 | { 85 | fptrig = fopen(argv[3], "wt"); 86 | if(fptrig == NULL) 87 | { 88 | fprintf(stderr, "Error: Could not open output trigger file '%s'.\n", argv[3]); 89 | if(fpin != NULL) fclose(fpin); 90 | if(fpout != NULL) fclose(fpout); 91 | exit(EXIT_FAILURE); 92 | } 93 | } 94 | 95 | // Create NCom decoder and check 96 | nrx = NComCreateNComRxC(); 97 | if(nrx == NULL) 98 | { 99 | fprintf(stderr, "Error: Unable to create NCom decoder.\n"); 100 | if(fpin != NULL) fclose(fpin); 101 | if(fpout != NULL) fclose(fpout); 102 | if(fptrig != NULL) fclose(fptrig); 103 | exit(EXIT_FAILURE); 104 | } 105 | 106 | // Read all of the input file and convert to text 107 | while((c = fgetc(fpin)) != EOF) 108 | { 109 | // Decode the data 110 | if(NComNewChar(nrx, (unsigned char) c) == COM_NEW_UPDATE) 111 | { 112 | // For regular updates then output to main output file, otherwise, 113 | // for falling edge input triggers then output to trigger file. 114 | switch(nrx->mOutputPacketType) 115 | { 116 | case OUTPUT_PACKET_REGULAR : print(fpout, nrx); break; 117 | case OUTPUT_PACKET_IN1DOWN : print(fptrig, nrx); break; 118 | default : break; 119 | } 120 | } 121 | 122 | // Report some statistics every 4096 chars processed 123 | if( (NComNumChars(nrx) & UINT32_C(0xFFF)) == 0) report(nrx); 124 | } 125 | 126 | // Report final statistics 127 | report(nrx); 128 | printf("\n"); 129 | 130 | // Clean up 131 | if(fpin != NULL) fclose(fpin); 132 | if(fpout != NULL) fclose(fpout); 133 | if(fptrig != NULL) fclose(fptrig); 134 | NComDestroyNComRxC(nrx); 135 | 136 | return EXIT_SUCCESS; 137 | } 138 | 139 | 140 | //============================================================================================================ 141 | //! \brief Simple decoding progress report. 142 | 143 | static void report(const NComRxC *nrx) 144 | { 145 | assert(nrx); 146 | 147 | printf("\rChars Read %" PRIu64 ", Packets Read %" PRIu64 ", Chars Skipped %" PRIu64, 148 | NComNumChars(nrx), NComNumPackets(nrx), NComSkippedChars(nrx)); 149 | 150 | fflush(stdout); 151 | } 152 | 153 | 154 | //============================================================================================================ 155 | //! \brief Used to write some of the NCom data to a file pointer. 156 | //! 157 | //! There are only a few examples here of how to use the data values. 158 | 159 | static void print(FILE *fp, const NComRxC *nrx) 160 | { 161 | static int HeaderWritten = 0; 162 | assert(fp); 163 | assert(nrx); 164 | 165 | // Add in the headers to the file 166 | if (HeaderWritten == 0) 167 | { 168 | #if __linux__ 169 | fprintf(fp," Time()," 170 | #else 171 | fwprintf(fp, L" Time()," 172 | #endif 173 | " Date," 174 | " Local Time," 175 | " Latitude(deg)," 176 | " Longitude(deg)," 177 | " Altitude(m)," 178 | " Distance horizontal(m)," 179 | " Velocity north(m/s)," 180 | " Velocity east(m/s)," 181 | " Velocity down(m/s)," 182 | " Velocity up(m/s)," 183 | " Velocity forward(m/s)," 184 | " Velocity lateral(m/s)," 185 | " ISO e.f.s. east velocity(m/s)," 186 | " ISO e.f.s. north velocity(m/s)," 187 | " ISO e.f.s. vertical velocity(m/s)," 188 | " ISO i.s. longitudinal velocity(m/s)," 189 | " ISO i.s. lateral velocity(m/s)," 190 | " ISO i.s. vertical velocity(m/s)," 191 | " ISO v.s. longitudinal velocity(m/s)," 192 | " ISO v.s. lateral velocity(m/s)," 193 | " ISO v.s. vertical velocity(m/s)," 194 | " Speed horizontal(m/s)," 195 | " Acceleration Xv(m/s²)," 196 | " Acceleration Yv(m/s²)," 197 | " Acceleration Zv(m/s²)," 198 | " Acceleration forward(m/s²)," 199 | " Acceleration lateral(m/s²)," 200 | " Acceleration down(m/s²)," 201 | " ISO e.f.s. east acceleration(m/s²)," 202 | " ISO e.f.s. north acceleration(m/s²)," 203 | " ISO e.f.s. vertical acceleration(m/s²)," 204 | " ISO i.s. longitudinal acceleration(m/s²)," 205 | " ISO i.s. lateral acceleration(m/s²)," 206 | " ISO i.s. vertical acceleration(m/s²)," 207 | " ISO v.s. longitudinal acceleration(m/s²)," 208 | " ISO v.s. lateral acceleration(m/s²)," 209 | " ISO v.s. vertical acceleration(m/s²)," 210 | " Heading(deg)," 211 | " Pitch(deg)," 212 | " Roll(deg)," 213 | " ISO yaw angle(deg)," 214 | " ISO pitch angle(deg)," 215 | " ISO roll angle(deg)," 216 | " Angular rate Xv(deg/s)," 217 | " Angular rate Yv(deg/s)," 218 | " Angular rate Zv(deg/s)," 219 | " Angular rate forward(deg/s)," 220 | " Angular rate lateral(deg/s)," 221 | " Angular rate down(deg/s)," 222 | " ISO e.f.s. roll velocity(deg/s)," 223 | " ISO e.f.s. pitch velocity(deg/s)," 224 | " ISO e.f.s. yaw velocity(deg/s)," 225 | " ISO i.s. roll velocity(deg/s)," 226 | " ISO i.s. pitch velocity(deg/s)," 227 | " ISO i.s. yaw velocity(deg/s)," 228 | " ISO v.s. roll velocity(deg/s)," 229 | " ISO v.s. pitch velocity(deg/s)," 230 | " ISO v.s. yaw velocity(deg/s)," 231 | " Angular acceleration Xv(deg/s²)," 232 | " Angular acceleration Yv(deg/s²)," 233 | " Angular acceleration Zv(deg/s²)," 234 | " Angular acceleration forward(deg/s²)," 235 | " Angular acceleration lateral(deg/s²)," 236 | " Angular acceleration down(deg/s²)," 237 | " ISO e.f.s. roll acceleration(deg/s²)," 238 | " ISO e.f.s. pitch acceleration(deg/s²)," 239 | " ISO e.f.s. yaw acceleration(deg/s²)," 240 | " ISO i.s. roll acceleration(deg/s²)," 241 | " ISO i.s. pitch acceleration(deg/s²)," 242 | " ISO i.s. yaw acceleration(deg/s²)," 243 | " ISO v.s. roll acceleration(deg/s²)," 244 | " ISO v.s. pitch acceleration(deg/s²)," 245 | " ISO v.s. yaw acceleration(deg/s²)," 246 | // " Acceleration filtered Xv(m/s²)," 247 | // " Acceleration filtered Yv(m/s²)," 248 | // " Acceleration filtered Zv(m/s²)," 249 | // " Acceleration filtered forward(m/s²)," 250 | // " Acceleration filtered lateral(m/s²)," 251 | // " Acceleration filtered down(m/s²)," 252 | // " ISO e.f.s. east filtered acceleration(m/s²)," 253 | // " ISO e.f.s. north filtered acceleration(m/s²)," 254 | // " ISO e.f.s. vertical filtered acceleration(m/s²)," 255 | // " ISO i.s. longitudinal filtered acceleration(m/s²)," 256 | // " ISO i.s. lateral filtered acceleration(m/s²)," 257 | // " ISO i.s. vertical filtered acceleration(m/s²)," 258 | // " ISO v.s. longitudinal filtered acceleration(m/s²)," 259 | // " ISO v.s. lateral filtered acceleration(m/s²)," 260 | // " ISO v.s. vertical filtered acceleration(m/s²)," 261 | // " Angular acceleration filtered Xv(deg/s²)," 262 | // " Angular acceleration filtered Yv(deg/s²)," 263 | // " Angular acceleration filtered Zv(deg/s²)," 264 | // " Angular acceleration filtered forward(deg/s²)," 265 | // " Angular acceleration filtered lateral(deg/s²)," 266 | // " Angular acceleration filtered down(deg/s²)," 267 | // " ISO e.f.s. roll filtered acceleration(deg/s²)," 268 | // " ISO e.f.s. pitch filtered acceleration(deg/s²)," 269 | // " ISO e.f.s. yaw filtered acceleration(deg/s²)," 270 | // " ISO i.s. roll filtered acceleration(deg/s²)," 271 | // " ISO i.s. pitch filtered acceleration(deg/s²)," 272 | // " ISO i.s. yaw filtered acceleration(deg/s²)," 273 | // " ISO v.s. roll filtered acceleration(deg/s²)," 274 | // " ISO v.s. pitch filtered acceleration(deg/s²)," 275 | // " ISO v.s. yaw filtered acceleration(deg/s²)," 276 | 277 | ); 278 | fprintf(fp, "\n"); 279 | HeaderWritten = 1; 280 | } 281 | 282 | // Print the time - GPS time, local date and time zone. 283 | if (nrx->mIsTimeValid) 284 | { 285 | double gps2machine, mMachineTime; 286 | time_t t1; 287 | struct tm *td; 288 | int ms; 289 | 290 | // Convert GPS seconds (from 1980-01-06 00:00:00) to machine seconds (from 1970-01-01 00:00:00). It is 291 | // very likely the machine will adjust for leap seconds, hence the correct GPS UTC difference is 292 | // applied. If the local machine time does not start from 1970-01-01 00:00:00 then the value of 293 | // gps2machine below needs to change. 294 | gps2machine = 315964800.0; 295 | 296 | if(nrx->mIsTimeUtcOffsetValid) 297 | { mMachineTime = nrx->mTime + gps2machine + nrx->mTimeUtcOffset; 298 | } else {mMachineTime = nrx->mTime + gps2machine - 17;} 299 | 300 | // Compute local time 301 | t1 = (time_t) floor(mMachineTime); 302 | td = localtime(&t1); 303 | ms = floor(0.5 + (mMachineTime - t1) * 1000.0); 304 | if(ms < 0) ms = 0; else if(ms > 999) ms = 999; 305 | 306 | // Print: GPS time, local date, time zone. 307 | fprintf(fp, "%10.3f,%04d-%02d-%02d,%02d:%02d:%02d.%03d,", 308 | nrx->mTime, 309 | 1900+td->tm_year, 1+td->tm_mon, td->tm_mday, td->tm_hour, td->tm_min, td->tm_sec, ms); 310 | } 311 | 312 | // Print the measurments listed in the header 313 | if (nrx->mIsTimeValid) 314 | { 315 | // Print the PosLat (deg) 316 | if(nrx->mIsLatValid) fprintf(fp, "%.8f", nrx->mLat); 317 | fprintf(fp, ","); 318 | 319 | // Print the PosLon (deg) 320 | if(nrx->mIsLonValid) fprintf(fp, "%.8f", nrx->mLon); 321 | fprintf(fp, ","); 322 | 323 | // Print the PosAlt (m) 324 | if(nrx->mIsAltValid) fprintf(fp, "%.3f",nrx->mAlt); 325 | fprintf(fp, ","); 326 | 327 | // Print the Distance (m) 328 | if(nrx->mIsDist2dValid) fprintf(fp, "%.3f",nrx->mDist2d); 329 | fprintf(fp, ","); 330 | 331 | // Print the VelNorth (km/h) 332 | if(nrx->mIsVnValid) fprintf(fp, "%.3f",nrx->mVn); 333 | fprintf(fp, ","); 334 | 335 | // Print the VelEast (km/h) 336 | if(nrx->mIsVeValid) fprintf(fp, "%.3f",nrx->mVe); 337 | fprintf(fp, ","); 338 | 339 | // Print the VelDown (km/h) 340 | if(nrx->mIsVdValid) fprintf(fp, "%.3f",nrx->mVd); 341 | fprintf(fp, ","); 342 | 343 | // Print the Velup (km/h) 344 | fprintf(fp, "-,"); 345 | 346 | // Print the VelForward (km/h) 347 | if(nrx->mIsVfValid) fprintf(fp, "%.3f",nrx->mVf); 348 | fprintf(fp, ","); 349 | 350 | // Print the VelLateral (km/h) 351 | if(nrx->mIsVlValid) fprintf(fp, "%.3f",nrx->mVl); 352 | fprintf(fp, ","); 353 | 354 | // Print the "ISO e.f.s. east velocity(m/s)," 355 | if(nrx->mIsIsoVnXValid) fprintf(fp, "%.2f",nrx->mIsoVnX); 356 | fprintf(fp, ","); 357 | 358 | // Print the "ISO e.f.s. north velocity(m/s)," 359 | if(nrx->mIsIsoVnYValid) fprintf(fp, "%.2f",nrx->mIsoVnY); 360 | fprintf(fp, ","); 361 | 362 | // Print the "ISO e.f.s. vertical velocity (m/s)" 363 | if(nrx->mIsIsoVnZValid) fprintf(fp, "%.2f",nrx->mIsoVnZ); 364 | fprintf(fp, ","); 365 | 366 | // Print the "ISO i.s. longitudinal velocity(m/s²)," 367 | if(nrx->mIsIsoVhXValid) fprintf(fp, "%.2f",nrx->mIsoVhX); 368 | fprintf(fp, ","); 369 | 370 | // Print the "ISO i.s. lateral velocity(m/s²)," 371 | if(nrx->mIsIsoVhYValid) fprintf(fp, "%.2f",nrx->mIsoVhY); 372 | fprintf(fp, ","); 373 | 374 | // Print the "ISO i.s. vertical velocity(m/s²)" 375 | if(nrx->mIsIsoVhZValid) fprintf(fp, "%.2f",nrx->mIsoVhZ); 376 | fprintf(fp, ","); 377 | 378 | // Print the "ISO v.s. longitudinal velocity(m/s²)," 379 | if(nrx->mIsIsoVoXValid) fprintf(fp, "%.2f",nrx->mIsoVoX); 380 | fprintf(fp, ","); 381 | 382 | // Print the "ISO v.s. lateral velocity(m/s²)," 383 | if(nrx->mIsIsoVoYValid) fprintf(fp, "%.2f",nrx->mIsoVoY); 384 | fprintf(fp, ","); 385 | 386 | // Print the "ISO v.s. vertical velocity(m/s²)" 387 | if(nrx->mIsIsoVoZValid) fprintf(fp, "%.2f",nrx->mIsoVoZ); 388 | fprintf(fp, ","); 389 | 390 | //Print the Speed2D (m/s) 391 | if(nrx->mIsSpeed2dValid) fprintf(fp, "%.2f", nrx->mSpeed2d); 392 | fprintf(fp, ","); 393 | 394 | // Print the AccelX (m/s²) 395 | if(nrx->mIsAxValid) fprintf(fp, "%.3f",nrx->mAx); 396 | fprintf(fp, ","); 397 | 398 | // Print the AccelY (m/s²) 399 | if(nrx->mIsAyValid) fprintf(fp, "%.3f",nrx->mAy); 400 | fprintf(fp, ","); 401 | 402 | // Print the AccelZ (m/s²) 403 | if(nrx->mIsAzValid) fprintf(fp, "%.3f",nrx->mAz); 404 | fprintf(fp, ","); 405 | 406 | // Print the AccelForward (m/s²) 407 | if(nrx->mIsAfValid) fprintf(fp, "%.3f",nrx->mAf); 408 | fprintf(fp, ","); 409 | 410 | // Print the AccelLateral (m/s²) 411 | if(nrx->mIsAlValid) fprintf(fp, "%.3f",nrx->mAl); 412 | fprintf(fp, ","); 413 | 414 | // Print the AccelDown (m/s²) 415 | if(nrx->mIsAdValid) fprintf(fp, "%.3f",nrx->mAd); 416 | fprintf(fp, ","); 417 | 418 | // Print the "ISO e.f.s. east acceleration(m/s²)," 419 | if(nrx->mIsIsoAnXValid) fprintf(fp, "%.2f",nrx->mIsoAnX); 420 | fprintf(fp, ","); 421 | 422 | // Print the "ISO e.f.s. north acceleration(m/s²)," 423 | if(nrx->mIsIsoAnYValid) fprintf(fp, "%.2f",nrx->mIsoAnY); 424 | fprintf(fp, ","); 425 | 426 | // Print the "ISO e.f.s. vertical acceleration(m/s²)" 427 | if(nrx->mIsIsoAnZValid) fprintf(fp, "%.2f",nrx->mIsoAnZ); 428 | fprintf(fp, ","); 429 | 430 | // Print the "ISO i.s. longitudinal acceleration(m/s²)," 431 | if(nrx->mIsIsoAhXValid) fprintf(fp, "%.2f",nrx->mIsoAhX); 432 | fprintf(fp, ","); 433 | 434 | // Print the "ISO i.s. lateral acceleration(m/s²)," 435 | if(nrx->mIsIsoAhYValid) fprintf(fp, "%.2f",nrx->mIsoAhY); 436 | fprintf(fp, ","); 437 | 438 | // Print the "ISO i.s. vertical acceleration(m/s²)" 439 | if(nrx->mIsIsoAhZValid) fprintf(fp, "%.2f",nrx->mIsoAhZ); 440 | fprintf(fp, ","); 441 | 442 | // Print the "ISO v.s. longitudinal acceleration(m/s²)," 443 | if(nrx->mIsIsoAoXValid) fprintf(fp, "%.2f",nrx->mIsoAoX); 444 | fprintf(fp, ","); 445 | 446 | // Print the "ISO v.s. lateral acceleration(m/s²)," 447 | if(nrx->mIsIsoAoYValid) fprintf(fp, "%.2f",nrx->mIsoAoY); 448 | fprintf(fp, ","); 449 | 450 | // Print the "ISO v.s. vertical acceleration(m/s²)" 451 | if(nrx->mIsIsoAoZValid) fprintf(fp, "%.2f",nrx->mIsoAoZ); 452 | fprintf(fp, ","); 453 | 454 | // Print the AngleHeading (deg) 455 | if(nrx->mIsHeadingValid) fprintf(fp, "%.3f",nrx->mHeading); 456 | fprintf(fp, ","); 457 | 458 | // Print the AnglePitch (deg) 459 | if(nrx->mIsPitchValid) fprintf(fp, "%.3f",nrx->mPitch); 460 | fprintf(fp, ","); 461 | 462 | // Print the AngleRoll (deg) 463 | if(nrx->mIsRollValid) fprintf(fp, "%.3f",nrx->mRoll); 464 | fprintf(fp, ","); 465 | 466 | // Print the ISO Yaw 467 | if(nrx->mIsIsoYawValid) fprintf(fp, "%.2f",nrx->mIsoYaw); 468 | fprintf(fp, ","); 469 | 470 | // Print the ISO Pitch 471 | if(nrx->mIsIsoPitchValid) fprintf(fp, "%.2f",nrx->mIsoPitch); 472 | fprintf(fp, ","); 473 | 474 | // Print the ISO Roll 475 | if(nrx->mIsIsoRollValid) fprintf(fp, "%.2f",nrx->mIsoRoll); 476 | fprintf(fp, ","); 477 | 478 | // // Print the AngleSlip (deg) 479 | // if(nrx->mIsSlipValid) fprintf(fp, "%.3f",nrx->mSlip); 480 | // fprintf(fp, ","); 481 | 482 | // // Print the AngleTrack (deg) edited for +ve measurments only 483 | // if(nrx->mIsTrackValid) 484 | // { 485 | // if(nrx->mTrack<0) fprintf(fp, "%.3f",360 + nrx->mTrack); else fprintf(fp, "%.3f",nrx->mTrack); 486 | // } 487 | // fprintf(fp, ","); 488 | 489 | // // Print the Curvature (1/m) 490 | // if(nrx->mIsCurvatureValid) fprintf(fp, "%.4f",nrx->mCurvature); 491 | // fprintf(fp, ","); 492 | 493 | // Print the AngleLocalYaw (deg) 494 | 495 | // Print the AngleRateX (deg/s) 496 | if(nrx->mIsWxValid) fprintf(fp, "%.3f",nrx->mWx); 497 | fprintf(fp, ","); 498 | 499 | // Print the AngleRateY (deg/s) 500 | if(nrx->mIsWyValid) fprintf(fp, "%.3f",nrx->mWy); 501 | fprintf(fp, ","); 502 | 503 | // Print the AngleRateZ (deg/s) 504 | if(nrx->mIsWzValid) fprintf(fp, "%.3f",nrx->mWz); 505 | fprintf(fp, ","); 506 | 507 | // Print the AngleRateForward (deg/s) 508 | if(nrx->mIsWfValid) fprintf(fp, "%.3f",nrx->mWf); 509 | fprintf(fp, ","); 510 | 511 | // Print the AngleRateLateral (deg/s) 512 | if(nrx->mIsWlValid) fprintf(fp, "%.3f",nrx->mWl); 513 | fprintf(fp, ","); 514 | 515 | // Print the AngleRateDown (deg/s) 516 | if(nrx->mIsWdValid) fprintf(fp, "%.3f",nrx->mWd); 517 | fprintf(fp, ","); 518 | 519 | //Print the "ISO e.f.s. roll velocity(deg/s)," 520 | if(nrx->mIsIsoWnXValid) fprintf(fp, "%.3f",nrx->mIsoWnX); 521 | fprintf(fp, ","); 522 | 523 | //Print the "ISO e.f.s. pitch velocity(deg/s)," 524 | if(nrx->mIsIsoWnYValid) fprintf(fp, "%.3f",nrx->mIsoWnY); 525 | fprintf(fp, ","); 526 | 527 | // Print the "ISO e.f.s. yaw velocity(deg/s)," 528 | if(nrx->mIsIsoWnZValid) fprintf(fp, "%.3f",nrx->mIsoWnZ); 529 | fprintf(fp, ","); 530 | 531 | //Print the "ISO i.s. roll velocity(deg/s)," 532 | if(nrx->mIsIsoWhXValid) fprintf(fp, "%.3f",nrx->mIsoWhX); 533 | fprintf(fp, ","); 534 | 535 | //Print "ISO i.s. pitch velocity(deg/s)," 536 | if(nrx->mIsIsoWhYValid) fprintf(fp, "%.3f",nrx->mIsoWhY); 537 | fprintf(fp, ","); 538 | 539 | //Print "ISO i.s. yaw velocity(deg/s)," 540 | if(nrx->mIsIsoWhZValid) fprintf(fp, "%.3f",nrx->mIsoWhZ); 541 | fprintf(fp, ","); 542 | 543 | //Print "ISO v.s. roll velocity(deg/s)," 544 | if(nrx->mIsIsoWoXValid) fprintf(fp, "%.3f",nrx->mIsoWoX); 545 | fprintf(fp, ","); 546 | 547 | //Print "ISO v.s. pitch velocity(deg/s)," 548 | if(nrx->mIsIsoWoYValid) fprintf(fp, "%.3f",nrx->mIsoWoY); 549 | fprintf(fp, ","); 550 | 551 | //Print "ISO v.s. yaw velocity(deg/s)," 552 | if(nrx->mIsIsoWoZValid) fprintf(fp, "%.3f",nrx->mIsoWoZ); 553 | fprintf(fp, ","); 554 | 555 | //Print "Angular acceleration Xv(deg/s²)," 556 | if(nrx->mIsYxValid) fprintf(fp, "%.3f",nrx->mYx); 557 | fprintf(fp, ","); 558 | 559 | //Print "Angular acceleration Yv(deg/s²)," 560 | if(nrx->mIsYyValid) fprintf(fp, "%.3f",nrx->mYy); 561 | fprintf(fp, ","); 562 | 563 | //Print "Angular acceleration Zv(deg/s²)," 564 | if(nrx->mIsYzValid) fprintf(fp, "%.3f",nrx->mYz); 565 | fprintf(fp, ","); 566 | 567 | //Print "Angular acceleration forward(deg/s²)," 568 | if(nrx->mIsYfValid) fprintf(fp, "%.3f",nrx->mYf); 569 | fprintf(fp, ","); 570 | 571 | //Print "Angular acceleration lateral(deg/s²)," 572 | if(nrx->mIsYlValid) fprintf(fp, "%.3f",nrx->mYl); 573 | fprintf(fp, ","); 574 | 575 | //Print "Angular acceleration down(deg/s²)," 576 | if(nrx->mIsYdValid) fprintf(fp, "%.3f",nrx->mYd); 577 | fprintf(fp, ","); 578 | 579 | //Print "ISO e.f.s. roll acceleration(deg/s²)," 580 | if(nrx->mIsIsoYnXValid) fprintf(fp, "%.3f",nrx->mIsoYnX); 581 | fprintf(fp, ","); 582 | 583 | //Print "ISO e.f.s. pitch acceleration(deg/s²)," 584 | if(nrx->mIsIsoYnYValid) fprintf(fp, "%.3f",nrx->mIsoYnY); 585 | fprintf(fp, ","); 586 | 587 | //Print "ISO e.f.s. yaw acceleration(deg/s²)," 588 | if(nrx->mIsIsoYnZValid) fprintf(fp, "%.3f",nrx->mIsoYnZ); 589 | fprintf(fp, ","); 590 | 591 | //Print "ISO i.s. roll acceleration(deg/s²)," 592 | if(nrx->mIsIsoYhXValid) fprintf(fp, "%.3f",nrx->mIsoYhX); 593 | fprintf(fp, ","); 594 | 595 | //Print "ISO i.s. pitch acceleration(deg/s²)," 596 | if(nrx->mIsIsoYhYValid) fprintf(fp, "%.3f",nrx->mIsoYhY); 597 | fprintf(fp, ","); 598 | 599 | //Print "ISO i.s. yaw acceleration(deg/s²)," 600 | if(nrx->mIsIsoYhZValid) fprintf(fp, "%.3f",nrx->mIsoYhZ); 601 | fprintf(fp, ","); 602 | 603 | //Print "ISO v.s. roll acceleration(deg/s²)," 604 | if(nrx->mIsIsoYoXValid) fprintf(fp, "%.3f",nrx->mIsoYoX); 605 | fprintf(fp, ","); 606 | 607 | //Print "ISO v.s. pitch acceleration(deg/s²)," 608 | if(nrx->mIsIsoYoYValid) fprintf(fp, "%.3f",nrx->mIsoYoY); 609 | fprintf(fp, ","); 610 | 611 | //Print "ISO v.s. yaw acceleration(deg/s²)," 612 | if(nrx->mIsIsoYoZValid) fprintf(fp, "%.3f",nrx->mIsoYoZ); 613 | fprintf(fp, ","); 614 | 615 | 616 | 617 | // // Print the filtered AccelX (m/s²) 618 | // if(nrx->mIsFiltAxValid) fprintf(fp, "%.3f",nrx->mFiltAx); 619 | // fprintf(fp, ","); 620 | // 621 | // // Print the filtered AccelY (m/s²) 622 | // if(nrx->mIsFiltAyValid) fprintf(fp, "%.3f",nrx->mFiltAy); 623 | // fprintf(fp, ","); 624 | // 625 | // // Print the filtered AccelZ (m/s²) 626 | // if(nrx->mIsFiltAzValid) fprintf(fp, "%.3f",nrx->mFiltAz); 627 | // fprintf(fp, ","); 628 | // 629 | // // Print the filtered AccelForward (m/s²) 630 | // if(nrx->mIsFiltAfValid) fprintf(fp, "%.3f",nrx->mFiltAf); 631 | // fprintf(fp, ","); 632 | // 633 | // // Print the filtered AccelLateral (m/s²) 634 | // if(nrx->mIsFiltAlValid) fprintf(fp, "%.3f",nrx->mFiltAl); 635 | // fprintf(fp, ","); 636 | // 637 | // // Print the filtered AccelDown (m/s²) 638 | // if(nrx->mIsFiltAdValid) fprintf(fp, "%.3f",nrx->mFiltAd); 639 | // fprintf(fp, ","); 640 | // 641 | // 642 | // 643 | // // Print the filtered AccelX (m/s²) 644 | // if(nrx->mIsFiltAxValid) fprintf(fp, "%.3f",nrx->mFiltAx); 645 | // fprintf(fp, ","); 646 | // 647 | // // Print the filtered AccelY (m/s²) 648 | // if(nrx->mIsFiltAyValid) fprintf(fp, "%.3f",nrx->mFiltAy); 649 | // fprintf(fp, ","); 650 | // 651 | // // Print the filtered AccelZ (m/s²) 652 | // if(nrx->mIsFiltAzValid) fprintf(fp, "%.3f",nrx->mFiltAz); 653 | // fprintf(fp, ","); 654 | // 655 | // // Print the filtered AccelForward (m/s²) 656 | // if(nrx->mIsFiltAfValid) fprintf(fp, "%.3f",nrx->mFiltAf); 657 | // fprintf(fp, ","); 658 | // 659 | // // Print the filtered AccelLateral (m/s²) 660 | // if(nrx->mIsFiltAlValid) fprintf(fp, "%.3f",nrx->mFiltAl); 661 | // fprintf(fp, ","); 662 | // 663 | // // Print the filtered AccelDown (m/s²) 664 | // if(nrx->mIsFiltAdValid) fprintf(fp, "%.3f",nrx->mFiltAd); 665 | // fprintf(fp, ","); 666 | // 667 | // 668 | // // " ISO e.f.s. east filtered acceleration(m/s²)," 669 | // if(nrx->mIsFiltIsoAnXValid) fprintf(fp, "%.3f",nrx->mFiltIsoAnX); 670 | // fprintf(fp, ","); 671 | // 672 | // // " ISO e.f.s. north filtered acceleration(m/s²)," 673 | // if(nrx->mIsFiltIsoAnYValid) fprintf(fp, "%.3f",nrx->mFiltIsoAnY); 674 | // fprintf(fp, ","); 675 | // 676 | // // " ISO e.f.s. vertical filtered acceleration(m/s²)," 677 | // if(nrx->mIsFiltIsoAnZValid) fprintf(fp, "%.3f",nrx->mFiltIsoAnZ); 678 | // fprintf(fp, ","); 679 | // 680 | // // " ISO i.s. longitudinal filtered acceleration(m/s²)," 681 | // if(nrx->mIsFiltIsoAhXValid) fprintf(fp, "%.3f",nrx->mFiltIsoAhX); 682 | // fprintf(fp, ","); 683 | // 684 | // // " ISO i.s. lateral filtered acceleration(m/s²)," 685 | // if(nrx->mIsFiltIsoAhYValid) fprintf(fp, "%.3f",nrx->mFiltIsoAhY); 686 | // fprintf(fp, ","); 687 | // 688 | // // " ISO i.s. vertical filtered acceleration(m/s²)," 689 | // if(nrx->mIsFiltIsoAhZValid) fprintf(fp, "%.3f",nrx->mFiltIsoAhZ); 690 | // fprintf(fp, ","); 691 | // 692 | // // " ISO v.s. longitudinal filtered acceleration(m/s²)," 693 | // if(nrx->mIsFiltIsoAoXValid) fprintf(fp, "%.3f",nrx->mFiltIsoAoX); 694 | // fprintf(fp, ","); 695 | // 696 | // // " ISO v.s. lateral filtered acceleration(m/s²)," 697 | // if(nrx->mIsFiltIsoAoYValid) fprintf(fp, "%.3f",nrx->mFiltIsoAoY); 698 | // fprintf(fp, ","); 699 | // 700 | // // " ISO v.s. vertical filtered acceleration(m/s²)," 701 | // if(nrx->mIsFiltIsoAoZValid) fprintf(fp, "%.3f",nrx->mFiltIsoAoZ); 702 | // fprintf(fp, ","); 703 | // 704 | // 705 | // 706 | // // Print the Filtered AngAccelX (deg/s²) 707 | // if(nrx->mIsFiltYxValid) fprintf(fp, "%.3f",nrx->mFiltYx); 708 | // fprintf(fp, ","); 709 | // 710 | // // Print the Filtered AngAccelY (deg/s²) 711 | // if(nrx->mIsFiltYyValid) fprintf(fp, "%.3f",nrx->mFiltYy); 712 | // fprintf(fp, ","); 713 | // 714 | // // Print the Filtered AngAccelZ (deg/s²) 715 | // if(nrx->mIsFiltYzValid) fprintf(fp, "%.3f",nrx->mFiltYz); 716 | // fprintf(fp, ","); 717 | // 718 | // // Print the Filtered AngAccelForward (deg/s²) 719 | // if(nrx->mIsFiltYfValid) fprintf(fp, "%.3f",nrx->mFiltYf); 720 | // fprintf(fp, ","); 721 | // 722 | // // Print the Filtered AngAccelLateral (deg/s²) 723 | // if(nrx->mIsFiltYlValid) fprintf(fp, "%.3f",nrx->mFiltYl); 724 | // fprintf(fp, ","); 725 | // 726 | // // Print the Filtered AngAccelDown (deg/s²) 727 | // if(nrx->mIsFiltYdValid) fprintf(fp, "%.3f",nrx->mFiltYd); 728 | // fprintf(fp, ","); 729 | // 730 | // 731 | // 732 | // 733 | // // " ISO e.f.s. roll filtered acceleration(deg/s²)," 734 | // if(nrx->mIsFiltIsoYnXValid) fprintf(fp, "%.3f",nrx->mFiltIsoYnX); 735 | // fprintf(fp, ","); 736 | // 737 | // // " ISO e.f.s. pitch filtered acceleration(deg/s²)," 738 | // if(nrx->mIsFiltIsoYnYValid) fprintf(fp, "%.3f",nrx->mFiltIsoYnY); 739 | // fprintf(fp, ","); 740 | // 741 | // // " ISO e.f.s. yaw filtered acceleration(deg/s²)," 742 | // if(nrx->mIsFiltIsoYnZValid) fprintf(fp, "%.3f",nrx->mFiltIsoYnZ); 743 | // fprintf(fp, ","); 744 | // 745 | // // " ISO i.s. roll filtered acceleration(deg/s²)," 746 | // if(nrx->mIsFiltIsoYhXValid) fprintf(fp, "%.3f",nrx->mFiltIsoYhX); 747 | // fprintf(fp, ","); 748 | // 749 | // // " ISO i.s. pitch filtered acceleration(deg/s²)," 750 | // if(nrx->mIsFiltIsoYhYValid) fprintf(fp, "%.3f",nrx->mFiltIsoYhY); 751 | // fprintf(fp, ","); 752 | // 753 | // // " ISO i.s. yaw filtered acceleration(deg/s²)," 754 | // if(nrx->mIsFiltIsoYhZValid) fprintf(fp, "%.3f",nrx->mFiltIsoYhZ); 755 | // fprintf(fp, ","); 756 | // 757 | // // " ISO v.s. roll filtered acceleration(deg/s²)," 758 | // if(nrx->mIsFiltIsoYoXValid) fprintf(fp, "%.3f",nrx->mFiltIsoYoX); 759 | // fprintf(fp, ","); 760 | // 761 | // // " ISO v.s. pitch filtered acceleration(deg/s²)," 762 | // if(nrx->mIsFiltIsoYoYValid) fprintf(fp, "%.3f",nrx->mFiltIsoYoY); 763 | // fprintf(fp, ","); 764 | // 765 | // // " ISO v.s. yaw filtered acceleration(deg/s²)," 766 | // if(nrx->mIsFiltIsoYoZValid) fprintf(fp, "%.3f",nrx->mFiltIsoYoZ); 767 | // fprintf(fp, ","); 768 | 769 | 770 | 771 | 772 | 773 | // // Print the PosLatStdev (m) 774 | // if(nrx->mIsNorthAccValid) fprintf(fp, "%.3f",nrx->mNorthAcc); 775 | // fprintf(fp, ","); 776 | // 777 | // // Print the PosLonStdev (m) 778 | // if(nrx->mIsEastAccValid) fprintf(fp, "%.3f",nrx->mEastAcc); 779 | // fprintf(fp, ","); 780 | 781 | // // Print the PosAltStdev (m) 782 | // if(nrx->mIsAltAccValid) fprintf(fp, "%.3f",nrx->mAltAcc); 783 | // fprintf(fp, ","); 784 | // 785 | // // Print the VelNorthStdev (km/h) 786 | // if(nrx->mIsVnAccValid) fprintf(fp, "%.3f",(nrx->mVnAcc)*MPS2KMPH); 787 | // fprintf(fp, ","); 788 | // 789 | // // Print the VelEastStdev (km/h) 790 | // if(nrx->mIsVeAccValid) fprintf(fp, "%.3f",(nrx->mVeAcc)*MPS2KMPH); 791 | // fprintf(fp, ","); 792 | // 793 | // // Print the VelDownStdev (km/h) 794 | // if(nrx->mIsVdAccValid) fprintf(fp, "%.3f",(nrx->mVdAcc)*MPS2KMPH); 795 | // fprintf(fp, ","); 796 | // 797 | // // Print the AngleHeadingStdev (deg) 798 | // if(nrx->mIsHeadingAccValid) fprintf(fp, "%.3f",nrx->mHeadingAcc); 799 | // fprintf(fp, ","); 800 | // 801 | // // Print the AnglePitchStdev (deg) 802 | // if(nrx->mIsPitchAccValid) fprintf(fp, "%.3f",nrx->mPitchAcc); 803 | // fprintf(fp, ","); 804 | // 805 | // // Print the AngleRollStdev (deg) 806 | // if(nrx->mIsRollAccValid) fprintf(fp, "%.3f",nrx->mRollAcc); 807 | // fprintf(fp, ","); 808 | // 809 | // // Print the GpsPosMode 810 | // if(nrx->mIsGpsPosModeValid) fprintf(fp, "%s",NComGetGpsPosModeString(nrx)); 811 | // fprintf(fp, ","); 812 | // 813 | // // Print the GpsVelMode 814 | // if(nrx->mIsGpsVelModeValid) fprintf(fp, "%s",NComGetGpsVelModeString(nrx)); 815 | // fprintf(fp, ","); 816 | // 817 | // // Print the GpsAttMode 818 | // if(nrx->mIsGpsAttModeValid) fprintf(fp, "%s",NComGetGpsAttModeString(nrx)); 819 | // fprintf(fp, ","); 820 | // 821 | // // Print the GpsNumSats 822 | // if(nrx->mIsGpsNumObsValid) fprintf(fp, "%i",nrx->mGpsNumObs); 823 | // fprintf(fp, ","); 824 | // 825 | // // Print the GpsDiffAge (s) 826 | // if(nrx->mIsGpsDiffAgeValid) fprintf(fp, "%.1f",nrx->mGpsDiffAge); 827 | // fprintf(fp, ","); 828 | 829 | fprintf(fp, "\n"); 830 | } 831 | } 832 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NCOMdecoder [![Build Status](https://travis-ci.com/OxfordTechnicalSolutions/NCOMdecoder.svg?branch=master)](https://travis-ci.com/OxfordTechnicalSolutions/NCOMdecoder) 2 | An NCOM decoder based in C for use with OxTS navigation systems, enabling users to decode the binary NCOM output. 3 | 4 | ## Repository folders 5 | 6 | ### nav 7 | This folder contains two library files `NcomRxC.h` and `NcomRxC.c`, which can be included in your project. 8 | 9 | ### example 10 | The folder contains a simple program that exports an NCOM file to a CSV file, using the library files in `nav`. The program opens a file stream (to read the file), and decodes the NCOM packets from this stream. 11 | 12 | ## Instructions to build and run example program 13 | 14 | *** 15 | NB: This has been tested on the following platforms: 16 | * Unix (MacOS, Xenial) 17 | * MINGW64 (Windows 10) 18 | 19 | _Please note there appears to be an issue running in Cygwin._ 20 | *** 21 | 22 | ``` 23 | # First clone this repository 24 | git clone https://github.com/OxfordTechnicalSolutions/NCOMdecoder.git 25 | cd NCOMdecoder 26 | 27 | # Change directory into example source code folder 28 | cd example 29 | 30 | # Run make, which includes library files in nav (specified in Makefile) 31 | make 32 | 33 | # Run executable, with example ncom data to create csv file 34 | # Usage: NcomToCsv [] 35 | 36 | ./NcomToCsv 171019_031603.ncom 171019_031603.csv 37 | 38 | ``` 39 | 40 | ## Measurements 41 | 42 | The following table lists all the measurements available in a standard NCOM packet. 43 | 44 | These can also be found in `measurements.csv` 45 | 46 | | Store name | Type | Units | Format | Full name | Coordinate Frame | Alternate Coordinate Frame Name | Description | 47 | |----------------------|----------|--------|-------------------|--------------------------------------------------------------|------------------------------|------------------------------------------------------|--------------------------------------------------------------------------------| 48 | | Ax | double | m/s² | 0 | Acceleration Xv | OxTS vehicle frame | OxTS output frame (with default output displacement) | OxTS output frame longitudinal (forward) IMU acceleration | 49 | | Ay | double | m/s² | 0 | Acceleration Yv | OxTS vehicle frame | OxTS output frame (with default output displacement) | OxTS output frame lateral (right) IMU acceleration | 50 | | Az | double | m/s² | 0 | Acceleration Zv | OxTS vehicle frame | OxTS output frame (with default output displacement) | OxTS output frame vertical (down) IMU acceleration | 51 | | Af | double | m/s² | 0 | Acceleration forward | OxTS horizontal frame | OxTS level frame | OxTS horizontal frame longitudinal (forward) IMU acceleration | 52 | | Al | double | m/s² | 0 | Acceleration lateral | OxTS horizontal frame | OxTS level frame | OxTS horizontal frame lateral (right) IMU acceleration | 53 | | Ad | double | m/s² | 0 | Acceleration down | OxTS horizontal frame | OxTS level frame | OxTS horizontal frame vertical (down) IMU acceleration | 54 | | FiltAx | double | m/s² | 0 | Acceleration filtered Xv | OxTS vehicle frame | OxTS output frame (with default output displacement) | OxTS output frame longitudinal (forward) filtered IMU acceleration | 55 | | FiltAy | double | m/s² | 0 | Acceleration filtered Yv | OxTS vehicle frame | OxTS output frame (with default output displacement) | OxTS output frame lateral (right) filtered IMU acceleration | 56 | | FiltAz | double | m/s² | 0 | Acceleration filtered Zv | OxTS vehicle frame | OxTS output frame (with default output displacement) | OxTS output frame vertical (down) filtered IMU acceleration | 57 | | FiltAf | double | m/s² | 0 | Acceleration filtered forward | OxTS horizontal frame | OxTS level frame | OxTS horizontal frame longitudinal (forward) filtered IMU acceleration | 58 | | FiltAl | double | m/s² | 0 | Acceleration filtered lateral | OxTS horizontal frame | OxTS level frame | OxTS horizontal frame lateral (right) filtered IMU acceleration | 59 | | FiltAd | double | m/s² | 0 | Acceleration filtered down | OxTS horizontal frame | OxTS level frame | OxTS horizontal frame vertical (down) filtered IMU acceleration | 60 | | IsoAnX | double | m/s² | 0 | ISO e.f.s. east acceleration | ISO 8855 earth-fixed system | | ISO 8855 earth-fixed system east acceleration | 61 | | IsoAnY | double | m/s² | 0 | ISO e.f.s. north acceleration | ISO 8855 earth-fixed system | | ISO 8855 earth-fixed system north acceleration | 62 | | IsoAnZ | double | m/s² | 0 | ISO e.f.s. vertical acceleration | ISO 8855 earth-fixed system | | ISO 8855 earth-fixed system vertical (up) acceleration | 63 | | IsoAhX | double | m/s² | 0 | ISO i.s. longitudinal acceleration | ISO 8855 intermediate system | | ISO 8855 intermediate system longitudinal (forward) acceleration | 64 | | IsoAhY | double | m/s² | 0 | ISO i.s. lateral acceleration | ISO 8855 intermediate system | | ISO 8855 intermediate system lateral (left) acceleration | 65 | | IsoAhZ | double | m/s² | 0 | ISO i.s. vertical acceleration | ISO 8855 intermediate system | | ISO 8855 intermediate system vertical (up) acceleration | 66 | | IsoAoX | double | m/s² | 0 | ISO v.s. longitudinal acceleration | ISO 8855 vehicle system | | ISO 8855 vehicle system longitudinal (forward) acceleration | 67 | | IsoAoY | double | m/s² | 0 | ISO v.s. lateral acceleration | ISO 8855 vehicle system | | ISO 8855 vehicle system lateral (left) acceleration | 68 | | IsoAoZ | double | m/s² | 0 | ISO v.s. vertical acceleration | ISO 8855 vehicle system | | ISO 8855 vehicle system vertical (up) acceleration | 69 | | FiltIsoAnX | double | m/s² | 0 | ISO e.f.s. east filtered acceleration | ISO 8855 earth-fixed system | | ISO 8855 earth-fixed system east filtered acceleration | 70 | | FiltIsoAnY | double | m/s² | 0 | ISO e.f.s. north filtered acceleration | ISO 8855 earth-fixed system | | ISO 8855 earth-fixed system north filtered acceleration | 71 | | FiltIsoAnZ | double | m/s² | 0 | ISO e.f.s. vertical filtered acceleration | ISO 8855 earth-fixed system | | ISO 8855 earth-fixed system vertical (up) filtered acceleration | 72 | | FiltIsoAhX | double | m/s² | 0 | ISO i.s. longitudinal filtered acceleration | ISO 8855 intermediate system | | ISO 8855 intermediate system longitudinal (forward) filtered acceleration | 73 | | FiltIsoAhY | double | m/s² | 0 | ISO i.s. lateral filtered acceleration | ISO 8855 intermediate system | | ISO 8855 intermediate system lateral (left) filtered acceleration | 74 | | FiltIsoAhZ | double | m/s² | 0 | ISO i.s. vertical filtered acceleration | ISO 8855 intermediate system | | ISO 8855 intermediate system vertical (up) filtered acceleration | 75 | | FiltIsoAoX | double | m/s² | 0 | ISO v.s. longitudinal filtered acceleration | ISO 8855 vehicle system | | ISO 8855 vehicle system longitudinal (forward) filtered acceleration | 76 | | FiltIsoAoY | double | m/s² | 0 | ISO v.s. lateral filtered acceleration | ISO 8855 vehicle system | | ISO 8855 vehicle system lateral (left) filtered acceleration | 77 | | FiltIsoAoZ | double | m/s² | 0 | ISO v.s. vertical filtered acceleration | ISO 8855 vehicle system | | ISO 8855 vehicle system vertical (up) filtered acceleration | 78 | | Yx | double | deg/s² | 0 | Angular acceleration Xv | OxTS vehicle frame | OxTS output frame (with default output displacement) | OxTS output frame longitudinal (forward) IMU angular acceleration | 79 | | Yy | double | deg/s² | 0 | Angular acceleration Yv | OxTS vehicle frame | OxTS output frame (with default output displacement) | OxTS output frame lateral (right) IMU angular acceleration | 80 | | Yz | double | deg/s² | 0 | Angular acceleration Zv | OxTS vehicle frame | OxTS output frame (with default output displacement) | OxTS output frame vertical (down) IMU angular acceleration | 81 | | Yf | double | deg/s² | 0 | Angular acceleration forward | OxTS horizontal frame | OxTS level frame | OxTS horizontal frame longitudinal (forward) IMU angular acceleration | 82 | | Yl | double | deg/s² | 0 | Angular acceleration lateral | OxTS horizontal frame | OxTS level frame | OxTS horizontal frame lateral (right) IMU angular acceleration | 83 | | Yd | double | deg/s² | 0 | Angular acceleration down | OxTS horizontal frame | OxTS level frame | OxTS horizontal frame vertical (down) IMU angular acceleration | 84 | | FiltYx | double | deg/s² | 0 | Angular acceleration filtered Xv | OxTS vehicle frame | OxTS output frame (with default output displacement) | OxTS output frame longitudinal (forward) filtered IMU angular acceleration | 85 | | FiltYy | double | deg/s² | 0 | Angular acceleration filtered Yv | OxTS vehicle frame | OxTS output frame (with default output displacement) | OxTS output frame lateral (right) filtered IMU angular acceleration | 86 | | FiltYz | double | deg/s² | 0 | Angular acceleration filtered Zv | OxTS vehicle frame | OxTS output frame (with default output displacement) | OxTS output frame vertical (down) filtered IMU angular acceleration | 87 | | FiltYf | double | deg/s² | 0 | Angular acceleration filtered forward | OxTS horizontal frame | OxTS level frame | OxTS horizontal frame longitudinal (forward) filtered IMU angular acceleration | 88 | | FiltYl | double | deg/s² | 0 | Angular acceleration filtered lateral | OxTS horizontal frame | OxTS level frame | OxTS horizontal frame lateral (right) filtered IMU angular acceleration | 89 | | FiltYd | double | deg/s² | 0 | Angular acceleration filtered down | OxTS horizontal frame | OxTS level frame | OxTS horizontal frame vertical (down) filtered IMU angular acceleration | 90 | | IsoYnX | double | deg/s² | 0 | ISO e.f.s. roll acceleration | ISO 8855 earth-fixed system | | ISO 8855 earth-fixed system roll (east angular) acceleration | 91 | | IsoYnY | double | deg/s² | 0 | ISO e.f.s. pitch acceleration | ISO 8855 earth-fixed system | | ISO 8855 earth-fixed system pitch (north angular) acceleration | 92 | | IsoYnZ | double | deg/s² | 0 | ISO e.f.s. yaw acceleration | ISO 8855 earth-fixed system | | ISO 8855 earth-fixed system yaw (vertical angular) acceleration | 93 | | IsoYhX | double | deg/s² | 0 | ISO i.s. roll acceleration | ISO 8855 intermediate system | | ISO 8855 intermediate system roll (longitudinal angular) acceleration | 94 | | IsoYhY | double | deg/s² | 0 | ISO i.s. pitch acceleration | ISO 8855 intermediate system | | ISO 8855 intermediate system pitch (lateral angular) acceleration | 95 | | IsoYhZ | double | deg/s² | 0 | ISO i.s. yaw acceleration | ISO 8855 intermediate system | | ISO 8855 intermediate system yaw (vertical angular) acceleration | 96 | | IsoYoX | double | deg/s² | 0 | ISO v.s. roll acceleration | ISO 8855 vehicle system | | ISO 8855 vehicle system roll (longitudinal angular) acceleration | 97 | | IsoYoY | double | deg/s² | 0 | ISO v.s. pitch acceleration | ISO 8855 vehicle system | | ISO 8855 vehicle system pitch (lateral angular) acceleration | 98 | | IsoYoZ | double | deg/s² | 0 | ISO v.s. yaw acceleration | ISO 8855 vehicle system | | ISO 8855 vehicle system yaw (vertical angular) acceleration | 99 | | FiltIsoYnX | double | deg/s² | 0 | ISO e.f.s. roll filtered acceleration | ISO 8855 earth-fixed system | | ISO 8855 earth-fixed system roll (east angular) filtered acceleration | 100 | | FiltIsoYnY | double | deg/s² | 0 | ISO e.f.s. pitch filtered acceleration | ISO 8855 earth-fixed system | | ISO 8855 earth-fixed system pitch (north angular) filtered acceleration | 101 | | FiltIsoYnZ | double | deg/s² | 0 | ISO e.f.s. yaw filtered acceleration | ISO 8855 earth-fixed system | | ISO 8855 earth-fixed system yaw (vertical angular) filtered acceleration | 102 | | FiltIsoYhX | double | deg/s² | 0 | ISO i.s. roll filtered acceleration | ISO 8855 intermediate system | | ISO 8855 intermediate system roll (longitudinal angular) filtered acceleration | 103 | | FiltIsoYhY | double | deg/s² | 0 | ISO i.s. pitch filtered acceleration | ISO 8855 intermediate system | | ISO 8855 intermediate system pitch (lateral angular) filtered acceleration | 104 | | FiltIsoYhZ | double | deg/s² | 0 | ISO i.s. yaw filtered acceleration | ISO 8855 intermediate system | | ISO 8855 intermediate system yaw (vertical angular) filtered acceleration | 105 | | FiltIsoYoX | double | deg/s² | 0 | ISO v.s. roll filtered acceleration | ISO 8855 vehicle system | | ISO 8855 vehicle system roll (longitudinal angular) filtered acceleration | 106 | | FiltIsoYoY | double | deg/s² | 0 | ISO v.s. pitch filtered acceleration | ISO 8855 vehicle system | | ISO 8855 vehicle system pitch (lateral angular) filtered acceleration | 107 | | FiltIsoYoZ | double | deg/s² | 0 | ISO v.s. yaw filtered acceleration | ISO 8855 vehicle system | | ISO 8855 vehicle system yaw (vertical angular) filtered acceleration | 108 | | Wx | double | deg/s | 0 | Angular rate Xv | OxTS vehicle frame | OxTS output frame (with default output displacement) | OxTS output frame longitudinal (forward) IMU angular rate | 109 | | Wy | double | deg/s | 0 | Angular rate Yv | OxTS vehicle frame | OxTS output frame (with default output displacement) | OxTS output frame lateral (right) IMU angular rate | 110 | | Wz | double | deg/s | 0 | Angular rate Zv | OxTS vehicle frame | OxTS output frame (with default output displacement) | OxTS output frame vertical (down) IMU angular rate | 111 | | Wf | double | deg/s | 0 | Angular rate forward | OxTS horizontal frame | OxTS level frame | OxTS horizontal frame longitudinal (forward) IMU angular rate | 112 | | Wl | double | deg/s | 0 | Angular rate lateral | OxTS horizontal frame | OxTS level frame | OxTS horizontal frame lateral (right) IMU angular rate | 113 | | Wd | double | deg/s | 0 | Angular rate down | OxTS horizontal frame | OxTS level frame | OxTS horizontal frame vertical (down) IMU angular rate | 114 | | IsoWnX | double | deg/s | 0 | ISO e.f.s. roll velocity | ISO 8855 earth-fixed system | | ISO 8855 earth-fixed system roll (east angular) velocity | 115 | | IsoWnY | double | deg/s | 0 | ISO e.f.s. pitch velocity | ISO 8855 earth-fixed system | | ISO 8855 earth-fixed system pitch (north angular) velocity | 116 | | IsoWnZ | double | deg/s | 0 | ISO e.f.s. yaw velocity | ISO 8855 earth-fixed system | | ISO 8855 earth-fixed system yaw (vertical angular) velocity | 117 | | IsoWhX | double | deg/s | 0 | ISO i.s. roll velocity | ISO 8855 intermediate system | | ISO 8855 intermediate system roll (longitudinal angular) velocity | 118 | | IsoWhY | double | deg/s | 0 | ISO i.s. pitch velocity | ISO 8855 intermediate system | | ISO 8855 intermediate system pitch (lateral angular) velocity | 119 | | IsoWhZ | double | deg/s | 0 | ISO i.s. yaw velocity | ISO 8855 intermediate system | | ISO 8855 intermediate system yaw (vertical angular) velocity | 120 | | IsoWoX | double | deg/s | 0 | ISO v.s. roll velocity | ISO 8855 vehicle system | | ISO 8855 vehicle system roll (longitudinal angular) velocity | 121 | | IsoWoY | double | deg/s | 0 | ISO v.s. pitch velocity | ISO 8855 vehicle system | | ISO 8855 vehicle system pitch (lateral angular) velocity | 122 | | IsoWoZ | double | deg/s | 0 | ISO v.s. yaw velocity | ISO 8855 vehicle system | | ISO 8855 vehicle system yaw (vertical angular) velocity | 123 | | HeadingAcc | double | deg | 0 | Heading accuracy | | | Heading Accuracy | 124 | | PitchAcc | double | deg | 0 | Pitch accuracy | | | Pitch Accuracy | 125 | | RollAcc | double | deg | 0 | Roll accuracy | | | Roll Accuracy | 126 | | Track | double | deg | 0 | Track angle | | | | 127 | | TrackAcc | double | deg | 0 | Track angle accuracy | | | | 128 | | Slip | double | deg | 0 | Slip angle | | | | 129 | | SlipAcc | double | deg | 0 | Slip angle accuracy | | | | 130 | | IsoYaw | double | deg | 0 | ISO yaw angle | | | ISO 8855 yaw angle | 131 | | IsoPitch | double | deg | 0 | ISO pitch angle | | | ISO 8855 pitch angle | 132 | | IsoRoll | double | deg | 0 | ISO roll angle | | | ISO 8855 roll angle | 133 | | Surf2OutHeading | double | deg | 0 | Heading to surface | | | | 134 | | Surf2OutPitch | double | deg | 0 | Pitch to surface | | | | 135 | | Surf2OutRoll | double | deg | 0 | Roll to surface | | | | 136 | | Lat | double | deg | 0 | Latitude | | | Latitude | 137 | | Lon | double | deg | 0 | Longitude | | | Longitude | 138 | | Alt | double | m | 0 | Altitude | | | Altitude | 139 | | NorthAcc | double | m | 0 | Position accuracy north | | | North Position Accuracy | 140 | | EastAcc | double | m | 0 | Position accuracy east | | | East Position Accuracy | 141 | | AltAcc | double | m | 0 | Position accuracy down | | | Down Position Accuracy | 142 | | Dist2d | double | m | 0 | Distance horizontal | | | Distance travelled in horizontal directions | 143 | | Dist3d | double | m | 0 | Distance 3D | | | Distance travelled in all directions | 144 | | GpsPosMode | int | | ~GpsXModeName (#) | GPS position mode | | | Position mode of the GPS receiver being used for position | 145 | | GpsVelMode | int | | ~GpsXModeName (#) | GPS velocity mode | | | Velocity mode of the GPS receiver being used for velocity | 146 | | GpsAttMode | int | | ~GpsXModeName (#) | GPS dual antenna attitude mode | | | Attitude (dual-antenna) mode of the GPS receivers | 147 | | GpsNumObs | int | | # | Number of GPS satellites used | | | Number of GPS satellites tracked by the Primary GPS receiver | 148 | | GpsDiffAge | double | s | 0 | Differential GPS age | | | Age of the current differential corrections | 149 | | "Time " | double | | | Time in seconds from start of GPS time | | | Seconds from GPS time zero (0h 1980-01-06). [s] | 150 | | "TimeWeekCount " | uint32_t | | | GPS time format week counter | | | GPS time format week counter. [week] | 151 | | "TimeWeekSecond " | double | | | GPS time format seconds into week | | | GPS time format seconds into week. [s] | 152 | | "TimeUtcOffset " | int | | | Offset between Coordinated Universal Time (UTC) and GPS time | | | Offset between Coordinated Universal Time (UTC) and GPS time. [s] | 153 | | TrigTime | double | | | Time of last trigger falling edge | | | Time of last trigger falling edge. [s] | 154 | | Trig2Time | double | | | Time of last trigger rising edge | | | Time of last trigger rising edge. [s] | 155 | 156 | *This table is generated from .README.csv using https://donatstudios.com/CsvToMarkdownTable* 157 | -------------------------------------------------------------------------------- /nav/NComRxC.h: -------------------------------------------------------------------------------- 1 | //============================================================================================================ 2 | //! 3 | //! The software is protected by copyright of Oxford Technical Solutions at oxts.com. 4 | //! © 2008 - 2017, Oxford Technical Solutions Ltd. 5 | //! Unauthorised use, copying or distribution is not permitted. 6 | //! 7 | //! Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 8 | //! associated documentation files (the "Software"), to deal in the Software without restriction, including 9 | //! without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | //! copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the 11 | //! following conditions: 12 | //! 13 | //! All copies or substantial portions of the software must reproduce the above copyright notices, this list 14 | //! of conditions and the following disclaimer in the software documentation and/or other materials provided 15 | //! with the distribution. 16 | //! 17 | //! The software is provided by the copyright holders "as is" without any warranty of any kind, express or 18 | //! implied, including, but not limited to, warranties of merchantability or fitness for a particular purpose. 19 | //! In no event shall the copyright holders be liable for any direct, indirect, incidental, special, 20 | //! exemplary, or consequential damages however caused and on any liability, whether in contract, strict 21 | //! liability, or tort (including negligence or otherwise) arising in any way out of the use of this software. 22 | //! 23 | //! 24 | //! \file NComRxC.h 25 | //! 26 | //! \brief NCom C decoder header. 27 | //! 28 | //============================================================================================================ 29 | 30 | 31 | #ifndef NCOMRXC_H 32 | #define NCOMRXC_H 33 | 34 | 35 | #define NCOMRXC_DEV_ID "130325" //!< Development Identification. 36 | 37 | 38 | //============================================================================================================ 39 | // Provide multiple compiler support for standard integer types for 8, 16, 32, and 64 bit quantities. 40 | // 41 | // Wish to use standard integer types for 8, 16, 32, and 64 bit quantities. Not all compilers support these 42 | // types. Our aim is to use (u)intN_t for low level byte conversions and counters, i.e. places where the size 43 | // of the type is very important. In more general code the regular types are used, where it is assumed that 44 | // {char, short, int, long long} <--> {8, 16, 32, 64} bit types for both 32 and 64 bit x86 systems. 45 | // 46 | // For x86 systems long can either be 32 or 64 bits so its (direct) use is avoided. The definitions below 47 | // should be modified according to compiler, but with preference to include cstdint for C++ or stdint.h for 48 | // C if provided. 49 | // 50 | // It seems that MSVC does not support the usage of 8 bit integers in printf. 51 | 52 | #ifndef __STDC_LIMIT_MACROS 53 | #define __STDC_LIMIT_MACROS 54 | #endif 55 | 56 | #ifndef __STDC_FORMAT_MACROS 57 | #define __STDC_FORMAT_MACROS 58 | #endif 59 | 60 | #ifndef __STDC_CONSTANT_MACROS 61 | #define __STDC_CONSTANT_MACROS 62 | #endif 63 | 64 | 65 | #if(_MSC_VER) 66 | #if(__cplusplus) 67 | #include 68 | #else 69 | #include 70 | #endif 71 | #if(_MSC_VER < 1300) 72 | typedef signed char int8_t; 73 | typedef signed short int16_t; 74 | typedef signed int int32_t; 75 | typedef signed __int64 int64_t; 76 | typedef unsigned char uint8_t; 77 | typedef unsigned short uint16_t; 78 | typedef unsigned int uint32_t; 79 | typedef unsigned __int64 uint64_t; 80 | #elif(_MSC_VER < 1600) 81 | typedef signed __int8 int8_t; //!< Standard signed integer basic type of 8 bits. 82 | typedef signed __int16 int16_t; //!< Standard signed integer basic type of 16 bits. 83 | typedef signed __int32 int32_t; //!< Standard signed integer basic type of 32 bits. 84 | typedef signed __int64 int64_t; //!< Standard signed integer basic type of 64 bits. 85 | typedef unsigned __int8 uint8_t; //!< Standard unsigned integer basic type of 8 bits. 86 | typedef unsigned __int16 uint16_t; //!< Standard unsigned integer basic type of 16 bits. 87 | typedef unsigned __int32 uint32_t; //!< Standard unsigned integer basic type of 32 bits. 88 | typedef unsigned __int64 uint64_t; //!< Standard unsigned integer basic type of 64 bits. 89 | #define INT8_MIN ((int8_t) _I8_MIN) //!< Limit macro for the most negative value of the standard signed integer type of 8 bits. 90 | #define INT16_MIN ((int16_t) _I16_MIN) //!< Limit macro for the most negative value of the standard signed integer type of 16 bits. 91 | #define INT32_MIN ((int32_t) _I32_MIN) //!< Limit macro for the most negative value of the standard signed integer type of 32 bits. 92 | #define INT64_MIN ((int64_t) _I64_MIN) //!< Limit macro for the most negative value of the standard signed integer type of 64 bits. 93 | #define INT8_MAX (_I8_MAX) //!< Limit macro for the most positive value of the standard signed integer type of 8 bits. 94 | #define INT16_MAX (_I16_MAX) //!< Limit macro for the most positive value of the standard signed integer type of 16 bits. 95 | #define INT32_MAX (_I32_MAX) //!< Limit macro for the most positive value of the standard signed integer type of 32 bits. 96 | #define INT64_MAX (_I64_MAX) //!< Limit macro for the most positive value of the standard signed integer type of 64 bits. 97 | #define UINT8_MAX (_UI8_MAX) //!< Limit macro for the most positive value of the standard unsigned integer type of 8 bits. 98 | #define UINT16_MAX (_UI16_MAX) //!< Limit macro for the most positive value of the standard unsigned integer type of 16 bits. 99 | #define UINT32_MAX (_UI32_MAX) //!< Limit macro for the most positive value of the standard unsigned integer type of 32 bits. 100 | #define UINT64_MAX (_UI64_MAX) //!< Limit macro for the most positive value of the standard unsigned integer type of 64 bits. 101 | #define INT8_C(val) val##i8 //!< Literal constant macro for the standard signed integer type of 8 bits. 102 | #define INT16_C(val) val##i16 //!< Literal constant macro for the standard signed integer type of 16 bits. 103 | #define INT32_C(val) val##i32 //!< Literal constant macro for the standard signed integer type of 32 bits. 104 | #define INT64_C(val) val##i64 //!< Literal constant macro for the standard signed integer type of 64 bits. 105 | #define UINT8_C(val) val##ui8 //!< Literal constant macro for the standard unsigned integer type of 8 bits. 106 | #define UINT16_C(val) val##ui16 //!< Literal constant macro for the standard unsigned integer type of 16 bits. 107 | #define UINT32_C(val) val##ui32 //!< Literal constant macro for the standard unsigned integer type of 32 bits. 108 | #define UINT64_C(val) val##ui64 //!< Literal constant macro for the standard unsigned integer type of 64 bits. 109 | #else 110 | #if(__cplusplus) 111 | #include 112 | #else 113 | #include 114 | #endif 115 | #endif 116 | #define PRId8 #error //!< Printing signed decimal format macro for the standard signed integer type of 8 bits. 117 | #define PRId16 "hd" //!< Printing signed decimal format macro for the standard signed integer type of 16 bits. 118 | #define PRId32 "I32d" //!< Printing signed decimal format macro for the standard signed integer type of 32 bits. 119 | #define PRId64 "I64d" //!< Printing signed decimal format macro for the standard signed integer type of 64 bits. 120 | #define PRIu8 #error //!< Printing unsigned decimal format macro for the standard unsigned integer type of 8 bits. 121 | #define PRIu16 "hu" //!< Printing unsigned decimal format macro for the standard unsigned integer type of 16 bits. 122 | #define PRIu32 "I32u" //!< Printing unsigned decimal format macro for the standard unsigned integer type of 32 bits. 123 | #define PRIu64 "I64u" //!< Printing unsigned decimal format macro for the standard unsigned integer type of 64 bits. 124 | #else 125 | #if(__cplusplus && (__cplusplus > 199711L)) 126 | #include 127 | #include 128 | using std::int8_t; 129 | using std::int16_t; 130 | using std::int32_t; 131 | using std::int64_t; 132 | using std::uint8_t; 133 | using std::uint16_t; 134 | using std::uint32_t; 135 | using std::uint64_t; 136 | #else 137 | #include 138 | #include 139 | #endif 140 | #endif 141 | 142 | 143 | //============================================================================================================ 144 | //! \brief Matrix element definition allows an easy change from float to double numerical types. 145 | //! 146 | //! All matrix manipulation should be done with this type. 147 | 148 | typedef double MatElement; // Use double numbers for the matrix type. 149 | 150 | 151 | //============================================================================================================ 152 | //! \brief This type is used for all references to matrices. 153 | //! 154 | //! Using this type will prevent the user from needing to worry about matrix dimensions. 155 | 156 | typedef struct 157 | { 158 | MatElement *m; //!< Pointer to the matrix data. 159 | long r; //!< Rows of the matrix. 160 | long c; //!< Columns of the matrix. 161 | long tr; //!< Number of allocated rows. 162 | long tc; //!< Number of allocated columns. 163 | } Mat; 164 | 165 | 166 | //============================================================================================================ 167 | //! \brief Macro providing easy access to matrix elements. 168 | 169 | #define e(A,r,c) ((A)->m[c+(r)*(int)(A)->tc]) 170 | 171 | 172 | //============================================================================================================ 173 | //! \brief Definition of empty (unallocated) matrix. 174 | 175 | #define EMPTY_MAT {NULL, 0, 0, 0, 0} 176 | 177 | 178 | //============================================================================================================ 179 | // Useful constants 180 | 181 | #define MAX_INN_AGE (10000) 182 | #define DEV_ID_STRLEN (9) 183 | #define OS_SCRIPT_ID_STRLEN (11) 184 | #define BASE_STATION_ID_STRLEN (5) 185 | #define OMNISTAR_SERIAL_STRLEN (15) 186 | #define NCOMRX_BUFFER_SIZE (512) 187 | #define NCOM_PACKET_LENGTH (72) 188 | #define NCOM_STATUS_PACKET_LENGTH (8) 189 | 190 | 191 | //============================================================================================================ 192 | //! \brief Response types used by the decoder. 193 | //! 194 | //! In the future, we may wish to distinguish between invalid or incomplete incoming data. 195 | 196 | typedef enum 197 | { 198 | COM_NO_UPDATE, //!< No update (invalid or incomplete data). 199 | COM_NEW_UPDATE //!< Successful update. 200 | } ComResponse; 201 | 202 | 203 | //============================================================================================================ 204 | //! \brief Various output packet states. 205 | 206 | typedef enum 207 | { 208 | OUTPUT_PACKET_INVALID, //!< An invalid output packet (only on invalidation). 209 | OUTPUT_PACKET_EMPTY, //!< An empty output packet. 210 | OUTPUT_PACKET_REGULAR, //!< A regular output packet. 211 | OUTPUT_PACKET_STATUS, //!< Status only output packet. 212 | OUTPUT_PACKET_IN1DOWN, //!< Trigger output packet (falling edge of input). 213 | OUTPUT_PACKET_IN1UP, //!< Trigger2 output packet (rising edge of input). 214 | OUTPUT_PACKET_OUT1, //!< Digital output packet. 215 | OUTPUT_PACKET_INTERPOLATED, //!< Interpolated output packet. 216 | OUTPUT_PACKET_UNKNOWN //!< Unknown. 217 | } OutputPacketType; 218 | 219 | 220 | //============================================================================================================ 221 | //! \brief Navigation status. 222 | 223 | typedef enum 224 | { 225 | NAVIGATION_STATUS_NOTHING, 226 | NAVIGATION_STATUS_RAWIMU, 227 | NAVIGATION_STATUS_INIT, 228 | NAVIGATION_STATUS_LOCKING, 229 | NAVIGATION_STATUS_LOCKED, 230 | NAVIGATION_STATUS_UNLOCKED, 231 | NAVIGATION_STATUS_EXPIRED, 232 | NAVIGATION_STATUS_RESERVED_07, 233 | NAVIGATION_STATUS_RESERVED_08, 234 | NAVIGATION_STATUS_RESERVED_09, 235 | NAVIGATION_STATUS_STATUSONLY, 236 | NAVIGATION_STATUS_RESERVED_11, 237 | NAVIGATION_STATUS_RESERVED_12, 238 | NAVIGATION_STATUS_RESERVED_13, 239 | NAVIGATION_STATUS_RESERVED_14, 240 | NAVIGATION_STATUS_RESERVED_15, 241 | NAVIGATION_STATUS_RESERVED_16, 242 | NAVIGATION_STATUS_RESERVED_17, 243 | NAVIGATION_STATUS_RESERVED_18, 244 | NAVIGATION_STATUS_RESERVED_19, 245 | NAVIGATION_STATUS_TRIGINIT, 246 | NAVIGATION_STATUS_TRIGLOCKING, 247 | NAVIGATION_STATUS_TRIGLOCKED, 248 | NAVIGATION_STATUS_UNKNOWN 249 | } NavigationStatus; 250 | 251 | 252 | //============================================================================================================ 253 | //! \brief Definitions of IMU types. 254 | 255 | typedef enum 256 | { 257 | IMU_TYPE_SIIMUA = 0, 258 | IMU_TYPE_IMU200 = 1, 259 | IMU_TYPE_IMU2 = 2, 260 | IMU_TYPE_IMU2X = 3, 261 | IMU_TYPE_IMU3 = 4, 262 | IMU_TYPE_IMU3X = 5 263 | } IMUType; 264 | 265 | 266 | //============================================================================================================ 267 | //! \brief Definitions of GPS types. 268 | 269 | typedef enum 270 | { 271 | GPS_TYPE_BEELINE = 0, 272 | GPS_TYPE_OEM4 = 1, 273 | GPS_TYPE_NONE = 2, 274 | GPS_TYPE_OEMV = 3, 275 | GPS_TYPE_LEA4 = 4, 276 | GPS_TYPE_GENERIC = 5, 277 | GPS_TYPE_TRIMBLE5700 = 6, 278 | GPS_TYPE_AGGPS132 = 7, 279 | GPS_TYPE_GB500 = 8, 280 | GPS_TYPE_SAPPHIRE = 9, 281 | GPS_TYPE_LEA6 = 10, 282 | GPS_TYPE_BD920 = 11, 283 | GPS_TYPE_GX1200 = 12, 284 | GPS_TYPE_B110 = 13, 285 | GPS_TYPE_OEM6 = 14, 286 | GPS_TYPE_UNKNOWN = 15 287 | } GPSType; 288 | 289 | 290 | //============================================================================================================ 291 | //! \brief Indexes into the packet. 292 | 293 | typedef enum 294 | { 295 | PI_SYNC = 0, 296 | PI_TIME = 1, 297 | PI_ACCEL_X = 3, 298 | PI_ACCEL_Y = 6, 299 | PI_ACCEL_Z = 9, 300 | PI_ANG_RATE_X = 12, 301 | PI_ANG_RATE_Y = 15, 302 | PI_ANG_RATE_Z = 18, 303 | PI_INS_NAV_MODE = 21, 304 | PI_CHECKSUM_1 = 22, 305 | PI_POS_LAT = 23, 306 | PI_POS_LON = 31, 307 | PI_POS_ALT = 39, 308 | PI_VEL_N = 43, 309 | PI_VEL_E = 46, 310 | PI_VEL_D = 49, 311 | PI_ORIEN_H = 52, 312 | PI_ORIEN_P = 55, 313 | PI_ORIEN_R = 58, 314 | PI_CHECKSUM_2 = 61, 315 | PI_CHANNEL_INDEX = 62, 316 | PI_CHANNEL_STATUS = 63, 317 | PI_CHECKSUM_3 = 71 318 | } PacketIndexes; 319 | 320 | 321 | //============================================================================================================ 322 | //! \brief Indexes into the packet. 323 | //! 324 | //! Range is [start, stop). 325 | 326 | typedef enum 327 | { 328 | PCSR_CHECKSUM_1_START = 1, 329 | PCSR_CHECKSUM_1_STOP = 22, 330 | PCSR_CHECKSUM_2_START = 22, 331 | PCSR_CHECKSUM_2_STOP = 61, 332 | PCSR_CHECKSUM_3_START = 61, 333 | PCSR_CHECKSUM_3_STOP = 71 334 | } PacketChecksumRanges; 335 | 336 | 337 | 338 | //############################################################################################################ 339 | //## ## 340 | //## Filt2ndOrder ## 341 | //## ## 342 | //############################################################################################################ 343 | 344 | 345 | //============================================================================================================ 346 | //! \brief Internally used 2nd order filter. 347 | //! 348 | //! \note Used as a 'private' member of NComRxC. 349 | //! 350 | //! The intention is that the user need not be concerned with this structure. The role of this structure is 351 | //! to store the state variables required for the implementation of discrete 2nd order filter functionality. 352 | 353 | typedef struct 354 | { 355 | // Principal design parameters 356 | double mFreqSample; //!< Input sampling frequency. [Hz] 357 | double mFreqCutoff; //!< Filter cut-off frequency. [Hz] 358 | double mZeta; //!< Filter damping ratio. [-] 359 | 360 | // Derived filter coefficients 361 | double mA0, mA1, mA2; //!< Transfer function numerator coefficients. 362 | double mB0, mB1, mB2; //!< Transfer function denominator coefficients. 363 | 364 | // Internal state variables 365 | double mT0, mT1, mT2; //!< Time stamps of past inputs. 366 | double mX0, mX1, mX2; //!< Past inputs. 367 | double mU0, mU1, mU2; //!< Past outputs. 368 | int mOutputValid; //!< Is current output valid? 369 | 370 | } Filt2ndOrder; 371 | 372 | 373 | 374 | 375 | //############################################################################################################ 376 | //## ## 377 | //## NComRxCInternal ## 378 | //## ## 379 | //############################################################################################################ 380 | 381 | 382 | //============================================================================================================ 383 | //! \brief Internally used variables used in the decoding of a series NCom data packets. 384 | //! 385 | //! \note Used as a 'private' member of NComRxC. 386 | //! 387 | //! The intention is that the user need not be concerned with this structure. The role of this structure is 388 | //! to provide work space and retain state information over a sequence of incoming packets. Basic decoding 389 | //! statistics are also included in this structure since they are property of the decoder rather than the 390 | //! decoded data. These statistics may be accessed (indirectly) using the functions NComNumChars, 391 | //! NComSkippedChars and NComNumPackets defined for NComRxC. 392 | 393 | typedef struct 394 | { 395 | // Some hard coded options. 396 | int mHoldDistWhenSlow; //!< Distance hold when Slow. 397 | 398 | // Buffer items. 399 | unsigned char mCurPkt[NCOMRX_BUFFER_SIZE]; //!< Holds the incoming data. 400 | unsigned char *mCurStatus; //!< Direct acccess to the raw status byte data. 401 | int mCurChannel; //!< Direct acccess to the raw status channel number. 402 | int mCurLen; //!< Length of data in buffer. 403 | int mPktProcessed; //!< Flag indicates processed packet. 404 | 405 | // Byte counters. 406 | uint64_t mNumChars; //!< Number of bytes. 407 | uint64_t mSkippedChars; //!< Number of skipped bytes. 408 | uint64_t mNumPackets; //!< Number of packets. 409 | 410 | // For time (comes from Status and each cycle and needs combining). 411 | int32_t mMilliSecs; 412 | int32_t mMinutes; 413 | 414 | // To identify new triggers. 415 | unsigned char mTrigCount; 416 | unsigned char mTrig2Count; 417 | unsigned char mDigitalOutCount; 418 | 419 | // To compute distance travelled. 420 | int mPrevDist2dValid; 421 | double mPrevDist2dTime; 422 | double mPrevDist2dSpeed; 423 | double mPrevDist2d; 424 | int mPrevDist3dValid; 425 | double mPrevDist3dTime; 426 | double mPrevDist3dSpeed; 427 | double mPrevDist3d; 428 | 429 | // Storage for wheel speed information required to persist over several packets. 430 | int mIsOldWSpeedTimeValid; double mOldWSpeedTime; 431 | int mIsOldWSpeedCountValid; double mOldWSpeedCount; 432 | 433 | // Storage for reference frame information required to persist over several packets. 434 | int mIsAccurateRefLatValid; double mAccurateRefLat; 435 | int mIsAccurateRefLonValid; double mAccurateRefLon; 436 | int mIsAccurateRefAltValid; double mAccurateRefAlt; 437 | int mIsAccurateRefHeadingValid; double mAccurateRefHeading; 438 | 439 | // Work space for matrix calculations. 440 | Mat E; //!< Euler angles. 441 | Mat Ab; //!< Accels Body. 442 | Mat Al; //!< Accels level. 443 | Mat Wb; //!< Ang Rate Body. 444 | Mat Wl; //!< Ang Rate level. 445 | Mat Vn; //!< Velocities navigation-frame. 446 | Mat Vl; //!< Velocities level. 447 | Mat Yb; //!< Ang Accel Body. 448 | Mat Yl; //!< Ang Accel level. 449 | Mat C_on; //!< Rotation from output-frame to navigation-frame (all angles). 450 | int C_on_valid; //!< Rotation from output-frame to navigation-frame (all angles) is valid. 451 | Mat C_oh; //!< Rotation from output-frame to horizontal-frame (roll and pitch angles). 452 | int C_oh_valid; //!< Rotation from output-frame to horizontal-frame (roll and pitch angles) is valid. 453 | Mat C_hn; //!< Rotation from horizontal-frame to navigation-frame (heading angle). 454 | int C_hn_valid; //!< Rotation from horizontal-frame to navigation-frame (heading angle) is valid. 455 | Mat C_sn; //!< Rotation from surface-frame to navigation-frame. 456 | Mat C_os; //!< Rotation from output-frame to surface-frame. 457 | int mMatrixHold; //!< Prevents matrix calculations when 1 (say for slow computers), normally 0. 458 | 459 | // Filters for linear acceleration. 460 | int mIsLinAccFiltFixed; //!< Filter flags. 461 | int mHasLinAccFiltChanged; //!< Filter flags. 462 | int mIsLinAccFiltOff; //!< Filter flags. 463 | Filt2ndOrder FiltForAx; //!< Filter for X-axis linear acceleration. 464 | Filt2ndOrder FiltForAy; //!< Filter for Y-axis linear acceleration. 465 | Filt2ndOrder FiltForAz; //!< Filter for Z-axis linear acceleration. 466 | 467 | // State variables for differentiation of angular rate into angular acceleration. 468 | double mPrevWx; //!< Previous value of Wx. [deg/s] 469 | double mPrevWy; //!< Previous value of Wy. [deg/s] 470 | double mPrevWz; //!< Previous value of Wz. [deg/s] 471 | double mPrevWbTime; //!< Time corresponding to previous values of Wx, Wy and Wz. [s] 472 | 473 | // Filters for angular acceleration. 474 | int mIsAngAccFiltFixed; //!< Filter flags. 475 | int mHasAngAccFiltChanged; //!< Filter flags. 476 | int mIsAngAccFiltOff; //!< Filter flags. 477 | Filt2ndOrder FiltForYx; //!< Filter for X-axis angular acceleration. 478 | Filt2ndOrder FiltForYy; //!< Filter for Y-axis angular acceleration. 479 | Filt2ndOrder FiltForYz; //!< Filter for Z-axis angular acceleration. 480 | 481 | } NComRxCInternal; 482 | 483 | 484 | 485 | 486 | //############################################################################################################ 487 | //## ## 488 | //## NComRxCGps ## 489 | //## ## 490 | //############################################################################################################ 491 | 492 | 493 | //============================================================================================================ 494 | //! \brief Structure to hold GPS information 495 | //! 496 | //! \note Used as a 'public' member of NComRxC. 497 | //! 498 | //! Note there are validity flags for everything. Data members are set to 'zero' and invalid when created. 499 | //! 500 | //! This structure collects most of the information for the primary, secondary and external GPS receivers. 501 | 502 | typedef struct 503 | { 504 | // *** Code Generation Begin - NComRxCGps Structure *** 505 | 506 | //-------------------------------------------------------------------------------------------------------- 507 | // GPS Information 508 | 509 | // System information 510 | 511 | int mIsTypeValid; uint8_t mType; //!< Type of card fitted/connected. 512 | int mIsFormatValid; uint8_t mFormat; //!< Data format of card fitted/connected. 513 | 514 | int mIsRawRateValid; uint8_t mRawRate; //!< Raw update rate. 515 | int mIsPosRateValid; uint8_t mPosRate; //!< Position update rate. 516 | int mIsVelRateValid; uint8_t mVelRate; //!< Velocity update rate. 517 | 518 | int mIsAntStatusValid; uint8_t mAntStatus; //!< Antenna status. 519 | int mIsAntPowerValid; uint8_t mAntPower; //!< Antenna power. 520 | int mIsPosModeValid; uint8_t mPosMode; //!< Position mode. 521 | 522 | int mIsSerBaudValid; uint8_t mSerBaud; //!< Receiver baud. 523 | 524 | // Status 525 | 526 | int mIsNumSatsValid; int mNumSats; //!< Number of satellites tracked. 527 | 528 | int mIsCpuUsedValid; double mCpuUsed; //!< CPU usage. [%] 529 | int mIsCoreNoiseValid; double mCoreNoise; //!< Core noise. [%] 530 | int mIsCoreTempValid; double mCoreTemp; //!< Core temperature. [deg C] 531 | int mIsSupplyVoltValid; double mSupplyVolt; //!< Supply voltage. [V] 532 | 533 | // Received data statistics 534 | 535 | int mIsCharsValid; uint32_t mChars; //!< Number of bytes. 536 | int mIsCharsSkippedValid; uint32_t mCharsSkipped; //!< Number of invalid bytes. 537 | int mIsPktsValid; uint32_t mPkts; //!< Number of valid packets. 538 | int mIsOldPktsValid; uint32_t mOldPkts; //!< Number of out of date packets. 539 | 540 | // *** Code Generation End - NComRxCGps Structure *** 541 | 542 | } NComRxCGps; 543 | 544 | 545 | 546 | #ifdef __cplusplus 547 | extern "C" 548 | { 549 | #endif 550 | 551 | 552 | //============================================================================================================ 553 | // NComRxCGps access functions to return a textual description of values (such enumerated types) used in 554 | // NComRxCGps. For information about function NComGpsGetString see comments regarding defined 555 | // in the NComRxCGps structure. 556 | 557 | // *** Code Generation Begin - NComRxCGps External String Functions *** 558 | 559 | //------------------------------------------------------------------------------------------------------------ 560 | // GPS Information 561 | 562 | // System information 563 | 564 | extern const char *NComGpsGetTypeString(const NComRxCGps *Com); 565 | extern const char *NComGpsGetFormatString(const NComRxCGps *Com); 566 | 567 | extern const char *NComGpsGetRawRateString(const NComRxCGps *Com); 568 | extern const char *NComGpsGetPosRateString(const NComRxCGps *Com); 569 | extern const char *NComGpsGetVelRateString(const NComRxCGps *Com); 570 | 571 | extern const char *NComGpsGetAntStatusString(const NComRxCGps *Com); 572 | extern const char *NComGpsGetAntPowerString(const NComRxCGps *Com); 573 | extern const char *NComGpsGetPosModeString(const NComRxCGps *Com); 574 | 575 | extern const char *NComGpsGetSerBaudString(const NComRxCGps *Com); 576 | 577 | // *** Code Generation End - NComRxCGps External String Functions *** 578 | 579 | 580 | //============================================================================================================ 581 | // General function declarations. 582 | 583 | extern NComRxCGps *NComGpsCreate(); 584 | extern void NComGpsDestroy(NComRxCGps *Com); 585 | extern void NComGpsCopy(NComRxCGps *ComDestination, const NComRxCGps *ComSource); 586 | 587 | 588 | #ifdef __cplusplus 589 | } 590 | #endif 591 | 592 | 593 | 594 | 595 | //############################################################################################################ 596 | //## ## 597 | //## NComRxC ## 598 | //## ## 599 | //############################################################################################################ 600 | 601 | 602 | //============================================================================================================ 603 | //! \brief Structure to hold measurements and information that have been decoded from NCom data packet(s). 604 | //! 605 | //! Note there are validity flags for everything. Most data members are set to 'zero' and invalid when created. 606 | //! 607 | //! The data member "mInternal" should be assumed to be private as this contains decoder state and work space 608 | //! information. 609 | 610 | typedef struct 611 | { 612 | //-------------------------------------------------------------------------------------------------------- 613 | // Other structures. 614 | 615 | NComRxCGps *mGpsPrimary; //!< Primary internal GPS receiver. 616 | NComRxCGps *mGpsSecondary; //!< Secondary internal GPS receiver. 617 | NComRxCGps *mGpsExternal; //!< External GPS receiver. 618 | 619 | // *** Code Generation Begin - NComRxC Structure *** 620 | 621 | //-------------------------------------------------------------------------------------------------------- 622 | // General information 623 | 624 | // Status 625 | 626 | int mIsOutputPacketTypeValid; uint8_t mOutputPacketType; //!< Type of output packet from the decoder. 627 | int mIsInsNavModeValid; uint8_t mInsNavMode; //!< Navigation system mode. 628 | 629 | // System information 630 | 631 | int mIsSerialNumberValid; int mSerialNumber; //!< Unit serial number. 632 | int mIsDevIdValid; char mDevId[DEV_ID_STRLEN+1]; //!< Development ID. 633 | 634 | int mIsOsVersion1Valid; int mOsVersion1; //!< Operating system major version. 635 | int mIsOsVersion2Valid; int mOsVersion2; //!< Operating system minor version. 636 | int mIsOsVersion3Valid; int mOsVersion3; //!< Operating system revision version. 637 | int mIsOsScriptIdValid; char mOsScriptId[OS_SCRIPT_ID_STRLEN+1]; //!< Operating system boot up script ID. 638 | 639 | int mIsImuTypeValid; uint8_t mImuType; //!< Type of IMU fitted. 640 | int mIsCpuPcbTypeValid; uint8_t mCpuPcbType; //!< Type of CPU PCB fitted. 641 | int mIsInterPcbTypeValid; uint8_t mInterPcbType; //!< Type of interconnection PCB fitted. 642 | int mIsFrontPcbTypeValid; uint8_t mFrontPcbType; //!< Type of front panel PCB fitted. 643 | int mIsInterSwIdValid; uint8_t mInterSwId; //!< Software ID of interconnection PCB. 644 | int mIsHwConfigValid; uint8_t mHwConfig; //!< Reserved for testing. 645 | 646 | int mIsDiskSpaceValid; uint64_t mDiskSpace; //!< Remaining disk space. [B] 647 | int mIsFileSizeValid; uint64_t mFileSize; //!< Size of current raw data file. [B] 648 | int mIsUpTimeValid; uint32_t mUpTime; //!< Up time. [s] 649 | int mIsDualPortRamStatusValid; uint8_t mDualPortRamStatus; //!< Dual port RAM interface status. 650 | 651 | // IMU information 652 | 653 | int mIsUmacStatusValid; uint8_t mUmacStatus; //!< UMAC status. 654 | 655 | // Global Navigation Satellite System (GNSS) information 656 | 657 | int mIsGnssGpsEnabledValid; int mGnssGpsEnabled; //!< Global Positioning System (GPS) enabled. 658 | int mIsGnssGlonassEnabledValid; int mGnssGlonassEnabled; //!< GLObal NAvigation Satellite System (GLONASS) enabled. 659 | int mIsGnssGalileoEnabledValid; int mGnssGalileoEnabled; //!< Galileo enabled. 660 | int mIsGnssBeiDouEnabledValid; int mGnssBeiDouEnabled; //!< BeiDou enabled. 661 | 662 | int mIsPsrDiffEnabledValid; int mPsrDiffEnabled; //!< Pseudo-range differential. 663 | int mIsSBASEnabledValid; int mSBASEnabled; //!< Satellite Based Augmentation System (SBAS). 664 | int mIsOmniVBSEnabledValid; int mOmniVBSEnabled; //!< OmniSTAR Virtual Base Station (VBS). 665 | int mIsOmniHPEnabledValid; int mOmniHPEnabled; //!< OmniSTAR High Performance (HP). 666 | int mIsL1DiffEnabledValid; int mL1DiffEnabled; //!< L1 carrier-phase differential (RT20). 667 | int mIsL1L2DiffEnabledValid; int mL1L2DiffEnabled; //!< L1/L2 carrier-phase differential (RT2). 668 | 669 | int mIsRawRngEnabledValid; int mRawRngEnabled; //!< Raw pseudo-range output. 670 | int mIsRawDopEnabledValid; int mRawDopEnabled; //!< Raw Doppler output. 671 | int mIsRawL1EnabledValid; int mRawL1Enabled; //!< Raw L1 output. 672 | int mIsRawL2EnabledValid; int mRawL2Enabled; //!< Raw L2 output. 673 | int mIsRawL5EnabledValid; int mRawL5Enabled; //!< Raw L5 output. 674 | 675 | int mIsGpsPosModeValid; uint8_t mGpsPosMode; //!< Position mode. 676 | int mIsGpsVelModeValid; uint8_t mGpsVelMode; //!< Velocity mode. 677 | int mIsGpsAttModeValid; uint8_t mGpsAttMode; //!< Attitude mode. 678 | 679 | int mIsPDOPValid; double mPDOP; //!< Positional dilution of precision. [-] 680 | int mIsHDOPValid; double mHDOP; //!< Horizontal dilution of precision. [-] 681 | int mIsVDOPValid; double mVDOP; //!< Vertical dilution of precision. [-] 682 | 683 | int mIsGpsNumObsValid; int mGpsNumObs; //!< Number of satellites. 684 | int mIsUndulationValid; double mUndulation; //!< Difference between ellipsoidal altitude and geoidal altitude. [m] 685 | 686 | int mIsBaseStationIdValid; char mBaseStationId[BASE_STATION_ID_STRLEN+1]; //!< Differential base station ID. 687 | int mIsGpsDiffAgeValid; double mGpsDiffAge; //!< Differential corrections age to GPS. [s] 688 | 689 | // Heading computation status 690 | 691 | int mIsHeadQualityValid; uint8_t mHeadQuality; //!< Dual antenna Heading quality. 692 | int mIsHeadSearchTypeValid; uint8_t mHeadSearchType; //!< Dual antenna Heading search type. 693 | int mIsHeadSearchStatusValid; uint8_t mHeadSearchStatus; //!< Dual antenna Heading search status. 694 | int mIsHeadSearchReadyValid; uint8_t mHeadSearchReady; //!< Dual antenna Heading search ready. 695 | 696 | int mIsHeadSearchInitValid; int mHeadSearchInit; //!< Initial number of ambiguities in the heading search. 697 | int mIsHeadSearchNumValid; int mHeadSearchNum; //!< Remaining number of ambiguities in the heading search. 698 | int mIsHeadSearchTimeValid; int mHeadSearchTime; //!< Heading Search Duration. [s] 699 | int mIsHeadSearchConstrValid; int mHeadSearchConstr; //!< Number of constraints applied in the Heading Search. 700 | 701 | int mIsHeadSearchMasterValid; int mHeadSearchMaster; //!< Master Satellite PRN in the Heading Search. 702 | int mIsHeadSearchSlave1Valid; int mHeadSearchSlave1; //!< Slave 1 Satellite PRN in the Heading Search. 703 | int mIsHeadSearchSlave2Valid; int mHeadSearchSlave2; //!< Slave 2 Satellite PRN in the Heading Search. 704 | int mIsHeadSearchSlave3Valid; int mHeadSearchSlave3; //!< Slave 3 Satellite PRN in the Heading Search. 705 | 706 | // OmniSTAR information 707 | 708 | int mIsOmniStarSerialValid; char mOmniStarSerial[OMNISTAR_SERIAL_STRLEN+1]; //!< OmniSTAR serial string. 709 | int mIsOmniStarFreqValid; double mOmniStarFreq; //!< OmniSTAR frequency. [Hz] 710 | int mIsOmniStarSNRValid; double mOmniStarSNR; //!< OmniSTAR signal to noise ratio. [dB] 711 | int mIsOmniStarLockTimeValid; double mOmniStarLockTime; //!< OmniSTAR lock time. [s] 712 | 713 | int mIsOmniStatusVbsExpiredValid; int mOmniStatusVbsExpired; //!< Virtual Base Station status: Expired. 714 | int mIsOmniStatusVbsOutOfRegionValid; int mOmniStatusVbsOutOfRegion; //!< Virtual Base Station status: Out of region. 715 | int mIsOmniStatusVbsNoRemoteSitesValid; int mOmniStatusVbsNoRemoteSites; //!< Virtual Base Station status: No remote sites. 716 | 717 | int mIsOmniStatusHpExpiredValid; int mOmniStatusHpExpired; //!< High Performance status: Expired. 718 | int mIsOmniStatusHpOutOfRegionValid; int mOmniStatusHpOutOfRegion; //!< High Performance status: Out of region. 719 | int mIsOmniStatusHpNoRemoteSitesValid; int mOmniStatusHpNoRemoteSites; //!< High Performance status: No remote sites. 720 | int mIsOmniStatusHpNotConvergedValid; int mOmniStatusHpNotConverged; //!< High Performance status: Not converged. 721 | int mIsOmniStatusHpKeyInvalidValid; int mOmniStatusHpKeyInvalid; //!< High Performance status: Key is invalid. 722 | 723 | //-------------------------------------------------------------------------------------------------------- 724 | // General user options 725 | 726 | // General options 727 | 728 | int mIsOptionLevelValid; uint8_t mOptionLevel; //!< Vehicle level during initialisation 729 | int mIsOptionVibrationValid; uint8_t mOptionVibration; //!< Vibration level. 730 | int mIsOptionGpsAccValid; uint8_t mOptionGpsAcc; //!< GPS environment. 731 | int mIsOptionUdpValid; uint8_t mOptionUdp; //!< Packet format transmitted over Ethernet. 732 | int mIsOptionSer1Valid; uint8_t mOptionSer1; //!< Packet format transmitted over serial port 1. 733 | int mIsOptionSer2Valid; uint8_t mOptionSer2; //!< Packet format transmitted over serial port 2. 734 | int mIsOptionSer3Valid; uint8_t mOptionSer3; //!< Packet format transmitted over serial port 3. 735 | int mIsOptionHeadingValid; uint8_t mOptionHeading; //!< Dual antenna heading initialisation mode. 736 | 737 | int mIsOptionInitSpeedValid; int mIsOptionInitSpeedConfig; double mOptionInitSpeed; //!< Initialisation speed. [m s^(-1)] 738 | int mIsOptionTopSpeedValid; int mIsOptionTopSpeedConfig; double mOptionTopSpeed; //!< Maximum vehicle speed. [m s^(-1)] 739 | 740 | // Output baud rate settings 741 | 742 | int mIsOptionSer1BaudValid; uint8_t mOptionSer1Baud; //!< Serial port 1 baud. 743 | 744 | int mIsOptionSer2BaudValid; uint8_t mOptionSer2Baud; //!< Serial port 2 baud. 745 | 746 | int mIsOptionSer3BaudValid; uint8_t mOptionSer3Baud; //!< Serial port 3 baud. 747 | 748 | int mIsOptionCanBaudValid; uint8_t mOptionCanBaud; //!< Controller area network (CAN) bus baud rate. 749 | 750 | //-------------------------------------------------------------------------------------------------------- 751 | // General measurements 752 | 753 | // Timing 754 | 755 | int mIsTimeValid; double mTime; //!< Seconds from GPS time zero (0h 1980-01-06). [s] 756 | 757 | int mIsTimeWeekCountValid; uint32_t mTimeWeekCount; //!< GPS time format, week counter. [week] 758 | int mIsTimeWeekSecondValid; double mTimeWeekSecond; //!< GPS time format, seconds into week. [s] 759 | int mIsTimeUtcOffsetValid; int mTimeUtcOffset; //!< Offset between Coordinated Universal Time (UTC) and GPS time. [s] 760 | 761 | // Position 762 | 763 | int mIsLatValid; int mIsLatApprox; double mLat; //!< Latitude. [deg] 764 | int mIsLonValid; int mIsLonApprox; double mLon; //!< Longitude. [deg] 765 | int mIsAltValid; int mIsAltApprox; double mAlt; //!< Altitude. [m] 766 | 767 | int mIsNorthAccValid; double mNorthAcc; //!< North accuracy. [m] 768 | int mIsEastAccValid; double mEastAcc; //!< East accuracy. [m] 769 | int mIsAltAccValid; double mAltAcc; //!< Altitude accuracy. [m] 770 | 771 | // Distance 772 | 773 | int mIsDist2dValid; double mDist2d; //!< Distance travelled in horizontal directions. [m] 774 | int mIsDist3dValid; double mDist3d; //!< Distance travelled in all directions. [m] 775 | 776 | // Velocity 777 | 778 | int mIsVnValid; int mIsVnApprox; double mVn; //!< North velocity. [m s^(-1)] 779 | int mIsVeValid; int mIsVeApprox; double mVe; //!< East velocity. [m s^(-1)] 780 | int mIsVdValid; int mIsVdApprox; double mVd; //!< Down velocity. [m s^(-1)] 781 | 782 | int mIsVfValid; double mVf; //!< Forward velocity. [m s^(-1)] 783 | int mIsVlValid; double mVl; //!< Right velocity. [m s^(-1)] 784 | 785 | int mIsVnAccValid; double mVnAcc; //!< North velocity accuracy. [m s^(-1)] 786 | int mIsVeAccValid; double mVeAcc; //!< East velocity accuracy. [m s^(-1)] 787 | int mIsVdAccValid; double mVdAcc; //!< Down velocity accuracy. [m s^(-1)] 788 | 789 | int mIsIsoVnXValid; double mIsoVnX; //!< ISO earth-fixed system east velocity. [m s^(-1)] 790 | int mIsIsoVnYValid; double mIsoVnY; //!< ISO earth-fixed system north velocity. [m s^(-1)] 791 | int mIsIsoVnZValid; double mIsoVnZ; //!< ISO earth-fixed system vertical velocity. [m s^(-1)] 792 | 793 | int mIsIsoVhXValid; double mIsoVhX; //!< ISO intermediate system longitudinal velocity. [m s^(-1)] 794 | int mIsIsoVhYValid; double mIsoVhY; //!< ISO intermediate system lateral velocity. [m s^(-1)] 795 | int mIsIsoVhZValid; double mIsoVhZ; //!< ISO intermediate system vertical velocity. [m s^(-1)] 796 | 797 | int mIsIsoVoXValid; double mIsoVoX; //!< ISO vehicle system longitudinal velocity. [m s^(-1)] 798 | int mIsIsoVoYValid; double mIsoVoY; //!< ISO vehicle system lateral velocity. [m s^(-1)] 799 | int mIsIsoVoZValid; double mIsoVoZ; //!< ISO vehicle system vertical velocity. [m s^(-1)] 800 | 801 | // Speed 802 | 803 | int mIsSpeed2dValid; double mSpeed2d; //!< Speed in horizonal directions. [m s^(-1)] 804 | int mIsSpeed3dValid; double mSpeed3d; //!< Speed in all directions. [m s^(-1)] 805 | 806 | // Acceleration 807 | 808 | int mIsAxValid; double mAx; //!< IMU acceleration along the X axis. [m s^(-2)] 809 | int mIsAyValid; double mAy; //!< IMU acceleration along the Y axis. [m s^(-2)] 810 | int mIsAzValid; double mAz; //!< IMU acceleration along the Z axis. [m s^(-2)] 811 | 812 | int mIsAfValid; double mAf; //!< IMU forward acceleration. [m s^(-2)] 813 | int mIsAlValid; double mAl; //!< IMU right acceleration. [m s^(-2)] 814 | int mIsAdValid; double mAd; //!< IMU down acceleration. [m s^(-2)] 815 | 816 | int mIsIsoAnXValid; double mIsoAnX; //!< ISO earth-fixed system east acceleration. [m s^(-2)] 817 | int mIsIsoAnYValid; double mIsoAnY; //!< ISO earth-fixed system north acceleration. [m s^(-2)] 818 | int mIsIsoAnZValid; double mIsoAnZ; //!< ISO earth-fixed system vertical acceleration. [m s^(-2)] 819 | 820 | int mIsIsoAhXValid; double mIsoAhX; //!< ISO intermediate system longitudinal acceleration. [m s^(-2)] 821 | int mIsIsoAhYValid; double mIsoAhY; //!< ISO intermediate system lateral acceleration. [m s^(-2)] 822 | int mIsIsoAhZValid; double mIsoAhZ; //!< ISO intermediate system vertical acceleration. [m s^(-2)] 823 | 824 | int mIsIsoAoXValid; double mIsoAoX; //!< ISO vehicle system longitudinal acceleration. [m s^(-2)] 825 | int mIsIsoAoYValid; double mIsoAoY; //!< ISO vehicle system lateral acceleration. [m s^(-2)] 826 | int mIsIsoAoZValid; double mIsoAoZ; //!< ISO vehicle system vertical acceleration. [m s^(-2)] 827 | 828 | // Filtered acceleration 829 | 830 | int mIsFiltAxValid; double mFiltAx; //!< Filtered IMU acceleration along the X axis. [m s^(-2)] 831 | int mIsFiltAyValid; double mFiltAy; //!< Filtered IMU acceleration along the Y axis. [m s^(-2)] 832 | int mIsFiltAzValid; double mFiltAz; //!< Filtered IMU acceleration along the Z axis. [m s^(-2)] 833 | 834 | int mIsFiltAfValid; double mFiltAf; //!< Filtered IMU forward acceleration. [m s^(-2)] 835 | int mIsFiltAlValid; double mFiltAl; //!< Filtered IMU right acceleration. [m s^(-2)] 836 | int mIsFiltAdValid; double mFiltAd; //!< Filtered IMU down acceleration. [m s^(-2)] 837 | 838 | int mIsFiltIsoAnXValid; double mFiltIsoAnX; //!< ISO earth-fixed system east filtered acceleration. [m s^(-2)] 839 | int mIsFiltIsoAnYValid; double mFiltIsoAnY; //!< ISO earth-fixed system north filtered acceleration. [m s^(-2)] 840 | int mIsFiltIsoAnZValid; double mFiltIsoAnZ; //!< ISO earth-fixed system vertical filtered acceleration. [m s^(-2)] 841 | 842 | int mIsFiltIsoAhXValid; double mFiltIsoAhX; //!< ISO intermediate system longitudinal filtered acceleration. [m s^(-2)] 843 | int mIsFiltIsoAhYValid; double mFiltIsoAhY; //!< ISO intermediate system lateral filtered acceleration. [m s^(-2)] 844 | int mIsFiltIsoAhZValid; double mFiltIsoAhZ; //!< ISO intermediate system vertical filtered acceleration. [m s^(-2)] 845 | 846 | int mIsFiltIsoAoXValid; double mFiltIsoAoX; //!< ISO vehicle system longitudinal filtered acceleration. [m s^(-2)] 847 | int mIsFiltIsoAoYValid; double mFiltIsoAoY; //!< ISO vehicle system lateral filtered acceleration. [m s^(-2)] 848 | int mIsFiltIsoAoZValid; double mFiltIsoAoZ; //!< ISO vehicle system vertical filtered acceleration. [m s^(-2)] 849 | 850 | // Orientation 851 | 852 | int mIsHeadingValid; int mIsHeadingApprox; double mHeading; //!< Heading. [deg] 853 | int mIsPitchValid; int mIsPitchApprox; double mPitch; //!< Pitch. [deg] 854 | int mIsRollValid; int mIsRollApprox; double mRoll; //!< Roll. [deg] 855 | 856 | int mIsHeadingAccValid; double mHeadingAcc; //!< Heading accuracy. [deg] 857 | int mIsPitchAccValid; double mPitchAcc; //!< Pitch accuracy. [deg] 858 | int mIsRollAccValid; double mRollAcc; //!< Roll accuracy. [deg] 859 | 860 | int mIsIsoYawValid; double mIsoYaw; //!< ISO yaw angle. [deg] 861 | int mIsIsoPitchValid; double mIsoPitch; //!< ISO pitch angle. [deg] 862 | int mIsIsoRollValid; double mIsoRoll; //!< ISO roll angle. [deg] 863 | 864 | // Special 865 | 866 | int mIsTrackValid; double mTrack; //!< Track angle. [deg] 867 | 868 | int mIsSlipValid; double mSlip; //!< Slip angle. [deg] 869 | 870 | int mIsCurvatureValid; double mCurvature; //!< Curvature. [m^(-1)] 871 | 872 | // Angular rate 873 | 874 | int mIsWxValid; double mWx; //!< Angular rate about the X axis. [deg s^(-1)] 875 | int mIsWyValid; double mWy; //!< Angular rate about the Y axis. [deg s^(-1)] 876 | int mIsWzValid; double mWz; //!< Angular rate about the Z axis. [deg s^(-1)] 877 | 878 | int mIsWfValid; double mWf; //!< Angular rate about the forward axis. [deg s^(-1)] 879 | int mIsWlValid; double mWl; //!< Angular rate about the right axis. [deg s^(-1)] 880 | int mIsWdValid; double mWd; //!< Angular rate about the down axis. [deg s^(-1)] 881 | 882 | int mIsIsoWnXValid; double mIsoWnX; //!< ISO earth-fixed system roll velocity. [deg s^(-1)] 883 | int mIsIsoWnYValid; double mIsoWnY; //!< ISO earth-fixed system pitch velocity. [deg s^(-1)] 884 | int mIsIsoWnZValid; double mIsoWnZ; //!< ISO earth-fixed system yaw velocity. [deg s^(-1)] 885 | 886 | int mIsIsoWhXValid; double mIsoWhX; //!< ISO intermediate system roll velocity. [deg s^(-1)] 887 | int mIsIsoWhYValid; double mIsoWhY; //!< ISO intermediate system pitch velocity. [deg s^(-1)] 888 | int mIsIsoWhZValid; double mIsoWhZ; //!< ISO intermediate system yaw velocity. [deg s^(-1)] 889 | 890 | int mIsIsoWoXValid; double mIsoWoX; //!< ISO vehicle system roll velocity. [deg s^(-1)] 891 | int mIsIsoWoYValid; double mIsoWoY; //!< ISO vehicle system pitch velocity. [deg s^(-1)] 892 | int mIsIsoWoZValid; double mIsoWoZ; //!< ISO vehicle system yaw velocity. [deg s^(-1)] 893 | 894 | // Angular acceleration 895 | 896 | int mIsYxValid; double mYx; //!< Angular acceleration about the X axis. [deg s^(-2)] 897 | int mIsYyValid; double mYy; //!< Angular acceleration about the Y axis. [deg s^(-2)] 898 | int mIsYzValid; double mYz; //!< Angular acceleration about the Z axis. [deg s^(-2)] 899 | 900 | int mIsYfValid; double mYf; //!< Angular acceleration about the forward axis. [deg s^(-2)] 901 | int mIsYlValid; double mYl; //!< Angular acceleration about the right axis. [deg s^(-2)] 902 | int mIsYdValid; double mYd; //!< Angular acceleration about the down axis. [deg s^(-2)] 903 | 904 | int mIsIsoYnXValid; double mIsoYnX; //!< ISO earth-fixed system roll acceleration. [deg s^(-2)] 905 | int mIsIsoYnYValid; double mIsoYnY; //!< ISO earth-fixed system pitch acceleration. [deg s^(-2)] 906 | int mIsIsoYnZValid; double mIsoYnZ; //!< ISO earth-fixed system yaw acceleration. [deg s^(-2)] 907 | 908 | int mIsIsoYhXValid; double mIsoYhX; //!< ISO intermediate system roll acceleration. [deg s^(-2)] 909 | int mIsIsoYhYValid; double mIsoYhY; //!< ISO intermediate system pitch acceleration. [deg s^(-2)] 910 | int mIsIsoYhZValid; double mIsoYhZ; //!< ISO intermediate system yaw acceleration. [deg s^(-2)] 911 | 912 | int mIsIsoYoXValid; double mIsoYoX; //!< ISO vehicle system roll acceleration. [deg s^(-2)] 913 | int mIsIsoYoYValid; double mIsoYoY; //!< ISO vehicle system pitch acceleration. [deg s^(-2)] 914 | int mIsIsoYoZValid; double mIsoYoZ; //!< ISO vehicle system yaw acceleration. [deg s^(-2)] 915 | 916 | // Filtered angular acceleration 917 | 918 | int mIsFiltYxValid; double mFiltYx; //!< Filtered angular acceleration about the X axis. [deg s^(-2)] 919 | int mIsFiltYyValid; double mFiltYy; //!< Filtered angular acceleration about the Y axis. [deg s^(-2)] 920 | int mIsFiltYzValid; double mFiltYz; //!< Filtered angular acceleration about the Z axis. [deg s^(-2)] 921 | 922 | int mIsFiltYfValid; double mFiltYf; //!< Filtered angular acceleration about the forward axis. [deg s^(-2)] 923 | int mIsFiltYlValid; double mFiltYl; //!< Filtered angular acceleration about the right axis. [deg s^(-2)] 924 | int mIsFiltYdValid; double mFiltYd; //!< Filtered angular acceleration about the down axis. [deg s^(-2)] 925 | 926 | int mIsFiltIsoYnXValid; double mFiltIsoYnX; //!< ISO earth-fixed system filtered roll acceleration. [deg s^(-2)] 927 | int mIsFiltIsoYnYValid; double mFiltIsoYnY; //!< ISO earth-fixed system filtered pitch acceleration. [deg s^(-2)] 928 | int mIsFiltIsoYnZValid; double mFiltIsoYnZ; //!< ISO earth-fixed system filtered yaw acceleration. [deg s^(-2)] 929 | 930 | int mIsFiltIsoYhXValid; double mFiltIsoYhX; //!< ISO intermediate system filtered roll acceleration. [deg s^(-2)] 931 | int mIsFiltIsoYhYValid; double mFiltIsoYhY; //!< ISO intermediate system filtered pitch acceleration. [deg s^(-2)] 932 | int mIsFiltIsoYhZValid; double mFiltIsoYhZ; //!< ISO intermediate system filtered yaw acceleration. [deg s^(-2)] 933 | 934 | int mIsFiltIsoYoXValid; double mFiltIsoYoX; //!< ISO vehicle system filtered roll acceleration. [deg s^(-2)] 935 | int mIsFiltIsoYoYValid; double mFiltIsoYoY; //!< ISO vehicle system filtered pitch acceleration. [deg s^(-2)] 936 | int mIsFiltIsoYoZValid; double mFiltIsoYoZ; //!< ISO vehicle system filtered yaw acceleration. [deg s^(-2)] 937 | 938 | // Filter characteristics 939 | 940 | int mIsLinAccFiltFreqValid; double mLinAccFiltFreq; //!< Cut-off frequency of linear acceleration low-pass filter. [Hz] 941 | int mIsLinAccFiltZetaValid; double mLinAccFiltZeta; //!< Damping ratio of linear acceleration low-pass filter. [-] 942 | 943 | int mIsAngAccFiltFreqValid; double mAngAccFiltFreq; //!< Cut-off frequency of angular acceleration low-pass filter. [Hz] 944 | int mIsAngAccFiltZetaValid; double mAngAccFiltZeta; //!< Damping ratio of angular acceleration low-pass filter. [-] 945 | 946 | //-------------------------------------------------------------------------------------------------------- 947 | // Model particulars 948 | 949 | // Innovations (discrepancy between GPS and IMU) 950 | 951 | int mInnPosXAge; double mInnPosX; //!< Innovation in latitude. [-] 952 | int mInnPosYAge; double mInnPosY; //!< Innovation in longitude. [-] 953 | int mInnPosZAge; double mInnPosZ; //!< Innovation in altitude. [-] 954 | 955 | int mInnVelXAge; double mInnVelX; //!< Innovation in north velocity. [-] 956 | int mInnVelYAge; double mInnVelY; //!< Innovation in east velocity. [-] 957 | int mInnVelZAge; double mInnVelZ; //!< Innovation in down velocity. [-] 958 | 959 | int mInnHeadingAge; double mInnHeading; //!< Innovation in heading. [-] 960 | int mInnPitchAge; double mInnPitch; //!< Innovation in pitch. [-] 961 | 962 | // Gyroscope bias and scale factor 963 | 964 | int mIsWxBiasValid; double mWxBias; //!< X gyroscope bias. [deg s^(-1)] 965 | int mIsWyBiasValid; double mWyBias; //!< Y gyroscope bias. [deg s^(-1)] 966 | int mIsWzBiasValid; double mWzBias; //!< Z gyroscope bias. [deg s^(-1)] 967 | 968 | int mIsWxBiasAccValid; double mWxBiasAcc; //!< X gyroscope bias accuracy. [deg s^(-1)] 969 | int mIsWyBiasAccValid; double mWyBiasAcc; //!< Y gyroscope bias accuracy. [deg s^(-1)] 970 | int mIsWzBiasAccValid; double mWzBiasAcc; //!< Z gyroscope bias accuracy. [deg s^(-1)] 971 | 972 | int mIsWxSfValid; double mWxSf; //!< X gyroscope scale factor deviation. [-] 973 | int mIsWySfValid; double mWySf; //!< Y gyroscope scale factor deviation. [-] 974 | int mIsWzSfValid; double mWzSf; //!< Z gyroscope scale factor deviation. [-] 975 | 976 | int mIsWxSfAccValid; double mWxSfAcc; //!< X gyroscope scale factor deviation accuracy. [-] 977 | int mIsWySfAccValid; double mWySfAcc; //!< Y gyroscope scale factor deviation accuracy. [-] 978 | int mIsWzSfAccValid; double mWzSfAcc; //!< Z gyroscope scale factor deviation accuracy. [-] 979 | 980 | // Accelerometer bias and scale factor 981 | 982 | int mIsAxBiasValid; double mAxBias; //!< X accelerometer bias. [m s^(-2)] 983 | int mIsAyBiasValid; double mAyBias; //!< Y accelerometer bias. [m s^(-2)] 984 | int mIsAzBiasValid; double mAzBias; //!< Z accelerometer bias. [m s^(-2)] 985 | 986 | int mIsAxBiasAccValid; double mAxBiasAcc; //!< X accelerometer bias accuracy. [m s^(-2)] 987 | int mIsAyBiasAccValid; double mAyBiasAcc; //!< Y accelerometer bias accuracy. [m s^(-2)] 988 | int mIsAzBiasAccValid; double mAzBiasAcc; //!< Z accelerometer bias accuracy. [m s^(-2)] 989 | 990 | int mIsAxSfValid; double mAxSf; //!< X accelerometer scale factor deviation. [-] 991 | int mIsAySfValid; double mAySf; //!< Y accelerometer scale factor deviation. [-] 992 | int mIsAzSfValid; double mAzSf; //!< Z accelerometer scale factor deviation. [-] 993 | 994 | int mIsAxSfAccValid; double mAxSfAcc; //!< X accelerometer scale factor deviation accuracy. [-] 995 | int mIsAySfAccValid; double mAySfAcc; //!< Y accelerometer scale factor deviation accuracy. [-] 996 | int mIsAzSfAccValid; double mAzSfAcc; //!< Z accelerometer scale factor deviation accuracy. [-] 997 | 998 | // GNSS antenna position 999 | 1000 | int mIsGAPxValid; double mGAPx; //!< Primary GNSS antenna position X offset. [m] 1001 | int mIsGAPyValid; double mGAPy; //!< Primary GNSS antenna position Y offset. [m] 1002 | int mIsGAPzValid; double mGAPz; //!< Primary GNSS antenna position Z offset. [m] 1003 | 1004 | int mIsGAPxAccValid; double mGAPxAcc; //!< Primary GNSS antenna position X offset accuracy. [m] 1005 | int mIsGAPyAccValid; double mGAPyAcc; //!< Primary GNSS antenna position Y offset accuracy. [m] 1006 | int mIsGAPzAccValid; double mGAPzAcc; //!< Primary GNSS antenna position Z offset accuracy. [m] 1007 | 1008 | int mIsAtHValid; double mAtH; //!< Secondary GNSS antenna relative heading. [deg] 1009 | int mIsAtPValid; double mAtP; //!< Secondary GNSS antenna relative pitch. [deg] 1010 | 1011 | int mIsAtHAccValid; double mAtHAcc; //!< Secondary GNSS antenna relative heading accuracy. [deg] 1012 | int mIsAtPAccValid; double mAtPAcc; //!< Secondary GNSS antenna relative pitch accuracy. [deg] 1013 | 1014 | int mIsBaseLineLengthValid; int mIsBaseLineLengthConfig; double mBaseLineLength; //!< Distance between GNSS antennas. [m] 1015 | 1016 | int mIsBaseLineLengthAccValid; int mIsBaseLineLengthAccConfig; double mBaseLineLengthAcc; //!< Distance between GNSS antennas accuracy. [m] 1017 | 1018 | //-------------------------------------------------------------------------------------------------------- 1019 | // Statistics 1020 | 1021 | // IMU hardware status 1022 | 1023 | int mIsImuMissedPktsValid; uint32_t mImuMissedPkts; //!< Number of IMU hardware missed packets. 1024 | int mIsImuResetCountValid; uint32_t mImuResetCount; //!< Number of IMU hardware resets. 1025 | int mIsImuErrorCountValid; uint32_t mImuErrorCount; //!< Number of IMU hardware errors. 1026 | 1027 | // GPS successive rejected aiding updates 1028 | 1029 | int mIsGPSPosRejectValid; uint32_t mGPSPosReject; //!< Number of successive GNSS position updates rejected. 1030 | int mIsGPSVelRejectValid; uint32_t mGPSVelReject; //!< Number of successive GNSS velocity updates rejected. 1031 | int mIsGPSAttRejectValid; uint32_t mGPSAttReject; //!< Number of successive GNSS attitude updates rejected. 1032 | 1033 | // Received data statistics 1034 | 1035 | int mIsImuCharsValid; uint32_t mImuChars; //!< IMU number of bytes. 1036 | int mIsImuCharsSkippedValid; uint32_t mImuCharsSkipped; //!< IMU number of invalid bytes. 1037 | int mIsImuPktsValid; uint32_t mImuPkts; //!< IMU number of valid packets. 1038 | 1039 | int mIsCmdCharsValid; uint32_t mCmdChars; //!< Command number of bytes. 1040 | int mIsCmdCharsSkippedValid; uint32_t mCmdCharsSkipped; //!< Command number of invalid bytes. 1041 | int mIsCmdPktsValid; uint32_t mCmdPkts; //!< Command number of valid packets. 1042 | int mIsCmdErrorsValid; uint32_t mCmdErrors; //!< Command number of errors. 1043 | 1044 | //-------------------------------------------------------------------------------------------------------- 1045 | // Transformation Euler angles 1046 | 1047 | // Orientation of vehicle-frame relative to IMU-frame 1048 | 1049 | int mIsImu2VehHeadingValid; double mImu2VehHeading; //!< Heading. [deg] 1050 | int mIsImu2VehPitchValid; double mImu2VehPitch; //!< Pitch. [deg] 1051 | int mIsImu2VehRollValid; double mImu2VehRoll; //!< Roll. [deg] 1052 | 1053 | // Orientation of output-frame relative to surface-frame 1054 | 1055 | int mIsSurf2OutHeadingValid; double mSurf2OutHeading; //!< Heading. [deg] 1056 | int mIsSurf2OutPitchValid; double mSurf2OutPitch; //!< Pitch. [deg] 1057 | int mIsSurf2OutRollValid; double mSurf2OutRoll; //!< Roll. [deg] 1058 | 1059 | // Orientation of surface-frame relative to NED-frame 1060 | 1061 | int mIsNed2SurfHeadingValid; double mNed2SurfHeading; //!< Heading. [deg] 1062 | int mIsNed2SurfPitchValid; double mNed2SurfPitch; //!< Pitch. [deg] 1063 | int mIsNed2SurfRollValid; double mNed2SurfRoll; //!< Roll. [deg] 1064 | 1065 | //-------------------------------------------------------------------------------------------------------- 1066 | // Miscellaneous items 1067 | 1068 | // Triggers 1069 | 1070 | int mIsTrigTimeValid; int mIsTrigTimeNew; double mTrigTime; //!< Time of last trigger falling edge. [s] 1071 | int mIsTrig2TimeValid; int mIsTrig2TimeNew; double mTrig2Time; //!< Time of last trigger rising edge. [s] 1072 | int mIsDigitalOutTimeValid; int mIsDigitalOutTimeNew; double mDigitalOutTime; //!< Time of last digital output. [s] 1073 | 1074 | // Remote lever arm option 1075 | 1076 | int mIsRemoteLeverArmXValid; double mRemoteLeverArmX; //!< Remote lever arm X position. [m] 1077 | int mIsRemoteLeverArmYValid; double mRemoteLeverArmY; //!< Remote lever arm Y position. [m] 1078 | int mIsRemoteLeverArmZValid; double mRemoteLeverArmZ; //!< Remote lever arm Z position. [m] 1079 | 1080 | // Local reference frame (definition) 1081 | 1082 | int mIsRefLatValid; double mRefLat; //!< Reference frame latitude. [deg] 1083 | int mIsRefLonValid; double mRefLon; //!< Reference frame longitude. [deg] 1084 | int mIsRefAltValid; double mRefAlt; //!< Reference frame altitude. [m] 1085 | int mIsRefHeadingValid; double mRefHeading; //!< Reference frame heading. [deg] 1086 | 1087 | //-------------------------------------------------------------------------------------------------------- 1088 | // Zero velocity 1089 | 1090 | // Innovations 1091 | 1092 | int mInnZeroVelXAge; double mInnZeroVelX; //!< Discrepancy from zero of north velocity. [-] 1093 | int mInnZeroVelYAge; double mInnZeroVelY; //!< Discrepancy from zero of east velocity. [-] 1094 | int mInnZeroVelZAge; double mInnZeroVelZ; //!< Discrepancy from zero of downward velocity. [-] 1095 | 1096 | // Lever arm options 1097 | 1098 | int mIsZeroVelLeverArmXValid; double mZeroVelLeverArmX; //!< Zero velocity position X offset. [m] 1099 | int mIsZeroVelLeverArmYValid; double mZeroVelLeverArmY; //!< Zero velocity position Y offset. [m] 1100 | int mIsZeroVelLeverArmZValid; double mZeroVelLeverArmZ; //!< Zero velocity position Z offset. [m] 1101 | 1102 | int mIsZeroVelLeverArmXAccValid; double mZeroVelLeverArmXAcc; //!< Zero velocity position X offset accuracy. [m] 1103 | int mIsZeroVelLeverArmYAccValid; double mZeroVelLeverArmYAcc; //!< Zero velocity position Y offset accuracy. [m] 1104 | int mIsZeroVelLeverArmZAccValid; double mZeroVelLeverArmZAcc; //!< Zero velocity position Z offset accuracy. [m] 1105 | 1106 | // User Options 1107 | 1108 | int mIsOptionSZVDelayValid; int mIsOptionSZVDelayConfig; double mOptionSZVDelay; //!< Garage mode setting. [s] 1109 | int mIsOptionSZVPeriodValid; int mIsOptionSZVPeriodConfig; double mOptionSZVPeriod; //!< Garage mode setting. [s] 1110 | 1111 | //-------------------------------------------------------------------------------------------------------- 1112 | // Advanced lateral slip 1113 | 1114 | // Innovations 1115 | 1116 | int mInnNoSlipHAge; double mInnNoSlipH; //!< Discrepancy of lateral slip angle. [-] 1117 | 1118 | // Lever arm options 1119 | 1120 | int mIsNoSlipLeverArmXValid; double mNoSlipLeverArmX; //!< Lateral no slip position X offset. [m] 1121 | int mIsNoSlipLeverArmYValid; double mNoSlipLeverArmY; //!< Lateral no slip position Y offset. [m] 1122 | int mIsNoSlipLeverArmZValid; double mNoSlipLeverArmZ; //!< Lateral no slip position Z offset. [m] 1123 | 1124 | int mIsNoSlipLeverArmXAccValid; double mNoSlipLeverArmXAcc; //!< Lateral no slip position X offset accuracy. [m] 1125 | int mIsNoSlipLeverArmYAccValid; double mNoSlipLeverArmYAcc; //!< Lateral no slip position Y offset accuracy. [m] 1126 | int mIsNoSlipLeverArmZAccValid; double mNoSlipLeverArmZAcc; //!< Lateral no slip position Z offset accuracy. [m] 1127 | 1128 | // User Options 1129 | 1130 | int mIsOptionNSDelayValid; int mIsOptionNSDelayConfig; double mOptionNSDelay; //!< Advanced lateral slip setting. [s] 1131 | int mIsOptionNSPeriodValid; int mIsOptionNSPeriodConfig; double mOptionNSPeriod; //!< Advanced lateral slip setting. [s] 1132 | int mIsOptionNSAngleStdValid; int mIsOptionNSAngleStdConfig; double mOptionNSAngleStd; //!< Advanced lateral slip setting. [deg] 1133 | int mIsOptionNSHAccelValid; int mIsOptionNSHAccelConfig; double mOptionNSHAccel; //!< Advanced lateral slip setting. [m s^(-2)] 1134 | int mIsOptionNSVAccelValid; int mIsOptionNSVAccelConfig; double mOptionNSVAccel; //!< Advanced lateral slip setting. [m s^(-2)] 1135 | int mIsOptionNSSpeedValid; int mIsOptionNSSpeedConfig; double mOptionNSSpeed; //!< Advanced lateral slip setting. [m s^(-1)] 1136 | int mIsOptionNSRadiusValid; int mIsOptionNSRadiusConfig; double mOptionNSRadius; //!< Advanced lateral slip setting. [m] 1137 | 1138 | // Measurements 1139 | 1140 | int mIsHeadingMisAlignValid; double mHeadingMisAlign; //!< Estimated heading offset between unit and vehicle. [deg] 1141 | int mIsHeadingMisAlignAccValid; double mHeadingMisAlignAcc; //!< Estimated accuracy of heading offset between unit and vehicle. [deg] 1142 | 1143 | //-------------------------------------------------------------------------------------------------------- 1144 | // Wheel speed input 1145 | 1146 | // Innovations 1147 | 1148 | int mInnWSpeedAge; double mInnWSpeed; //!< Wheel speed innovation. [-] 1149 | 1150 | // Wheel speed lever arm option 1151 | 1152 | int mIsWSpeedLeverArmXValid; double mWSpeedLeverArmX; //!< Wheel speed position X offset. [m] 1153 | int mIsWSpeedLeverArmYValid; double mWSpeedLeverArmY; //!< Wheel speed position Y offset. [m] 1154 | int mIsWSpeedLeverArmZValid; double mWSpeedLeverArmZ; //!< Wheel speed position Z offset. [m] 1155 | 1156 | int mIsWSpeedLeverArmXAccValid; double mWSpeedLeverArmXAcc; //!< Wheel speed position X offset accuracy. [m] 1157 | int mIsWSpeedLeverArmYAccValid; double mWSpeedLeverArmYAcc; //!< Wheel speed position Y offset accuracy. [m] 1158 | int mIsWSpeedLeverArmZAccValid; double mWSpeedLeverArmZAcc; //!< Wheel speed position Z offset accuracy. [m] 1159 | 1160 | // User Options 1161 | 1162 | int mIsOptionWSpeedDelayValid; int mIsOptionWSpeedDelayConfig; double mOptionWSpeedDelay; //!< Wheel speed setting. [s] 1163 | int mIsOptionWSpeedZVDelayValid; int mIsOptionWSpeedZVDelayConfig; double mOptionWSpeedZVDelay; //!< Wheel speed setting. [s] 1164 | int mIsOptionWSpeedNoiseStdValid; int mIsOptionWSpeedNoiseStdConfig; double mOptionWSpeedNoiseStd; //!< Wheel speed setting. 1165 | 1166 | // Measurements 1167 | 1168 | int mIsWSpeedScaleValid; int mIsWSpeedScaleConfig; double mWSpeedScale; //!< Wheel speed scale factor. [pulse m^(-1)] 1169 | int mIsWSpeedScaleStdValid; int mIsWSpeedScaleStdConfig; double mWSpeedScaleStd; //!< Wheel speed scale factor accuracy. [%] 1170 | 1171 | int mIsWSpeedTimeValid; double mWSpeedTime; //!< Time of last wheel speed measurement. [s] 1172 | int mIsWSpeedCountValid; double mWSpeedCount; //!< Count at last wheel speed measurement. 1173 | int mIsWSpeedTimeUnchangedValid; double mWSpeedTimeUnchanged; //!< Time since last count. [s] 1174 | int mIsWSpeedFreqValid; double mWSpeedFreq; //!< Wheel speed frequency. [Hz] 1175 | 1176 | //-------------------------------------------------------------------------------------------------------- 1177 | // Heading lock 1178 | 1179 | // Innovations 1180 | 1181 | int mInnHeadingHAge; double mInnHeadingH; //!< Heading lock innovation. [-] 1182 | 1183 | // User options 1184 | 1185 | int mIsOptionHLDelayValid; int mIsOptionHLDelayConfig; double mOptionHLDelay; //!< Heading lock delay setting. [s] 1186 | int mIsOptionHLPeriodValid; int mIsOptionHLPeriodConfig; double mOptionHLPeriod; //!< Heading lock period setting. [s] 1187 | int mIsOptionHLAngleStdValid; int mIsOptionHLAngleStdConfig; double mOptionHLAngleStd; //!< Heading lock angle accuracy setting. [deg] 1188 | 1189 | int mIsOptionStatDelayValid; int mIsOptionStatDelayConfig; double mOptionStatDelay; //!< Stationary delay setting. [s] 1190 | int mIsOptionStatSpeedValid; int mIsOptionStatSpeedConfig; double mOptionStatSpeed; //!< Stationary speed setting. [m s^(-1)] 1191 | 1192 | //-------------------------------------------------------------------------------------------------------- 1193 | // For use in testing 1194 | 1195 | // Reserved for testing 1196 | 1197 | int mIsTimeMismatchValid; int mTimeMismatch; //!< Time mismatch. 1198 | int mIsImuTimeDiffValid; int mImuTimeDiff; //!< IMU time difference. 1199 | int mIsImuTimeMarginValid; int mImuTimeMargin; //!< IMU time margin. 1200 | int mIsImuLoopTimeValid; int mImuLoopTime; //!< IMU loop time. 1201 | int mIsOpLoopTimeValid; int mOpLoopTime; //!< Output loop time. 1202 | 1203 | int mIsBnsLagValid; int mBnsLag; //!< Blended navigation system lag. 1204 | int mIsBnsLagFiltValid; double mBnsLagFilt; //!< Filtered blended navigation system lag. 1205 | 1206 | // *** Code Generation End - NComRxC Structure *** 1207 | 1208 | //-------------------------------------------------------------------------------------------------------- 1209 | // Decoder private area. 1210 | 1211 | NComRxCInternal *mInternal; //!< Private decoder state and work space. 1212 | 1213 | } NComRxC; 1214 | 1215 | 1216 | 1217 | #ifdef __cplusplus 1218 | extern "C" 1219 | { 1220 | #endif 1221 | 1222 | 1223 | //============================================================================================================ 1224 | // NComRxC access functions to return a textual description of values (such enumerated types) used in NComRxC. 1225 | // For information about function NComGetString see comments regarding defined in the NComRxC 1226 | // structure. 1227 | 1228 | // *** Code Generation Begin - NComRxC External String Functions *** 1229 | 1230 | //------------------------------------------------------------------------------------------------------------ 1231 | // General information 1232 | 1233 | // Status 1234 | 1235 | extern const char *NComGetOutputPacketTypeString(const NComRxC *Com); 1236 | extern const char *NComGetInsNavModeString(const NComRxC *Com); 1237 | 1238 | // System information 1239 | 1240 | extern const char *NComGetImuTypeString(const NComRxC *Com); 1241 | extern const char *NComGetCpuPcbTypeString(const NComRxC *Com); 1242 | extern const char *NComGetInterPcbTypeString(const NComRxC *Com); 1243 | extern const char *NComGetFrontPcbTypeString(const NComRxC *Com); 1244 | extern const char *NComGetInterSwIdString(const NComRxC *Com); 1245 | extern const char *NComGetHwConfigString(const NComRxC *Com); 1246 | 1247 | extern const char *NComGetDualPortRamStatusString(const NComRxC *Com); 1248 | 1249 | // IMU information 1250 | 1251 | extern const char *NComGetUmacStatusString(const NComRxC *Com); 1252 | 1253 | // Global Navigation Satellite System (GNSS) information 1254 | 1255 | extern const char *NComGetGpsPosModeString(const NComRxC *Com); 1256 | extern const char *NComGetGpsVelModeString(const NComRxC *Com); 1257 | extern const char *NComGetGpsAttModeString(const NComRxC *Com); 1258 | 1259 | // Heading computation status 1260 | 1261 | extern const char *NComGetHeadQualityString(const NComRxC *Com); 1262 | extern const char *NComGetHeadSearchTypeString(const NComRxC *Com); 1263 | extern const char *NComGetHeadSearchStatusString(const NComRxC *Com); 1264 | extern const char *NComGetHeadSearchReadyString(const NComRxC *Com); 1265 | 1266 | //------------------------------------------------------------------------------------------------------------ 1267 | // General user options 1268 | 1269 | // General options 1270 | 1271 | extern const char *NComGetOptionLevelString(const NComRxC *Com); 1272 | extern const char *NComGetOptionVibrationString(const NComRxC *Com); 1273 | extern const char *NComGetOptionGpsAccString(const NComRxC *Com); 1274 | extern const char *NComGetOptionUdpString(const NComRxC *Com); 1275 | extern const char *NComGetOptionSer1String(const NComRxC *Com); 1276 | extern const char *NComGetOptionSer2String(const NComRxC *Com); 1277 | extern const char *NComGetOptionSer3String(const NComRxC *Com); 1278 | extern const char *NComGetOptionHeadingString(const NComRxC *Com); 1279 | 1280 | // Output baud rate settings 1281 | 1282 | extern const char *NComGetOptionSer1BaudString(const NComRxC *Com); 1283 | 1284 | extern const char *NComGetOptionSer2BaudString(const NComRxC *Com); 1285 | 1286 | extern const char *NComGetOptionSer3BaudString(const NComRxC *Com); 1287 | 1288 | extern const char *NComGetOptionCanBaudString(const NComRxC *Com); 1289 | 1290 | // *** Code Generation End - NComRxC External String Functions *** 1291 | 1292 | 1293 | //============================================================================================================ 1294 | // General function declarations. 1295 | 1296 | extern void NComInvalidate(NComRxC *Com); 1297 | extern NComRxC *NComCreateNComRxC(); 1298 | extern void NComDestroyNComRxC(NComRxC *Com); 1299 | extern void NComCopy(NComRxC *ComDestination, const NComRxC *ComSource); 1300 | extern ComResponse NComNewChar(NComRxC *Com, unsigned char c); 1301 | extern ComResponse NComNewChars(NComRxC *Com, const unsigned char *data, int num); 1302 | extern uint64_t NComNumChars(const NComRxC *Com); 1303 | extern uint64_t NComSkippedChars(const NComRxC *Com); 1304 | extern uint64_t NComNumPackets(const NComRxC *Com); 1305 | extern unsigned int NComGetCurrentPacketSize(const NComRxC *Com); 1306 | extern const unsigned char *NComGetCurrentPacketData(const NComRxC *Com); 1307 | extern int NComGetCurrentStatusChannel(const NComRxC *Com); 1308 | extern unsigned int NComGetCurrentStatusPacketSize(const NComRxC *Com); 1309 | extern const unsigned char *NComGetCurrentStatusPacketData(const NComRxC *Com); 1310 | extern void NComUpdateInnAge(NComRxC *Com); 1311 | extern void NComInterpolate(NComRxC *Com, double a, const NComRxC *A, double b, const NComRxC *B); 1312 | 1313 | 1314 | #ifdef __cplusplus 1315 | } 1316 | #endif 1317 | 1318 | 1319 | 1320 | 1321 | //============================================================================================================ 1322 | // Backwards compatibility. 1323 | // 1324 | // This decoder is not quite compatible with some older versions, hence the change to the type NComRxC from 1325 | // NComRx. The changes are slight, however, so one may wish to continue using the older type NComRx. To do so 1326 | // enable the following type definition. 1327 | 1328 | // typedef NComRxC NComRx; 1329 | 1330 | 1331 | #endif 1332 | --------------------------------------------------------------------------------