Skip to main content

Module phone_launch

Module phone_launch 

Source
Expand description

A phone app’s launch….csv: one row a sample, from the phone’s GPS, accelerometer, gyroscope, magnetometer and, in the newer files, its barometer.

The app isn’t named in its files, and no published description of the format was found. Its files are named launch and a number, and open on a header row whose first names are Seconds,Timestamp,AltitudeMSLGPS:

Seconds,Timestamp,AltitudeMSLGPS,Record,Static,Latitude,Longitude,GTotal,Gx,Gy,Gz,GMax,…
0.000,1941868800000,100,1,12,40.123456,-100.234567,1.000000,0.000000,0.932039,0.362358,…

Two generations are among the project’s sample logs, as of 2026-10-13 27 files: 19 older ones of 35 columns (8 of them with Reserved1 and Reserved2 where the others have Revolutions and RevApogee), whose AltitudeRelativeBarometer is 0 on every row, and 8 newer ones of 67 or 69 columns, which add a barometer (hPa, and a barometric altitude and speed that move), a temperature, the acceleration with gravity taken out, a satellite count and an external sensor’s columns. The rows come about 20 times a second; the GPS’s columns change about once a second and repeat their last fix between.

Recognition. The first line that isn’t blank opens with Seconds,Timestamp,AltitudeMSLGPS: no other layout among the project’s sample logs does.

Rows. Every row is as wide as the header; a row of another width, a cell that isn’t a number, a row without a time or a time that doesn’t increase is refused, naming its line. An empty cell is a gap. Blank lines are skipped; lines may end in CR, LF or both, and a byte-order mark is dropped. A name the header gives twice, or leaves empty, is refused.

Columns. Seconds is the clock: seconds from the app’s start, as its name says, and the log’s zero is the app’s. Every other column is a channel on that clock, in the file’s order. No source states the other columns’ units, so each is read in a unit only where two independent checks on the file’s own values agree on it (ADR-258 §2); otherwise it is kept as written, Quantity::Unrecognized, with a note giving the evidence. A column the reader doesn’t know is kept as written too.

ColumnRead asChecks (below)
Secondsthe clock, sits name
TimestampQuantity::TimeOfDay, UTC: a Unix time in msits steps against the clock’s; its date
hPaQuantity::Pressure, hPa × 100 Paits name; the pad’s pressure a launch site’s
AltitudeRelativeBarometerQuantity::AltitudeAboveGround, m: the primary trackthe pressure altitude of hPa; gravity in the coast
VelocityBarometer, VelocityBarometerRawQuantity::Speed, m/s: the first the primary track’sthe barometric altitude’s rate; gravity in the coast
Gx, Gy, Gz, GTotalQuantity::Acceleration, g × 9.806 65 m/s²1 g at rest; the boost against the barometric climb
NoGravGx, NoGravGy, NoGravGz, NoGravGTotalQuantity::Acceleration, g, gravity taken outthe accelerometer’s unit and gravity’s 1 g between them
YawQuantity::Angle, radians × 180/πwithin ±π; the magnetic field’s direction
RollQuantity::Angle, radians × 180/πwithin ±π; gravity’s direction
PitchQuantity::Angle, radians × 180/πwithin ±π/2; gravity’s direction
GyroX, GyroY, GyroZQuantity::AngularRate, rad/s × 180/πthe attitude’s turn; a full scale in °/s
HeadingQuantity::Angle, degreeswithin 0 to 360 and past 2π; its wrap’s period, 360
Latitude, LongitudeQuantity::Latitude, Quantity::Longitude, degrees, both or neitherthe latitude past π/2 and within 90; the longitude past π and within 180
AltitudeMSLGPS, AltitudeMSLMaxGPSQuantity::Unrecognized, as writtenno second check (below)
Record, Static, UsbState, SatellitesQuantity::Number, as writtenflags, a state and a count
GMax, NoGravGMax, AltitudeRelativeMaxBarometer, VelocityBarometerMax, VelocityBarometerMinQuantity::Unrecognized, as writtenrunning extremes, not tied to their columns
TemperatureQuantity::Unrecognized, as written°C and °F both possible
MagnetometerX, …Y, …Z, HeadingX, …Y, …ZQuantity::Unrecognized, as writtenno quantity for a magnetic field
Revolutions, RevApogee, RevolutionsClock, HorizontalResGPS, VerticalResGPS, Battery, AltitudeRelativeSerial, AltitudeRelativeMaxSerial, Usb…, Reserved…Quantity::Unrecognized, as writtenno source states their units

The checks. The two checks of a pair read different numbers: two columns, a column against another of settled unit or direction, or one column’s extent against its steps. Each item below says what each check reads and which rival units it rules out on its own. A check the file can’t run (too few rows, no barometer, no rest) counts as failed.

  • The pressure. hPa names its unit. The first reading, on the pad, must also be a launch site’s, 500 to 1,100 hPa, the bounds crate::rrc3 cites (the U.S. Standard Atmosphere’s pressure about 5,570 m up, and above the highest sea-level pressure on record); otherwise the column is kept as written and everything below that needs it fails.
  • The barometric altitude, in meters. (1) Above the first row it is the pressure altitude of hPa above the first row’s, in the U.S. Standard Atmosphere, 1976 (Ussa76), within 3 m and 2% of the climb, over a climb of at least 30 m: in feet it would be 3.28 times as large. (2) In the coast, from 8 s to 3 s before the highest altitude and no earlier than a second after the steepest climb, nothing pushes the rocket, and gravity and drag slow it by at least 1 g: a parabola fitted to the altitude there must fall at 0.7 g to 0.7 × 3.28 g, so that an altitude in feet, falling at 1 g or more in feet per second squared, can’t pass. A rocket with more drag than that fails closed. As of 2026-10-13, in the 8 newer sample files, (1) holds within 1.5 m in all 8 and (2) gives 1.09 g to 1.66 g in the 7 with a coast in the file; the eighth starts after its coast.
  • The barometric speeds, in m/s. (1) Against the barometric altitude’s rate, over half a second about each row, a least-squares gain of 0.8 to 1.25 (ft/s, mph and km/h are 3.28, 2.24 and 3.6); (2) in the same coast window, the column falls at 0.7 g to 0.7 × 3.28 g. As of 2026-10-13, gains of 0.89 to 0.96 and slowings of 1.04 g to 1.66 g in the 7.
  • The accelerations, in g. (1) The quietest second before the steepest climb, the pad, reads 0.9 to 1.1 in the axes’ magnitude, as an accelerometer at rest reads 1 g (in m/s², 9.8); (2) from that second to the steepest climb, the magnitude less 1 g, times 9.806 65 m/s² and summed over time, the speed the boost gave, comes to 0.5 to 2 times the barometric climb rate there, an independent sensor’s speed. GTotal is read with the axes where it is their magnitude within 0.11 on every row. The newer files’ NoGrav… columns are read in g with the axes where the median magnitude of the axes less them, the gravity the phone took out, is 0.95 to 1.05. As of 2026-10-13, (1) gives 1.00 to 1.08 and (2) 0.83 to 1.12 in 6 of the 8 newer files; of the other two, one reads 1.19 in the second before its climb, the file starting at the launch, and one has no barometric climb. The older files have no barometer, so (2) can’t run: their accelerations, which in 18 of the 19 read 0.94 to 1.06 at their quietest second and clip near 2 on each axis, are kept as written. The NoGrav… columns’ median gives 1.00 to 1.12 in the 8, 6 of them within 0.95 to 1.05.
  • The attitude, in radians. Each angle: (1) every reading within ±π (the pitch, ±π/2), the angle’s extent, which a column in degrees or gradians fails once the phone turns past 3.14 of them from 0; (2) its direction against a sensor that measures it with no unit, which rules out every unit but radians on its own. On the rows where the accelerometer reads its rest, within 3% of the magnitude of its quietest second (before the steepest climb where the barometer gives one, else in the whole file), the accelerometer’s axes point up whatever their unit, and the magnetometer’s field, taken across up, points east whatever its unit. The angle read in radians must lie from what they give by a median of at most 0.2 rad over at least 20 rows, and by at most half the median the angle read in degrees gives. Rows where the angle lies within 0.2 of 0 (for the roll, of a half-turn), where an angle in degrees reads nearly as one in radians, are left out. The angles are those of Android’s SensorManager.getOrientation (Android API reference). Pitch, about x: |sin pitch| is gravity’s share along the phone’s y axis, |Gy| over the axes’ magnitude. Roll, about y: its distance from the nearest half-turn is gravity’s angle about y, atan(|Gx| / |Gz|), on rows with the y axis at least 0.2 from vertical. Neither uses gravity’s sign, so axes that point the other way pass too. Yaw, the azimuth: the angle from magnetic north toward east of the phone’s y axis, with east the field across up and north up across east, on rows with the y axis at least 0.2 from vertical. As of 2026-10-13, (2) gives medians of 0.17 rad or less for the yaw in 10 files, the 8 newer and 2 of the 19 older; in 16 of the other older ones the yaw lies a median 0.90 to 3.02 rad from the field’s azimuth, and one has too few rows, so their yaw is kept as written. For the roll, 0.07 rad or less in 24 files; 0.34 and 0.36 rad in two, and too few rows in one, kept.
  • The gyroscope, in rad/s. (1) With the attitude read in radians, the turn between rows five apart (the angle of the rotation from one attitude to the other, each yaw about z, then pitch about x, then roll about y) is 0.7 to 1.3 times the gyroscope’s rate summed over those rows, by the median over at least 10 such spans, those with an axis at its full scale left out; in degrees per second it would be 57 times smaller. (2) An axis sits at its largest reading on at least 5 rows, its full scale, and that is within 1% of one a MEMS gyroscope offers, ±125, ±250, ±500, ±1,000 or ±2,000 °/s (Bosch Sensortec, BMI160 data sheet, BST-BMI160-DS000, table 2), read in rad/s. As of 2026-10-13, (1) gives 0.80 to 1.02 in the 9 files whose attitude is read whole, and the newer files’ gyroscopes stop at 1,000 °/s; the older ones’ never stop at a full scale, and are kept as written.
  • The heading, in degrees. (1) Its extent: every reading within 0 to 360 and one past 2π. Radians, which never pass 2π, always fail it; a unit that runs to more than 360, gradians to 400, fails it once the heading passes 360 of it. (2) Its period, from its steps: some step between rows crosses north by more than 300 and, less 360 in its direction, turns as the steps on either side do, of their sign and within a factor of 2 of each. Crossing north, a heading steps by its period less its turn in that row. Radians can’t step 300; a heading in gradians steps 400 less its turn, and less 360 that turns against the rows on either side unless the heading turns 80 to 100 gradians a row, 4 to 5 turns a second at 20 rows a second.
  • The position, in degrees. Latitude and Longitude are decided together, both read or both kept, on two columns’ extents: (1) the latitude’s largest reading from 0 lies past π/2, which radians never pass, and within 90; (2) the longitude’s past π and within 180. Radians fail both, as do scaled integers (such as 10⁻⁷°). NMEA 0183’s degrees and minutes run together (4230.0 for 42.5°), and minutes of arc, pass the latitude’s only within 1.5° of the equator and the longitude’s only within 3° of the prime meridian: the pair passes both only for a site in the open sea of the Gulf of Guinea. A site in degrees within 1.57° of the equator or 3.14° of the prime meridian fails closed, both kept. Neither check can separate a unit within about 11% of the degree: the gradian, 0.9°, passes both below 81° of latitude and 162° of longitude. No check in the file rules it out; the reader takes degrees over it because phones’ location services give positions in degrees (Android’s Location.getLatitude, Apple’s CLLocationDegrees).
  • The time stamp, a Unix time in ms. (1) Each step between rows, divided by 1,000, is the clock’s step, Seconds, within 1.5 ms; (2) the first, read so, falls between 2000 and 2100, where read in seconds it would be tens of thousands of years on. It is kept as the time of day in UTC, Quantity::TimeOfDay, s after midnight.
  • The GPS altitude, kept as written. Against the pressure altitude at the GPS’s fresh fixes (the rows where the altitude or position changes), a least-squares gain near 1 says meters and 3.28 feet, but that is one check, and the files hold no second. Fixes once a second, and lagging in flight, can’t show gravity’s pull in the coast. On the pad, the GPS’s height above sea level against the pad’s pressure altitude separates the units only on a high pad. The extremes of sea-level pressure on record, 870 to 1,083.8 hPa (WMO, Records of Weather and Climate Extremes), move the pressure altitude about −570 m to +1,270 m from the height, a band 1,840 m wide (wider with the GPS’s own error). A reading N is N m read in meters and 0.3048 N m read in feet, 0.695 N m apart, so both readings fall in the band for some weather unless N tops 1,840 / 0.695, about 2,650: a pad above about 2,650 m if the column is in meters, or above 810 m if it is in feet. That check isn’t used: no sample file’s pad reads that high, so it would settle none of them, and the gain it would pair with has no pass band of its own yet. The note gives the gain where the file has a barometer. As of 2026-10-13, the gain is 0.69 to 1.11 in 7 of the 8 newer files; in the eighth the GPS didn’t follow the flight.

The primary track. The barometric altitude, where it is read in meters, on every row, its vertical speed VelocityBarometer where that is read in m/s. Otherwise the track is empty, as a GPS log’s is (ADR-254 §2), and the readings withhold on the log; the channels keep every column. The temperature and battery tracks are always empty: neither column’s unit is settled.

The altitude’s step. hPa is written from a 32-bit float, which between 512 and 1,024 hPa steps by 2⁻¹⁴ hPa: every pressure in the 8 newer sample files is a whole number of those. That is 0.000 51 m of altitude at sea level, ALTITUDE_STEP_M, the barometer’s step; the barometer’s own noise is far larger. The track, AltitudeRelativeBarometer, is written in finer steps of its own, as small as 0.25 mm in those files.

Values too large. A cell is refused if its unit’s conversion to SI makes it infinite, such as 1.7e308 in hPa (ADR-258 §3).

Constants§

ALTITUDE_STEP_M
The barometer’s step as an altitude, m: the hPa column’s step, 2⁻¹⁴ hPa, at sea level, where a pascal is 1 / (ρ₀ g₀) m with the International Standard Atmosphere’s ρ₀ = 1.225 kg/m³ (ISO 2533:1975) and standard gravity g₀ (CGPM 1901): 0.000 508 m. It is the barometer’s step, not the track’s: AltitudeRelativeBarometer is written in finer steps, as small as 0.25 mm.

Functions§

read
Reads a phone app’s launch….csv from its text.
recognizes
Whether the text is the app’s CSV: a header row opening Seconds,Timestamp,AltitudeMSLGPS.