- public AltosState(AltosHashSet h) {
- this();
-
- set = h.getInt("set", set);
- received_time = h.getLong("received_time", received_time);
- time = h.getDouble("time", time);
- prev_time = h.getDouble("prev_time", prev_time);
- time_change = h.getDouble("time_change", time_change);
- tick = h.getInt("tick", tick);
- prev_tick = h.getInt("prev_tick", prev_tick);
- boost_tick = h.getInt("boost_tick", boost_tick);
- state = h.getInt("state", state);
- flight = h.getInt("flight", flight);
- serial = h.getInt("serial", serial);
- altitude_32 = h.getInt("altitude_32", altitude_32);
- receiver_serial = h.getInt("receiver_serial", receiver_serial);
- landed = h.getBoolean("landed", landed);
- ascent = h.getBoolean("ascent", ascent);
- boost = h.getBoolean("boost", boost);
- rssi = h.getInt("rssi", rssi);
- status = h.getInt("status", status);
- device_type = h.getInt("device_type", device_type);
- config_major = h.getInt("config_major", config_major);
- config_minor = h.getInt("config_minor", config_minor);
- apogee_delay = h.getInt("apogee_delay", apogee_delay);
- main_deploy = h.getInt("main_deploy", main_deploy);
- flight_log_max = h.getInt("flight_log_max", flight_log_max);
- ground_altitude = AltosCValue_fromHashSet(h.getHash("ground_altitude"), ground_altitude);
- gps_ground_altitude = AltosGpsGroundAltitude_fromHashSet(h.getHash("gps_ground_altitude"), gps_ground_altitude);
- ground_pressure = AltosGroundPressure_fromHashSet(h.getHash("ground_pressure"), ground_pressure);
- altitude = AltosAltitude_fromHashSet(h.getHash("altitude"), altitude);
- gps_altitude = AltosGpsAltitude_fromHashSet(h.getHash("gps_altitude"), gps_altitude);
- gps_ground_speed = AltosValue_fromHashSet(h.getHash("gps_ground_speed"), gps_ground_speed);
- gps_ascent_rate = AltosValue_fromHashSet(h.getHash("gps_ascent_rate"), gps_ascent_rate);
- gps_course = AltosValue_fromHashSet(h.getHash("gps_course"), gps_course);
- gps_speed = AltosValue_fromHashSet(h.getHash("gps_speed"), gps_speed);
- pressure = AltosPressure_fromHashSet(h.getHash("pressure"), pressure);
- speed = AltosSpeed_fromHashSet(h.getHash("speed"), speed);
- acceleration = AltosAccel_fromHashSet(h.getHash("acceleration"), acceleration);
- orient = AltosCValue_fromHashSet(h.getHash("orient"), orient);
- kalman_height = AltosValue_fromHashSet(h.getHash("kalman_height"), kalman_height);
- kalman_speed = AltosValue_fromHashSet(h.getHash("kalman_speed"), kalman_speed);
- kalman_acceleration = AltosValue_fromHashSet(h.getHash("kalman_acceleration"), kalman_acceleration);
-
- battery_voltage = h.getDouble("battery_voltage", battery_voltage);
- pyro_voltage = h.getDouble("pyro_voltage", pyro_voltage);
- temperature = h.getDouble("temperature", temperature);
- apogee_voltage = h.getDouble("apogee_voltage", apogee_voltage);
- main_voltage= h.getDouble("main_voltage", main_voltage);
- ignitor_voltage = h.getDoubleArray("ignitor_voltage", ignitor_voltage);
- gps = AltosGPS.fromHashSet(h.getHash("gps"), gps);
- temp_gps = AltosGPS.fromHashSet(h.getHash("temp_gps"), temp_gps);
- temp_gps_sat_tick = h.getInt("temp_gps_sat_tick", temp_gps_sat_tick);
- gps_pending = h.getBoolean("gps_pending", gps_pending);
- gps_sequence = h.getInt("gps_sequence", gps_sequence);
- imu = AltosIMU.fromHashSet(h.getHash("imu"), imu);
- mag = AltosMag.fromHashSet(h.getHash("mag"), mag);
-
- npad = h.getInt("npad", npad);
- gps_waiting = h.getInt("gps_waiting", gps_waiting);
- gps_ready = h.getBoolean("gps_ready", gps_ready);
- ngps = h.getInt("ngps", ngps);
- from_pad = AltosGreatCircle.fromHashSet(h.getHash("from_pad"), from_pad);
- elevation = h.getDouble("elevation", elevation);
- range = h.getDouble("range", range);
- gps_height = h.getDouble("gps_height", gps_height);
- pad_lat = h.getDouble("pad_lat", pad_lat);
- pad_lon = h.getDouble("pad_lon", pad_lon);
- pad_alt = h.getDouble("pad_alt", pad_alt);
- speak_tick = h.getInt("speak_tick", speak_tick);
- speak_altitude = h.getDouble("speak_altitude", speak_altitude);
- callsign = h.getString("callsign", callsign);
- firmware_version = h.getString("firmware_version", firmware_version);
- accel_plus_g = h.getDouble("accel_plus_g", accel_plus_g);
- accel_minus_g = h.getDouble("accel_minus_g", accel_minus_g);
- accel = h.getDouble("accel", accel);
- ground_accel = h.getDouble("ground_accel", ground_accel);
- ground_accel_avg = h.getDouble("ground_accel_avg", ground_accel_avg);
- log_format = h.getInt("log_format", log_format);
- log_space = h.getInt("log_space", log_space);
- product = h.getString("product", product);
- baro = AltosMs5607.fromHashSet(h.getHash("baro"), baro);
- companion = AltosCompanion.fromHashSet(h.getHash("companion"), companion);
- pyro_fired = h.getInt("pyro_fired", pyro_fired);
- accel_zero_along = h.getDouble("accel_zero_along", accel_zero_along);
- accel_zero_across = h.getDouble("accel_zero_across", accel_zero_across);
- accel_zero_through = h.getDouble("accel_zero_through", accel_zero_through);
-
- rotation = AltosRotation.fromHashSet(h.getHash("rotation"), rotation);
- ground_rotation = AltosRotation.fromHashSet(h.getHash("ground_rotation"), ground_rotation);
-
- pad_orientation = h.getInt("pad_orientation", pad_orientation);
-
- accel_ground_along = h.getDouble("accel_ground_along", accel_ground_along);
- accel_ground_across = h.getDouble("accel_ground_across", accel_ground_across);
- accel_ground_through = h.getDouble("accel_ground_through", accel_ground_through);
-
- gyro_zero_roll = h.getDouble("gyro_zero_roll", gyro_zero_roll);
- gyro_zero_pitch = h.getDouble("gyro_zero_pitch", gyro_zero_pitch);
- gyro_zero_yaw = h.getDouble("gyro_zero_yaw", gyro_zero_yaw);
-
- last_imu_time = h.getDouble("last_imu_time", last_imu_time);
- }
-