diff --git a/app/src/main/java/com/openathena/CursorOnTargetSender.java b/app/src/main/java/com/openathena/CursorOnTargetSender.java index 74ea9a6..8ff881c 100644 --- a/app/src/main/java/com/openathena/CursorOnTargetSender.java +++ b/app/src/main/java/com/openathena/CursorOnTargetSender.java @@ -180,7 +180,7 @@ public static String buildCoT(String uid, String imageISO, String nowAsISO, Stri Element openAthenaCalculationInfo = doc.createElement("openAthenaCalculationInfo"); double theta = Math.toDegrees(Math.atan2(Double.parseDouble(le),Double.parseDouble(ce))); - openAthenaCalculationInfo.setAttribute("slantAngleDegrees", String.valueOf(theta)); + openAthenaCalculationInfo.setAttribute("raySlantAngleDeg", String.valueOf(theta)); // add all the various calculation data from oaInfoMap to use for statistics/experimentation and debugging for (Map.Entry entry : oaInfoMap.entrySet()) { openAthenaCalculationInfo.setAttribute(entry.getKey(), entry.getValue()); diff --git a/app/src/main/java/com/openathena/MainActivity.java b/app/src/main/java/com/openathena/MainActivity.java index 752356f..9d25939 100644 --- a/app/src/main/java/com/openathena/MainActivity.java +++ b/app/src/main/java/com/openathena/MainActivity.java @@ -595,14 +595,21 @@ public void calculateImage(View view, boolean shouldISendCoT) double[] values = theMeta.getMetadataValues(exif); double y = values[0]; double x = values[1]; - // MetadataExctractor.getMetadataValues auto converts vertical datum to EGM96 AMSL + // MetadataExctractor.getMetadataValues auto converts vertical datum to WGS84 ellipsoidal double z = values[2]; double azimuth = values[3]; + // pitch angle in OpenAthena convention, positive degrees downwards from horizon double theta = values[4]; double roll = values[5]; Log.i(TAG, "parsed xmpMeta\n"); + openAthenaCalculationInfo.put("droneLatitude", roundDouble(y)); + openAthenaCalculationInfo.put("droneLongitude", roundDouble(x)); + openAthenaCalculationInfo.put("droneElevationHAE", roundDouble(z)); + openAthenaCalculationInfo.put("cameraRollAngleDeg", roundDouble(roll)); + openAthenaCalculationInfo.put("cameraSlantAngleDeg", roundDouble(theta)); + appendText(getString(R.string.opened_exif_for_image_msg)); attribs += MetadataExtractor.getTagString(ExifInterface.TAG_DATETIME, exif); attribs += MetadataExtractor.getTagString(ExifInterface.TAG_MAKE, exif);