Objective:

Imagine you're a software developer at a space agency, and they are about to launch a spacecraft. Before the launch, there is a traditional countdown. The countdown is usually conveyed via audio, but the agency wants a written log too. This log will be based on raw telemetry data received from the spacecraft.

Requirements:

Task:

You receive raw telemetry data in the following format: "D-100*T-10:30:45*STATUS:Ready"

· D- represents the number of days left for the launch.

· T- stands for the time left in hours, minutes, and seconds' format.

· After the second asterisk (*) is the current status of the spacecraft.

Your task is to:

· Extract this data and convert it into a more readable format.

· Calculate the total time left for the launch in minutes.

· Generate a status message based on the raw telemetry data.

Steps:

· Data Extraction:

· Identify the positions of the asterisks and hyphens in the string.

· Extract the number of days, time, and status message from the raw data string.

· Time Conversion:

· Convert the extracted time (which is in hours:minutes:seconds format) into total minutes using mathematical functions.

· Consider the days in your calculations. (1 day = 1440 minutes)

· Status Message Generation:

· If the character after "STATUS:" is an uppercase letter, display the status as it is. If it's a lowercase letter, convert it to uppercase before displaying. This ensures the status message always looks formal.

Deliverable:

Write a program in Java that takes the raw telemetry data string as input, performs the aforementioned steps, and outputs the status message and total minutes left for the launch.

Tips:

· Use String.indexOf() to find the position of specific characters or substrings in the string.

· String.split() can help in splitting the time format into hours, minutes, and seconds.

· Convert the extracted string numbers into integers using Integer.parseInt().

· Remember to use Math.round() or other relevant Math functions when needed.

Notes:

· You can find formulas for BMI, IBW, and BMR online or in relevant literature.

· Ensure that the program handles both male and female calculations where applicable.

Here's an example solution in Java:

```java
public class LogGenerator {

public static void main(String[] args) {
String telemetryData = "D-100*T-10:30:45*STATUS:Ready";

// Data Extraction
int asterisk1Pos = telemetryData.indexOf("*");
int asterisk2Pos = telemetryData.lastIndexOf("*");
int hyphenPos = telemetryData.indexOf("-");
int colonPos = telemetryData.indexOf(":");
int statusPos = telemetryData.indexOf("STATUS:") + 7; // Add 7 to skip "STATUS:"

int daysLeft = Integer.parseInt(telemetryData.substring(hyphenPos + 1, asterisk1Pos));
String timeLeft = telemetryData.substring(asterisk1Pos + 1, asterisk2Pos);
String status = telemetryData.substring(statusPos);

// Time Conversion
String[] timeParts = timeLeft.split(":");
int hoursLeft = Integer.parseInt(timeParts[0]);
int minutesLeft = Integer.parseInt(timeParts[1]);
int secondsLeft = Integer.parseInt(timeParts[2]);

int totalMinutesLeft = daysLeft * 24 * 60 + hoursLeft * 60 + minutesLeft;

// Status Message Generation
char firstChar = status.charAt(0);
if (Character.isLowerCase(firstChar)) {
status = Character.toUpperCase(firstChar) + status.substring(1);
}

// Output
System.out.println("Time left for launch: " + totalMinutesLeft + " minutes");
System.out.println("Status: " + status);
}
}
```

This program parses the telemetry data string and extracts the number of days, time left, and status message. It then converts the time left into total minutes and generates a formatted status message. Finally, it outputs the total minutes left and the status message.

Note that this solution assumes the input string will always be in the specified format. Additional error handling and validation may be needed in a real-world scenario.