Tezzeret  1
Tezzeret
magstructs.h
1 #pragma once
2 
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6 
7 #ifndef GMMETA_HPP_
8 #include <GmMeta.hpp>
9 #endif
10 
11 #include <geotypes.hpp>
12 #include <GmError.hpp>
13 
14 PACKED_PRAGMA
15 struct PACKED_SPEC _geoDateTimeSimple
16 {
17  double m_dSec;
18  short m_iMin;
19  short m_iHour;
20  short m_iDay;
21  short m_iMonth;
22  short m_iYear; // years since 2000
23 } ; // 18 bytes size.
24 
25 PACKED_PRAGMA
26 struct PACKED_SPEC _MagDatum
27 {
28  double m_dField; // 8 bytes
29  unsigned long m_iFieldStrength; // 4 bytes
30 }; // total size 12 bytes.
31 
32 extern struct _geoDateTimeSimple s_gdtsGlobalDateTime;
33 
34 #define GEO_MAG_DATA_PER_BODY 4
35 
36 PACKED_PRAGMA
37 struct PACKED_SPEC _MagBody
38 {
39  struct _MagDatum m_amdMagData[GEO_MAG_DATA_PER_BODY]; // Offset 0,
40  // Offset 24 in s_Indexed860MagBodyWithHeader
41  // size 48
42  int m_iCountMags; // Offset 48, offset 72 in s_Indexed860MagBodyWithHeader, size 4
43  struct _geoDateTimeSimple m_gdtsDateAndTime; // Offset 52, size 18 offset 76 in s_Indexed860MagBodyWithHeader
44 }; // total size 70?
45 
46 // -------- MFAM data with indexing added. -----------------
47 PACKED_PRAGMA
48 typedef struct PACKED_SPEC s_Indexed860MagBody {
49  uint64_t m_ui64PacketIndex; // offset 0, size 8, offset 16 in s_Indexed860MagBodyWithHeader
50  struct _MagBody m_mbMagData; // offset 8, size 70? offset 24 in s_Indexed860MagBodyWithHeader
51 } Indexed860MagBody; // total size 78?
52 
53 #ifndef DWORD
54 typedef unsigned long DWORD;
55 #endif
56 
57 PACKED_PRAGMA
58 typedef struct PACKED_SPEC s_Indexed860MagBodyWithHeader
59 {
60  /* dwRecordType should be GM_860_BINARY_01 if used in this structure
61  * directly, but if used in TimeStamped860, should be GM_MAG_860_TIMESTAMPED
62  */
63  DWORD m_dwRecordType; //offset 0
64  UInt32 m_uRecordSize; //offset 4
65  UInt32 m_ui32Seconds; //offset 8
66  UInt32 m_ui32HertzIndex; // offset 12
67  struct s_Indexed860MagBody m_i8mbMagDatum; // offset 16, size 78
68 } Indexed860MagBodyWithHeader; // total size 94?
69 
70 PACKED_PRAGMA
71 typedef struct PACKED_SPEC s_timestamped860
72 {
73  struct s_Indexed860MagBodyWithHeader m860Indexed;
74  uint64_t mTimestamp;
75 } TimeStamped860; // total size 102
76 
77 
78 #ifdef __cplusplus
79 }
80 #endif
Definition: magstructs.h:38
Definition: magstructs.h:27
Definition: magstructs.h:16
Definition: magstructs.h:59
Definition: magstructs.h:48
Definition: magstructs.h:72