36 #define RADIANS_TO_DEGREES (180.0 / M_PI) 58 memcpy(&_utmPacket->
position, &_anPacket->
data[0], 3 *
sizeof(
double));
60 _utmPacket->
zone = _anPacket->
data[25];
87 printf(
"Decoding error: packet ID %u of Length %u\n", _anPacket->
id, _anPacket->
length);
104 switch (_anPacket->
id)
118 printf(
"Recieved system state packet.\n");
124 printf(
"Failed to decode system state packet properly.\n");
138 printf(
"Recieved unix time packet.\n");
144 printf(
"Failed to decode unix time packet properly.\n");
158 printf(
"Recieved raw sensors packet.\n");
164 printf(
"Failed to decode raw sensors packet properly.\n");
177 printf(
"Collected satellites packet.\n");
182 printf(
"Failed to decode satellites packet properly.\n");
195 printf(
"Collected detailed satellites packet.\n");
200 printf(
"Failed to decode detailed satellites packet properly.\n");
213 printf(
"Collected local magnetics packet.\n");
218 printf(
"Failed to decode local magnetics packet properly.\n");
234 printf(
"Collected utm position packet.\n");
239 printf(
"Failed to decode utm position packet properly.\n");
252 printf(
"Collected ecef position packet.\n");
257 printf(
"Failed to decode ecef position packet properly.\n");
270 printf(
"Collected north seeking status packet.\n");
275 printf(
"Failed to decode north seeking status packet properly.\n");
288 printf(
"Collected euler orientation standard deviation packet.\n");
293 printf(
"Failed to decode euler orientation standard devation packet.\n");
305 printf(
"Collected odometer state packet.\n");
310 printf(
"Failed to decode odometer state packet.\n");
322 printf(
"Collected raw gnss packet\n");
327 printf(
"Failed to decode raw gnss packet\n");
KVH Geo Fog 3D driver class header.
int decode_north_seeking_status_packet(north_seeking_status_packet_t *north_seeking_status_packet, an_packet_t *an_packet)
int decode_detailed_satellites_packet(detailed_satellites_packet_t *detailed_satellites_packet, an_packet_t *an_packet)
int decode_raw_sensors_packet(raw_sensors_packet_t *raw_sensors_packet, an_packet_t *an_packet)
int decode_euler_orientation_standard_deviation_packet(euler_orientation_standard_deviation_packet_t *euler_orientation_standard_deviation, an_packet_t *an_packet)
int decode_raw_gnss_packet(raw_gnss_packet_t *raw_gnss_packet, an_packet_t *an_packet)
int SetPacketUpdated(packet_id_e, bool)
int DecodeUtmFix(utm_fix *, an_packet_t *)
The current api given by kvh incorrectly deals with this packet so we needed to write our own decoder...
int decode_local_magnetics_packet(local_magnetics_packet_t *local_magnetics_packet, an_packet_t *an_packet)
int decode_odometer_state_packet(odometer_state_packet_t *odometer_state_packet, an_packet_t *an_packet)
bool debug_
Set true to print debug statements.
KvhPacketStorage packetStorage_
Class responsible for handling packets and ensuring consistency.
int decode_ecef_position_packet(ecef_position_packet_t *ecef_position_packet, an_packet_t *an_packet)
int decode_satellites_packet(satellites_packet_t *satellites_packet, an_packet_t *an_packet)
int DecodePacket(an_packet_t *)
int decode_unix_time_packet(unix_time_packet_t *unix_time_packet, an_packet_t *an_packet)
bool Contains(packet_id_e)
int UpdatePacket(packet_id_e _packetId, T &_packetData)
int decode_system_state_packet(system_state_packet_t *system_state_packet, an_packet_t *an_packet)