jsf2orientation
Overview
jsf2orientation extracts attitude and heading records from EdgeTech JSF Attitude messages (message type 3001, JSF_Attitude_3001_Data) and writes two OMG-HDCS v3 attitude files:
<prefix>.orientation: Roll, pitch, heave, and heading records (status = 15).<prefix>.heading: Heading-only records (status = 4).
Usage
jsf2orientation [-v] [-debug] -jsf <input_name.jsf> -orientation <file_prefix>
CLI Options
| Flag | Arguments | Default | Description |
|---|---|---|---|
-jsf | <input_name.jsf> | Required | Path to the input EdgeTech .jsf file. |
-orientation | <file_prefix> | Required | Output prefix for <file_prefix>.orientation and <file_prefix>.heading. |
-v | None | Off | Print every parsed JSF_Attitude_3001_Data record. |
-debug | None | Off | Enable debug flag. |
How It Works
- Base Time Initialization: Scans the
.jsffile for the first message3001to establishbase_time(refTime = base_time / 100), writesOMG_HDCS_summary_attitudeheaders to<prefix>.orientationand<prefix>.heading, and rewinds the file. - Validity Bit Routing: For every message
3001, inspectsattitude_3001.data_validity_flags:- If bit
0x01(heading valid) is set, writes a heading record (heading * 100.0) to<prefix>.heading. - If bits
0x02(roll),0x04(pitch), and0x08(heave) are all set (either alongside bit0x01or independently), writes a full roll/pitch/heave/headingOMG_HDCS_attituderecord to<prefix>.orientation.
- If bit
Practical Examples
1. Extract .orientation and .heading files from an EdgeTech JSF file:
jsf2orientation -jsf line01.jsf -orientation line01