commit 816b847cf4d1dd0e9d70abf62f2e4b0676bedaea
Author: cuijingzhou <1150427534@qq.com>
Date: Fri Jul 11 18:21:26 2025 +0800
updata
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..aa724b7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,15 @@
+*.iml
+.gradle
+/local.properties
+/.idea/caches
+/.idea/libraries
+/.idea/modules.xml
+/.idea/workspace.xml
+/.idea/navEditor.xml
+/.idea/assetWizardSettings.xml
+.DS_Store
+/build
+/captures
+.externalNativeBuild
+.cxx
+local.properties
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/.idea/.name b/.idea/.name
new file mode 100644
index 0000000..14bbe0f
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+LongYi-GroundStation
\ No newline at end of file
diff --git a/.idea/AndroidProjectSystem.xml b/.idea/AndroidProjectSystem.xml
new file mode 100644
index 0000000..4a53bee
--- /dev/null
+++ b/.idea/AndroidProjectSystem.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..b86273d
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml
new file mode 100644
index 0000000..2459be5
--- /dev/null
+++ b/.idea/deploymentTargetSelector.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/dictionaries/11504.xml b/.idea/dictionaries/11504.xml
new file mode 100644
index 0000000..6441fe0
--- /dev/null
+++ b/.idea/dictionaries/11504.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
new file mode 100644
index 0000000..639c779
--- /dev/null
+++ b/.idea/gradle.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/migrations.xml b/.idea/migrations.xml
new file mode 100644
index 0000000..f8051a6
--- /dev/null
+++ b/.idea/migrations.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..e513455
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml
new file mode 100644
index 0000000..16660f1
--- /dev/null
+++ b/.idea/runConfigurations.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.gitignore b/app/.gitignore
new file mode 100644
index 0000000..42afabf
--- /dev/null
+++ b/app/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
new file mode 100644
index 0000000..74009e1
--- /dev/null
+++ b/app/build.gradle
@@ -0,0 +1,74 @@
+plugins {
+ alias(libs.plugins.android.application)
+ alias(libs.plugins.kotlin.android)
+}
+
+android {
+ namespace 'com.example.longyi_groundstation'
+ compileSdk 35
+
+ defaultConfig {
+ applicationId "com.example.longyi_groundstation"
+ minSdk 24
+ targetSdk 35
+ versionCode 1
+ versionName "1.0"
+
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+
+ ndk {
+ //设置支持的SO库架构(开发者可以根据需要,选择一个或多个平台的so)
+ abiFilters "armeabi-v7a", "arm64-v8a"
+ }
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ }
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_11
+ targetCompatibility JavaVersion.VERSION_11
+ }
+
+ sourceSets {
+ main {
+ jniLibs.srcDirs = ['libs']
+ }
+ }
+ kotlinOptions {
+ jvmTarget = '11'
+ }
+}
+
+dependencies {
+ implementation files(fileTree(include: ['*.jar'], dir: 'libs'))
+ implementation libs.appcompat
+ implementation libs.material
+ implementation libs.activity
+ implementation libs.constraintlayout
+ implementation libs.core.ktx
+ testImplementation libs.junit
+ androidTestImplementation libs.ext.junit
+ androidTestImplementation libs.espresso.core
+
+ implementation 'io.dronefleet.mavlink:mavlink:1.1.11'
+ implementation 'com.google.code.gson:gson:2.8.9'
+ implementation 'io.github.xmaihh:serialport:2.1.1' //有用
+ implementation 'com.licheedev:android-serialport:2.1.5'
+
+ implementation 'com.google.android.flexbox:flexbox:3.0.0'//自动补齐布局
+
+ implementation files("libs/fpvplayer-v3.2.2.aar")
+ implementation files("libs/sky-ijkplayer-v1.1.aar")
+ implementation files("libs/rcsdk-v1.2.1.aar")
+ implementation files("libs/isoparser-1.1.9.jar")//用于H264封装为MP4
+
+ implementation files('libs/AIKit.aar')
+
+// implementation 'com.github.licheedev.Android-SerialPort-API:serialport:2.0.0'
+
+
+}
\ No newline at end of file
diff --git a/app/debug/app-debug.apk b/app/debug/app-debug.apk
new file mode 100644
index 0000000..c6b2a25
Binary files /dev/null and b/app/debug/app-debug.apk differ
diff --git a/app/debug/output-metadata.json b/app/debug/output-metadata.json
new file mode 100644
index 0000000..d649ef7
--- /dev/null
+++ b/app/debug/output-metadata.json
@@ -0,0 +1,21 @@
+{
+ "version": 3,
+ "artifactType": {
+ "type": "APK",
+ "kind": "Directory"
+ },
+ "applicationId": "com.example.longyi_groundstation",
+ "variantName": "debug",
+ "elements": [
+ {
+ "type": "SINGLE",
+ "filters": [],
+ "attributes": [],
+ "versionCode": 1,
+ "versionName": "1.0",
+ "outputFile": "app-debug.apk"
+ }
+ ],
+ "elementType": "File",
+ "minSdkVersionForDexing": 24
+}
\ No newline at end of file
diff --git a/app/libs/AIKit.aar b/app/libs/AIKit.aar
new file mode 100644
index 0000000..ca6f61f
Binary files /dev/null and b/app/libs/AIKit.aar differ
diff --git a/app/libs/AMap3DMap_10.1.300_AMapSearch_9.7.4_AMapLocation_6.4.9_20250509.jar b/app/libs/AMap3DMap_10.1.300_AMapSearch_9.7.4_AMapLocation_6.4.9_20250509.jar
new file mode 100644
index 0000000..9ec90e4
Binary files /dev/null and b/app/libs/AMap3DMap_10.1.300_AMapSearch_9.7.4_AMapLocation_6.4.9_20250509.jar differ
diff --git a/app/libs/arm64-v8a/libAMapSDK_MAP_v10_1_300.so b/app/libs/arm64-v8a/libAMapSDK_MAP_v10_1_300.so
new file mode 100644
index 0000000..3a18395
Binary files /dev/null and b/app/libs/arm64-v8a/libAMapSDK_MAP_v10_1_300.so differ
diff --git a/app/libs/armeabi-v7a/libAMapSDK_MAP_v10_1_300.so b/app/libs/armeabi-v7a/libAMapSDK_MAP_v10_1_300.so
new file mode 100644
index 0000000..a09bbd6
Binary files /dev/null and b/app/libs/armeabi-v7a/libAMapSDK_MAP_v10_1_300.so differ
diff --git a/app/libs/build.properties b/app/libs/build.properties
new file mode 100644
index 0000000..801ffc4
--- /dev/null
+++ b/app/libs/build.properties
@@ -0,0 +1,10 @@
+iid=11738
+sid=3590694
+bid=1406899
+version=13.08.0.10009104
+time=2025-05-09 16:22:08
+FEATURE_LOCATION=1
+FEATURE_ROUTE_OVERLAY=1
+FEATURE_MVT=1
+FEATURE_3DTiles=1
+FEATURE_GLTF=1
diff --git a/app/libs/fpvplayer-v3.2.2.aar b/app/libs/fpvplayer-v3.2.2.aar
new file mode 100644
index 0000000..dff2a47
Binary files /dev/null and b/app/libs/fpvplayer-v3.2.2.aar differ
diff --git a/app/libs/isoparser-1.1.9.jar b/app/libs/isoparser-1.1.9.jar
new file mode 100644
index 0000000..61f0870
Binary files /dev/null and b/app/libs/isoparser-1.1.9.jar differ
diff --git a/app/libs/rcsdk-v1.2.1.aar b/app/libs/rcsdk-v1.2.1.aar
new file mode 100644
index 0000000..ede1220
Binary files /dev/null and b/app/libs/rcsdk-v1.2.1.aar differ
diff --git a/app/libs/sky-ijkplayer-v1.1.aar b/app/libs/sky-ijkplayer-v1.1.aar
new file mode 100644
index 0000000..19d550b
Binary files /dev/null and b/app/libs/sky-ijkplayer-v1.1.aar differ
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
new file mode 100644
index 0000000..481bb43
--- /dev/null
+++ b/app/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
\ No newline at end of file
diff --git a/app/src/androidTest/java/com/example/longyi_groundstation/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/example/longyi_groundstation/ExampleInstrumentedTest.java
new file mode 100644
index 0000000..9e3c9fa
--- /dev/null
+++ b/app/src/androidTest/java/com/example/longyi_groundstation/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+package com.example.longyi_groundstation;
+
+import android.content.Context;
+
+import androidx.test.platform.app.InstrumentationRegistry;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.*;
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * @see Testing documentation
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+ @Test
+ public void useAppContext() {
+ // Context of the app under test.
+ Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
+ assertEquals("com.example.longyi_groundstation", appContext.getPackageName());
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..8f2d31c
--- /dev/null
+++ b/app/src/main/AndroidManifest.xml
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/Funcation/Activity/FuncationActivity.java b/app/src/main/java/com/example/longyi_groundstation/Funcation/Activity/FuncationActivity.java
new file mode 100644
index 0000000..184d4c4
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Funcation/Activity/FuncationActivity.java
@@ -0,0 +1,82 @@
+package com.example.longyi_groundstation.Funcation.Activity;
+
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+
+import androidx.activity.EdgeToEdge;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.core.graphics.Insets;
+import androidx.core.view.ViewCompat;
+import androidx.core.view.WindowInsetsCompat;
+
+import com.example.longyi_groundstation.Funcation.Void.AllView;
+import com.example.longyi_groundstation.Main.Activity.MainActivity;
+import com.example.longyi_groundstation.Main.Service.MyBoundService;
+import com.example.longyi_groundstation.R;
+
+public class FuncationActivity extends AppCompatActivity {
+
+ private AllView allView;
+ private Intent intent;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ EdgeToEdge.enable(this);
+ setContentView(R.layout.activity_funcation);
+ ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
+ Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
+ v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
+ return insets;
+ });
+
+
+ initData();
+ initView();
+ initOnClick();
+
+ }
+
+
+ /**
+ * 方法:初始化数据
+ *
+ * @cuijingzhou
+ */
+ private void initData() {
+ intent = getIntent();
+
+ }
+
+ /**
+ * 方法:初始化视图
+ *
+ * @cuijingzhou
+ */
+ private void initView() {
+ allView = new AllView(this);
+
+
+ }
+
+ /**
+ * 方法:初始化点击事件
+ *
+ * @cuijingzhou
+ */
+ private void initOnClick() {
+
+ allView.ll_work.setOnClickListener(v -> {
+ // 绑定服务
+ Intent intents = new Intent(this, MainActivity.class);
+ intents.putExtra("type", intent.getIntExtra("type", 0));
+ if (intent.getIntExtra("type", 0) != 0) {
+ intents.putExtra("port", intent.getStringExtra("port"));
+ }
+ startActivity(intents);
+ });
+
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/Funcation/Void/AllView.java b/app/src/main/java/com/example/longyi_groundstation/Funcation/Void/AllView.java
new file mode 100644
index 0000000..a58973f
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Funcation/Void/AllView.java
@@ -0,0 +1,33 @@
+package com.example.longyi_groundstation.Funcation.Void;
+
+import android.app.Activity;
+import android.widget.EditText;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.RadioButton;
+import android.widget.RadioGroup;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.amap.api.maps.MapView;
+import com.example.longyi_groundstation.Main.View.AttitudeIndicatorView;
+import com.example.longyi_groundstation.R;
+import com.skydroid.fpvplayer.FPVWidget;
+
+public class AllView {
+
+ public Activity activity;
+ public LinearLayout ll_work;
+
+ public AllView(Activity activity) {
+ this.activity = activity;
+ init();
+ }
+
+ public void init() {
+ ll_work = activity.findViewById(R.id.ll_work);
+
+ }
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/Funcation/Void/SharedPrefsHelper.java b/app/src/main/java/com/example/longyi_groundstation/Funcation/Void/SharedPrefsHelper.java
new file mode 100644
index 0000000..81be39e
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Funcation/Void/SharedPrefsHelper.java
@@ -0,0 +1,37 @@
+package com.example.longyi_groundstation.Funcation.Void;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+
+public class SharedPrefsHelper {
+ private static final String PREFS_NAME = "AccountPrefs";
+ private static final String KEY_USERNAME = "username";
+ private static final String KEY_PASSWORD = "password";
+
+ // 保存账号密码
+ public static void saveCredentials(Context context, String username, String password) {
+ SharedPreferences sharedPref = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);
+ SharedPreferences.Editor editor = sharedPref.edit();
+ editor.putString(KEY_USERNAME, username);
+ editor.putString(KEY_PASSWORD, password);
+ editor.apply(); // 异步提交
+ }
+
+ // 获取保存的账号
+ public static String getUsername(Context context) {
+ SharedPreferences sharedPref = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);
+ return sharedPref.getString(KEY_USERNAME, null);
+ }
+
+ // 获取保存的密码
+ public static String getPassword(Context context) {
+ SharedPreferences sharedPref = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);
+ return sharedPref.getString(KEY_PASSWORD, null);
+ }
+
+ // 清除存储的账号密码
+ public static void clearCredentials(Context context) {
+ SharedPreferences sharedPref = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);
+ sharedPref.edit().clear().apply();
+ }
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/Login/Activity/LoginActivity.java b/app/src/main/java/com/example/longyi_groundstation/Login/Activity/LoginActivity.java
new file mode 100644
index 0000000..61b8949
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Login/Activity/LoginActivity.java
@@ -0,0 +1,113 @@
+package com.example.longyi_groundstation.Login.Activity;
+
+import android.annotation.SuppressLint;
+import android.content.Intent;
+import android.os.Bundle;
+import androidx.activity.EdgeToEdge;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.core.graphics.Insets;
+import androidx.core.view.ViewCompat;
+import androidx.core.view.WindowInsetsCompat;
+
+import com.example.longyi_groundstation.Funcation.Activity.FuncationActivity;
+import com.example.longyi_groundstation.Login.Void.AllView;
+import com.example.longyi_groundstation.Main.Activity.MainActivity;
+import com.example.longyi_groundstation.R;
+
+
+public class LoginActivity extends AppCompatActivity {
+
+
+ private AllView allView;
+ private int type = 0;//0=串口 1=UDP
+
+ private boolean isSelect = true;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ EdgeToEdge.enable(this);
+ setContentView(R.layout.activity_login);
+ ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
+ Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
+ v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
+ return insets;
+ });
+
+ initData();
+ initView();
+ initOnClick();
+ }
+
+ /**
+ * 方法:初始化数据
+ *
+ * @cuijingzhou
+ */
+ private void initData() {
+
+ }
+
+ /**
+ * 方法:初始化视图
+ *
+ * @cuijingzhou
+ */
+ private void initView() {
+ //所有组件
+ allView = new AllView(this);
+
+
+
+ }
+
+ /**
+ * 方法:初始化点击事件
+ *
+ * @cuijingzhou
+ */
+ @SuppressLint("NonConstantResourceId")
+ private void initOnClick() {
+
+ allView.btn_login.setOnClickListener(v -> {
+ //todo 没有用
+ if (allView.et_username.getText().toString().equals("admin1")){
+ type = 1;
+ }
+ Intent intent = new Intent(LoginActivity.this, FuncationActivity.class);
+ intent.putExtra("type", type);
+ if (type != 0){
+ intent.putExtra("port", "14551");
+ }
+ startActivity(intent);
+ finish();
+ });
+
+ //选择是否记住密码
+ allView.ll_select_password.setOnClickListener(v -> {
+ if (isSelect){
+ isSelect = false;
+ allView.iv_select.setImageResource(R.mipmap.icon_select_no);
+ }else {
+ isSelect = true;
+ allView.iv_select.setImageResource(R.mipmap.icon_select_yes);
+ }
+ });
+
+// allView.rb_bt1.setOnClickListener(v -> {
+// type = 0;
+// });
+// allView.rb_bt2.setOnClickListener(v -> {
+// type = 1;
+// });
+
+ }
+
+ @Override
+ protected void onDestroy() {
+// allView.rg_layout.setOnCheckedChangeListener(null);
+ super.onDestroy();
+ }
+
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/Login/Base/User.java b/app/src/main/java/com/example/longyi_groundstation/Login/Base/User.java
new file mode 100644
index 0000000..5ce6b7d
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Login/Base/User.java
@@ -0,0 +1,6 @@
+package com.example.longyi_groundstation.Login.Base;
+
+public class User {
+
+
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/Login/Void/AllView.java b/app/src/main/java/com/example/longyi_groundstation/Login/Void/AllView.java
new file mode 100644
index 0000000..aa11fce
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Login/Void/AllView.java
@@ -0,0 +1,53 @@
+package com.example.longyi_groundstation.Login.Void;
+
+import android.app.Activity;
+import android.widget.EditText;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.RadioButton;
+import android.widget.RadioGroup;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.amap.api.maps.MapView;
+import com.example.longyi_groundstation.Main.View.AttitudeIndicatorView;
+import com.example.longyi_groundstation.R;
+import com.skydroid.fpvplayer.FPVWidget;
+
+public class AllView {
+
+ public RelativeLayout main;
+ public Activity activity;
+ public EditText et_username;
+ public EditText et_password;
+ public TextView btn_login;
+ public TextView tv_restart;
+// public RadioGroup rg_layout;
+// public RadioButton rb_bt1,rb_bt2;
+
+ public LinearLayout ll_select_password;
+ public ImageView iv_select;
+
+
+ public AllView(Activity activity) {
+ this.activity = activity;
+ init();
+ }
+
+ public void init() {
+ et_username = activity.findViewById(R.id.et_username);
+ et_password = activity.findViewById(R.id.et_password);
+ btn_login = activity.findViewById(R.id.btn_login);
+// tv_restart = activity.findViewById(R.id.tv_restart);
+ main = activity.findViewById(R.id.main);
+// rg_layout = activity.findViewById(R.id.rg_layout);
+// rb_bt1 = activity.findViewById(R.id.rb_bt1);
+// rb_bt2 = activity.findViewById(R.id.rb_bt2);
+// et_port = activity.findViewById(R.id.et_port);
+ ll_select_password = activity.findViewById(R.id.ll_select_password);
+ iv_select = activity.findViewById(R.id.iv_select);
+
+ }
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/MAVLinkPacket.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/MAVLinkPacket.java
new file mode 100644
index 0000000..d0be6be
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/MAVLinkPacket.java
@@ -0,0 +1,749 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink;
+
+import static com.example.longyi_groundstation.MAVLink.common.msg_local_position_ned.*;
+import static com.example.longyi_groundstation.MAVLink.common.msg_mission_item_reached.*;
+import static com.example.longyi_groundstation.MAVLink.common.msg_servo_output_raw.*;
+
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload;
+import com.example.longyi_groundstation.MAVLink.common.*;
+import com.example.longyi_groundstation.MAVLink.minimal.msg_heartbeat;
+import com.example.longyi_groundstation.MAVLink.minimal.msg_protocol_version;
+import com.example.longyi_groundstation.MAVLink.paparazzi.CRC;
+import com.example.longyi_groundstation.MAVLink.paparazzi.msg_script_count;
+import com.example.longyi_groundstation.MAVLink.paparazzi.msg_script_current;
+import com.example.longyi_groundstation.MAVLink.paparazzi.msg_script_item;
+import com.example.longyi_groundstation.MAVLink.paparazzi.msg_script_request;
+import com.example.longyi_groundstation.MAVLink.paparazzi.msg_script_request_list;
+
+import java.io.Serializable;
+
+
+/**
+ * Common interface for all MAVLink Messages
+ * Packet Anatomy
+ * This is the anatomy of one packet. It is inspired by the CAN and SAE AS-4 standards.
+ *
+ * MAVLink 1 Packet Format
+ *
+ * Byte Index Content Value Explanation
+ * 0 Packet start sign v1.0: 0xFE Indicates the start of a new packet. (v0.9: 0x55; v1.0: 0xFE; v2.0 0xFD)
+ * 1 Payload length 0 - 255 Indicates length of the following payload.
+ * 2 Packet sequence 0 - 255 Each component counts up its send sequence. Allows to detect packet loss
+ * 3 System ID 1 - 255 ID of the SENDING system. Allows to differentiate different MAVs on the same network.
+ * 4 Component ID 0 - 255 ID of the SENDING component. Allows to differentiate different components of the same system, e.g. the IMU and the autopilot.
+ * 5 Message ID 0 - 255 ID of the message - the id defines what the payload means and how it should be correctly decoded.
+ * 6 to (n+6) Payload 0 - 255 Data of the message, depends on the message id.
+ * (n+7)to(n+8) Checksum (low byte, high byte) CRC16/MCRF4XX hash, excluding packet start sign, so bytes 1..(n+6) Note: The checksum also includes MAVLINK_CRC_EXTRA (Number computed from message fields. Protects the packet from decoding a different version of the same packet but with different variables).
+ *
+ * The checksum is the CRC16/MCRF4XX. Please see the MAVLink source code for a documented C-implementation of it. LINK TO CHECKSUM
+ * The minimum packet length is 8 bytes for acknowledgement packets without payload
+ * The maximum packet length is 263 bytes for full payload
+ *
+ *
+ * MAVLink 2 Packet Format
+ *
+ * Byte Index Content Value Explanation
+ * 0 Packet start sign v2.0: 0xFD Indicates the start of a new packet. (v0.9: 0x55; v1.0: 0xFE; v2.0 0xFD)
+ * 1 Payload length 0 - 255 Indicates length of the following payload.
+ * 2 Incompatible Flags 0 - 255 Flags that must be understood
+ * 3 Compatible Flags 0 - 255 Flags that can be ignored if not understood
+ * 4 Packet sequence 0 - 255 Each component counts up its send sequence. Allows to detect packet loss
+ * 5 System ID 1 - 255 ID of the SENDING system. Allows to differentiate different MAVs on the same network.
+ * 6 Component ID 0 - 255 ID of the SENDING component. Allows to differentiate different components of the same system, e.g. the IMU and the autopilot.
+ * 7 to 9 Message ID 0 - 16777216 ID of the message - the id defines what the payload means and how it should be correctly decoded.
+ * 10 Target System ID 1 - 255 (OPTIONAL) ID of the TARGET system. Only used for point-to-point mode
+ * 11 Target Component ID 0 - 255 (OPTIONAL) ID of the TARGET component. Only used for point-to-point mode
+ * 12 to (n+12) Payload 0 - 255 Data of the message, depends on the message id.
+ * (n+13)to(n+14) Checksum (low byte, high byte) CRC16/MCRF4XX hash, excluding packet start sign, so bytes 1..(n+6) Note: The checksum also includes MAVLINK_CRC_EXTRA (Number computed from message fields. Protects the packet from decoding a different version of the same packet but with different variables).
+ * (n+15)to(n+27) Signature (typeid, timestamp, sha256) (OPTIONAL) Signature which allows ensuring that the link is tamper-proof; 13 bytes containing typeid (1 byte), timestamp (6 bytes), and last 6 bytes of SHA256 hash
+ *
+ * The signature is a combination of a typeid, timestamp, and SHA256 hash.
+ * OPTIONAL fields mean that, if they are not used, they do not exist in the MAVLink frame at all. Typically target sysid and target compid are not used, and signature is only used if signing is set up between both ends.
+ *
+ * @see mavlink.io for more documentation on the MAVLink protocol
+ */
+public class MAVLinkPacket implements Serializable {
+ private static final long serialVersionUID = 2095947771227815314L;
+
+ public static final int MAVLINK_STX_MAVLINK1 = 0xFE; // 254
+ public static final int MAVLINK_STX_MAVLINK2 = 0xFD; // 253
+ public static final int MAVLINK1_HEADER_LEN = 6;
+ public static final int MAVLINK2_HEADER_LEN = 10;
+ public static final int MAVLINK1_NONPAYLOAD_LEN = MAVLINK1_HEADER_LEN + 2;
+ public static final int MAVLINK2_NONPAYLOAD_LEN = MAVLINK2_HEADER_LEN + 2;
+
+ static final boolean V = false;
+ static void logv(String str) {
+ if(V) System.out.println(String.format("MAVLinkPacket: %s", str));
+ }
+
+ /**
+ * Payload length
+ */
+ public final int len;
+
+ /**
+ * Message sequence
+ */
+ public int seq;
+
+ /**
+ * ID of the SENDING system. Allows to differentiate different MAVs on the
+ * same network.
+ */
+ public int sysid;
+
+ /**
+ * ID of the SENDING component. Allows to differentiate different components
+ * of the same system, e.g. the IMU and the autopilot.
+ * 组件
+ */
+ public int compid;
+
+ /**
+ * ID of the message - the id defines what the payload means and how it
+ * should be correctly decoded.
+ */
+ public int msgid;
+
+ /**
+ * Data of the message, depends on the message id.
+ */
+ public MAVLinkPayload payload;
+
+ /**
+ * CRC-16/MCRF4XX hash, excluding packet start sign, so bytes 1..(n+HEADER-LENGTH)
+ * Note: The checksum also includes MAVLINK_CRC_EXTRA (Number computed from
+ * message fields. Protects the packet from decoding a different version of
+ * the same packet but with different variables).
+ */
+ public CRC crc;
+
+ // MAVLink 2.0 fields
+
+ /**
+ * Flag to indicate which MAVLink version this packet is
+ */
+ public boolean isMavlink2;
+
+ /**
+ * Flags that must be understood
+ * 标志
+ */
+ public int incompatFlags;
+
+ /**
+ * Flags that can be ignored if not understood
+ */
+ public int compatFlags;
+
+ public MAVLinkPacket(int payloadLength) {
+ this(payloadLength, false);
+ }
+
+ public MAVLinkPacket(final int payloadLength, final boolean isMavlink2) {
+ len = payloadLength;
+ payload = new MAVLinkPayload();
+ this.isMavlink2 = isMavlink2;
+ }
+
+ /**
+ * Check if the size of the Payload is equal to the "len" byte
+ */
+ public boolean payloadIsFilled() {
+ return payload.size() >= len;
+ }
+
+ /**
+ * Update CRC for this packet.
+ * @return boolean True if the CRC was successfully updated. Otherwise false
+ */
+ public boolean generateCRC(final int payloadSize) {
+ if (crc == null) {
+ crc = new CRC();
+ } else {
+ crc.start_checksum();
+ }
+
+ if (isMavlink2) {
+ crc.update_checksum(payloadSize);
+ crc.update_checksum(incompatFlags);
+ crc.update_checksum(compatFlags);
+ crc.update_checksum(seq);
+ crc.update_checksum(sysid);
+ crc.update_checksum(compid);
+ crc.update_checksum(msgid);
+ crc.update_checksum(msgid >>> 8);
+ crc.update_checksum(msgid >>> 16);
+ } else {
+ crc.update_checksum(payloadSize);
+ crc.update_checksum(seq);
+ crc.update_checksum(sysid);
+ crc.update_checksum(compid);
+ crc.update_checksum(msgid);
+ }
+
+ payload.resetIndex();
+
+ for (int i = 0; i < payloadSize; i++) {
+ crc.update_checksum(payload.getByte());
+ }
+ return crc.finish_checksum(msgid);
+ }
+
+ /**
+ * Return length of actual data after trimming zeros at the end.
+ * @param payload
+ * @return minimum length of valid data
+ */
+ private int mavTrimPayload(final byte[] payload)
+ {
+ int length = payload.length;
+ while (length > 1 && payload[length-1] == 0) {
+ length--;
+ }
+ return length;
+ }
+
+ /**
+ * Encode this packet for transmission.
+ *
+ * @return Array with bytes to be transmitted
+ */
+ public byte[] encodePacket() {
+ final int bufLen;
+ final int payloadSize;
+
+ if (isMavlink2) {
+ payloadSize = mavTrimPayload(payload.payload.array());
+ bufLen = MAVLINK2_HEADER_LEN + payloadSize + 2;
+ } else {
+ payloadSize = payload.size();
+ bufLen = MAVLINK1_HEADER_LEN + payloadSize + 2;
+
+ }
+ byte[] buffer = new byte[bufLen];
+
+ int i = 0;
+ if (isMavlink2) {
+ buffer[i++] = (byte) MAVLINK_STX_MAVLINK2;
+ buffer[i++] = (byte) payloadSize;
+ buffer[i++] = (byte) incompatFlags;
+ buffer[i++] = (byte) compatFlags;
+ buffer[i++] = (byte) seq;
+ buffer[i++] = (byte) sysid;
+ buffer[i++] = (byte) compid;
+ buffer[i++] = (byte) (msgid & 0XFF);
+ buffer[i++] = (byte) ((msgid >>> 8) & 0XFF);
+ buffer[i++] = (byte) ((msgid >>> 16) & 0XFF);
+ } else {
+ buffer[i++] = (byte) MAVLINK_STX_MAVLINK1;
+ buffer[i++] = (byte) payloadSize;
+ buffer[i++] = (byte) seq;
+ buffer[i++] = (byte) sysid;
+ buffer[i++] = (byte) compid;
+ buffer[i++] = (byte) msgid;
+ }
+
+ for (int j = 0; j < payloadSize; ++j) {
+ buffer[i++] = payload.payload.get(j);
+ }
+
+ generateCRC(payloadSize);
+ buffer[i++] = (byte) (crc.getLSB());
+ buffer[i++] = (byte) (crc.getMSB());
+
+ logv(String.format("encode: isMavlink2=%s msgid=%d", isMavlink2, msgid));
+
+ return buffer;
+ }
+
+ /**
+ * Unpack the data in this packet and return a MAVLink message
+ *
+ * @return MAVLink message decoded from this packet
+ */
+ public MAVLinkMessage unpack() {
+ switch (msgid) {
+ case msg_heartbeat.MAVLINK_MSG_ID_HEARTBEAT:
+ return new msg_heartbeat(this);
+ case msg_sys_status.MAVLINK_MSG_ID_SYS_STATUS:
+ return new msg_sys_status(this);
+ case msg_system_time.MAVLINK_MSG_ID_SYSTEM_TIME:
+ return new msg_system_time(this);
+ case msg_ping.MAVLINK_MSG_ID_PING:
+ return new msg_ping(this);
+ case msg_change_operator_control.MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL:
+ return new msg_change_operator_control(this);
+ case msg_change_operator_control_ack.MAVLINK_MSG_ID_CHANGE_OPERATOR_CONTROL_ACK:
+ return new msg_change_operator_control_ack(this);
+ case msg_auth_key.MAVLINK_MSG_ID_AUTH_KEY:
+ return new msg_auth_key(this);
+ case msg_link_node_status.MAVLINK_MSG_ID_LINK_NODE_STATUS:
+ return new msg_link_node_status(this);
+ case msg_set_mode.MAVLINK_MSG_ID_SET_MODE:
+ return new msg_set_mode(this);
+ case msg_param_request_read.MAVLINK_MSG_ID_PARAM_REQUEST_READ:
+ return new msg_param_request_read(this);
+ case msg_param_request_list.MAVLINK_MSG_ID_PARAM_REQUEST_LIST:
+ return new msg_param_request_list(this);
+ case msg_param_value.MAVLINK_MSG_ID_PARAM_VALUE:
+ return new msg_param_value(this);
+ case msg_param_set.MAVLINK_MSG_ID_PARAM_SET:
+ return new msg_param_set(this);
+ case msg_gps_raw_int.MAVLINK_MSG_ID_GPS_RAW_INT:
+ return new msg_gps_raw_int(this);
+ case msg_gps_status.MAVLINK_MSG_ID_GPS_STATUS:
+ return new msg_gps_status(this);
+ case msg_scaled_imu.MAVLINK_MSG_ID_SCALED_IMU:
+ return new msg_scaled_imu(this);
+ case msg_raw_imu.MAVLINK_MSG_ID_RAW_IMU:
+ return new msg_raw_imu(this);
+ case msg_raw_pressure.MAVLINK_MSG_ID_RAW_PRESSURE:
+ return new msg_raw_pressure(this);
+ case msg_scaled_pressure.MAVLINK_MSG_ID_SCALED_PRESSURE:
+ return new msg_scaled_pressure(this);
+ case msg_attitude.MAVLINK_MSG_ID_ATTITUDE:
+ return new msg_attitude(this);
+ case msg_attitude_quaternion.MAVLINK_MSG_ID_ATTITUDE_QUATERNION:
+ return new msg_attitude_quaternion(this);
+ case MAVLINK_MSG_ID_LOCAL_POSITION_NED:
+ return new msg_local_position_ned(this);
+ case msg_global_position_int.MAVLINK_MSG_ID_GLOBAL_POSITION_INT:
+ return new msg_global_position_int(this);
+ case msg_rc_channels_scaled.MAVLINK_MSG_ID_RC_CHANNELS_SCALED:
+ return new msg_rc_channels_scaled(this);
+ case msg_rc_channels_raw.MAVLINK_MSG_ID_RC_CHANNELS_RAW:
+ return new msg_rc_channels_raw(this);
+ case MAVLINK_MSG_ID_SERVO_OUTPUT_RAW:
+ return new msg_servo_output_raw(this);
+ case msg_mission_request_partial_list.MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST:
+ return new msg_mission_request_partial_list(this);
+ case msg_mission_write_partial_list.MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST:
+ return new msg_mission_write_partial_list(this);
+ case msg_mission_item.MAVLINK_MSG_ID_MISSION_ITEM:
+ return new msg_mission_item(this);
+ case msg_mission_request.MAVLINK_MSG_ID_MISSION_REQUEST:
+ return new msg_mission_request(this);
+ case msg_mission_set_current.MAVLINK_MSG_ID_MISSION_SET_CURRENT:
+ return new msg_mission_set_current(this);
+ case msg_mission_current.MAVLINK_MSG_ID_MISSION_CURRENT:
+ return new msg_mission_current(this);
+ case msg_mission_request_list.MAVLINK_MSG_ID_MISSION_REQUEST_LIST:
+ return new msg_mission_request_list(this);
+ case msg_mission_count.MAVLINK_MSG_ID_MISSION_COUNT:
+ return new msg_mission_count(this);
+ case msg_mission_clear_all.MAVLINK_MSG_ID_MISSION_CLEAR_ALL:
+ return new msg_mission_clear_all(this);
+ case MAVLINK_MSG_ID_MISSION_ITEM_REACHED:
+ return new msg_mission_item_reached(this);
+ case msg_mission_ack.MAVLINK_MSG_ID_MISSION_ACK:
+ return new msg_mission_ack(this);
+ case msg_set_gps_global_origin.MAVLINK_MSG_ID_SET_GPS_GLOBAL_ORIGIN:
+ return new msg_set_gps_global_origin(this);
+ case msg_gps_global_origin.MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN:
+ return new msg_gps_global_origin(this);
+ case msg_param_map_rc.MAVLINK_MSG_ID_PARAM_MAP_RC:
+ return new msg_param_map_rc(this);
+ case msg_mission_request_int.MAVLINK_MSG_ID_MISSION_REQUEST_INT:
+ return new msg_mission_request_int(this);
+ case msg_safety_set_allowed_area.MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA:
+ return new msg_safety_set_allowed_area(this);
+ case msg_safety_allowed_area.MAVLINK_MSG_ID_SAFETY_ALLOWED_AREA:
+ return new msg_safety_allowed_area(this);
+ case msg_attitude_quaternion_cov.MAVLINK_MSG_ID_ATTITUDE_QUATERNION_COV:
+ return new msg_attitude_quaternion_cov(this);
+ case msg_nav_controller_output.MAVLINK_MSG_ID_NAV_CONTROLLER_OUTPUT:
+ return new msg_nav_controller_output(this);
+ case msg_global_position_int_cov.MAVLINK_MSG_ID_GLOBAL_POSITION_INT_COV:
+ return new msg_global_position_int_cov(this);
+ case msg_local_position_ned_cov.MAVLINK_MSG_ID_LOCAL_POSITION_NED_COV:
+ return new msg_local_position_ned_cov(this);
+ case msg_rc_channels.MAVLINK_MSG_ID_RC_CHANNELS:
+ return new msg_rc_channels(this);
+ case msg_request_data_stream.MAVLINK_MSG_ID_REQUEST_DATA_STREAM:
+ return new msg_request_data_stream(this);
+ case msg_data_stream.MAVLINK_MSG_ID_DATA_STREAM:
+ return new msg_data_stream(this);
+ case msg_manual_control.MAVLINK_MSG_ID_MANUAL_CONTROL:
+ return new msg_manual_control(this);
+ case msg_rc_channels_override.MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE:
+ return new msg_rc_channels_override(this);
+ case msg_mission_item_int.MAVLINK_MSG_ID_MISSION_ITEM_INT:
+ return new msg_mission_item_int(this);
+ case msg_vfr_hud.MAVLINK_MSG_ID_VFR_HUD:
+ return new msg_vfr_hud(this);
+ case msg_command_int.MAVLINK_MSG_ID_COMMAND_INT:
+ return new msg_command_int(this);
+ case msg_command_long.MAVLINK_MSG_ID_COMMAND_LONG:
+ return new msg_command_long(this);
+ case msg_command_ack.MAVLINK_MSG_ID_COMMAND_ACK:
+ return new msg_command_ack(this);
+ case msg_command_cancel.MAVLINK_MSG_ID_COMMAND_CANCEL:
+ return new msg_command_cancel(this);
+ case msg_manual_setpoint.MAVLINK_MSG_ID_MANUAL_SETPOINT:
+ return new msg_manual_setpoint(this);
+ case msg_set_attitude_target.MAVLINK_MSG_ID_SET_ATTITUDE_TARGET:
+ return new msg_set_attitude_target(this);
+ case msg_attitude_target.MAVLINK_MSG_ID_ATTITUDE_TARGET:
+ return new msg_attitude_target(this);
+ case msg_set_position_target_local_ned.MAVLINK_MSG_ID_SET_POSITION_TARGET_LOCAL_NED:
+ return new msg_set_position_target_local_ned(this);
+ case msg_position_target_local_ned.MAVLINK_MSG_ID_POSITION_TARGET_LOCAL_NED:
+ return new msg_position_target_local_ned(this);
+ case msg_set_position_target_global_int.MAVLINK_MSG_ID_SET_POSITION_TARGET_GLOBAL_INT:
+ return new msg_set_position_target_global_int(this);
+ case msg_position_target_global_int.MAVLINK_MSG_ID_POSITION_TARGET_GLOBAL_INT:
+ return new msg_position_target_global_int(this);
+ case msg_local_position_ned_system_global_offset.MAVLINK_MSG_ID_LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET:
+ return new msg_local_position_ned_system_global_offset(this);
+ case msg_hil_state.MAVLINK_MSG_ID_HIL_STATE:
+ return new msg_hil_state(this);
+ case msg_hil_controls.MAVLINK_MSG_ID_HIL_CONTROLS:
+ return new msg_hil_controls(this);
+ case msg_hil_rc_inputs_raw.MAVLINK_MSG_ID_HIL_RC_INPUTS_RAW:
+ return new msg_hil_rc_inputs_raw(this);
+ case msg_hil_actuator_controls.MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS:
+ return new msg_hil_actuator_controls(this);
+ case msg_optical_flow.MAVLINK_MSG_ID_OPTICAL_FLOW:
+ return new msg_optical_flow(this);
+ case msg_global_vision_position_estimate.MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE:
+ return new msg_global_vision_position_estimate(this);
+ case msg_vision_position_estimate.MAVLINK_MSG_ID_VISION_POSITION_ESTIMATE:
+ return new msg_vision_position_estimate(this);
+ case msg_vision_speed_estimate.MAVLINK_MSG_ID_VISION_SPEED_ESTIMATE:
+ return new msg_vision_speed_estimate(this);
+ case msg_vicon_position_estimate.MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE:
+ return new msg_vicon_position_estimate(this);
+ case msg_highres_imu.MAVLINK_MSG_ID_HIGHRES_IMU:
+ return new msg_highres_imu(this);
+ case msg_optical_flow_rad.MAVLINK_MSG_ID_OPTICAL_FLOW_RAD:
+ return new msg_optical_flow_rad(this);
+ case msg_hil_sensor.MAVLINK_MSG_ID_HIL_SENSOR:
+ return new msg_hil_sensor(this);
+ case msg_sim_state.MAVLINK_MSG_ID_SIM_STATE:
+ return new msg_sim_state(this);
+ case msg_radio_status.MAVLINK_MSG_ID_RADIO_STATUS:
+ return new msg_radio_status(this);
+ case msg_file_transfer_protocol.MAVLINK_MSG_ID_FILE_TRANSFER_PROTOCOL:
+ return new msg_file_transfer_protocol(this);
+ case msg_timesync.MAVLINK_MSG_ID_TIMESYNC:
+ return new msg_timesync(this);
+ case msg_camera_trigger.MAVLINK_MSG_ID_CAMERA_TRIGGER:
+ return new msg_camera_trigger(this);
+ case msg_hil_gps.MAVLINK_MSG_ID_HIL_GPS:
+ return new msg_hil_gps(this);
+ case msg_hil_optical_flow.MAVLINK_MSG_ID_HIL_OPTICAL_FLOW:
+ return new msg_hil_optical_flow(this);
+ case msg_hil_state_quaternion.MAVLINK_MSG_ID_HIL_STATE_QUATERNION:
+ return new msg_hil_state_quaternion(this);
+ case msg_scaled_imu2.MAVLINK_MSG_ID_SCALED_IMU2:
+ return new msg_scaled_imu2(this);
+ case msg_log_request_list.MAVLINK_MSG_ID_LOG_REQUEST_LIST:
+ return new msg_log_request_list(this);
+ case msg_log_entry.MAVLINK_MSG_ID_LOG_ENTRY:
+ return new msg_log_entry(this);
+ case msg_log_request_data.MAVLINK_MSG_ID_LOG_REQUEST_DATA:
+ return new msg_log_request_data(this);
+ case msg_log_data.MAVLINK_MSG_ID_LOG_DATA:
+ return new msg_log_data(this);
+ case msg_log_erase.MAVLINK_MSG_ID_LOG_ERASE:
+ return new msg_log_erase(this);
+ case msg_log_request_end.MAVLINK_MSG_ID_LOG_REQUEST_END:
+ return new msg_log_request_end(this);
+ case msg_gps_inject_data.MAVLINK_MSG_ID_GPS_INJECT_DATA:
+ return new msg_gps_inject_data(this);
+ case msg_gps2_raw.MAVLINK_MSG_ID_GPS2_RAW:
+ return new msg_gps2_raw(this);
+ case msg_power_status.MAVLINK_MSG_ID_POWER_STATUS:
+ return new msg_power_status(this);
+ case msg_serial_control.MAVLINK_MSG_ID_SERIAL_CONTROL:
+ return new msg_serial_control(this);
+ case msg_gps_rtk.MAVLINK_MSG_ID_GPS_RTK:
+ return new msg_gps_rtk(this);
+ case msg_gps2_rtk.MAVLINK_MSG_ID_GPS2_RTK:
+ return new msg_gps2_rtk(this);
+ case msg_scaled_imu3.MAVLINK_MSG_ID_SCALED_IMU3:
+ return new msg_scaled_imu3(this);
+ case msg_data_transmission_handshake.MAVLINK_MSG_ID_DATA_TRANSMISSION_HANDSHAKE:
+ return new msg_data_transmission_handshake(this);
+ case msg_encapsulated_data.MAVLINK_MSG_ID_ENCAPSULATED_DATA:
+ return new msg_encapsulated_data(this);
+ case msg_distance_sensor.MAVLINK_MSG_ID_DISTANCE_SENSOR:
+ return new msg_distance_sensor(this);
+ case msg_terrain_request.MAVLINK_MSG_ID_TERRAIN_REQUEST:
+ return new msg_terrain_request(this);
+ case msg_terrain_data.MAVLINK_MSG_ID_TERRAIN_DATA:
+ return new msg_terrain_data(this);
+ case msg_terrain_check.MAVLINK_MSG_ID_TERRAIN_CHECK:
+ return new msg_terrain_check(this);
+ case msg_terrain_report.MAVLINK_MSG_ID_TERRAIN_REPORT:
+ return new msg_terrain_report(this);
+ case msg_scaled_pressure2.MAVLINK_MSG_ID_SCALED_PRESSURE2:
+ return new msg_scaled_pressure2(this);
+ case msg_att_pos_mocap.MAVLINK_MSG_ID_ATT_POS_MOCAP:
+ return new msg_att_pos_mocap(this);
+ case msg_set_actuator_control_target.MAVLINK_MSG_ID_SET_ACTUATOR_CONTROL_TARGET:
+ return new msg_set_actuator_control_target(this);
+ case msg_actuator_control_target.MAVLINK_MSG_ID_ACTUATOR_CONTROL_TARGET:
+ return new msg_actuator_control_target(this);
+ case msg_altitude.MAVLINK_MSG_ID_ALTITUDE:
+ return new msg_altitude(this);
+ case msg_resource_request.MAVLINK_MSG_ID_RESOURCE_REQUEST:
+ return new msg_resource_request(this);
+ case msg_scaled_pressure3.MAVLINK_MSG_ID_SCALED_PRESSURE3:
+ return new msg_scaled_pressure3(this);
+ case msg_follow_target.MAVLINK_MSG_ID_FOLLOW_TARGET:
+ return new msg_follow_target(this);
+ case msg_control_system_state.MAVLINK_MSG_ID_CONTROL_SYSTEM_STATE:
+ return new msg_control_system_state(this);
+ case msg_battery_status.MAVLINK_MSG_ID_BATTERY_STATUS:
+ return new msg_battery_status(this);
+ case msg_autopilot_version.MAVLINK_MSG_ID_AUTOPILOT_VERSION:
+ return new msg_autopilot_version(this);
+ case msg_landing_target.MAVLINK_MSG_ID_LANDING_TARGET:
+ return new msg_landing_target(this);
+ case msg_fence_status.MAVLINK_MSG_ID_FENCE_STATUS:
+ return new msg_fence_status(this);
+ case msg_script_item.MAVLINK_MSG_ID_SCRIPT_ITEM:
+ return new msg_script_item(this);
+ case msg_script_request.MAVLINK_MSG_ID_SCRIPT_REQUEST:
+ return new msg_script_request(this);
+ case msg_script_request_list.MAVLINK_MSG_ID_SCRIPT_REQUEST_LIST:
+ return new msg_script_request_list(this);
+ case msg_script_count.MAVLINK_MSG_ID_SCRIPT_COUNT:
+ return new msg_script_count(this);
+ case msg_script_current.MAVLINK_MSG_ID_SCRIPT_CURRENT:
+ return new msg_script_current(this);
+ case msg_mag_cal_report.MAVLINK_MSG_ID_MAG_CAL_REPORT:
+ return new msg_mag_cal_report(this);
+ case msg_efi_status.MAVLINK_MSG_ID_EFI_STATUS:
+ return new msg_efi_status(this);
+ case msg_estimator_status.MAVLINK_MSG_ID_ESTIMATOR_STATUS:
+ return new msg_estimator_status(this);
+ case msg_wind_cov.MAVLINK_MSG_ID_WIND_COV:
+ return new msg_wind_cov(this);
+ case msg_gps_input.MAVLINK_MSG_ID_GPS_INPUT:
+ return new msg_gps_input(this);
+ case msg_gps_rtcm_data.MAVLINK_MSG_ID_GPS_RTCM_DATA:
+ return new msg_gps_rtcm_data(this);
+ case msg_high_latency.MAVLINK_MSG_ID_HIGH_LATENCY:
+ return new msg_high_latency(this);
+ case msg_high_latency2.MAVLINK_MSG_ID_HIGH_LATENCY2:
+ return new msg_high_latency2(this);
+ case msg_vibration.MAVLINK_MSG_ID_VIBRATION:
+ return new msg_vibration(this);
+ case msg_home_position.MAVLINK_MSG_ID_HOME_POSITION:
+ return new msg_home_position(this);
+ case msg_set_home_position.MAVLINK_MSG_ID_SET_HOME_POSITION:
+ return new msg_set_home_position(this);
+ case msg_message_interval.MAVLINK_MSG_ID_MESSAGE_INTERVAL:
+ return new msg_message_interval(this);
+ case msg_extended_sys_state.MAVLINK_MSG_ID_EXTENDED_SYS_STATE:
+ return new msg_extended_sys_state(this);
+ case msg_adsb_vehicle.MAVLINK_MSG_ID_ADSB_VEHICLE:
+ return new msg_adsb_vehicle(this);
+ case msg_collision.MAVLINK_MSG_ID_COLLISION:
+ return new msg_collision(this);
+ case msg_v2_extension.MAVLINK_MSG_ID_V2_EXTENSION:
+ return new msg_v2_extension(this);
+ case msg_memory_vect.MAVLINK_MSG_ID_MEMORY_VECT:
+ return new msg_memory_vect(this);
+ case msg_debug_vect.MAVLINK_MSG_ID_DEBUG_VECT:
+ return new msg_debug_vect(this);
+ case msg_named_value_float.MAVLINK_MSG_ID_NAMED_VALUE_FLOAT:
+ return new msg_named_value_float(this);
+ case msg_named_value_int.MAVLINK_MSG_ID_NAMED_VALUE_INT:
+ return new msg_named_value_int(this);
+ case msg_statustext.MAVLINK_MSG_ID_STATUSTEXT:
+ return new msg_statustext(this);
+ case msg_debug.MAVLINK_MSG_ID_DEBUG:
+ return new msg_debug(this);
+ case msg_setup_signing.MAVLINK_MSG_ID_SETUP_SIGNING:
+ return new msg_setup_signing(this);
+ case msg_button_change.MAVLINK_MSG_ID_BUTTON_CHANGE:
+ return new msg_button_change(this);
+ case msg_play_tune.MAVLINK_MSG_ID_PLAY_TUNE:
+ return new msg_play_tune(this);
+ case msg_camera_information.MAVLINK_MSG_ID_CAMERA_INFORMATION:
+ return new msg_camera_information(this);
+ case msg_camera_settings.MAVLINK_MSG_ID_CAMERA_SETTINGS:
+ return new msg_camera_settings(this);
+ case msg_storage_information.MAVLINK_MSG_ID_STORAGE_INFORMATION:
+ return new msg_storage_information(this);
+ case msg_camera_capture_status.MAVLINK_MSG_ID_CAMERA_CAPTURE_STATUS:
+ return new msg_camera_capture_status(this);
+ case msg_camera_image_captured.MAVLINK_MSG_ID_CAMERA_IMAGE_CAPTURED:
+ return new msg_camera_image_captured(this);
+ case msg_flight_information.MAVLINK_MSG_ID_FLIGHT_INFORMATION:
+ return new msg_flight_information(this);
+ case msg_mount_orientation.MAVLINK_MSG_ID_MOUNT_ORIENTATION:
+ return new msg_mount_orientation(this);
+ case msg_logging_data.MAVLINK_MSG_ID_LOGGING_DATA:
+ return new msg_logging_data(this);
+ case msg_logging_data_acked.MAVLINK_MSG_ID_LOGGING_DATA_ACKED:
+ return new msg_logging_data_acked(this);
+ case msg_logging_ack.MAVLINK_MSG_ID_LOGGING_ACK:
+ return new msg_logging_ack(this);
+ case msg_video_stream_information.MAVLINK_MSG_ID_VIDEO_STREAM_INFORMATION:
+ return new msg_video_stream_information(this);
+ case msg_video_stream_status.MAVLINK_MSG_ID_VIDEO_STREAM_STATUS:
+ return new msg_video_stream_status(this);
+ case msg_camera_fov_status.MAVLINK_MSG_ID_CAMERA_FOV_STATUS:
+ return new msg_camera_fov_status(this);
+ case msg_camera_tracking_image_status.MAVLINK_MSG_ID_CAMERA_TRACKING_IMAGE_STATUS:
+ return new msg_camera_tracking_image_status(this);
+ case msg_camera_tracking_geo_status.MAVLINK_MSG_ID_CAMERA_TRACKING_GEO_STATUS:
+ return new msg_camera_tracking_geo_status(this);
+ case msg_camera_thermal_range.MAVLINK_MSG_ID_CAMERA_THERMAL_RANGE:
+ return new msg_camera_thermal_range(this);
+ case msg_gimbal_manager_information.MAVLINK_MSG_ID_GIMBAL_MANAGER_INFORMATION:
+ return new msg_gimbal_manager_information(this);
+ case msg_gimbal_manager_status.MAVLINK_MSG_ID_GIMBAL_MANAGER_STATUS:
+ return new msg_gimbal_manager_status(this);
+ case msg_gimbal_manager_set_attitude.MAVLINK_MSG_ID_GIMBAL_MANAGER_SET_ATTITUDE:
+ return new msg_gimbal_manager_set_attitude(this);
+ case msg_gimbal_device_information.MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION:
+ return new msg_gimbal_device_information(this);
+ case msg_gimbal_device_set_attitude.MAVLINK_MSG_ID_GIMBAL_DEVICE_SET_ATTITUDE:
+ return new msg_gimbal_device_set_attitude(this);
+ case msg_gimbal_device_attitude_status.MAVLINK_MSG_ID_GIMBAL_DEVICE_ATTITUDE_STATUS:
+ return new msg_gimbal_device_attitude_status(this);
+ case msg_autopilot_state_for_gimbal_device.MAVLINK_MSG_ID_AUTOPILOT_STATE_FOR_GIMBAL_DEVICE:
+ return new msg_autopilot_state_for_gimbal_device(this);
+ case msg_gimbal_manager_set_pitchyaw.MAVLINK_MSG_ID_GIMBAL_MANAGER_SET_PITCHYAW:
+ return new msg_gimbal_manager_set_pitchyaw(this);
+ case msg_gimbal_manager_set_manual_control.MAVLINK_MSG_ID_GIMBAL_MANAGER_SET_MANUAL_CONTROL:
+ return new msg_gimbal_manager_set_manual_control(this);
+ case msg_esc_info.MAVLINK_MSG_ID_ESC_INFO:
+ return new msg_esc_info(this);
+ case msg_esc_status.MAVLINK_MSG_ID_ESC_STATUS:
+ return new msg_esc_status(this);
+ case msg_wifi_config_ap.MAVLINK_MSG_ID_WIFI_CONFIG_AP:
+ return new msg_wifi_config_ap(this);
+ case msg_protocol_version.MAVLINK_MSG_ID_PROTOCOL_VERSION:
+ return new msg_protocol_version(this);
+ case msg_ais_vessel.MAVLINK_MSG_ID_AIS_VESSEL:
+ return new msg_ais_vessel(this);
+ case msg_uavcan_node_status.MAVLINK_MSG_ID_UAVCAN_NODE_STATUS:
+ return new msg_uavcan_node_status(this);
+ case msg_uavcan_node_info.MAVLINK_MSG_ID_UAVCAN_NODE_INFO:
+ return new msg_uavcan_node_info(this);
+ case msg_param_ext_request_read.MAVLINK_MSG_ID_PARAM_EXT_REQUEST_READ:
+ return new msg_param_ext_request_read(this);
+ case msg_param_ext_request_list.MAVLINK_MSG_ID_PARAM_EXT_REQUEST_LIST:
+ return new msg_param_ext_request_list(this);
+ case msg_param_ext_value.MAVLINK_MSG_ID_PARAM_EXT_VALUE:
+ return new msg_param_ext_value(this);
+ case msg_param_ext_set.MAVLINK_MSG_ID_PARAM_EXT_SET:
+ return new msg_param_ext_set(this);
+ case msg_param_ext_ack.MAVLINK_MSG_ID_PARAM_EXT_ACK:
+ return new msg_param_ext_ack(this);
+ case msg_obstacle_distance.MAVLINK_MSG_ID_OBSTACLE_DISTANCE:
+ return new msg_obstacle_distance(this);
+ case msg_odometry.MAVLINK_MSG_ID_ODOMETRY:
+ return new msg_odometry(this);
+ case msg_trajectory_representation_waypoints.MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_WAYPOINTS:
+ return new msg_trajectory_representation_waypoints(this);
+ case msg_trajectory_representation_bezier.MAVLINK_MSG_ID_TRAJECTORY_REPRESENTATION_BEZIER:
+ return new msg_trajectory_representation_bezier(this);
+ case msg_cellular_status.MAVLINK_MSG_ID_CELLULAR_STATUS:
+ return new msg_cellular_status(this);
+ case msg_isbd_link_status.MAVLINK_MSG_ID_ISBD_LINK_STATUS:
+ return new msg_isbd_link_status(this);
+ case msg_cellular_config.MAVLINK_MSG_ID_CELLULAR_CONFIG:
+ return new msg_cellular_config(this);
+ case msg_raw_rpm.MAVLINK_MSG_ID_RAW_RPM:
+ return new msg_raw_rpm(this);
+ case msg_utm_global_position.MAVLINK_MSG_ID_UTM_GLOBAL_POSITION:
+ return new msg_utm_global_position(this);
+ case msg_debug_float_array.MAVLINK_MSG_ID_DEBUG_FLOAT_ARRAY:
+ return new msg_debug_float_array(this);
+ case msg_orbit_execution_status.MAVLINK_MSG_ID_ORBIT_EXECUTION_STATUS:
+ return new msg_orbit_execution_status(this);
+ case msg_smart_battery_info.MAVLINK_MSG_ID_SMART_BATTERY_INFO:
+ return new msg_smart_battery_info(this);
+ case msg_fuel_status.MAVLINK_MSG_ID_FUEL_STATUS:
+ return new msg_fuel_status(this);
+ case msg_battery_info.MAVLINK_MSG_ID_BATTERY_INFO:
+ return new msg_battery_info(this);
+ case msg_generator_status.MAVLINK_MSG_ID_GENERATOR_STATUS:
+ return new msg_generator_status(this);
+ case msg_actuator_output_status.MAVLINK_MSG_ID_ACTUATOR_OUTPUT_STATUS:
+ return new msg_actuator_output_status(this);
+ case msg_time_estimate_to_target.MAVLINK_MSG_ID_TIME_ESTIMATE_TO_TARGET:
+ return new msg_time_estimate_to_target(this);
+ case msg_tunnel.MAVLINK_MSG_ID_TUNNEL:
+ return new msg_tunnel(this);
+ case msg_can_frame.MAVLINK_MSG_ID_CAN_FRAME:
+ return new msg_can_frame(this);
+ case msg_canfd_frame.MAVLINK_MSG_ID_CANFD_FRAME:
+ return new msg_canfd_frame(this);
+ case msg_can_filter_modify.MAVLINK_MSG_ID_CAN_FILTER_MODIFY:
+ return new msg_can_filter_modify(this);
+ case msg_onboard_computer_status.MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS:
+ return new msg_onboard_computer_status(this);
+ case msg_component_information.MAVLINK_MSG_ID_COMPONENT_INFORMATION:
+ return new msg_component_information(this);
+ case msg_component_information_basic.MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC:
+ return new msg_component_information_basic(this);
+ case msg_component_metadata.MAVLINK_MSG_ID_COMPONENT_METADATA:
+ return new msg_component_metadata(this);
+ case msg_play_tune_v2.MAVLINK_MSG_ID_PLAY_TUNE_V2:
+ return new msg_play_tune_v2(this);
+ case msg_supported_tunes.MAVLINK_MSG_ID_SUPPORTED_TUNES:
+ return new msg_supported_tunes(this);
+ case msg_event.MAVLINK_MSG_ID_EVENT:
+ return new msg_event(this);
+ case msg_current_event_sequence.MAVLINK_MSG_ID_CURRENT_EVENT_SEQUENCE:
+ return new msg_current_event_sequence(this);
+ case msg_request_event.MAVLINK_MSG_ID_REQUEST_EVENT:
+ return new msg_request_event(this);
+ case msg_response_event_error.MAVLINK_MSG_ID_RESPONSE_EVENT_ERROR:
+ return new msg_response_event_error(this);
+ case msg_available_modes.MAVLINK_MSG_ID_AVAILABLE_MODES:
+ return new msg_available_modes(this);
+ case msg_current_mode.MAVLINK_MSG_ID_CURRENT_MODE:
+ return new msg_current_mode(this);
+ case msg_available_modes_monitor.MAVLINK_MSG_ID_AVAILABLE_MODES_MONITOR:
+ return new msg_available_modes_monitor(this);
+ case msg_illuminator_status.MAVLINK_MSG_ID_ILLUMINATOR_STATUS:
+ return new msg_illuminator_status(this);
+ case msg_wheel_distance.MAVLINK_MSG_ID_WHEEL_DISTANCE:
+ return new msg_wheel_distance(this);
+ case msg_winch_status.MAVLINK_MSG_ID_WINCH_STATUS:
+ return new msg_winch_status(this);
+ case msg_open_drone_id_basic_id.MAVLINK_MSG_ID_OPEN_DRONE_ID_BASIC_ID:
+ return new msg_open_drone_id_basic_id(this);
+ case msg_open_drone_id_location.MAVLINK_MSG_ID_OPEN_DRONE_ID_LOCATION:
+ return new msg_open_drone_id_location(this);
+ case msg_open_drone_id_authentication.MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION:
+ return new msg_open_drone_id_authentication(this);
+ case msg_open_drone_id_self_id.MAVLINK_MSG_ID_OPEN_DRONE_ID_SELF_ID:
+ return new msg_open_drone_id_self_id(this);
+ case msg_open_drone_id_system.MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM:
+ return new msg_open_drone_id_system(this);
+ case msg_open_drone_id_operator_id.MAVLINK_MSG_ID_OPEN_DRONE_ID_OPERATOR_ID:
+ return new msg_open_drone_id_operator_id(this);
+ case msg_open_drone_id_message_pack.MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK:
+ return new msg_open_drone_id_message_pack(this);
+ case msg_open_drone_id_arm_status.MAVLINK_MSG_ID_OPEN_DRONE_ID_ARM_STATUS:
+ return new msg_open_drone_id_arm_status(this);
+ case msg_open_drone_id_system_update.MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_UPDATE:
+ return new msg_open_drone_id_system_update(this);
+ case msg_hygrometer_sensor.MAVLINK_MSG_ID_HYGROMETER_SENSOR:
+ return new msg_hygrometer_sensor(this);
+
+ default:
+ return null;
+ }
+ }
+
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/Messages/Description.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/Messages/Description.java
new file mode 100644
index 0000000..90d9b1a
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/Messages/Description.java
@@ -0,0 +1,32 @@
+package com.example.longyi_groundstation.MAVLink.Messages;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.reflect.Field;
+
+@Documented
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.FIELD)
+@SuppressWarnings("unchecked")
+/**
+ * Description annotation to provide programmatic access to the MAVLink description for each field
+ */
+public @interface Description {
+
+ String value();
+
+ class Test {
+
+ @Description("The speed of the drone")
+ public float speed;
+
+ public static void main(String[] args) throws Exception {
+ Field f = Test.class.getField("speed");
+ Description anno = (Description) f.getAnnotation(Description.class);
+ System.out.println(anno.value());
+ }
+ }
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/Messages/MAVLinkMessage.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/Messages/MAVLinkMessage.java
new file mode 100644
index 0000000..8a641d5
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/Messages/MAVLinkMessage.java
@@ -0,0 +1,30 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.Messages;
+
+import java.io.Serializable;
+
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+
+/**
+ * Common interface for all MAVLink messages
+ */
+public abstract class MAVLinkMessage implements Serializable {
+ private static final long serialVersionUID = -7754622750478538539L;
+ // The MAVLink message classes have been changed to implement Serializable,
+ // this way is possible to pass a mavlink message through the Service-Acctivity interface
+
+ public int sysid;
+ public int compid;
+ public int msgid;
+ public boolean isMavlink2;
+
+ public abstract MAVLinkPacket pack();
+ public abstract void unpack(com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload payload);
+ public abstract String toString();
+ public abstract String name();
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/Messages/MAVLinkPayload.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/Messages/MAVLinkPayload.java
new file mode 100644
index 0000000..4d7c4f1
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/Messages/MAVLinkPayload.java
@@ -0,0 +1,210 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.Messages;
+
+import java.nio.ByteBuffer;
+
+/**
+ * Wrapper around {@link ByteBuffer} to represent a MAVLink message payload
+ */
+public class MAVLinkPayload {
+
+ private static final byte UNSIGNED_BYTE_MIN_VALUE = 0;
+ private static final short UNSIGNED_BYTE_MAX_VALUE = Byte.MAX_VALUE - Byte.MIN_VALUE;
+
+ private static final short UNSIGNED_SHORT_MIN_VALUE = 0;
+ private static final int UNSIGNED_SHORT_MAX_VALUE = Short.MAX_VALUE - Short.MIN_VALUE;
+
+ private static final int UNSIGNED_INT_MIN_VALUE = 0;
+ private static final long UNSIGNED_INT_MAX_VALUE = (long) Integer.MAX_VALUE - Integer.MIN_VALUE;
+
+ private static final long UNSIGNED_LONG_MIN_VALUE = 0;
+
+ public static final int MAX_PAYLOAD_SIZE = 255;
+
+ public final ByteBuffer payload;
+ public int index;
+
+ public MAVLinkPayload() {
+ // This has to be larger than the received payloadSize since MAVLINK V2 will truncate the payloads to the last non-zero value
+ payload = ByteBuffer.allocate(MAX_PAYLOAD_SIZE);
+ }
+
+ public ByteBuffer getData() {
+ return payload;
+ }
+
+ public int size() {
+ return payload.position();
+ }
+
+ public void add(byte c) {
+ payload.put(c);
+ }
+
+ public void resetIndex() {
+ index = 0;
+ }
+
+ public byte getByte() {
+ byte result = 0;
+ result |= (payload.get(index + 0) & 0xFF);
+ index += 1;
+ return result;
+ }
+
+ public short getUnsignedByte() {
+ short result = 0;
+ result |= payload.get(index + 0) & 0xFF;
+ index += 1;
+ return result;
+ }
+
+ public short getShort() {
+ short result = 0;
+ result |= (payload.get(index + 1) & 0xFF) << 8;
+ result |= (payload.get(index + 0) & 0xFF);
+ index += 2;
+ return result;
+ }
+
+ public int getUnsignedShort() {
+ int result = 0;
+ result |= (payload.get(index + 1) & 0xFF) << 8;
+ result |= (payload.get(index + 0) & 0xFF);
+ index += 2;
+ return result;
+ }
+
+ public int getInt() {
+ int result = 0;
+ result |= (payload.get(index + 3) & 0xFF) << 24;
+ result |= (payload.get(index + 2) & 0xFF) << 16;
+ result |= (payload.get(index + 1) & 0xFF) << 8;
+ result |= (payload.get(index + 0) & 0xFF);
+ index += 4;
+ return result;
+ }
+
+ public long getUnsignedInt() {
+ long result = 0;
+ result |= (payload.get(index + 3) & 0xFFL) << 24;
+ result |= (payload.get(index + 2) & 0xFFL) << 16;
+ result |= (payload.get(index + 1) & 0xFFL) << 8;
+ result |= (payload.get(index + 0) & 0xFFL);
+ index += 4;
+ return result;
+ }
+
+ public long getLong() {
+ long result = 0;
+ result |= (payload.get(index + 7) & 0xFFL) << 56;
+ result |= (payload.get(index + 6) & 0xFFL) << 48;
+ result |= (payload.get(index + 5) & 0xFFL) << 40;
+ result |= (payload.get(index + 4) & 0xFFL) << 32;
+ result |= (payload.get(index + 3) & 0xFFL) << 24;
+ result |= (payload.get(index + 2) & 0xFFL) << 16;
+ result |= (payload.get(index + 1) & 0xFFL) << 8;
+ result |= (payload.get(index + 0) & 0xFFL);
+ index += 8;
+ return result;
+ }
+
+ public long getUnsignedLong(){
+ return getLong();
+ }
+
+ public long getLongReverse() {
+ long result = 0;
+ result |= (payload.get(index + 0) & 0xFFL) << 56;
+ result |= (payload.get(index + 1) & 0xFFL) << 48;
+ result |= (payload.get(index + 2) & 0xFFL) << 40;
+ result |= (payload.get(index + 3) & 0xFFL) << 32;
+ result |= (payload.get(index + 4) & 0xFFL) << 24;
+ result |= (payload.get(index + 5) & 0xFFL) << 16;
+ result |= (payload.get(index + 6) & 0xFFL) << 8;
+ result |= (payload.get(index + 7) & 0xFFL);
+ index += 8;
+ return result;
+ }
+
+ public float getFloat() {
+ return Float.intBitsToFloat(getInt());
+ }
+
+ public double getDouble() {
+ return Double.longBitsToDouble(getLong());
+ }
+
+ public void putByte(byte data) {
+ add(data);
+ }
+
+ public void putUnsignedByte(short data) {
+ if (data < UNSIGNED_BYTE_MIN_VALUE || data > UNSIGNED_BYTE_MAX_VALUE) {
+ throw new IllegalArgumentException("Value is outside of the range of an unsigned byte: " + data);
+ }
+
+ putByte((byte) data);
+ }
+
+ public void putShort(short data) {
+ add((byte) (data >> 0));
+ add((byte) (data >> 8));
+ }
+
+ public void putUnsignedShort(int data) {
+ if (data < UNSIGNED_SHORT_MIN_VALUE || data > UNSIGNED_SHORT_MAX_VALUE) {
+ throw new IllegalArgumentException("Value is outside of the range of an unsigned short: " + data);
+ }
+
+ putShort((short) data);
+ }
+
+ public void putInt(int data) {
+ add((byte) (data >> 0));
+ add((byte) (data >> 8));
+ add((byte) (data >> 16));
+ add((byte) (data >> 24));
+ }
+
+ public void putUnsignedInt(long data) {
+ if (data < UNSIGNED_INT_MIN_VALUE || data > UNSIGNED_INT_MAX_VALUE) {
+ throw new IllegalArgumentException("Value is outside of the range of an unsigned int: " + data);
+ }
+
+ putInt((int) data);
+ }
+
+ public void putLong(long data) {
+ add((byte) (data >> 0));
+ add((byte) (data >> 8));
+ add((byte) (data >> 16));
+ add((byte) (data >> 24));
+ add((byte) (data >> 32));
+ add((byte) (data >> 40));
+ add((byte) (data >> 48));
+ add((byte) (data >> 56));
+ }
+
+ public void putUnsignedLong(long data) {
+ if (data < UNSIGNED_LONG_MIN_VALUE) {
+ throw new IllegalArgumentException("Value is outside of the range of an unsigned long: " + data);
+ }
+
+ putLong(data);
+ }
+
+ public void putFloat(float data) {
+ putInt(Float.floatToIntBits(data));
+ }
+
+ public void putDouble(double data) {
+ putLong(Double.doubleToLongBits(data));
+ }
+
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/Messages/MAVLinkStats.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/Messages/MAVLinkStats.java
new file mode 100644
index 0000000..8085adf
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/Messages/MAVLinkStats.java
@@ -0,0 +1,153 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.Messages;
+
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.common.msg_radio_status;
+
+/**
+ * Storage for MAVLink Packet and Error statistics
+ */
+public class MAVLinkStats /* implements Serializable */{
+
+ public int receivedPacketCount; // total received packet count for all sources
+
+ public int crcErrorCount;
+
+ public int lostPacketCount; // total lost packet count for all sources
+
+ public boolean ignoreRadioPackets;
+
+ // stats are nil for a system id until a packet has been received from a system
+ public SystemStat[] systemStats; // stats for each system that is known
+
+ public MAVLinkStats() {
+ this(false);
+ }
+
+ public MAVLinkStats(boolean ignoreRadioPackets) {
+ this.ignoreRadioPackets = ignoreRadioPackets;
+ resetStats();
+ }
+
+ /**
+ * Check the new received packet to see if has lost someone between this and
+ * the last packet
+ *
+ * @param packet Packet that should be checked
+ */
+ public void newPacket(MAVLinkPacket packet) {
+ if (ignoreRadioPackets && packet.msgid == msg_radio_status.MAVLINK_MSG_ID_RADIO_STATUS) {
+ return;
+ }
+
+ if (systemStats[packet.sysid] == null) {
+ // only allocate stats for systems that exist on the network
+ systemStats[packet.sysid] = new SystemStat();
+ }
+ lostPacketCount += systemStats[packet.sysid].newPacket(packet);
+ receivedPacketCount++;
+ }
+
+ /**
+ * Called when a CRC error happens on the parser
+ */
+ public void crcError() {
+ crcErrorCount++;
+ }
+
+ public void resetStats() {
+ crcErrorCount = 0;
+ lostPacketCount = 0;
+ receivedPacketCount = 0;
+ systemStats = new SystemStat[256];
+ }
+
+ /**
+ * Stat structure for every system id
+ */
+ public static class SystemStat {
+ public int lostPacketCount; // the lost count for this source
+ public int receivedPacketCount;
+
+ // stats are nil for a component id until a packet has been received from a system
+ public ComponentStat[] componentStats; // stats for each component that is known
+
+ public SystemStat() {
+ resetStats();
+ }
+
+ public int newPacket(MAVLinkPacket packet) {
+ int newLostPackets = 0;
+ if (componentStats[packet.compid] == null) {
+ // only allocate stats for systems that exist on the network
+ componentStats[packet.compid] = new ComponentStat();
+ }
+ newLostPackets = componentStats[packet.compid].newPacket(packet);
+ lostPacketCount += newLostPackets;
+ receivedPacketCount++;
+ return newLostPackets;
+ }
+
+ public void resetStats() {
+ lostPacketCount = 0;
+ receivedPacketCount = 0;
+ componentStats = new ComponentStat[256];
+ }
+ }
+
+ /**
+ * stat structure for every system id
+ */
+ public static class ComponentStat {
+ public int lastPacketSeq;
+ public int lostPacketCount; // the lost count for this source
+ public int receivedPacketCount;
+
+ public ComponentStat() {
+ resetStats();
+ }
+
+ public int newPacket(MAVLinkPacket packet) {
+ int newLostPackets = 0;
+ if (hasLostPackets(packet)) {
+ newLostPackets = updateLostPacketCount(packet);
+ }
+ lastPacketSeq = packet.seq;
+ advanceLastPacketSequence(packet.seq);
+ receivedPacketCount++;
+ return newLostPackets;
+ }
+
+ public void resetStats() {
+ lastPacketSeq = -1;
+ lostPacketCount = 0;
+ receivedPacketCount = 0;
+ }
+
+ private int updateLostPacketCount(MAVLinkPacket packet) {
+ int lostPackets;
+ if (packet.seq - lastPacketSeq < 0) {
+ lostPackets = (packet.seq - lastPacketSeq) + 255;
+ } else {
+ lostPackets = (packet.seq - lastPacketSeq);
+ }
+ lostPacketCount += lostPackets;
+ return lostPackets;
+ }
+
+ private void advanceLastPacketSequence(int lastSeq) {
+ // wrap from 255 to 0 if necessary
+ lastPacketSeq = (lastSeq + 1) & 0xFF;
+ }
+
+ private boolean hasLostPackets(MAVLinkPacket packet) {
+ return lastPacketSeq >= 0 && packet.seq != lastPacketSeq;
+ }
+ }
+
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/Messages/Units.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/Messages/Units.java
new file mode 100644
index 0000000..050f864
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/Messages/Units.java
@@ -0,0 +1,42 @@
+package com.example.longyi_groundstation.MAVLink.Messages;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.reflect.Field;
+
+@Documented
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.FIELD)
+@SuppressWarnings("unchecked")
+/**
+ * Units annotation to provide programmatic access to the MAVLink units for a given field.
+ *
+ * The standard list of units can be found in the MAVLink Schema.
+ *
+ * @see MAVLink Schema
+ *
+ * A snapshot of the allowable units is available in the UnitsEnum class to prevent typos
+ * @see {@link com.example.longyi_groundstation.MAVLink.Messages.UnitsEnum}
+ *
+ */
+public @interface Units {
+ /**
+ * The string value of the units. A string was used to prevent brittleness as the list of valid units change
+ * @return
+ */
+ String value();
+
+ class Test {
+ @Units("m/s")
+ public float speed;
+
+ public static void main(String[] args) throws Exception {
+ Field field = Test.class.getField("speed");
+ Units annotation = (Units) field.getAnnotation(Units.class);
+ System.out.println(UnitsEnum.fromName(annotation.value()));
+ }
+ }
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/Messages/UnitsEnum.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/Messages/UnitsEnum.java
new file mode 100644
index 0000000..ff81169
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/Messages/UnitsEnum.java
@@ -0,0 +1,127 @@
+package com.example.longyi_groundstation.MAVLink.Messages;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Units enumeration to be used to prevent typos.
+ *
+ * This enumerated list is a snapshot of the the standard list of units found in the MAVLink Schema.
+ *
+ * @see MAVLink Schema
+ *
+ */
+public enum UnitsEnum {
+// time
+ S("s"), // seconds
+ DS("ds"),// deciseconds
+ CS("cs"),// centiseconds
+ MS("ms"),// milliseconds
+ US("us"),// microseconds
+ HZ("Hz"),// Herz
+ MHZ("MHz"),// Mega-Herz
+ // distance
+ KM("km"),// kilometres
+ DAM("dam"),// decametres
+ M("m"),// metres
+ M_PER_SEC("m/s"),// metres per second
+ M_PER_SEC_SEC("m/s/s"),// metres per second per second
+ M_PER_SEC_5("m/s*5"),// metres per second * 5 required from dagar for HIGH_LATENCY2 message
+ DM("dm"),// decimetres
+ DM_PER_S("dm/s"),// decimetres per second
+ CM("cm"),// centimetres
+ CM2("cm^2"),// centimetres squared (typically used in variance)
+ CM_PER_S("cm/s"),// centimetres per second
+ MM("mm"),// millimetres
+ MM_PER_S("mm/s"),// millimetres per second
+ MM_PER_H("mm/h"),// millimetres per hour
+ //temperature
+ K("K"),// Kelvin
+ DEG_C("degC"),// degrees Celsius
+ CDEG_C("cdegC"),// centi degrees Celsius
+ //angle
+ RAD("rad"),// radians
+ RAD_PER_S("rad/s"),// radians per second
+ MRAD_PER_S("mrad/s"),// milli-radians per second
+ DEG("deg"),// degrees
+ DEG_OVER_2("deg/2"),// degrees/2 required from dagar for HIGH_LATENCY2 message
+ DEG_PER_S("deg/s"),// degrees per second
+ CDEG("cdeg"),// centidegrees
+ CDEG_PER_S("cdeg/s"),// centidegrees per second
+ DEGe5("degE5"),// degrees * 10E5
+ DEGE7("degE7"),// degrees * 10E7
+ RPM("rpm"),// rotations per minute
+ //electricity
+ V("V"),// Volt
+ CV("cV"),// centi-Volt
+ MV("mV"),// milli-Volt
+ A("A"),// Ampere
+ CA("cA"),// centi-Ampere
+ MA("mA"),// milli-Ampere
+ MAH("mAh"),// milli-Ampere hour
+ //magnetism
+ MT("mT"),// milli-Tesla
+ GAUSS("gauss"),// Gauss
+ MGAUSS("mgauss"),// milli-Gauss
+ // energy
+ HJ("hJ"),// hecto-Joule
+ //power
+ W("W"),// Watt
+ //force
+ MG("mG"),// milli-G
+ //mass
+ G("g"),// grams
+ KG("kg"),// kilograms
+ //pressure
+ PA("Pa"),// Pascal
+ HPA("hPa"),// hecto-Pascal
+ KPA("kPa"),// kilo-Pascal
+ MBAR("mbar"),// millibar
+ //ratio
+ PERCENT("%"),// percent
+ DPERCENT("d%"),// decipercent
+ CPERCENT("c%"),// centipercent
+ DB("dB"),// Deci-Bell
+ DBM("dBm"),// Deci-Bell-milliwatts
+ //digital
+ KIB("KiB"),// Kibibyte (1024 bytes)
+ KIB_PER_S("KiB/s"),// Kibibyte (1024 bytes) per second
+ MIB("MiB"),// Mebibyte (1024*1024 bytes)
+ MIB_PER_S("MiB/s"),// Mebibyte (1024*1024 bytes) per second
+ BYTES("bytes"),// bytes
+ BYTES_PER_S("bytes/s"),// bytes per second
+ BITS_PER_S("bits/s"),// bits per second
+ PIX("pix"),// pixels
+ DPIX("dpix"),// decipixels
+ //flow
+ G_PER_MIN("g/min"),// grams/minute
+ CM3_PER_MIN("cm^3/min"),// cubic centimetres/minute
+ //volume
+ CM3("cm^3"),// cubic centimetres
+ L("l");// liters
+ private final String name;
+ private static final Map toEnum = new HashMap<>();
+
+ static {
+ for (UnitsEnum ue : UnitsEnum.values()) {
+ toEnum.put(ue.getName(), ue);
+ }
+ }
+
+ UnitsEnum(String name) {
+ this.name = name;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public String toString() {
+ return this.name;
+ }
+
+ public static UnitsEnum fromName(String name) {
+ return toEnum.get(name);
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/Parser.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/Parser.java
new file mode 100644
index 0000000..a1c72f0
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/Parser.java
@@ -0,0 +1,216 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink;
+
+
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkStats;
+
+/**
+ * MAVLink parser that parses @{link MAVLinkPacket}s from a byte stream one byte
+ * at a time.
+ *
+ * After creating an instance of this class, simply use the @{link #mavlink_parse_char}
+ * method to parse a byte stream.
+ */
+public class Parser {
+ static final String TAG = Parser.class.getSimpleName();
+ static final boolean V = false;
+
+ static void logv(String tag, String msg) {
+ if(V) System.out.println(String.format("%s: %s", tag, msg));
+ }
+
+ /**
+ * States from the parsing state machine
+ */
+ enum MAV_states {
+ MAVLINK_PARSE_STATE_UNINIT,
+ MAVLINK_PARSE_STATE_IDLE,
+ MAVLINK_PARSE_STATE_GOT_STX,
+ MAVLINK_PARSE_STATE_GOT_LENGTH,
+ MAVLINK_PARSE_STATE_GOT_INCOMPAT_FLAGS, // MAVLink 2
+ MAVLINK_PARSE_STATE_GOT_COMPAT_FLAGS, // MAVLink 2
+ MAVLINK_PARSE_STATE_GOT_SEQ,
+ MAVLINK_PARSE_STATE_GOT_SYSID,
+ MAVLINK_PARSE_STATE_GOT_COMPID,
+ MAVLINK_PARSE_STATE_GOT_MSGID1,
+ MAVLINK_PARSE_STATE_GOT_MSGID2, // MAVLink 2
+ MAVLINK_PARSE_STATE_GOT_MSGID3, // MAVLink 2
+ MAVLINK_PARSE_STATE_GOT_CRC1,
+ MAVLINK_PARSE_STATE_GOT_CRC2, // MAVLink 2
+ MAVLINK_PARSE_STATE_GOT_PAYLOAD,
+ MAVLINK_PARSE_STATE_GOT_SIGNATURE, // MAVLink 2
+ }
+
+ private MAV_states state = MAV_states.MAVLINK_PARSE_STATE_UNINIT;
+
+ public MAVLinkStats stats;
+ private MAVLinkPacket m;
+ private boolean isMavlink2;
+
+ public Parser() {
+ this(false);
+ }
+
+ public Parser(boolean ignoreRadioPacketStats) {
+ stats = new MAVLinkStats(ignoreRadioPacketStats);
+ isMavlink2 = false;
+ }
+
+ /**
+ * This is a convenience function which handles the complete MAVLink
+ * parsing. the function will parse one byte at a time and return the
+ * complete packet once it could be successfully decoded. Checksum and other
+ * failures will be silently ignored.
+ *
+ * @param c The char to parse
+ * @return the complete @{link MAVLinkPacket} if successfully decoded, else null
+ */
+ public MAVLinkPacket mavlink_parse_char(int c) {
+
+ // force to 8 bits
+ c &= 0xFF;
+
+ switch (state) {
+ case MAVLINK_PARSE_STATE_UNINIT:
+ case MAVLINK_PARSE_STATE_IDLE:
+ // MAVLink 1 and 2
+ if (c == MAVLinkPacket.MAVLINK_STX_MAVLINK2) {
+ state = MAV_states.MAVLINK_PARSE_STATE_GOT_STX;
+ if (!isMavlink2) {
+ isMavlink2 = true;
+ logv(TAG, "Turning mavlink2 ON");
+ }
+ } else if (c == MAVLinkPacket.MAVLINK_STX_MAVLINK1) {
+ state = MAV_states.MAVLINK_PARSE_STATE_GOT_STX;
+ if (isMavlink2) {
+ isMavlink2 = false;
+ logv(TAG, "Turning mavlink2 OFF");
+ }
+ }
+ break;
+
+ case MAVLINK_PARSE_STATE_GOT_STX:
+ // MAVLink 1 and 2
+ m = new MAVLinkPacket(c, isMavlink2);
+ if (isMavlink2) {
+ state = MAV_states.MAVLINK_PARSE_STATE_GOT_LENGTH;
+ } else {
+ state = MAV_states.MAVLINK_PARSE_STATE_GOT_COMPAT_FLAGS;
+ }
+ break;
+
+ case MAVLINK_PARSE_STATE_GOT_LENGTH:
+ // MAVLink 1 and 2
+ m.incompatFlags = c;
+ if (c != 0 && c != 1) {
+ // message includes an incompatible feature flag
+ state = MAV_states.MAVLINK_PARSE_STATE_IDLE;
+ break;
+ }
+ state = MAV_states.MAVLINK_PARSE_STATE_GOT_INCOMPAT_FLAGS;
+ break;
+
+ case MAVLINK_PARSE_STATE_GOT_INCOMPAT_FLAGS:
+ // MAVLink 2 only
+ m.compatFlags = c;
+ state = MAV_states.MAVLINK_PARSE_STATE_GOT_COMPAT_FLAGS;
+ break;
+
+ case MAVLINK_PARSE_STATE_GOT_COMPAT_FLAGS:
+ m.seq = c;
+ state = MAV_states.MAVLINK_PARSE_STATE_GOT_SEQ;
+ break;
+
+ case MAVLINK_PARSE_STATE_GOT_SEQ:
+ // back to MAVLink 1 and 2
+ m.sysid = c;
+ state = MAV_states.MAVLINK_PARSE_STATE_GOT_SYSID;
+ break;
+
+ case MAVLINK_PARSE_STATE_GOT_SYSID:
+ // MAVLink 1 and 2
+ m.compid = c;
+ state = MAV_states.MAVLINK_PARSE_STATE_GOT_COMPID;
+ break;
+
+ case MAVLINK_PARSE_STATE_GOT_COMPID:
+ // MAVLink 1 and 2
+ m.msgid = c;
+ if (isMavlink2) {
+ state = MAV_states.MAVLINK_PARSE_STATE_GOT_MSGID1;
+ } else if (m.len > 0) {
+ state = MAV_states.MAVLINK_PARSE_STATE_GOT_MSGID3;
+ } else {
+ state = MAV_states.MAVLINK_PARSE_STATE_GOT_PAYLOAD;
+ }
+ break;
+
+ case MAVLINK_PARSE_STATE_GOT_MSGID1:
+ // MAVLink 2 only
+ m.msgid |= c << 8;
+ state = MAV_states.MAVLINK_PARSE_STATE_GOT_MSGID2;
+ break;
+
+ case MAVLINK_PARSE_STATE_GOT_MSGID2:
+ // MAVLink 2 only
+ m.msgid |= c << 16;
+ if (m.len > 0) {
+ state = MAV_states.MAVLINK_PARSE_STATE_GOT_MSGID3;
+ } else {
+ state = MAV_states.MAVLINK_PARSE_STATE_GOT_PAYLOAD;
+ }
+ break;
+
+ case MAVLINK_PARSE_STATE_GOT_MSGID3:
+ // back to MAVLink 1 and 2
+ m.payload.add((byte) c);
+ if (m.payloadIsFilled()) {
+ state = MAV_states.MAVLINK_PARSE_STATE_GOT_PAYLOAD;
+ }
+ break;
+
+ case MAVLINK_PARSE_STATE_GOT_PAYLOAD:
+ boolean crcGen = m.generateCRC(m.payload.size());
+ // Check first checksum byte and verify the CRC was successfully generated (msg extra exists)
+ if (c != m.crc.getLSB() || !crcGen) {
+ state = MAV_states.MAVLINK_PARSE_STATE_IDLE;
+ stats.crcError();
+ } else {
+ state = MAV_states.MAVLINK_PARSE_STATE_GOT_CRC1;
+ }
+ break;
+
+ case MAVLINK_PARSE_STATE_GOT_CRC1:
+ // Check second checksum byte
+ if (c != m.crc.getMSB()) {
+ state = MAV_states.MAVLINK_PARSE_STATE_IDLE;
+ stats.crcError();
+ } else { // crc is good
+ stats.newPacket(m);
+
+ if (!isMavlink2 || (m.incompatFlags != 0x01)) {
+ // If no signature, then return the message.
+ state = MAV_states.MAVLINK_PARSE_STATE_IDLE;
+ return m;
+ } else {
+ // TODO: MAVLink 2 - signed
+ state = MAV_states.MAVLINK_PARSE_STATE_IDLE;
+ stats.crcError();
+ }
+ }
+ break;
+
+ case MAVLINK_PARSE_STATE_GOT_CRC2:
+ // TODO: implement signature parsing and validation
+ state = MAV_states.MAVLINK_PARSE_STATE_IDLE;
+ stats.crcError();
+ break;
+ } // switch
+ return null;
+ }
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/CRC.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/CRC.java
new file mode 100644
index 0000000..c8ac8a6
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/CRC.java
@@ -0,0 +1,310 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.common;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * CRC-16/MCRF4XX calculation for MAVlink messages. The checksum must be
+ * initialized, updated with which field of the message, and then finished with
+ * the message id.
+ *
+ */
+public class CRC {
+ private static final Map MAVLINK_MESSAGE_CRCS;
+ private static final int CRC_INIT_VALUE = 0xffff;
+ private int crcValue;
+
+ static {
+ MAVLINK_MESSAGE_CRCS = new HashMap<>();
+ MAVLINK_MESSAGE_CRCS.put(0, 50);
+ MAVLINK_MESSAGE_CRCS.put(1, 124);
+ MAVLINK_MESSAGE_CRCS.put(2, 137);
+ MAVLINK_MESSAGE_CRCS.put(4, 237);
+ MAVLINK_MESSAGE_CRCS.put(5, 217);
+ MAVLINK_MESSAGE_CRCS.put(6, 104);
+ MAVLINK_MESSAGE_CRCS.put(7, 119);
+ MAVLINK_MESSAGE_CRCS.put(8, 117);
+ MAVLINK_MESSAGE_CRCS.put(11, 89);
+ MAVLINK_MESSAGE_CRCS.put(20, 214);
+ MAVLINK_MESSAGE_CRCS.put(21, 159);
+ MAVLINK_MESSAGE_CRCS.put(22, 220);
+ MAVLINK_MESSAGE_CRCS.put(23, 168);
+ MAVLINK_MESSAGE_CRCS.put(24, 24);
+ MAVLINK_MESSAGE_CRCS.put(25, 23);
+ MAVLINK_MESSAGE_CRCS.put(26, 170);
+ MAVLINK_MESSAGE_CRCS.put(27, 144);
+ MAVLINK_MESSAGE_CRCS.put(28, 67);
+ MAVLINK_MESSAGE_CRCS.put(29, 115);
+ MAVLINK_MESSAGE_CRCS.put(30, 39);
+ MAVLINK_MESSAGE_CRCS.put(31, 246);
+ MAVLINK_MESSAGE_CRCS.put(32, 185);
+ MAVLINK_MESSAGE_CRCS.put(33, 104);
+ MAVLINK_MESSAGE_CRCS.put(34, 237);
+ MAVLINK_MESSAGE_CRCS.put(35, 244);
+ MAVLINK_MESSAGE_CRCS.put(36, 222);
+ MAVLINK_MESSAGE_CRCS.put(37, 212);
+ MAVLINK_MESSAGE_CRCS.put(38, 9);
+ MAVLINK_MESSAGE_CRCS.put(39, 254);
+ MAVLINK_MESSAGE_CRCS.put(40, 230);
+ MAVLINK_MESSAGE_CRCS.put(41, 28);
+ MAVLINK_MESSAGE_CRCS.put(42, 28);
+ MAVLINK_MESSAGE_CRCS.put(43, 132);
+ MAVLINK_MESSAGE_CRCS.put(44, 221);
+ MAVLINK_MESSAGE_CRCS.put(45, 232);
+ MAVLINK_MESSAGE_CRCS.put(46, 11);
+ MAVLINK_MESSAGE_CRCS.put(47, 153);
+ MAVLINK_MESSAGE_CRCS.put(48, 41);
+ MAVLINK_MESSAGE_CRCS.put(49, 39);
+ MAVLINK_MESSAGE_CRCS.put(50, 78);
+ MAVLINK_MESSAGE_CRCS.put(51, 196);
+ MAVLINK_MESSAGE_CRCS.put(54, 15);
+ MAVLINK_MESSAGE_CRCS.put(55, 3);
+ MAVLINK_MESSAGE_CRCS.put(61, 167);
+ MAVLINK_MESSAGE_CRCS.put(62, 183);
+ MAVLINK_MESSAGE_CRCS.put(63, 119);
+ MAVLINK_MESSAGE_CRCS.put(64, 191);
+ MAVLINK_MESSAGE_CRCS.put(65, 118);
+ MAVLINK_MESSAGE_CRCS.put(66, 148);
+ MAVLINK_MESSAGE_CRCS.put(67, 21);
+ MAVLINK_MESSAGE_CRCS.put(69, 243);
+ MAVLINK_MESSAGE_CRCS.put(70, 124);
+ MAVLINK_MESSAGE_CRCS.put(73, 38);
+ MAVLINK_MESSAGE_CRCS.put(74, 20);
+ MAVLINK_MESSAGE_CRCS.put(75, 158);
+ MAVLINK_MESSAGE_CRCS.put(76, 152);
+ MAVLINK_MESSAGE_CRCS.put(77, 143);
+ MAVLINK_MESSAGE_CRCS.put(80, 14);
+ MAVLINK_MESSAGE_CRCS.put(81, 106);
+ MAVLINK_MESSAGE_CRCS.put(82, 49);
+ MAVLINK_MESSAGE_CRCS.put(83, 22);
+ MAVLINK_MESSAGE_CRCS.put(84, 143);
+ MAVLINK_MESSAGE_CRCS.put(85, 140);
+ MAVLINK_MESSAGE_CRCS.put(86, 5);
+ MAVLINK_MESSAGE_CRCS.put(87, 150);
+ MAVLINK_MESSAGE_CRCS.put(89, 231);
+ MAVLINK_MESSAGE_CRCS.put(90, 183);
+ MAVLINK_MESSAGE_CRCS.put(91, 63);
+ MAVLINK_MESSAGE_CRCS.put(92, 54);
+ MAVLINK_MESSAGE_CRCS.put(93, 47);
+ MAVLINK_MESSAGE_CRCS.put(100, 175);
+ MAVLINK_MESSAGE_CRCS.put(101, 102);
+ MAVLINK_MESSAGE_CRCS.put(102, 158);
+ MAVLINK_MESSAGE_CRCS.put(103, 208);
+ MAVLINK_MESSAGE_CRCS.put(104, 56);
+ MAVLINK_MESSAGE_CRCS.put(105, 93);
+ MAVLINK_MESSAGE_CRCS.put(106, 138);
+ MAVLINK_MESSAGE_CRCS.put(107, 108);
+ MAVLINK_MESSAGE_CRCS.put(108, 32);
+ MAVLINK_MESSAGE_CRCS.put(109, 185);
+ MAVLINK_MESSAGE_CRCS.put(110, 84);
+ MAVLINK_MESSAGE_CRCS.put(111, 34);
+ MAVLINK_MESSAGE_CRCS.put(112, 174);
+ MAVLINK_MESSAGE_CRCS.put(113, 124);
+ MAVLINK_MESSAGE_CRCS.put(114, 237);
+ MAVLINK_MESSAGE_CRCS.put(115, 4);
+ MAVLINK_MESSAGE_CRCS.put(116, 76);
+ MAVLINK_MESSAGE_CRCS.put(117, 128);
+ MAVLINK_MESSAGE_CRCS.put(118, 56);
+ MAVLINK_MESSAGE_CRCS.put(119, 116);
+ MAVLINK_MESSAGE_CRCS.put(120, 134);
+ MAVLINK_MESSAGE_CRCS.put(121, 237);
+ MAVLINK_MESSAGE_CRCS.put(122, 203);
+ MAVLINK_MESSAGE_CRCS.put(123, 250);
+ MAVLINK_MESSAGE_CRCS.put(124, 87);
+ MAVLINK_MESSAGE_CRCS.put(125, 203);
+ MAVLINK_MESSAGE_CRCS.put(126, 220);
+ MAVLINK_MESSAGE_CRCS.put(127, 25);
+ MAVLINK_MESSAGE_CRCS.put(128, 226);
+ MAVLINK_MESSAGE_CRCS.put(129, 46);
+ MAVLINK_MESSAGE_CRCS.put(130, 29);
+ MAVLINK_MESSAGE_CRCS.put(131, 223);
+ MAVLINK_MESSAGE_CRCS.put(132, 85);
+ MAVLINK_MESSAGE_CRCS.put(133, 6);
+ MAVLINK_MESSAGE_CRCS.put(134, 229);
+ MAVLINK_MESSAGE_CRCS.put(135, 203);
+ MAVLINK_MESSAGE_CRCS.put(136, 1);
+ MAVLINK_MESSAGE_CRCS.put(137, 195);
+ MAVLINK_MESSAGE_CRCS.put(138, 109);
+ MAVLINK_MESSAGE_CRCS.put(139, 168);
+ MAVLINK_MESSAGE_CRCS.put(140, 181);
+ MAVLINK_MESSAGE_CRCS.put(141, 47);
+ MAVLINK_MESSAGE_CRCS.put(142, 72);
+ MAVLINK_MESSAGE_CRCS.put(143, 131);
+ MAVLINK_MESSAGE_CRCS.put(144, 127);
+ MAVLINK_MESSAGE_CRCS.put(146, 103);
+ MAVLINK_MESSAGE_CRCS.put(147, 154);
+ MAVLINK_MESSAGE_CRCS.put(148, 178);
+ MAVLINK_MESSAGE_CRCS.put(149, 200);
+ MAVLINK_MESSAGE_CRCS.put(162, 189);
+ MAVLINK_MESSAGE_CRCS.put(192, 36);
+ MAVLINK_MESSAGE_CRCS.put(225, 208);
+ MAVLINK_MESSAGE_CRCS.put(230, 163);
+ MAVLINK_MESSAGE_CRCS.put(231, 105);
+ MAVLINK_MESSAGE_CRCS.put(232, 151);
+ MAVLINK_MESSAGE_CRCS.put(233, 35);
+ MAVLINK_MESSAGE_CRCS.put(234, 150);
+ MAVLINK_MESSAGE_CRCS.put(235, 179);
+ MAVLINK_MESSAGE_CRCS.put(241, 90);
+ MAVLINK_MESSAGE_CRCS.put(242, 104);
+ MAVLINK_MESSAGE_CRCS.put(243, 85);
+ MAVLINK_MESSAGE_CRCS.put(244, 95);
+ MAVLINK_MESSAGE_CRCS.put(245, 130);
+ MAVLINK_MESSAGE_CRCS.put(246, 184);
+ MAVLINK_MESSAGE_CRCS.put(247, 81);
+ MAVLINK_MESSAGE_CRCS.put(248, 8);
+ MAVLINK_MESSAGE_CRCS.put(249, 204);
+ MAVLINK_MESSAGE_CRCS.put(250, 49);
+ MAVLINK_MESSAGE_CRCS.put(251, 170);
+ MAVLINK_MESSAGE_CRCS.put(252, 44);
+ MAVLINK_MESSAGE_CRCS.put(253, 83);
+ MAVLINK_MESSAGE_CRCS.put(254, 46);
+ MAVLINK_MESSAGE_CRCS.put(256, 71);
+ MAVLINK_MESSAGE_CRCS.put(257, 131);
+ MAVLINK_MESSAGE_CRCS.put(258, 187);
+ MAVLINK_MESSAGE_CRCS.put(259, 92);
+ MAVLINK_MESSAGE_CRCS.put(260, 146);
+ MAVLINK_MESSAGE_CRCS.put(261, 179);
+ MAVLINK_MESSAGE_CRCS.put(262, 12);
+ MAVLINK_MESSAGE_CRCS.put(263, 133);
+ MAVLINK_MESSAGE_CRCS.put(264, 49);
+ MAVLINK_MESSAGE_CRCS.put(265, 26);
+ MAVLINK_MESSAGE_CRCS.put(266, 193);
+ MAVLINK_MESSAGE_CRCS.put(267, 35);
+ MAVLINK_MESSAGE_CRCS.put(268, 14);
+ MAVLINK_MESSAGE_CRCS.put(269, 109);
+ MAVLINK_MESSAGE_CRCS.put(270, 59);
+ MAVLINK_MESSAGE_CRCS.put(271, 22);
+ MAVLINK_MESSAGE_CRCS.put(275, 126);
+ MAVLINK_MESSAGE_CRCS.put(276, 18);
+ MAVLINK_MESSAGE_CRCS.put(277, 62);
+ MAVLINK_MESSAGE_CRCS.put(280, 70);
+ MAVLINK_MESSAGE_CRCS.put(281, 48);
+ MAVLINK_MESSAGE_CRCS.put(282, 123);
+ MAVLINK_MESSAGE_CRCS.put(283, 74);
+ MAVLINK_MESSAGE_CRCS.put(284, 99);
+ MAVLINK_MESSAGE_CRCS.put(285, 137);
+ MAVLINK_MESSAGE_CRCS.put(286, 210);
+ MAVLINK_MESSAGE_CRCS.put(287, 1);
+ MAVLINK_MESSAGE_CRCS.put(288, 20);
+ MAVLINK_MESSAGE_CRCS.put(290, 251);
+ MAVLINK_MESSAGE_CRCS.put(291, 10);
+ MAVLINK_MESSAGE_CRCS.put(299, 19);
+ MAVLINK_MESSAGE_CRCS.put(300, 217);
+ MAVLINK_MESSAGE_CRCS.put(301, 243);
+ MAVLINK_MESSAGE_CRCS.put(310, 28);
+ MAVLINK_MESSAGE_CRCS.put(311, 95);
+ MAVLINK_MESSAGE_CRCS.put(320, 243);
+ MAVLINK_MESSAGE_CRCS.put(321, 88);
+ MAVLINK_MESSAGE_CRCS.put(322, 243);
+ MAVLINK_MESSAGE_CRCS.put(323, 78);
+ MAVLINK_MESSAGE_CRCS.put(324, 132);
+ MAVLINK_MESSAGE_CRCS.put(330, 23);
+ MAVLINK_MESSAGE_CRCS.put(331, 91);
+ MAVLINK_MESSAGE_CRCS.put(332, 236);
+ MAVLINK_MESSAGE_CRCS.put(333, 231);
+ MAVLINK_MESSAGE_CRCS.put(334, 72);
+ MAVLINK_MESSAGE_CRCS.put(335, 225);
+ MAVLINK_MESSAGE_CRCS.put(336, 245);
+ MAVLINK_MESSAGE_CRCS.put(339, 199);
+ MAVLINK_MESSAGE_CRCS.put(340, 99);
+ MAVLINK_MESSAGE_CRCS.put(350, 232);
+ MAVLINK_MESSAGE_CRCS.put(360, 11);
+ MAVLINK_MESSAGE_CRCS.put(370, 75);
+ MAVLINK_MESSAGE_CRCS.put(371, 10);
+ MAVLINK_MESSAGE_CRCS.put(372, 26);
+ MAVLINK_MESSAGE_CRCS.put(373, 117);
+ MAVLINK_MESSAGE_CRCS.put(375, 251);
+ MAVLINK_MESSAGE_CRCS.put(380, 232);
+ MAVLINK_MESSAGE_CRCS.put(385, 147);
+ MAVLINK_MESSAGE_CRCS.put(386, 132);
+ MAVLINK_MESSAGE_CRCS.put(387, 4);
+ MAVLINK_MESSAGE_CRCS.put(388, 8);
+ MAVLINK_MESSAGE_CRCS.put(390, 156);
+ MAVLINK_MESSAGE_CRCS.put(395, 0);
+ MAVLINK_MESSAGE_CRCS.put(396, 50);
+ MAVLINK_MESSAGE_CRCS.put(397, 182);
+ MAVLINK_MESSAGE_CRCS.put(400, 110);
+ MAVLINK_MESSAGE_CRCS.put(401, 183);
+ MAVLINK_MESSAGE_CRCS.put(410, 160);
+ MAVLINK_MESSAGE_CRCS.put(411, 106);
+ MAVLINK_MESSAGE_CRCS.put(412, 33);
+ MAVLINK_MESSAGE_CRCS.put(413, 77);
+ MAVLINK_MESSAGE_CRCS.put(435, 134);
+ MAVLINK_MESSAGE_CRCS.put(436, 193);
+ MAVLINK_MESSAGE_CRCS.put(437, 30);
+ MAVLINK_MESSAGE_CRCS.put(440, 66);
+ MAVLINK_MESSAGE_CRCS.put(9000, 113);
+ MAVLINK_MESSAGE_CRCS.put(9005, 117);
+ MAVLINK_MESSAGE_CRCS.put(12900, 114);
+ MAVLINK_MESSAGE_CRCS.put(12901, 254);
+ MAVLINK_MESSAGE_CRCS.put(12902, 140);
+ MAVLINK_MESSAGE_CRCS.put(12903, 249);
+ MAVLINK_MESSAGE_CRCS.put(12904, 77);
+ MAVLINK_MESSAGE_CRCS.put(12905, 49);
+ MAVLINK_MESSAGE_CRCS.put(12915, 94);
+ MAVLINK_MESSAGE_CRCS.put(12918, 139);
+ MAVLINK_MESSAGE_CRCS.put(12919, 7);
+ MAVLINK_MESSAGE_CRCS.put(12920, 20);
+
+ }
+
+ /**
+ * Accumulate the CRC by adding one char at a time.
+ *
+ * The checksum function adds the hash of one char at a time to the 16 bit
+ * checksum (uint16_t).
+ *
+ * @param data new char to hash
+ **/
+ public void update_checksum(int data) {
+ data = data & 0xff; //cast because we want an unsigned type
+ int tmp = data ^ (crcValue & 0xff);
+ tmp ^= (tmp << 4) & 0xff;
+ crcValue = ((crcValue >> 8) & 0xff) ^ (tmp << 8) ^ (tmp << 3) ^ ((tmp >> 4) & 0xf);
+ }
+
+ /**
+ * Finish the CRC calculation of a message, by running the CRC with the
+ * Magic Byte.
+ *
+ * @param msgid The message id number
+ * @return boolean True if the checksum was successfully finished. Otherwise false
+ */
+ public boolean finish_checksum(int msgid) {
+ if (MAVLINK_MESSAGE_CRCS.containsKey(msgid)) {
+ update_checksum(MAVLINK_MESSAGE_CRCS.get(msgid));
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Initialize the buffer for the CRC16/MCRF4XX
+ */
+ public void start_checksum() {
+ crcValue = CRC_INIT_VALUE;
+ }
+
+ public int getMSB() {
+ return ((crcValue >> 8) & 0xff);
+ }
+
+ public int getLSB() {
+ return (crcValue & 0xff);
+ }
+
+ public CRC() {
+ start_checksum();
+ }
+
+ public CRC(int crcValue) {
+ this.crcValue = crcValue;
+ }
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_actuator_control_target.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_actuator_control_target.java
new file mode 100644
index 0000000..e35dddc
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_actuator_control_target.java
@@ -0,0 +1,176 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+// MESSAGE ACTUATOR_CONTROL_TARGET PACKING
+package com.example.longyi_groundstation.MAVLink.common;
+
+
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.Description;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload;
+import com.example.longyi_groundstation.MAVLink.Messages.Units;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+/**
+ * Set the vehicle attitude and body angular rates.
+ */
+public class msg_actuator_control_target extends MAVLinkMessage {
+
+ public static final int MAVLINK_MSG_ID_ACTUATOR_CONTROL_TARGET = 140;
+ public static final int MAVLINK_MSG_LENGTH = 41;
+ private static final long serialVersionUID = MAVLINK_MSG_ID_ACTUATOR_CONTROL_TARGET;
+
+
+ /**
+ * Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.
+ */
+ @Description("Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.")
+ @Units("us")
+ public long time_usec;
+
+ /**
+ * Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs.
+ */
+ @Description("Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs.")
+ @Units("")
+ public float controls[] = new float[8];
+
+ /**
+ * Actuator group. The '_mlx' indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances.
+ */
+ @Description("Actuator group. The '_mlx' indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances.")
+ @Units("")
+ public short group_mlx;
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_ACTUATOR_CONTROL_TARGET;
+
+ packet.payload.putUnsignedLong(time_usec);
+
+ for (int i = 0; i < controls.length; i++) {
+ packet.payload.putFloat(controls[i]);
+ }
+
+ packet.payload.putUnsignedByte(group_mlx);
+
+ if (isMavlink2) {
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a actuator_control_target message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.time_usec = payload.getUnsignedLong();
+
+ for (int i = 0; i < this.controls.length; i++) {
+ this.controls[i] = payload.getFloat();
+ }
+
+ this.group_mlx = payload.getUnsignedByte();
+
+ if (isMavlink2) {
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_actuator_control_target() {
+ this.msgid = MAVLINK_MSG_ID_ACTUATOR_CONTROL_TARGET;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_actuator_control_target( long time_usec, float[] controls, short group_mlx) {
+ this.msgid = MAVLINK_MSG_ID_ACTUATOR_CONTROL_TARGET;
+
+ this.time_usec = time_usec;
+ this.controls = controls;
+ this.group_mlx = group_mlx;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_actuator_control_target( long time_usec, float[] controls, short group_mlx, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_ACTUATOR_CONTROL_TARGET;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.time_usec = time_usec;
+ this.controls = controls;
+ this.group_mlx = group_mlx;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_actuator_control_target(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_ACTUATOR_CONTROL_TARGET;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Returns a string with the MSG name and data
+ */
+ @Override
+ public String toString() {
+ JSONObject jsonObject = new JSONObject();
+ try {
+ jsonObject.put("msgid",MAVLINK_MSG_ID_ACTUATOR_CONTROL_TARGET);
+ jsonObject.put("sysid",sysid);
+ jsonObject.put("time_usec",time_usec);
+ jsonObject.put("controls",controls);
+ jsonObject.put("group_mlx",group_mlx);
+ return jsonObject.toString();
+ } catch (JSONException e) {
+ return null;
+ }
+
+ }
+
+ /**
+ * Returns a human-readable string of the name of the message
+ */
+ @Override
+ public String name() {
+ return "MAVLINK_MSG_ID_ACTUATOR_CONTROL_TARGET";
+ }
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_actuator_output_status.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_actuator_output_status.java
new file mode 100644
index 0000000..1595661
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_actuator_output_status.java
@@ -0,0 +1,161 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+// MESSAGE ACTUATOR_OUTPUT_STATUS PACKING
+package com.example.longyi_groundstation.MAVLink.common;
+
+
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.Description;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload;
+import com.example.longyi_groundstation.MAVLink.Messages.Units;
+
+/**
+ * The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW.
+ */
+public class msg_actuator_output_status extends MAVLinkMessage {
+
+ public static final int MAVLINK_MSG_ID_ACTUATOR_OUTPUT_STATUS = 375;
+ public static final int MAVLINK_MSG_LENGTH = 140;
+ private static final long serialVersionUID = MAVLINK_MSG_ID_ACTUATOR_OUTPUT_STATUS;
+
+
+ /**
+ * Timestamp (since system boot).
+ */
+ @Description("Timestamp (since system boot).")
+ @Units("us")
+ public long time_usec;
+
+ /**
+ * Active outputs
+ */
+ @Description("Active outputs")
+ @Units("")
+ public long active;
+
+ /**
+ * Servo / motor output array values. Zero values indicate unused channels.
+ */
+ @Description("Servo / motor output array values. Zero values indicate unused channels.")
+ @Units("")
+ public float actuator[] = new float[32];
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_ACTUATOR_OUTPUT_STATUS;
+
+ packet.payload.putUnsignedLong(time_usec);
+ packet.payload.putUnsignedInt(active);
+
+ for (int i = 0; i < actuator.length; i++) {
+ packet.payload.putFloat(actuator[i]);
+ }
+
+
+ if (isMavlink2) {
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a actuator_output_status message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.time_usec = payload.getUnsignedLong();
+ this.active = payload.getUnsignedInt();
+
+ for (int i = 0; i < this.actuator.length; i++) {
+ this.actuator[i] = payload.getFloat();
+ }
+
+
+ if (isMavlink2) {
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_actuator_output_status() {
+ this.msgid = MAVLINK_MSG_ID_ACTUATOR_OUTPUT_STATUS;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_actuator_output_status( long time_usec, long active, float[] actuator) {
+ this.msgid = MAVLINK_MSG_ID_ACTUATOR_OUTPUT_STATUS;
+
+ this.time_usec = time_usec;
+ this.active = active;
+ this.actuator = actuator;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_actuator_output_status( long time_usec, long active, float[] actuator, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_ACTUATOR_OUTPUT_STATUS;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.time_usec = time_usec;
+ this.active = active;
+ this.actuator = actuator;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_actuator_output_status(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_ACTUATOR_OUTPUT_STATUS;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Returns a string with the MSG name and data
+ */
+ @Override
+ public String toString() {
+ return "MAVLINK_MSG_ID_ACTUATOR_OUTPUT_STATUS - sysid:"+sysid+" compid:"+compid+" time_usec:"+time_usec+" active:"+active+" actuator:"+actuator+"";
+ }
+
+ /**
+ * Returns a human-readable string of the name of the message
+ */
+ @Override
+ public String name() {
+ return "MAVLINK_MSG_ID_ACTUATOR_OUTPUT_STATUS";
+ }
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_adsb_vehicle.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_adsb_vehicle.java
new file mode 100644
index 0000000..7a618a8
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_adsb_vehicle.java
@@ -0,0 +1,298 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+// MESSAGE ADSB_VEHICLE PACKING
+package com.example.longyi_groundstation.MAVLink.common;
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload;
+import com.example.longyi_groundstation.MAVLink.Messages.Units;
+import com.example.longyi_groundstation.MAVLink.Messages.Description;
+
+/**
+ * The location and information of an ADSB vehicle
+ */
+public class msg_adsb_vehicle extends MAVLinkMessage {
+
+ public static final int MAVLINK_MSG_ID_ADSB_VEHICLE = 246;
+ public static final int MAVLINK_MSG_LENGTH = 38;
+ private static final long serialVersionUID = MAVLINK_MSG_ID_ADSB_VEHICLE;
+
+
+ /**
+ * ICAO address
+ */
+ @Description("ICAO address")
+ @Units("")
+ public long ICAO_address;
+
+ /**
+ * Latitude
+ */
+ @Description("Latitude")
+ @Units("degE7")
+ public int lat;
+
+ /**
+ * Longitude
+ */
+ @Description("Longitude")
+ @Units("degE7")
+ public int lon;
+
+ /**
+ * Altitude(ASL)
+ */
+ @Description("Altitude(ASL)")
+ @Units("mm")
+ public int altitude;
+
+ /**
+ * Course over ground
+ */
+ @Description("Course over ground")
+ @Units("cdeg")
+ public int heading;
+
+ /**
+ * The horizontal velocity
+ */
+ @Description("The horizontal velocity")
+ @Units("cm/s")
+ public int hor_velocity;
+
+ /**
+ * The vertical velocity. Positive is up
+ */
+ @Description("The vertical velocity. Positive is up")
+ @Units("cm/s")
+ public short ver_velocity;
+
+ /**
+ * Bitmap to indicate various statuses including valid data fields
+ */
+ @Description("Bitmap to indicate various statuses including valid data fields")
+ @Units("")
+ public int flags;
+
+ /**
+ * Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000
+ */
+ @Description("Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000")
+ @Units("")
+ public int squawk;
+
+ /**
+ * ADSB altitude type.
+ */
+ @Description("ADSB altitude type.")
+ @Units("")
+ public short altitude_type;
+
+ /**
+ * The callsign, 8+null
+ */
+ @Description("The callsign, 8+null")
+ @Units("")
+ public byte callsign[] = new byte[9];
+
+ /**
+ * ADSB emitter type.
+ */
+ @Description("ADSB emitter type.")
+ @Units("")
+ public short emitter_type;
+
+ /**
+ * Time since last communication in seconds
+ */
+ @Description("Time since last communication in seconds")
+ @Units("s")
+ public short tslc;
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_ADSB_VEHICLE;
+
+ packet.payload.putUnsignedInt(ICAO_address);
+ packet.payload.putInt(lat);
+ packet.payload.putInt(lon);
+ packet.payload.putInt(altitude);
+ packet.payload.putUnsignedShort(heading);
+ packet.payload.putUnsignedShort(hor_velocity);
+ packet.payload.putShort(ver_velocity);
+ packet.payload.putUnsignedShort(flags);
+ packet.payload.putUnsignedShort(squawk);
+ packet.payload.putUnsignedByte(altitude_type);
+
+ for (int i = 0; i < callsign.length; i++) {
+ packet.payload.putByte(callsign[i]);
+ }
+
+ packet.payload.putUnsignedByte(emitter_type);
+ packet.payload.putUnsignedByte(tslc);
+
+ if (isMavlink2) {
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a adsb_vehicle message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.ICAO_address = payload.getUnsignedInt();
+ this.lat = payload.getInt();
+ this.lon = payload.getInt();
+ this.altitude = payload.getInt();
+ this.heading = payload.getUnsignedShort();
+ this.hor_velocity = payload.getUnsignedShort();
+ this.ver_velocity = payload.getShort();
+ this.flags = payload.getUnsignedShort();
+ this.squawk = payload.getUnsignedShort();
+ this.altitude_type = payload.getUnsignedByte();
+
+ for (int i = 0; i < this.callsign.length; i++) {
+ this.callsign[i] = payload.getByte();
+ }
+
+ this.emitter_type = payload.getUnsignedByte();
+ this.tslc = payload.getUnsignedByte();
+
+ if (isMavlink2) {
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_adsb_vehicle() {
+ this.msgid = MAVLINK_MSG_ID_ADSB_VEHICLE;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_adsb_vehicle( long ICAO_address, int lat, int lon, int altitude, int heading, int hor_velocity, short ver_velocity, int flags, int squawk, short altitude_type, byte[] callsign, short emitter_type, short tslc) {
+ this.msgid = MAVLINK_MSG_ID_ADSB_VEHICLE;
+
+ this.ICAO_address = ICAO_address;
+ this.lat = lat;
+ this.lon = lon;
+ this.altitude = altitude;
+ this.heading = heading;
+ this.hor_velocity = hor_velocity;
+ this.ver_velocity = ver_velocity;
+ this.flags = flags;
+ this.squawk = squawk;
+ this.altitude_type = altitude_type;
+ this.callsign = callsign;
+ this.emitter_type = emitter_type;
+ this.tslc = tslc;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_adsb_vehicle( long ICAO_address, int lat, int lon, int altitude, int heading, int hor_velocity, short ver_velocity, int flags, int squawk, short altitude_type, byte[] callsign, short emitter_type, short tslc, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_ADSB_VEHICLE;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.ICAO_address = ICAO_address;
+ this.lat = lat;
+ this.lon = lon;
+ this.altitude = altitude;
+ this.heading = heading;
+ this.hor_velocity = hor_velocity;
+ this.ver_velocity = ver_velocity;
+ this.flags = flags;
+ this.squawk = squawk;
+ this.altitude_type = altitude_type;
+ this.callsign = callsign;
+ this.emitter_type = emitter_type;
+ this.tslc = tslc;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_adsb_vehicle(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_ADSB_VEHICLE;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Sets the buffer of this message with a string, adds the necessary padding
+ */
+ public void setCallsign(String str) {
+ int len = Math.min(str.length(), 9);
+ for (int i=0; i 0 indicates the interval at which it is sent.
+ */
+ @Description("The interval between two messages. A value of -1 indicates this stream is disabled, 0 indicates it is not available, > 0 indicates the interval at which it is sent.")
+ @Units("us")
+ public int interval_us;
+
+ /**
+ * The ID of the requested MAVLink message. v1.0 is limited to 254 messages.
+ */
+ @Description("The ID of the requested MAVLink message. v1.0 is limited to 254 messages.")
+ @Units("")
+ public int message_id;
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_MESSAGE_INTERVAL;
+
+ packet.payload.putInt(interval_us);
+ packet.payload.putUnsignedShort(message_id);
+
+ if (isMavlink2) {
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a message_interval message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.interval_us = payload.getInt();
+ this.message_id = payload.getUnsignedShort();
+
+ if (isMavlink2) {
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_message_interval() {
+ this.msgid = MAVLINK_MSG_ID_MESSAGE_INTERVAL;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_message_interval( int interval_us, int message_id) {
+ this.msgid = MAVLINK_MSG_ID_MESSAGE_INTERVAL;
+
+ this.interval_us = interval_us;
+ this.message_id = message_id;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_message_interval( int interval_us, int message_id, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_MESSAGE_INTERVAL;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.interval_us = interval_us;
+ this.message_id = message_id;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_message_interval(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_MESSAGE_INTERVAL;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Returns a string with the MSG name and data
+ */
+ @Override
+ public String toString() {
+ return "MAVLINK_MSG_ID_MESSAGE_INTERVAL - sysid:"+sysid+" compid:"+compid+" interval_us:"+interval_us+" message_id:"+message_id+"";
+ }
+
+ /**
+ * Returns a human-readable string of the name of the message
+ */
+ @Override
+ public String name() {
+ return "MAVLINK_MSG_ID_MESSAGE_INTERVAL";
+ }
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_ack.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_ack.java
new file mode 100644
index 0000000..55fe7b3
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_ack.java
@@ -0,0 +1,173 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+// MESSAGE MISSION_ACK PACKING
+package com.example.longyi_groundstation.MAVLink.common;
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload;
+import com.example.longyi_groundstation.MAVLink.Messages.Units;
+import com.example.longyi_groundstation.MAVLink.Messages.Description;
+
+/**
+ * Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero).
+ */
+public class msg_mission_ack extends MAVLinkMessage {
+
+ public static final int MAVLINK_MSG_ID_MISSION_ACK = 47;
+ public static final int MAVLINK_MSG_LENGTH = 8;
+ private static final long serialVersionUID = MAVLINK_MSG_ID_MISSION_ACK;
+
+
+ /**
+ * System ID
+ */
+ @Description("System ID")
+ @Units("")
+ public short target_system;
+
+ /**
+ * Component ID
+ */
+ @Description("Component ID")
+ @Units("")
+ public short target_component;
+
+ /**
+ * Mission result.
+ */
+ @Description("Mission result.")
+ @Units("")
+ public short type;
+
+ /**
+ * Mission type.
+ */
+ @Description("Mission type.")
+ @Units("")
+ public short mission_type;
+
+ /**
+ * Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle). The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS. The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique). 0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT). 0 if plan ids are not supported. The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.
+ */
+ @Description("Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle). The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS. The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique). 0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT). 0 if plan ids are not supported. The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded. ")
+ @Units("")
+ public long opaque_id;
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_MISSION_ACK;
+
+ packet.payload.putUnsignedByte(target_system);
+ packet.payload.putUnsignedByte(target_component);
+ packet.payload.putUnsignedByte(type);
+
+ if (isMavlink2) {
+ packet.payload.putUnsignedByte(mission_type);
+ packet.payload.putUnsignedInt(opaque_id);
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a mission_ack message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.target_system = payload.getUnsignedByte();
+ this.target_component = payload.getUnsignedByte();
+ this.type = payload.getUnsignedByte();
+
+ if (isMavlink2) {
+ this.mission_type = payload.getUnsignedByte();
+ this.opaque_id = payload.getUnsignedInt();
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_mission_ack() {
+ this.msgid = MAVLINK_MSG_ID_MISSION_ACK;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_mission_ack( short target_system, short target_component, short type, short mission_type, long opaque_id) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_ACK;
+
+ this.target_system = target_system;
+ this.target_component = target_component;
+ this.type = type;
+ this.mission_type = mission_type;
+ this.opaque_id = opaque_id;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_mission_ack( short target_system, short target_component, short type, short mission_type, long opaque_id, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_ACK;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.target_system = target_system;
+ this.target_component = target_component;
+ this.type = type;
+ this.mission_type = mission_type;
+ this.opaque_id = opaque_id;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_mission_ack(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_ACK;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Returns a string with the MSG name and data
+ */
+ @Override
+ public String toString() {
+ return "MAVLINK_MSG_ID_MISSION_ACK - sysid:"+sysid+" compid:"+compid+" target_system:"+target_system+" target_component:"+target_component+" type:"+type+" mission_type:"+mission_type+" opaque_id:"+opaque_id+"";
+ }
+
+ /**
+ * Returns a human-readable string of the name of the message
+ */
+ @Override
+ public String name() {
+ return "MAVLINK_MSG_ID_MISSION_ACK";
+ }
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_clear_all.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_clear_all.java
new file mode 100644
index 0000000..4e473ec
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_clear_all.java
@@ -0,0 +1,151 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+// MESSAGE MISSION_CLEAR_ALL PACKING
+package com.example.longyi_groundstation.MAVLink.common;
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload;
+import com.example.longyi_groundstation.MAVLink.Messages.Units;
+import com.example.longyi_groundstation.MAVLink.Messages.Description;
+
+/**
+ * Delete all mission items at once.
+ */
+public class msg_mission_clear_all extends MAVLinkMessage {
+
+ public static final int MAVLINK_MSG_ID_MISSION_CLEAR_ALL = 45;
+ public static final int MAVLINK_MSG_LENGTH = 3;
+ private static final long serialVersionUID = MAVLINK_MSG_ID_MISSION_CLEAR_ALL;
+
+
+ /**
+ * System ID
+ */
+ @Description("System ID")
+ @Units("")
+ public short target_system;
+
+ /**
+ * Component ID
+ */
+ @Description("Component ID")
+ @Units("")
+ public short target_component;
+
+ /**
+ * Mission type.
+ */
+ @Description("Mission type.")
+ @Units("")
+ public short mission_type;
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_MISSION_CLEAR_ALL;
+
+ packet.payload.putUnsignedByte(target_system);
+ packet.payload.putUnsignedByte(target_component);
+
+ if (isMavlink2) {
+ packet.payload.putUnsignedByte(mission_type);
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a mission_clear_all message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.target_system = payload.getUnsignedByte();
+ this.target_component = payload.getUnsignedByte();
+
+ if (isMavlink2) {
+ this.mission_type = payload.getUnsignedByte();
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_mission_clear_all() {
+ this.msgid = MAVLINK_MSG_ID_MISSION_CLEAR_ALL;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_mission_clear_all( short target_system, short target_component, short mission_type) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_CLEAR_ALL;
+
+ this.target_system = target_system;
+ this.target_component = target_component;
+ this.mission_type = mission_type;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_mission_clear_all( short target_system, short target_component, short mission_type, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_CLEAR_ALL;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.target_system = target_system;
+ this.target_component = target_component;
+ this.mission_type = mission_type;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_mission_clear_all(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_CLEAR_ALL;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Returns a string with the MSG name and data
+ */
+ @Override
+ public String toString() {
+ return "MAVLINK_MSG_ID_MISSION_CLEAR_ALL - sysid:"+sysid+" compid:"+compid+" target_system:"+target_system+" target_component:"+target_component+" mission_type:"+mission_type+"";
+ }
+
+ /**
+ * Returns a human-readable string of the name of the message
+ */
+ @Override
+ public String name() {
+ return "MAVLINK_MSG_ID_MISSION_CLEAR_ALL";
+ }
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_count.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_count.java
new file mode 100644
index 0000000..0fabb74
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_count.java
@@ -0,0 +1,173 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+// MESSAGE MISSION_COUNT PACKING
+package com.example.longyi_groundstation.MAVLink.common;
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload;
+import com.example.longyi_groundstation.MAVLink.Messages.Units;
+import com.example.longyi_groundstation.MAVLink.Messages.Description;
+
+/**
+ * This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints.
+ */
+public class msg_mission_count extends MAVLinkMessage {
+
+ public static final int MAVLINK_MSG_ID_MISSION_COUNT = 44;
+ public static final int MAVLINK_MSG_LENGTH = 9;
+ private static final long serialVersionUID = MAVLINK_MSG_ID_MISSION_COUNT;
+
+
+ /**
+ * Number of mission items in the sequence
+ */
+ @Description("Number of mission items in the sequence")
+ @Units("")
+ public int count;
+
+ /**
+ * System ID
+ */
+ @Description("System ID")
+ @Units("")
+ public short target_system;
+
+ /**
+ * Component ID
+ */
+ @Description("Component ID")
+ @Units("")
+ public short target_component;
+
+ /**
+ * Mission type.
+ */
+ @Description("Mission type.")
+ @Units("")
+ public short mission_type;
+
+ /**
+ * Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle). This field is used when downloading a plan from a vehicle to a GCS. 0 on upload to the vehicle from GCS. 0 if plan ids are not supported. The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded. The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK).
+ */
+ @Description("Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle). This field is used when downloading a plan from a vehicle to a GCS. 0 on upload to the vehicle from GCS. 0 if plan ids are not supported. The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded. The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK). ")
+ @Units("")
+ public long opaque_id;
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_MISSION_COUNT;
+
+ packet.payload.putUnsignedShort(count);
+ packet.payload.putUnsignedByte(target_system);
+ packet.payload.putUnsignedByte(target_component);
+
+ if (isMavlink2) {
+ packet.payload.putUnsignedByte(mission_type);
+ packet.payload.putUnsignedInt(opaque_id);
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a mission_count message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.count = payload.getUnsignedShort();
+ this.target_system = payload.getUnsignedByte();
+ this.target_component = payload.getUnsignedByte();
+
+ if (isMavlink2) {
+ this.mission_type = payload.getUnsignedByte();
+ this.opaque_id = payload.getUnsignedInt();
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_mission_count() {
+ this.msgid = MAVLINK_MSG_ID_MISSION_COUNT;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_mission_count( int count, short target_system, short target_component, short mission_type, long opaque_id) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_COUNT;
+
+ this.count = count;
+ this.target_system = target_system;
+ this.target_component = target_component;
+ this.mission_type = mission_type;
+ this.opaque_id = opaque_id;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_mission_count( int count, short target_system, short target_component, short mission_type, long opaque_id, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_COUNT;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.count = count;
+ this.target_system = target_system;
+ this.target_component = target_component;
+ this.mission_type = mission_type;
+ this.opaque_id = opaque_id;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_mission_count(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_COUNT;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Returns a string with the MSG name and data
+ */
+ @Override
+ public String toString() {
+ return "MAVLINK_MSG_ID_MISSION_COUNT - sysid:"+sysid+" compid:"+compid+" count:"+count+" target_system:"+target_system+" target_component:"+target_component+" mission_type:"+mission_type+" opaque_id:"+opaque_id+"";
+ }
+
+ /**
+ * Returns a human-readable string of the name of the message
+ */
+ @Override
+ public String name() {
+ return "MAVLINK_MSG_ID_MISSION_COUNT";
+ }
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_current.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_current.java
new file mode 100644
index 0000000..d745015
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_current.java
@@ -0,0 +1,228 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+// MESSAGE MISSION_CURRENT PACKING
+package com.example.longyi_groundstation.MAVLink.common;
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload;
+import com.example.longyi_groundstation.MAVLink.Messages.Units;
+import com.example.longyi_groundstation.MAVLink.Messages.Description;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+/**
+ *
+ Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).
+ This message should be streamed all the time (nominally at 1Hz).
+ This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT.
+
+ */
+public class msg_mission_current extends MAVLinkMessage {
+
+ public static final int MAVLINK_MSG_ID_MISSION_CURRENT = 42;
+ public static final int MAVLINK_MSG_LENGTH = 18;
+ private static final long serialVersionUID = MAVLINK_MSG_ID_MISSION_CURRENT;
+
+
+ /**
+ * Sequence
+ */
+ @Description("Sequence")
+ @Units("")
+ public int seq;
+
+ /**
+ * Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle.
+ */
+ @Description("Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle.")
+ @Units("")
+ public int total;
+
+ /**
+ * Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported.
+ */
+ @Description("Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported.")
+ @Units("")
+ public short mission_state;
+
+ /**
+ * Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode).
+ */
+ @Description("Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode).")
+ @Units("")
+ public short mission_mode;
+
+ /**
+ * Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK).
+ */
+ @Description("Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK).")
+ @Units("")
+ public long mission_id;
+
+ /**
+ * Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK).
+ */
+ @Description("Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK).")
+ @Units("")
+ public long fence_id;
+
+ /**
+ * Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK).
+ */
+ @Description("Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK).")
+ @Units("")
+ public long rally_points_id;
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_MISSION_CURRENT;
+
+ packet.payload.putUnsignedShort(seq);
+
+ if (isMavlink2) {
+ packet.payload.putUnsignedShort(total);
+ packet.payload.putUnsignedByte(mission_state);
+ packet.payload.putUnsignedByte(mission_mode);
+ packet.payload.putUnsignedInt(mission_id);
+ packet.payload.putUnsignedInt(fence_id);
+ packet.payload.putUnsignedInt(rally_points_id);
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a mission_current message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.seq = payload.getUnsignedShort();
+
+ if (isMavlink2) {
+ this.total = payload.getUnsignedShort();
+ this.mission_state = payload.getUnsignedByte();
+ this.mission_mode = payload.getUnsignedByte();
+ this.mission_id = payload.getUnsignedInt();
+ this.fence_id = payload.getUnsignedInt();
+ this.rally_points_id = payload.getUnsignedInt();
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_mission_current() {
+ this.msgid = MAVLINK_MSG_ID_MISSION_CURRENT;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_mission_current( int seq, int total, short mission_state, short mission_mode, long mission_id, long fence_id, long rally_points_id) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_CURRENT;
+
+ this.seq = seq;
+ this.total = total;
+ this.mission_state = mission_state;
+ this.mission_mode = mission_mode;
+ this.mission_id = mission_id;
+ this.fence_id = fence_id;
+ this.rally_points_id = rally_points_id;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_mission_current( int seq, int total, short mission_state, short mission_mode, long mission_id, long fence_id, long rally_points_id, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_CURRENT;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.seq = seq;
+ this.total = total;
+ this.mission_state = mission_state;
+ this.mission_mode = mission_mode;
+ this.mission_id = mission_id;
+ this.fence_id = fence_id;
+ this.rally_points_id = rally_points_id;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_mission_current(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_CURRENT;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Returns a string with the MSG name and data
+ */
+ @Override
+ public String toString() {
+
+ JSONObject jsonObject = new JSONObject();
+ try {
+ jsonObject.put("msgid",MAVLINK_MSG_ID_MISSION_CURRENT);
+ jsonObject.put("sysid",sysid);
+ jsonObject.put("compid",compid);
+ jsonObject.put("seq",seq);
+ jsonObject.put("total",total);
+ jsonObject.put("mission_state",mission_state);
+ jsonObject.put("mission_mode",mission_mode);
+ jsonObject.put("mission_id",mission_id);
+ jsonObject.put("fence_id",fence_id);
+ jsonObject.put("rally_points_id",rally_points_id);
+ return jsonObject.toString();
+ } catch (JSONException e) {
+ return null;
+ }
+
+// return "MAVLINK_MSG_ID_MISSION_CURRENT - sysid:"+sysid
+// +" compid:"+compid
+// +" seq:"+seq
+// +" total:"+total
+// +" mission_state:"+mission_state
+// +" mission_mode:"+mission_mode
+// +" mission_id:"+mission_id
+// +" fence_id:"+fence_id
+// +" rally_points_id:"+rally_points_id+"";
+ }
+
+ /**
+ * Returns a human-readable string of the name of the message
+ */
+ @Override
+ public String name() {
+ return "MAVLINK_MSG_ID_MISSION_CURRENT";
+ }
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_item.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_item.java
new file mode 100644
index 0000000..cbea479
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_item.java
@@ -0,0 +1,284 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+// MESSAGE MISSION_ITEM PACKING
+package com.example.longyi_groundstation.MAVLink.common;
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload;
+import com.example.longyi_groundstation.MAVLink.Messages.Units;
+import com.example.longyi_groundstation.MAVLink.Messages.Description;
+
+/**
+ * Message encoding a mission item. This message is emitted to announce
+ the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also https://mavlink.io/en/services/mission.html.
+ */
+public class msg_mission_item extends MAVLinkMessage {
+
+ public static final int MAVLINK_MSG_ID_MISSION_ITEM = 39;
+ public static final int MAVLINK_MSG_LENGTH = 38;
+ private static final long serialVersionUID = MAVLINK_MSG_ID_MISSION_ITEM;
+
+
+ /**
+ * PARAM1, see MAV_CMD enum
+ */
+ @Description("PARAM1, see MAV_CMD enum")
+ @Units("")
+ public float param1;
+
+ /**
+ * PARAM2, see MAV_CMD enum
+ */
+ @Description("PARAM2, see MAV_CMD enum")
+ @Units("")
+ public float param2;
+
+ /**
+ * PARAM3, see MAV_CMD enum
+ */
+ @Description("PARAM3, see MAV_CMD enum")
+ @Units("")
+ public float param3;
+
+ /**
+ * PARAM4, see MAV_CMD enum
+ */
+ @Description("PARAM4, see MAV_CMD enum")
+ @Units("")
+ public float param4;
+
+ /**
+ * PARAM5 / local: X coordinate, global: latitude
+ */
+ @Description("PARAM5 / local: X coordinate, global: latitude")
+ @Units("")
+ public float x;
+
+ /**
+ * PARAM6 / local: Y coordinate, global: longitude
+ */
+ @Description("PARAM6 / local: Y coordinate, global: longitude")
+ @Units("")
+ public float y;
+
+ /**
+ * PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame).
+ */
+ @Description("PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame).")
+ @Units("")
+ public float z;
+
+ /**
+ * Sequence
+ */
+ @Description("Sequence")
+ @Units("")
+ public int seq;
+
+ /**
+ * The scheduled action for the waypoint.
+ */
+ @Description("The scheduled action for the waypoint.")
+ @Units("")
+ public int command;
+
+ /**
+ * System ID
+ */
+ @Description("System ID")
+ @Units("")
+ public short target_system;
+
+ /**
+ * Component ID
+ */
+ @Description("Component ID")
+ @Units("")
+ public short target_component;
+
+ /**
+ * The coordinate system of the waypoint.
+ */
+ @Description("The coordinate system of the waypoint.")
+ @Units("")
+ public short frame;
+
+ /**
+ * false:0, true:1
+ */
+ @Description("false:0, true:1")
+ @Units("")
+ public short current;
+
+ /**
+ * Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes.
+ */
+ @Description("Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes.")
+ @Units("")
+ public short autocontinue;
+
+ /**
+ * Mission type.
+ */
+ @Description("Mission type.")
+ @Units("")
+ public short mission_type;
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_MISSION_ITEM;
+
+ packet.payload.putFloat(param1);
+ packet.payload.putFloat(param2);
+ packet.payload.putFloat(param3);
+ packet.payload.putFloat(param4);
+ packet.payload.putFloat(x);
+ packet.payload.putFloat(y);
+ packet.payload.putFloat(z);
+ packet.payload.putUnsignedShort(seq);
+ packet.payload.putUnsignedShort(command);
+ packet.payload.putUnsignedByte(target_system);
+ packet.payload.putUnsignedByte(target_component);
+ packet.payload.putUnsignedByte(frame);
+ packet.payload.putUnsignedByte(current);
+ packet.payload.putUnsignedByte(autocontinue);
+
+ if (isMavlink2) {
+ packet.payload.putUnsignedByte(mission_type);
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a mission_item message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.param1 = payload.getFloat();
+ this.param2 = payload.getFloat();
+ this.param3 = payload.getFloat();
+ this.param4 = payload.getFloat();
+ this.x = payload.getFloat();
+ this.y = payload.getFloat();
+ this.z = payload.getFloat();
+ this.seq = payload.getUnsignedShort();
+ this.command = payload.getUnsignedShort();
+ this.target_system = payload.getUnsignedByte();
+ this.target_component = payload.getUnsignedByte();
+ this.frame = payload.getUnsignedByte();
+ this.current = payload.getUnsignedByte();
+ this.autocontinue = payload.getUnsignedByte();
+
+ if (isMavlink2) {
+ this.mission_type = payload.getUnsignedByte();
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_mission_item() {
+ this.msgid = MAVLINK_MSG_ID_MISSION_ITEM;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_mission_item( float param1, float param2, float param3, float param4, float x, float y, float z, int seq, int command, short target_system, short target_component, short frame, short current, short autocontinue, short mission_type) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_ITEM;
+
+ this.param1 = param1;
+ this.param2 = param2;
+ this.param3 = param3;
+ this.param4 = param4;
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ this.seq = seq;
+ this.command = command;
+ this.target_system = target_system;
+ this.target_component = target_component;
+ this.frame = frame;
+ this.current = current;
+ this.autocontinue = autocontinue;
+ this.mission_type = mission_type;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_mission_item( float param1, float param2, float param3, float param4, float x, float y, float z, int seq, int command, short target_system, short target_component, short frame, short current, short autocontinue, short mission_type, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_ITEM;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.param1 = param1;
+ this.param2 = param2;
+ this.param3 = param3;
+ this.param4 = param4;
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ this.seq = seq;
+ this.command = command;
+ this.target_system = target_system;
+ this.target_component = target_component;
+ this.frame = frame;
+ this.current = current;
+ this.autocontinue = autocontinue;
+ this.mission_type = mission_type;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_mission_item(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_ITEM;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Returns a string with the MSG name and data
+ */
+ @Override
+ public String toString() {
+ return "MAVLINK_MSG_ID_MISSION_ITEM - sysid:"+sysid+" compid:"+compid+" param1:"+param1+" param2:"+param2+" param3:"+param3+" param4:"+param4+" x:"+x+" y:"+y+" z:"+z+" seq:"+seq+" command:"+command+" target_system:"+target_system+" target_component:"+target_component+" frame:"+frame+" current:"+current+" autocontinue:"+autocontinue+" mission_type:"+mission_type+"";
+ }
+
+ /**
+ * Returns a human-readable string of the name of the message
+ */
+ @Override
+ public String name() {
+ return "MAVLINK_MSG_ID_MISSION_ITEM";
+ }
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_item_int.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_item_int.java
new file mode 100644
index 0000000..a259599
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_item_int.java
@@ -0,0 +1,284 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+// MESSAGE MISSION_ITEM_INT PACKING
+package com.example.longyi_groundstation.MAVLink.common;
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload;
+import com.example.longyi_groundstation.MAVLink.Messages.Units;
+import com.example.longyi_groundstation.MAVLink.Messages.Description;
+
+/**
+ * Message encoding a mission item. This message is emitted to announce
+ the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also https://mavlink.io/en/services/mission.html.
+ */
+public class msg_mission_item_int extends MAVLinkMessage {
+
+ public static final int MAVLINK_MSG_ID_MISSION_ITEM_INT = 73;
+ public static final int MAVLINK_MSG_LENGTH = 38;
+ private static final long serialVersionUID = MAVLINK_MSG_ID_MISSION_ITEM_INT;
+
+
+ /**
+ * PARAM1, see MAV_CMD enum
+ */
+ @Description("PARAM1, see MAV_CMD enum")
+ @Units("")
+ public float param1;
+
+ /**
+ * PARAM2, see MAV_CMD enum
+ */
+ @Description("PARAM2, see MAV_CMD enum")
+ @Units("")
+ public float param2;
+
+ /**
+ * PARAM3, see MAV_CMD enum
+ */
+ @Description("PARAM3, see MAV_CMD enum")
+ @Units("")
+ public float param3;
+
+ /**
+ * PARAM4, see MAV_CMD enum
+ */
+ @Description("PARAM4, see MAV_CMD enum")
+ @Units("")
+ public float param4;
+
+ /**
+ * PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7
+ */
+ @Description("PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7")
+ @Units("")
+ public int x;
+
+ /**
+ * PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7
+ */
+ @Description("PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7")
+ @Units("")
+ public int y;
+
+ /**
+ * PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame.
+ */
+ @Description("PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame.")
+ @Units("")
+ public float z;
+
+ /**
+ * Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4).
+ */
+ @Description("Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4).")
+ @Units("")
+ public int seq;
+
+ /**
+ * The scheduled action for the waypoint.
+ */
+ @Description("The scheduled action for the waypoint.")
+ @Units("")
+ public int command;
+
+ /**
+ * System ID
+ */
+ @Description("System ID")
+ @Units("")
+ public short target_system;
+
+ /**
+ * Component ID
+ */
+ @Description("Component ID")
+ @Units("")
+ public short target_component;
+
+ /**
+ * The coordinate system of the waypoint.
+ */
+ @Description("The coordinate system of the waypoint.")
+ @Units("")
+ public short frame;
+
+ /**
+ * false:0, true:1
+ */
+ @Description("false:0, true:1")
+ @Units("")
+ public short current;
+
+ /**
+ * Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes.
+ */
+ @Description("Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes.")
+ @Units("")
+ public short autocontinue;
+
+ /**
+ * Mission type.
+ */
+ @Description("Mission type.")
+ @Units("")
+ public short mission_type;
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_MISSION_ITEM_INT;
+
+ packet.payload.putFloat(param1);
+ packet.payload.putFloat(param2);
+ packet.payload.putFloat(param3);
+ packet.payload.putFloat(param4);
+ packet.payload.putInt(x);
+ packet.payload.putInt(y);
+ packet.payload.putFloat(z);
+ packet.payload.putUnsignedShort(seq);
+ packet.payload.putUnsignedShort(command);
+ packet.payload.putUnsignedByte(target_system);
+ packet.payload.putUnsignedByte(target_component);
+ packet.payload.putUnsignedByte(frame);
+ packet.payload.putUnsignedByte(current);
+ packet.payload.putUnsignedByte(autocontinue);
+
+ if (isMavlink2) {
+ packet.payload.putUnsignedByte(mission_type);
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a mission_item_int message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.param1 = payload.getFloat();
+ this.param2 = payload.getFloat();
+ this.param3 = payload.getFloat();
+ this.param4 = payload.getFloat();
+ this.x = payload.getInt();
+ this.y = payload.getInt();
+ this.z = payload.getFloat();
+ this.seq = payload.getUnsignedShort();
+ this.command = payload.getUnsignedShort();
+ this.target_system = payload.getUnsignedByte();
+ this.target_component = payload.getUnsignedByte();
+ this.frame = payload.getUnsignedByte();
+ this.current = payload.getUnsignedByte();
+ this.autocontinue = payload.getUnsignedByte();
+
+ if (isMavlink2) {
+ this.mission_type = payload.getUnsignedByte();
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_mission_item_int() {
+ this.msgid = MAVLINK_MSG_ID_MISSION_ITEM_INT;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_mission_item_int( float param1, float param2, float param3, float param4, int x, int y, float z, int seq, int command, short target_system, short target_component, short frame, short current, short autocontinue, short mission_type) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_ITEM_INT;
+
+ this.param1 = param1;
+ this.param2 = param2;
+ this.param3 = param3;
+ this.param4 = param4;
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ this.seq = seq;
+ this.command = command;
+ this.target_system = target_system;
+ this.target_component = target_component;
+ this.frame = frame;
+ this.current = current;
+ this.autocontinue = autocontinue;
+ this.mission_type = mission_type;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_mission_item_int( float param1, float param2, float param3, float param4, int x, int y, float z, int seq, int command, short target_system, short target_component, short frame, short current, short autocontinue, short mission_type, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_ITEM_INT;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.param1 = param1;
+ this.param2 = param2;
+ this.param3 = param3;
+ this.param4 = param4;
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ this.seq = seq;
+ this.command = command;
+ this.target_system = target_system;
+ this.target_component = target_component;
+ this.frame = frame;
+ this.current = current;
+ this.autocontinue = autocontinue;
+ this.mission_type = mission_type;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_mission_item_int(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_ITEM_INT;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Returns a string with the MSG name and data
+ */
+ @Override
+ public String toString() {
+ return "MAVLINK_MSG_ID_MISSION_ITEM_INT - sysid:"+sysid+" compid:"+compid+" param1:"+param1+" param2:"+param2+" param3:"+param3+" param4:"+param4+" x:"+x+" y:"+y+" z:"+z+" seq:"+seq+" command:"+command+" target_system:"+target_system+" target_component:"+target_component+" frame:"+frame+" current:"+current+" autocontinue:"+autocontinue+" mission_type:"+mission_type+"";
+ }
+
+ /**
+ * Returns a human-readable string of the name of the message
+ */
+ @Override
+ public String name() {
+ return "MAVLINK_MSG_ID_MISSION_ITEM_INT";
+ }
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_item_reached.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_item_reached.java
new file mode 100644
index 0000000..c3a3f08
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_item_reached.java
@@ -0,0 +1,129 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+// MESSAGE MISSION_ITEM_REACHED PACKING
+package com.example.longyi_groundstation.MAVLink.common;
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload;
+import com.example.longyi_groundstation.MAVLink.Messages.Units;
+import com.example.longyi_groundstation.MAVLink.Messages.Description;
+
+/**
+ * A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint.
+ */
+public class msg_mission_item_reached extends MAVLinkMessage {
+
+ public static final int MAVLINK_MSG_ID_MISSION_ITEM_REACHED = 46;
+ public static final int MAVLINK_MSG_LENGTH = 2;
+ private static final long serialVersionUID = MAVLINK_MSG_ID_MISSION_ITEM_REACHED;
+
+
+ /**
+ * Sequence
+ */
+ @Description("Sequence")
+ @Units("")
+ public int seq;
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_MISSION_ITEM_REACHED;
+
+ packet.payload.putUnsignedShort(seq);
+
+ if (isMavlink2) {
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a mission_item_reached message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.seq = payload.getUnsignedShort();
+
+ if (isMavlink2) {
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_mission_item_reached() {
+ this.msgid = MAVLINK_MSG_ID_MISSION_ITEM_REACHED;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_mission_item_reached( int seq) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_ITEM_REACHED;
+
+ this.seq = seq;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_mission_item_reached( int seq, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_ITEM_REACHED;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.seq = seq;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_mission_item_reached(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_ITEM_REACHED;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Returns a string with the MSG name and data
+ */
+ @Override
+ public String toString() {
+ return "MAVLINK_MSG_ID_MISSION_ITEM_REACHED - sysid:"+sysid+" compid:"+compid+" seq:"+seq+"";
+ }
+
+ /**
+ * Returns a human-readable string of the name of the message
+ */
+ @Override
+ public String name() {
+ return "MAVLINK_MSG_ID_MISSION_ITEM_REACHED";
+ }
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_request.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_request.java
new file mode 100644
index 0000000..bd114d2
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_request.java
@@ -0,0 +1,162 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+// MESSAGE MISSION_REQUEST PACKING
+package com.example.longyi_groundstation.MAVLink.common;
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload;
+import com.example.longyi_groundstation.MAVLink.Messages.Units;
+import com.example.longyi_groundstation.MAVLink.Messages.Description;
+
+/**
+ * Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. https://mavlink.io/en/services/mission.html
+ */
+public class msg_mission_request extends MAVLinkMessage {
+
+ public static final int MAVLINK_MSG_ID_MISSION_REQUEST = 40;
+ public static final int MAVLINK_MSG_LENGTH = 5;
+ private static final long serialVersionUID = MAVLINK_MSG_ID_MISSION_REQUEST;
+
+
+ /**
+ * Sequence
+ */
+ @Description("Sequence")
+ @Units("")
+ public int seq;
+
+ /**
+ * System ID
+ */
+ @Description("System ID")
+ @Units("")
+ public short target_system;
+
+ /**
+ * Component ID
+ */
+ @Description("Component ID")
+ @Units("")
+ public short target_component;
+
+ /**
+ * Mission type.
+ */
+ @Description("Mission type.")
+ @Units("")
+ public short mission_type;
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_MISSION_REQUEST;
+
+ packet.payload.putUnsignedShort(seq);
+ packet.payload.putUnsignedByte(target_system);
+ packet.payload.putUnsignedByte(target_component);
+
+ if (isMavlink2) {
+ packet.payload.putUnsignedByte(mission_type);
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a mission_request message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.seq = payload.getUnsignedShort();
+ this.target_system = payload.getUnsignedByte();
+ this.target_component = payload.getUnsignedByte();
+
+ if (isMavlink2) {
+ this.mission_type = payload.getUnsignedByte();
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_mission_request() {
+ this.msgid = MAVLINK_MSG_ID_MISSION_REQUEST;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_mission_request( int seq, short target_system, short target_component, short mission_type) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_REQUEST;
+
+ this.seq = seq;
+ this.target_system = target_system;
+ this.target_component = target_component;
+ this.mission_type = mission_type;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_mission_request( int seq, short target_system, short target_component, short mission_type, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_REQUEST;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.seq = seq;
+ this.target_system = target_system;
+ this.target_component = target_component;
+ this.mission_type = mission_type;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_mission_request(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_REQUEST;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Returns a string with the MSG name and data
+ */
+ @Override
+ public String toString() {
+ return "MAVLINK_MSG_ID_MISSION_REQUEST - sysid:"+sysid+" compid:"+compid+" seq:"+seq+" target_system:"+target_system+" target_component:"+target_component+" mission_type:"+mission_type+"";
+ }
+
+ /**
+ * Returns a human-readable string of the name of the message
+ */
+ @Override
+ public String name() {
+ return "MAVLINK_MSG_ID_MISSION_REQUEST";
+ }
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_request_int.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_request_int.java
new file mode 100644
index 0000000..dd329bc
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_request_int.java
@@ -0,0 +1,162 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+// MESSAGE MISSION_REQUEST_INT PACKING
+package com.example.longyi_groundstation.MAVLink.common;
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload;
+import com.example.longyi_groundstation.MAVLink.Messages.Units;
+import com.example.longyi_groundstation.MAVLink.Messages.Description;
+
+/**
+ * Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. https://mavlink.io/en/services/mission.html
+ */
+public class msg_mission_request_int extends MAVLinkMessage {
+
+ public static final int MAVLINK_MSG_ID_MISSION_REQUEST_INT = 51;
+ public static final int MAVLINK_MSG_LENGTH = 5;
+ private static final long serialVersionUID = MAVLINK_MSG_ID_MISSION_REQUEST_INT;
+
+
+ /**
+ * Sequence
+ */
+ @Description("Sequence")
+ @Units("")
+ public int seq;
+
+ /**
+ * System ID
+ */
+ @Description("System ID")
+ @Units("")
+ public short target_system;
+
+ /**
+ * Component ID
+ */
+ @Description("Component ID")
+ @Units("")
+ public short target_component;
+
+ /**
+ * Mission type.
+ */
+ @Description("Mission type.")
+ @Units("")
+ public short mission_type;
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_MISSION_REQUEST_INT;
+
+ packet.payload.putUnsignedShort(seq);
+ packet.payload.putUnsignedByte(target_system);
+ packet.payload.putUnsignedByte(target_component);
+
+ if (isMavlink2) {
+ packet.payload.putUnsignedByte(mission_type);
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a mission_request_int message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.seq = payload.getUnsignedShort();
+ this.target_system = payload.getUnsignedByte();
+ this.target_component = payload.getUnsignedByte();
+
+ if (isMavlink2) {
+ this.mission_type = payload.getUnsignedByte();
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_mission_request_int() {
+ this.msgid = MAVLINK_MSG_ID_MISSION_REQUEST_INT;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_mission_request_int( int seq, short target_system, short target_component, short mission_type) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_REQUEST_INT;
+
+ this.seq = seq;
+ this.target_system = target_system;
+ this.target_component = target_component;
+ this.mission_type = mission_type;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_mission_request_int( int seq, short target_system, short target_component, short mission_type, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_REQUEST_INT;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.seq = seq;
+ this.target_system = target_system;
+ this.target_component = target_component;
+ this.mission_type = mission_type;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_mission_request_int(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_REQUEST_INT;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Returns a string with the MSG name and data
+ */
+ @Override
+ public String toString() {
+ return "MAVLINK_MSG_ID_MISSION_REQUEST_INT - sysid:"+sysid+" compid:"+compid+" seq:"+seq+" target_system:"+target_system+" target_component:"+target_component+" mission_type:"+mission_type+"";
+ }
+
+ /**
+ * Returns a human-readable string of the name of the message
+ */
+ @Override
+ public String name() {
+ return "MAVLINK_MSG_ID_MISSION_REQUEST_INT";
+ }
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_request_list.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_request_list.java
new file mode 100644
index 0000000..8a44c09
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_request_list.java
@@ -0,0 +1,151 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+// MESSAGE MISSION_REQUEST_LIST PACKING
+package com.example.longyi_groundstation.MAVLink.common;
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload;
+import com.example.longyi_groundstation.MAVLink.Messages.Units;
+import com.example.longyi_groundstation.MAVLink.Messages.Description;
+
+/**
+ * Request the overall list of mission items from the system/component.
+ */
+public class msg_mission_request_list extends MAVLinkMessage {
+
+ public static final int MAVLINK_MSG_ID_MISSION_REQUEST_LIST = 43;
+ public static final int MAVLINK_MSG_LENGTH = 3;
+ private static final long serialVersionUID = MAVLINK_MSG_ID_MISSION_REQUEST_LIST;
+
+
+ /**
+ * System ID
+ */
+ @Description("System ID")
+ @Units("")
+ public short target_system;
+
+ /**
+ * Component ID
+ */
+ @Description("Component ID")
+ @Units("")
+ public short target_component;
+
+ /**
+ * Mission type.
+ */
+ @Description("Mission type.")
+ @Units("")
+ public short mission_type;
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_MISSION_REQUEST_LIST;
+
+ packet.payload.putUnsignedByte(target_system);
+ packet.payload.putUnsignedByte(target_component);
+
+ if (isMavlink2) {
+ packet.payload.putUnsignedByte(mission_type);
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a mission_request_list message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.target_system = payload.getUnsignedByte();
+ this.target_component = payload.getUnsignedByte();
+
+ if (isMavlink2) {
+ this.mission_type = payload.getUnsignedByte();
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_mission_request_list() {
+ this.msgid = MAVLINK_MSG_ID_MISSION_REQUEST_LIST;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_mission_request_list( short target_system, short target_component, short mission_type) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_REQUEST_LIST;
+
+ this.target_system = target_system;
+ this.target_component = target_component;
+ this.mission_type = mission_type;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_mission_request_list( short target_system, short target_component, short mission_type, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_REQUEST_LIST;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.target_system = target_system;
+ this.target_component = target_component;
+ this.mission_type = mission_type;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_mission_request_list(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_REQUEST_LIST;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Returns a string with the MSG name and data
+ */
+ @Override
+ public String toString() {
+ return "MAVLINK_MSG_ID_MISSION_REQUEST_LIST - sysid:"+sysid+" compid:"+compid+" target_system:"+target_system+" target_component:"+target_component+" mission_type:"+mission_type+"";
+ }
+
+ /**
+ * Returns a human-readable string of the name of the message
+ */
+ @Override
+ public String name() {
+ return "MAVLINK_MSG_ID_MISSION_REQUEST_LIST";
+ }
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_request_partial_list.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_request_partial_list.java
new file mode 100644
index 0000000..a2ced3a
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_request_partial_list.java
@@ -0,0 +1,173 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+// MESSAGE MISSION_REQUEST_PARTIAL_LIST PACKING
+package com.example.longyi_groundstation.MAVLink.common;
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload;
+import com.example.longyi_groundstation.MAVLink.Messages.Units;
+import com.example.longyi_groundstation.MAVLink.Messages.Description;
+
+/**
+ * Request a partial list of mission items from the system/component. https://mavlink.io/en/services/mission.html. If start and end index are the same, just send one waypoint.
+ */
+public class msg_mission_request_partial_list extends MAVLinkMessage {
+
+ public static final int MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST = 37;
+ public static final int MAVLINK_MSG_LENGTH = 7;
+ private static final long serialVersionUID = MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST;
+
+
+ /**
+ * Start index
+ */
+ @Description("Start index")
+ @Units("")
+ public short start_index;
+
+ /**
+ * End index, -1 by default (-1: send list to end). Else a valid index of the list
+ */
+ @Description("End index, -1 by default (-1: send list to end). Else a valid index of the list")
+ @Units("")
+ public short end_index;
+
+ /**
+ * System ID
+ */
+ @Description("System ID")
+ @Units("")
+ public short target_system;
+
+ /**
+ * Component ID
+ */
+ @Description("Component ID")
+ @Units("")
+ public short target_component;
+
+ /**
+ * Mission type.
+ */
+ @Description("Mission type.")
+ @Units("")
+ public short mission_type;
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST;
+
+ packet.payload.putShort(start_index);
+ packet.payload.putShort(end_index);
+ packet.payload.putUnsignedByte(target_system);
+ packet.payload.putUnsignedByte(target_component);
+
+ if (isMavlink2) {
+ packet.payload.putUnsignedByte(mission_type);
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a mission_request_partial_list message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.start_index = payload.getShort();
+ this.end_index = payload.getShort();
+ this.target_system = payload.getUnsignedByte();
+ this.target_component = payload.getUnsignedByte();
+
+ if (isMavlink2) {
+ this.mission_type = payload.getUnsignedByte();
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_mission_request_partial_list() {
+ this.msgid = MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_mission_request_partial_list( short start_index, short end_index, short target_system, short target_component, short mission_type) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST;
+
+ this.start_index = start_index;
+ this.end_index = end_index;
+ this.target_system = target_system;
+ this.target_component = target_component;
+ this.mission_type = mission_type;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_mission_request_partial_list( short start_index, short end_index, short target_system, short target_component, short mission_type, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.start_index = start_index;
+ this.end_index = end_index;
+ this.target_system = target_system;
+ this.target_component = target_component;
+ this.mission_type = mission_type;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_mission_request_partial_list(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Returns a string with the MSG name and data
+ */
+ @Override
+ public String toString() {
+ return "MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST - sysid:"+sysid+" compid:"+compid+" start_index:"+start_index+" end_index:"+end_index+" target_system:"+target_system+" target_component:"+target_component+" mission_type:"+mission_type+"";
+ }
+
+ /**
+ * Returns a human-readable string of the name of the message
+ */
+ @Override
+ public String name() {
+ return "MAVLINK_MSG_ID_MISSION_REQUEST_PARTIAL_LIST";
+ }
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_set_current.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_set_current.java
new file mode 100644
index 0000000..09dbc57
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_set_current.java
@@ -0,0 +1,159 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+// MESSAGE MISSION_SET_CURRENT PACKING
+package com.example.longyi_groundstation.MAVLink.common;
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload;
+import com.example.longyi_groundstation.MAVLink.Messages.Units;
+import com.example.longyi_groundstation.MAVLink.Messages.Description;
+
+/**
+ *
+ Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).
+ If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.
+ Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).
+
+ This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.
+ If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.
+ If the system is not in mission mode this message must not trigger a switch to mission mode.
+
+ */
+public class msg_mission_set_current extends MAVLinkMessage {
+
+ public static final int MAVLINK_MSG_ID_MISSION_SET_CURRENT = 41;
+ public static final int MAVLINK_MSG_LENGTH = 4;
+ private static final long serialVersionUID = MAVLINK_MSG_ID_MISSION_SET_CURRENT;
+
+
+ /**
+ * Sequence
+ */
+ @Description("Sequence")
+ @Units("")
+ public int seq;
+
+ /**
+ * System ID
+ */
+ @Description("System ID")
+ @Units("")
+ public short target_system;
+
+ /**
+ * Component ID
+ */
+ @Description("Component ID")
+ @Units("")
+ public short target_component;
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_MISSION_SET_CURRENT;
+
+ packet.payload.putUnsignedShort(seq);
+ packet.payload.putUnsignedByte(target_system);
+ packet.payload.putUnsignedByte(target_component);
+
+ if (isMavlink2) {
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a mission_set_current message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.seq = payload.getUnsignedShort();
+ this.target_system = payload.getUnsignedByte();
+ this.target_component = payload.getUnsignedByte();
+
+ if (isMavlink2) {
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_mission_set_current() {
+ this.msgid = MAVLINK_MSG_ID_MISSION_SET_CURRENT;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_mission_set_current( int seq, short target_system, short target_component) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_SET_CURRENT;
+
+ this.seq = seq;
+ this.target_system = target_system;
+ this.target_component = target_component;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_mission_set_current( int seq, short target_system, short target_component, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_SET_CURRENT;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.seq = seq;
+ this.target_system = target_system;
+ this.target_component = target_component;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_mission_set_current(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_SET_CURRENT;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Returns a string with the MSG name and data
+ */
+ @Override
+ public String toString() {
+ return "MAVLINK_MSG_ID_MISSION_SET_CURRENT - sysid:"+sysid+" compid:"+compid+" seq:"+seq+" target_system:"+target_system+" target_component:"+target_component+"";
+ }
+
+ /**
+ * Returns a human-readable string of the name of the message
+ */
+ @Override
+ public String name() {
+ return "MAVLINK_MSG_ID_MISSION_SET_CURRENT";
+ }
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_write_partial_list.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_write_partial_list.java
new file mode 100644
index 0000000..ab61658
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mission_write_partial_list.java
@@ -0,0 +1,173 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+// MESSAGE MISSION_WRITE_PARTIAL_LIST PACKING
+package com.example.longyi_groundstation.MAVLink.common;
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload;
+import com.example.longyi_groundstation.MAVLink.Messages.Units;
+import com.example.longyi_groundstation.MAVLink.Messages.Description;
+
+/**
+ * This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!
+ */
+public class msg_mission_write_partial_list extends MAVLinkMessage {
+
+ public static final int MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST = 38;
+ public static final int MAVLINK_MSG_LENGTH = 7;
+ private static final long serialVersionUID = MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST;
+
+
+ /**
+ * Start index. Must be smaller / equal to the largest index of the current onboard list.
+ */
+ @Description("Start index. Must be smaller / equal to the largest index of the current onboard list.")
+ @Units("")
+ public short start_index;
+
+ /**
+ * End index, equal or greater than start index.
+ */
+ @Description("End index, equal or greater than start index.")
+ @Units("")
+ public short end_index;
+
+ /**
+ * System ID
+ */
+ @Description("System ID")
+ @Units("")
+ public short target_system;
+
+ /**
+ * Component ID
+ */
+ @Description("Component ID")
+ @Units("")
+ public short target_component;
+
+ /**
+ * Mission type.
+ */
+ @Description("Mission type.")
+ @Units("")
+ public short mission_type;
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST;
+
+ packet.payload.putShort(start_index);
+ packet.payload.putShort(end_index);
+ packet.payload.putUnsignedByte(target_system);
+ packet.payload.putUnsignedByte(target_component);
+
+ if (isMavlink2) {
+ packet.payload.putUnsignedByte(mission_type);
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a mission_write_partial_list message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.start_index = payload.getShort();
+ this.end_index = payload.getShort();
+ this.target_system = payload.getUnsignedByte();
+ this.target_component = payload.getUnsignedByte();
+
+ if (isMavlink2) {
+ this.mission_type = payload.getUnsignedByte();
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_mission_write_partial_list() {
+ this.msgid = MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_mission_write_partial_list( short start_index, short end_index, short target_system, short target_component, short mission_type) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST;
+
+ this.start_index = start_index;
+ this.end_index = end_index;
+ this.target_system = target_system;
+ this.target_component = target_component;
+ this.mission_type = mission_type;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_mission_write_partial_list( short start_index, short end_index, short target_system, short target_component, short mission_type, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.start_index = start_index;
+ this.end_index = end_index;
+ this.target_system = target_system;
+ this.target_component = target_component;
+ this.mission_type = mission_type;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_mission_write_partial_list(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Returns a string with the MSG name and data
+ */
+ @Override
+ public String toString() {
+ return "MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST - sysid:"+sysid+" compid:"+compid+" start_index:"+start_index+" end_index:"+end_index+" target_system:"+target_system+" target_component:"+target_component+" mission_type:"+mission_type+"";
+ }
+
+ /**
+ * Returns a human-readable string of the name of the message
+ */
+ @Override
+ public String name() {
+ return "MAVLINK_MSG_ID_MISSION_WRITE_PARTIAL_LIST";
+ }
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mount_orientation.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mount_orientation.java
new file mode 100644
index 0000000..0730dc3
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_mount_orientation.java
@@ -0,0 +1,173 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+// MESSAGE MOUNT_ORIENTATION PACKING
+package com.example.longyi_groundstation.MAVLink.common;
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload;
+import com.example.longyi_groundstation.MAVLink.Messages.Units;
+import com.example.longyi_groundstation.MAVLink.Messages.Description;
+
+/**
+ * Orientation of a mount
+ */
+public class msg_mount_orientation extends MAVLinkMessage {
+
+ public static final int MAVLINK_MSG_ID_MOUNT_ORIENTATION = 265;
+ public static final int MAVLINK_MSG_LENGTH = 20;
+ private static final long serialVersionUID = MAVLINK_MSG_ID_MOUNT_ORIENTATION;
+
+
+ /**
+ * Timestamp (time since system boot).
+ */
+ @Description("Timestamp (time since system boot).")
+ @Units("ms")
+ public long time_boot_ms;
+
+ /**
+ * Roll in global frame (set to NaN for invalid).
+ */
+ @Description("Roll in global frame (set to NaN for invalid).")
+ @Units("deg")
+ public float roll;
+
+ /**
+ * Pitch in global frame (set to NaN for invalid).
+ */
+ @Description("Pitch in global frame (set to NaN for invalid).")
+ @Units("deg")
+ public float pitch;
+
+ /**
+ * Yaw relative to vehicle (set to NaN for invalid).
+ */
+ @Description("Yaw relative to vehicle (set to NaN for invalid).")
+ @Units("deg")
+ public float yaw;
+
+ /**
+ * Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid).
+ */
+ @Description("Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid).")
+ @Units("deg")
+ public float yaw_absolute;
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_MOUNT_ORIENTATION;
+
+ packet.payload.putUnsignedInt(time_boot_ms);
+ packet.payload.putFloat(roll);
+ packet.payload.putFloat(pitch);
+ packet.payload.putFloat(yaw);
+
+ if (isMavlink2) {
+ packet.payload.putFloat(yaw_absolute);
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a mount_orientation message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.time_boot_ms = payload.getUnsignedInt();
+ this.roll = payload.getFloat();
+ this.pitch = payload.getFloat();
+ this.yaw = payload.getFloat();
+
+ if (isMavlink2) {
+ this.yaw_absolute = payload.getFloat();
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_mount_orientation() {
+ this.msgid = MAVLINK_MSG_ID_MOUNT_ORIENTATION;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_mount_orientation( long time_boot_ms, float roll, float pitch, float yaw, float yaw_absolute) {
+ this.msgid = MAVLINK_MSG_ID_MOUNT_ORIENTATION;
+
+ this.time_boot_ms = time_boot_ms;
+ this.roll = roll;
+ this.pitch = pitch;
+ this.yaw = yaw;
+ this.yaw_absolute = yaw_absolute;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_mount_orientation( long time_boot_ms, float roll, float pitch, float yaw, float yaw_absolute, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_MOUNT_ORIENTATION;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.time_boot_ms = time_boot_ms;
+ this.roll = roll;
+ this.pitch = pitch;
+ this.yaw = yaw;
+ this.yaw_absolute = yaw_absolute;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_mount_orientation(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_MOUNT_ORIENTATION;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Returns a string with the MSG name and data
+ */
+ @Override
+ public String toString() {
+ return "MAVLINK_MSG_ID_MOUNT_ORIENTATION - sysid:"+sysid+" compid:"+compid+" time_boot_ms:"+time_boot_ms+" roll:"+roll+" pitch:"+pitch+" yaw:"+yaw+" yaw_absolute:"+yaw_absolute+"";
+ }
+
+ /**
+ * Returns a human-readable string of the name of the message
+ */
+ @Override
+ public String name() {
+ return "MAVLINK_MSG_ID_MOUNT_ORIENTATION";
+ }
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_named_value_float.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_named_value_float.java
new file mode 100644
index 0000000..f399d3b
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/common/msg_named_value_float.java
@@ -0,0 +1,188 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+// MESSAGE NAMED_VALUE_FLOAT PACKING
+package com.example.longyi_groundstation.MAVLink.common;
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload;
+import com.example.longyi_groundstation.MAVLink.Messages.Units;
+import com.example.longyi_groundstation.MAVLink.Messages.Description;
+
+/**
+ * Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output.
+ */
+public class msg_named_value_float extends MAVLinkMessage {
+
+ public static final int MAVLINK_MSG_ID_NAMED_VALUE_FLOAT = 251;
+ public static final int MAVLINK_MSG_LENGTH = 18;
+ private static final long serialVersionUID = MAVLINK_MSG_ID_NAMED_VALUE_FLOAT;
+
+
+ /**
+ * Timestamp (time since system boot).
+ */
+ @Description("Timestamp (time since system boot).")
+ @Units("ms")
+ public long time_boot_ms;
+
+ /**
+ * Floating point value
+ */
+ @Description("Floating point value")
+ @Units("")
+ public float value;
+
+ /**
+ * Name of the debug variable
+ */
+ @Description("Name of the debug variable")
+ @Units("")
+ public byte name[] = new byte[10];
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_NAMED_VALUE_FLOAT;
+
+ packet.payload.putUnsignedInt(time_boot_ms);
+ packet.payload.putFloat(value);
+
+ for (int i = 0; i < name.length; i++) {
+ packet.payload.putByte(name[i]);
+ }
+
+
+ if (isMavlink2) {
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a named_value_float message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.time_boot_ms = payload.getUnsignedInt();
+ this.value = payload.getFloat();
+
+ for (int i = 0; i < this.name.length; i++) {
+ this.name[i] = payload.getByte();
+ }
+
+
+ if (isMavlink2) {
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_named_value_float() {
+ this.msgid = MAVLINK_MSG_ID_NAMED_VALUE_FLOAT;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_named_value_float( long time_boot_ms, float value, byte[] name) {
+ this.msgid = MAVLINK_MSG_ID_NAMED_VALUE_FLOAT;
+
+ this.time_boot_ms = time_boot_ms;
+ this.value = value;
+ this.name = name;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_named_value_float( long time_boot_ms, float value, byte[] name, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_NAMED_VALUE_FLOAT;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.time_boot_ms = time_boot_ms;
+ this.value = value;
+ this.name = name;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_named_value_float(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_NAMED_VALUE_FLOAT;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Sets the buffer of this message with a string, adds the necessary padding
+ */
+ public void setName(String str) {
+ int len = Math.min(str.length(), 10);
+ for (int i=0; i value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also https://mavlink.io/en/services/parameter.html for a full documentation of QGroundControl and IMU code.
+ */
+public class msg_param_request_read extends MAVLinkMessage {
+
+ public static final int MAVLINK_MSG_ID_PARAM_REQUEST_READ = 20;
+ public static final int MAVLINK_MSG_LENGTH = 20;
+ private static final long serialVersionUID = MAVLINK_MSG_ID_PARAM_REQUEST_READ;
+
+
+ /**
+ * Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)
+ */
+ @Description("Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)")
+ @Units("")
+ public short param_index;
+
+ /**
+ * System ID
+ */
+ @Description("System ID")
+ @Units("")
+ public short target_system;
+
+ /**
+ * Component ID
+ */
+ @Description("Component ID")
+ @Units("")
+ public short target_component;
+
+ /**
+ * Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string
+ */
+ @Description("Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string")
+ @Units("")
+ public byte param_id[] = new byte[16];
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_PARAM_REQUEST_READ;
+
+ packet.payload.putShort(param_index);
+ packet.payload.putUnsignedByte(target_system);
+ packet.payload.putUnsignedByte(target_component);
+
+ for (int i = 0; i < param_id.length; i++) {
+ packet.payload.putByte(param_id[i]);
+ }
+
+
+ if (isMavlink2) {
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a param_request_read message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.param_index = payload.getShort();
+ this.target_system = payload.getUnsignedByte();
+ this.target_component = payload.getUnsignedByte();
+
+ for (int i = 0; i < this.param_id.length; i++) {
+ this.param_id[i] = payload.getByte();
+ }
+
+
+ if (isMavlink2) {
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_param_request_read() {
+ this.msgid = MAVLINK_MSG_ID_PARAM_REQUEST_READ;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_param_request_read( short param_index, short target_system, short target_component, byte[] param_id) {
+ this.msgid = MAVLINK_MSG_ID_PARAM_REQUEST_READ;
+
+ this.param_index = param_index;
+ this.target_system = target_system;
+ this.target_component = target_component;
+ this.param_id = param_id;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_param_request_read( short param_index, short target_system, short target_component, byte[] param_id, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_PARAM_REQUEST_READ;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.param_index = param_index;
+ this.target_system = target_system;
+ this.target_component = target_component;
+ this.param_id = param_id;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_param_request_read(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_PARAM_REQUEST_READ;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Sets the buffer of this message with a string, adds the necessary padding
+ */
+ public void setParam_Id(String str) {
+ int len = Math.min(str.length(), 16);
+ for (int i=0; i 0 radius to pass by WP. Positive value for clockwise orbit, negative value for counter-clockwise orbit. Allows trajectory control.| Desired yaw angle at waypoint (rotary wing). NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */
+ public static final int MAV_CMD_NAV_LOITER_UNLIM = 17; /* Loiter around this waypoint an unlimited amount of time |Empty| Empty| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise| Desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */
+ public static final int MAV_CMD_NAV_LOITER_TURNS = 18; /* Loiter around this waypoint for X turns |Number of turns.| Leave loiter circle only once heading towards the next waypoint (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise| Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| Latitude| Longitude| Altitude| */
+ public static final int MAV_CMD_NAV_LOITER_TIME = 19; /* Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint. |Loiter time (only starts once Lat, Lon and Alt is reached).| Leave loiter circle only once heading towards the next waypoint (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, else counter-clockwise.| Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| Latitude| Longitude| Altitude| */
+ public static final int MAV_CMD_NAV_RETURN_TO_LAUNCH = 20; /* Return to launch location |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_NAV_LAND = 21; /* Land at location. |Minimum target altitude if landing is aborted (0 = undefined/use system default).| Precision land mode.| Empty.| Desired yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude.| Longitude.| Landing altitude (ground level in current frame).| */
+ public static final int MAV_CMD_NAV_TAKEOFF = 22; /* Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode. |Minimum pitch (if airspeed sensor present), desired pitch without sensor| Empty| Empty| Yaw angle (if magnetometer present), ignored without magnetometer. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */
+ public static final int MAV_CMD_NAV_LAND_LOCAL = 23; /* Land at local position (local frame only) |Landing target number (if available)| Maximum accepted offset from desired landing position - computed magnitude from spherical coordinates: d = sqrt(x^2 + y^2 + z^2), which gives the maximum accepted distance between the desired landing position and the position where the vehicle is about to land| Landing descend rate| Desired yaw angle| Y-axis position| X-axis position| Z-axis / ground level position| */
+ public static final int MAV_CMD_NAV_TAKEOFF_LOCAL = 24; /* Takeoff from local position (local frame only) |Minimum pitch (if airspeed sensor present), desired pitch without sensor| Empty| Takeoff ascend rate| Yaw angle (if magnetometer or another yaw estimation source present), ignored without one of these| Y-axis position| X-axis position| Z-axis position| */
+ public static final int MAV_CMD_NAV_FOLLOW = 25; /* Vehicle following, i.e. this waypoint represents the position of a moving vehicle |Following logic to use (e.g. loitering or sinusoidal following) - depends on specific autopilot implementation| Ground speed of vehicle to be followed| Radius around waypoint. If positive loiter clockwise, else counter-clockwise| Desired yaw angle.| Latitude| Longitude| Altitude| */
+ public static final int MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30; /* Continue on the current course and climb/descend to specified altitude. When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached. |Climb or Descend (0 = Neutral, command completes when within 5m of this command's altitude, 1 = Climbing, command completes when at or above this command's altitude, 2 = Descending, command completes when at or below this command's altitude.| Empty| Empty| Empty| Empty| Empty| Desired altitude| */
+ public static final int MAV_CMD_NAV_LOITER_TO_ALT = 31; /* Begin loiter at the specified Latitude and Longitude. If Lat=Lon=0, then loiter at the current position. Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint. |Leave loiter circle only once heading towards the next waypoint (0 = False)| Loiter radius around waypoint for forward-only moving vehicles (not multicopters). If positive loiter clockwise, negative counter-clockwise, 0 means no change to standard loiter.| Empty| Loiter circle exit location and/or path to next waypoint ("xtrack") for forward-only moving vehicles (not multicopters). 0 for the vehicle to converge towards the center xtrack when it leaves the loiter (the line between the centers of the current and next waypoint), 1 to converge to the direct line between the location that the vehicle exits the loiter radius and the next waypoint. Otherwise the angle (in degrees) between the tangent of the loiter circle and the center xtrack at which the vehicle must leave the loiter (and converge to the center xtrack). NaN to use the current system default xtrack behaviour.| Latitude| Longitude| Altitude| */
+ public static final int MAV_CMD_DO_FOLLOW = 32; /* Begin following a target |System ID (of the FOLLOW_TARGET beacon). Send 0 to disable follow-me and return to the default position hold mode.| Reserved| Reserved| Altitude mode: 0: Keep current altitude, 1: keep altitude difference to target, 2: go to a fixed altitude above home.| Altitude above home. (used if mode=2)| Reserved| Time to land in which the MAV should go to the default position hold mode after a message RX timeout.| */
+ public static final int MAV_CMD_DO_FOLLOW_REPOSITION = 33; /* Reposition the MAV after a follow target command has been sent |Camera q1 (where 0 is on the ray from the camera to the tracking device)| Camera q2| Camera q3| Camera q4| altitude offset from target| X offset from target| Y offset from target| */
+ public static final int MAV_CMD_DO_ORBIT = 34; /* Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults. |Radius of the circle. Positive: orbit clockwise. Negative: orbit counter-clockwise. NaN: Use vehicle default radius, or current radius if already orbiting.| Tangential Velocity. NaN: Use vehicle default velocity, or current velocity if already orbiting.| Yaw behavior of the vehicle.| Orbit around the centre point for this many radians (i.e. for a three-quarter orbit set 270*Pi/180). 0: Orbit forever. NaN: Use vehicle default, or current value if already orbiting.| Center point latitude (if no MAV_FRAME specified) / X coordinate according to MAV_FRAME. INT32_MAX (or NaN if sent in COMMAND_LONG): Use current vehicle position, or current center if already orbiting.| Center point longitude (if no MAV_FRAME specified) / Y coordinate according to MAV_FRAME. INT32_MAX (or NaN if sent in COMMAND_LONG): Use current vehicle position, or current center if already orbiting.| Center point altitude (MSL) (if no MAV_FRAME specified) / Z coordinate according to MAV_FRAME. NaN: Use current vehicle altitude.| */
+ public static final int MAV_CMD_NAV_ROI = 80; /* Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. |Region of interest mode.| Waypoint index/ target ID. (see MAV_ROI enum)| ROI index (allows a vehicle to manage multiple ROI's)| Empty| x the location of the fixed ROI (see MAV_FRAME)| y| z| */
+ public static final int MAV_CMD_NAV_PATHPLANNING = 81; /* Control autonomous path planning on the MAV. |0: Disable local obstacle avoidance / local path planning (without resetting map), 1: Enable local path planning, 2: Enable and reset local path planning| 0: Disable full path planning (without resetting map), 1: Enable, 2: Enable and reset map/occupancy grid, 3: Enable and reset planned route, but not occupancy grid| Empty| Yaw angle at goal| Latitude/X of goal| Longitude/Y of goal| Altitude/Z of goal| */
+ public static final int MAV_CMD_NAV_SPLINE_WAYPOINT = 82; /* Navigate to waypoint using a spline path. |Hold time. (ignored by fixed wing, time to stay at waypoint for rotary wing)| Empty| Empty| Empty| Latitude/X of goal| Longitude/Y of goal| Altitude/Z of goal| */
+ public static final int MAV_CMD_NAV_VTOL_TAKEOFF = 84; /* Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.). |Empty| Front transition heading.| Empty| Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude| */
+ public static final int MAV_CMD_NAV_VTOL_LAND = 85; /* Land using VTOL mode |Landing behaviour.| Empty| Approach altitude (with the same reference as the Altitude field). NaN if unspecified.| Yaw angle. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.).| Latitude| Longitude| Altitude (ground level) relative to the current coordinate frame. NaN to use system default landing altitude (ignore value).| */
+ public static final int MAV_CMD_NAV_GUIDED_ENABLE = 92; /* hand control over to an external controller |On / Off (> 0.5f on)| Empty| Empty| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_NAV_DELAY = 93; /* Delay the next navigation command a number of seconds or until a specified time |Delay (-1 to enable time-of-day fields)| hour (24h format, UTC, -1 to ignore)| minute (24h format, UTC, -1 to ignore)| second (24h format, UTC, -1 to ignore)| Empty| Empty| Empty| */
+ public static final int MAV_CMD_NAV_PAYLOAD_PLACE = 94; /* Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload. |Maximum distance to descend.| Empty| Empty| Empty| Latitude| Longitude| Altitude| */
+ public static final int MAV_CMD_NAV_LAST = 95; /* NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_CONDITION_DELAY = 112; /* Delay mission state machine. |Delay| Empty| Empty| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_CONDITION_CHANGE_ALT = 113; /* Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached. |Descent / Ascend rate.| Empty| Empty| Empty| Empty| Empty| Target Altitude| */
+ public static final int MAV_CMD_CONDITION_DISTANCE = 114; /* Delay mission state machine until within desired distance of next NAV point. |Distance.| Empty| Empty| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_CONDITION_YAW = 115; /* Reach a certain target angle. |target angle [0-360]. Absolute angles: 0 is north. Relative angle: 0 is initial yaw. Direction set by param3.| angular speed| direction: -1: counter clockwise, 0: shortest direction, 1: clockwise| 0: absolute angle, 1: relative offset| Empty| Empty| Empty| */
+ public static final int MAV_CMD_CONDITION_LAST = 159; /* NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_SET_MODE = 176; /* Set system mode. |Mode| Custom mode - this is system specific, please refer to the individual autopilot specifications for details.| Custom sub mode - this is system specific, please refer to the individual autopilot specifications for details.| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_JUMP = 177; /* Jump to the desired command in the mission list. Repeat this action only the specified number of times |Sequence number| Repeat count| Empty| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_CHANGE_SPEED = 178; /* Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change |Speed type of value set in param2 (such as airspeed, ground speed, and so on)| Speed (-1 indicates no change, -2 indicates return to default vehicle speed)| Throttle (-1 indicates no change, -2 indicates return to default vehicle throttle value)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_DO_SET_HOME = 179; /*
+ Sets the home position to either to the current position or a specified position.
+ The home position is the default position that the system will return to and land on.
+ The position is set automatically by the system during the takeoff (and may also be set using this command).
+ Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242).
+ |Use current (1=use current location, 0=use specified location)| Roll angle (of surface). Range: -180..180 degrees. NAN or 0 means value not set. 0.01 indicates zero roll.| Pitch angle (of surface). Range: -90..90 degrees. NAN or 0 means value not set. 0.01 means zero pitch.| Yaw angle. NaN to use default heading. Range: -180..180 degrees.| Latitude| Longitude| Altitude| */
+ public static final int MAV_CMD_DO_SET_PARAMETER = 180; /* Set a system parameter. Caution! Use of this command requires knowledge of the numeric enumeration value of the parameter. |Parameter number| Parameter value| Empty| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_SET_RELAY = 181; /* Set a relay to a condition. |Relay instance number.| Setting. (1=on, 0=off, others possible depending on system hardware)| Empty| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_REPEAT_RELAY = 182; /* Cycle a relay on and off for a desired number of cycles with a desired period. |Relay instance number.| Cycle count.| Cycle time.| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_SET_SERVO = 183; /* Set a servo to a desired PWM value. |Servo instance number.| Pulse Width Modulation.| Empty| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_REPEAT_SERVO = 184; /* Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period. |Servo instance number.| Pulse Width Modulation.| Cycle count.| Cycle time.| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_FLIGHTTERMINATION = 185; /* Terminate flight immediately.
+ Flight termination immediately and irreversibly terminates the current flight, returning the vehicle to ground.
+ The vehicle will ignore RC or other input until it has been power-cycled.
+ Termination may trigger safety measures, including: disabling motors and deployment of parachute on multicopters, and setting flight surfaces to initiate a landing pattern on fixed-wing).
+ On multicopters without a parachute it may trigger a crash landing.
+ Support for this command can be tested using the protocol bit: MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION.
+ Support for this command can also be tested by sending the command with param1=0 (< 0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED.
+ |Flight termination activated if > 0.5. Otherwise not activated and ACK with MAV_RESULT_FAILED.| Empty| Empty| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_CHANGE_ALTITUDE = 186; /* Change altitude set point. |Altitude.| Frame of new altitude.| Empty| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_SET_ACTUATOR = 187; /* Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter). |Actuator 1 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 2 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 3 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 4 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 5 value, scaled from [-1 to 1]. NaN to ignore.| Actuator 6 value, scaled from [-1 to 1]. NaN to ignore.| Index of actuator set (i.e if set to 1, Actuator 1 becomes Actuator 7)| */
+ public static final int MAV_CMD_DO_RETURN_PATH_START = 188; /* Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).
+ A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).
+ The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.
+ The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.
+ If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.
+ If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.
+ The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.
+ If specified, the item defines the waypoint at which the return segment starts.
+ If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored.
+ |Empty| Empty| Empty| Empty| Latitudee. 0: not used.| Longitudee. 0: not used.| Altitudee. 0: not used.| */
+ public static final int MAV_CMD_DO_LAND_START = 189; /* Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.
+
+ When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.
+ It should be followed by a navigation item that defines the first waypoint of the landing sequence.
+ The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).
+ If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.
+
+ When sent as a command it triggers a landing using a mission landing pattern.
+ The location parameters are not used in this case, and should be set to 0.
+ |Empty| Empty| Empty| Empty| Latitude for landing sequence selection, or 0 (see description). Ignored in commands (set 0).| Longitude for landing sequence selection, or 0 (see description). Ignored in commands (set 0).| Altitude for landing sequence selection, or 0 (see description). Ignored in commands (set 0).| */
+ public static final int MAV_CMD_DO_RALLY_LAND = 190; /* Mission command to perform a landing from a rally point. |Break altitude| Landing speed| Empty| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_GO_AROUND = 191; /* Mission command to safely abort an autonomous landing. |Altitude| Empty| Empty| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_REPOSITION = 192; /* Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead). |Ground speed, less than 0 (-1) for default| Bitmask of option flags.| Loiter radius for planes. Positive values only, direction is controlled by Yaw value. A value of zero or NaN is ignored. | Yaw heading. NaN to use the current system yaw heading mode (e.g. yaw towards next waypoint, yaw to home, etc.). For planes indicates loiter direction (0: clockwise, 1: counter clockwise)| Latitude| Longitude| Altitude| */
+ public static final int MAV_CMD_DO_PAUSE_CONTINUE = 193; /* If in a GPS controlled position mode, hold the current position or continue. |0: Pause current mission or reposition command, hold current position. 1: Continue mission. A VTOL capable vehicle should enter hover mode (multicopter and VTOL planes). A plane should loiter with the default loiter radius.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */
+ public static final int MAV_CMD_DO_SET_REVERSE = 194; /* Set moving direction to forward or reverse. |Direction (0=Forward, 1=Reverse)| Empty| Empty| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_SET_ROI_LOCATION = 195; /* Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message. |Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Empty| Empty| Empty| Latitude of ROI location| Longitude of ROI location| Altitude of ROI location| */
+ public static final int MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196; /* Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. |Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Empty| Empty| Empty| Pitch offset from next waypoint, positive pitching up| Roll offset from next waypoint, positive rolling to the right| Yaw offset from next waypoint, positive yawing to the right| */
+ public static final int MAV_CMD_DO_SET_ROI_NONE = 197; /* Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position. |Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Empty| Empty| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_SET_ROI_SYSID = 198; /* Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. |System ID| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_DO_CONTROL_VIDEO = 200; /* Control onboard camera system. |Camera ID (-1 for all)| Transmission: 0: disabled, 1: enabled compressed, 2: enabled raw| Transmission mode: 0: video stream, >0: single images every n seconds| Recording: 0: disabled, 1: enabled compressed, 2: enabled raw| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_SET_ROI = 201; /* Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. |Region of interest mode.| Waypoint index/ target ID (depends on param 1).| Region of interest index. (allows a vehicle to manage multiple ROI's)| Empty| MAV_ROI_WPNEXT: pitch offset from next waypoint, MAV_ROI_LOCATION: latitude| MAV_ROI_WPNEXT: roll offset from next waypoint, MAV_ROI_LOCATION: longitude| MAV_ROI_WPNEXT: yaw offset from next waypoint, MAV_ROI_LOCATION: altitude| */
+ public static final int MAV_CMD_DO_DIGICAM_CONFIGURE = 202; /* Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see https://mavlink.io/en/services/camera_def.html ). |Modes: P, TV, AV, M, Etc.| Shutter speed: Divisor number for one second.| Aperture: F stop number.| ISO number e.g. 80, 100, 200, Etc.| Exposure type enumerator.| Command Identity.| Main engine cut-off time before camera trigger. (0 means no cut-off)| */
+ public static final int MAV_CMD_DO_DIGICAM_CONTROL = 203; /* Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see https://mavlink.io/en/services/camera_def.html ). |Session control e.g. show/hide lens| Zoom's absolute position| Zooming step value to offset zoom from the current position| Focus Locking, Unlocking or Re-locking| Shooting Command| Command Identity| Test shot identifier. If set to 1, image will only be captured, but not counted towards internal frame count.| */
+ public static final int MAV_CMD_DO_MOUNT_CONFIGURE = 204; /* Mission command to configure a camera or antenna mount |Mount operation mode| stabilize roll? (1 = yes, 0 = no)| stabilize pitch? (1 = yes, 0 = no)| stabilize yaw? (1 = yes, 0 = no)| roll input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| pitch input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| yaw input (0 = angle body frame, 1 = angular rate, 2 = angle absolute frame)| */
+ public static final int MAV_CMD_DO_MOUNT_CONTROL = 205; /* Mission command to control a camera or antenna mount |pitch depending on mount mode (degrees or degrees/second depending on pitch input).| roll depending on mount mode (degrees or degrees/second depending on roll input).| yaw depending on mount mode (degrees or degrees/second depending on yaw input).| altitude depending on mount mode.| latitude, set if appropriate mount mode.| longitude, set if appropriate mount mode.| Mount mode.| */
+ public static final int MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206; /* Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera. |Camera trigger distance. 0 to stop triggering.| Camera shutter integration time. -1 or 0 to ignore| Trigger camera once immediately. (0 = no trigger, 1 = trigger)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_FENCE_ENABLE = 207; /*
+ Enable the geofence.
+ This can be used in a mission or via the command protocol.
+ The persistence/lifetime of the setting is undefined.
+ Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.
+ Flight stacks typically reset the setting to system defaults on reboot.
+ |enable? (0=disable, 1=enable, 2=disable_floor_only)| Fence types to enable or disable as a bitmask. 0: field is unused/all fences should be enabled or disabled (for compatiblity reasons). Parameter is ignored if param1=2.| Empty| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_PARACHUTE = 208; /* Mission item/command to release a parachute or enable/disable auto release. |Action| Empty| Empty| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_MOTOR_TEST = 209; /* Command to perform motor test. |Motor instance number (from 1 to max number of motors on the vehicle).| Throttle type (whether the Throttle Value in param3 is a percentage, PWM value, etc.)| Throttle value.| Timeout between tests that are run in sequence.| Motor count. Number of motors to test in sequence: 0/1=one motor, 2= two motors, etc. The Timeout (param4) is used between tests.| Motor test order.| Empty| */
+ public static final int MAV_CMD_DO_INVERTED_FLIGHT = 210; /* Change to/from inverted flight. |Inverted flight. (0=normal, 1=inverted)| Empty| Empty| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_GRIPPER = 211; /* Mission command to operate a gripper. |Gripper instance number.| Gripper action to perform.| Empty| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_AUTOTUNE_ENABLE = 212; /* Enable/disable autotune. |Enable (1: enable, 0:disable).| Specify axes for which autotuning is enabled/disabled. 0 indicates the field is unused (for compatiblity reasons). If 0 the autopilot will follow its default behaviour, which is usually to tune all axes.| Empty.| Empty.| Empty.| Empty.| Empty.| */
+ public static final int MAV_CMD_NAV_SET_YAW_SPEED = 213; /* Sets a desired vehicle turn angle and speed change. |Yaw angle to adjust steering by.| Speed.| Final angle. (0=absolute, 1=relative)| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214; /* Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera. |Camera trigger cycle time. -1 or 0 to ignore.| Camera shutter integration time. Should be less than trigger cycle time. -1 or 0 to ignore.| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220; /* Mission command to control a camera or antenna mount, using a quaternion as reference. |quaternion param q1, w (1 in null-rotation)| quaternion param q2, x (0 in null-rotation)| quaternion param q3, y (0 in null-rotation)| quaternion param q4, z (0 in null-rotation)| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_GUIDED_MASTER = 221; /* set id of master controller |System ID| Component ID| Empty| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_GUIDED_LIMITS = 222; /* Set limits for external control |Timeout - maximum time that external controller will be allowed to control vehicle. 0 means no timeout.| Altitude (MSL) min - if vehicle moves below this alt, the command will be aborted and the mission will continue. 0 means no lower altitude limit.| Altitude (MSL) max - if vehicle moves above this alt, the command will be aborted and the mission will continue. 0 means no upper altitude limit.| Horizontal move limit - if vehicle moves more than this distance from its location at the moment the command was executed, the command will be aborted and the mission will continue. 0 means no horizontal move limit.| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_ENGINE_CONTROL = 223; /* Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines |0: Stop engine, 1:Start Engine| 0: Warm start, 1:Cold start. Controls use of choke where applicable| Height delay. This is for commanding engine start only after the vehicle has gained the specified height. Used in VTOL vehicles during takeoff to start engine after the aircraft is off the ground. Zero for no delay.| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_SET_MISSION_CURRENT = 224; /*
+ Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).
+ If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.
+ Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).
+
+ This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.
+ If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.
+ If the system is not in mission mode this command must not trigger a switch to mission mode.
+
+ The mission may be "reset" using param2.
+ Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).
+ Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.
+
+ The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item).
+ |Mission sequence value to set. -1 for the current mission item (use to reset mission without changing current mission item).| Resets mission. 1: true, 0: false. Resets jump counters to initial values and changes mission state "completed" to be "active" or "paused".| Empty| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_DO_LAST = 240; /* NOP - This command is only used to mark the upper limit of the DO commands in the enumeration |Empty| Empty| Empty| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_PREFLIGHT_CALIBRATION = 241; /* Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero. |1: gyro calibration, 3: gyro temperature calibration| 1: magnetometer calibration| 1: ground pressure calibration| 1: radio RC calibration, 2: RC trim calibration| 1: accelerometer calibration, 2: board level calibration, 3: accelerometer temperature calibration, 4: simple accelerometer calibration| 1: APM: compass/motor interference calibration (PX4: airspeed calibration, deprecated), 2: airspeed calibration| 1: ESC calibration, 3: barometer temperature calibration| */
+ public static final int MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242; /* Set sensor offsets. This command will be only accepted if in pre-flight mode. |Sensor to adjust the offsets for: 0: gyros, 1: accelerometer, 2: magnetometer, 3: barometer, 4: optical flow, 5: second magnetometer, 6: third magnetometer| X axis offset (or generic dimension 1), in the sensor's raw units| Y axis offset (or generic dimension 2), in the sensor's raw units| Z axis offset (or generic dimension 3), in the sensor's raw units| Generic dimension 4, in the sensor's raw units| Generic dimension 5, in the sensor's raw units| Generic dimension 6, in the sensor's raw units| */
+ public static final int MAV_CMD_PREFLIGHT_UAVCAN = 243; /* Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named). |1: Trigger actuator ID assignment and direction mapping. 0: Cancel command.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */
+ public static final int MAV_CMD_PREFLIGHT_STORAGE = 245; /* Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode. |Action to perform on the persistent parameter storage| Action to perform on the persistent mission storage| Onboard logging: 0: Ignore, 1: Start default rate logging, -1: Stop logging, > 1: logging rate (e.g. set to 1000 for 1000 Hz logging)| Reserved| Empty| Empty| Empty| */
+ public static final int MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246; /* Request the reboot or shutdown of system components. |0: Do nothing for autopilot, 1: Reboot autopilot, 2: Shutdown autopilot, 3: Reboot autopilot and keep it in the bootloader until upgraded.| 0: Do nothing for onboard computer, 1: Reboot onboard computer, 2: Shutdown onboard computer, 3: Reboot onboard computer and keep it in the bootloader until upgraded.| 0: Do nothing for component, 1: Reboot component, 2: Shutdown component, 3: Reboot component and keep it in the bootloader until upgraded| MAVLink Component ID targeted in param3 (0 for all components).| Reserved (set to 0)| Conditions under which reboot/shutdown is allowed.| WIP: ID (e.g. camera ID -1 for all IDs)| */
+ public static final int MAV_CMD_OVERRIDE_GOTO = 252; /* Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position. |MAV_GOTO_DO_HOLD: pause mission and either hold or move to specified position (depending on param2), MAV_GOTO_DO_CONTINUE: resume mission.| MAV_GOTO_HOLD_AT_CURRENT_POSITION: hold at current position, MAV_GOTO_HOLD_AT_SPECIFIED_POSITION: hold at specified position.| Coordinate frame of hold point.| Desired yaw angle.| Latitude/X position.| Longitude/Y position.| Altitude/Z position.| */
+ public static final int MAV_CMD_OBLIQUE_SURVEY = 260; /* Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera. |Camera trigger distance. 0 to stop triggering.| Camera shutter integration time. 0 to ignore| The minimum interval in which the camera is capable of taking subsequent pictures repeatedly. 0 to ignore.| Total number of roll positions at which the camera will capture photos (images captures spread evenly across the limits defined by param5).| Angle limits that the camera can be rolled to left and right of center.| Fixed pitch angle that the camera will hold in oblique mode if the mount is actuated in the pitch axis.| Empty| */
+ public static final int MAV_CMD_DO_SET_STANDARD_MODE = 262; /* Enable the specified standard MAVLink mode.
+ If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.
+ See https://mavlink.io/en/services/standard_modes.html
+ |The mode to set.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */
+ public static final int MAV_CMD_MISSION_START = 300; /* start running a mission |first_item: the first mission item to run| last_item: the last mission item to run (after this item is run, the mission ends)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_ACTUATOR_TEST = 310; /* Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed. |Output value: 1 means maximum positive output, 0 to center servos or minimum motor thrust (expected to spin), -1 for maximum negative (if not supported by the motors, i.e. motor is not reversible, smaller than 0 maps to NaN). And NaN maps to disarmed (stop the motors).| Timeout after which the test command expires and the output is restored to the previous value. A timeout has to be set for safety reasons. A timeout of 0 means to restore the previous value immediately.| Reserved (default:0)| Reserved (default:0)| Actuator Output function| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_CONFIGURE_ACTUATOR = 311; /* Actuator configuration command. |Actuator configuration action| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Actuator Output function| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_COMPONENT_ARM_DISARM = 400; /* Arms / Disarms a component |0: disarm, 1: arm| 0: arm-disarm unless prevented by safety checks (i.e. when landed), 21196: force arming/disarming (e.g. allow arming to override preflight checks and disarming in flight)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_RUN_PREARM_CHECKS = 401; /* Instructs a target system to run pre-arm checks.
+ This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.
+ This command should return MAV_RESULT_ACCEPTED if it will run the checks.
+ The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).
+ The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed.
+ |Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_ILLUMINATOR_ON_OFF = 405; /* Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). |0: Illuminators OFF, 1: Illuminators ON| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406; /* Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). |Mode| 0%: Off, 100%: Max Brightness| Strobe period in seconds where 0 means strobing is not used| Strobe duty cycle where 100% means it is on constantly and 0 means strobing is not used| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_GET_HOME_POSITION = 410; /* Request the home position from the vehicle.
+ The vehicle will ACK the command and then emit the HOME_POSITION message. |Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */
+ public static final int MAV_CMD_INJECT_FAILURE = 420; /* Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting. |The unit which is affected by the failure.| The type how the failure manifests itself.| Instance affected by failure (0 to signal all).| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_START_RX_PAIR = 500; /* Starts receiver pairing. |RC type.| RC sub type.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_GET_MESSAGE_INTERVAL = 510; /*
+ Request the interval between messages for a particular MAVLink message ID.
+ The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message.
+ |The MAVLink message ID| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_SET_MESSAGE_INTERVAL = 511; /* Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM. |The MAVLink message ID| The interval between two messages. -1: disable. 0: request default rate (which may be zero).| Use for index ID, if required. Otherwise, the use of this parameter (if any) must be defined in the requested message. By default assumed not used (0). When used as an index ID, 0 means "all instances", "1" means the first instance in the sequence (the emitted message will have an id of 0 if message ids are 0-indexed, or 1 if index numbers start from one).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0/NaN).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0/NaN).| Target address of message stream (if message has target address fields). 0: Flight-stack default (recommended), 1: address of requestor, 2: broadcast.| */
+ public static final int MAV_CMD_REQUEST_MESSAGE = 512; /* Request the target system(s) emit a single instance of a specified message (i.e. a "one-shot" version of MAV_CMD_SET_MESSAGE_INTERVAL). |The MAVLink message ID of the requested message.| Use for index ID, if required. Otherwise, the use of this parameter (if any) must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| The use of this parameter (if any), must be defined in the requested message. By default assumed not used (0).| Target address for requested message (if message has target address fields). 0: Flight-stack default, 1: address of requestor, 2: broadcast.| */
+ public static final int MAV_CMD_REQUEST_PROTOCOL_VERSION = 519; /* Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message |1: Request supported protocol versions by all nodes on the network| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520; /* Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message |1: Request autopilot version| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_REQUEST_CAMERA_INFORMATION = 521; /* Request camera information (CAMERA_INFORMATION). |0: No action 1: Request camera capabilities| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_REQUEST_CAMERA_SETTINGS = 522; /* Request camera settings (CAMERA_SETTINGS). |0: No Action 1: Request camera settings| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_REQUEST_STORAGE_INFORMATION = 525; /* Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage. |Storage ID (0 for all, 1 for first, 2 for second, etc.)| 0: No Action 1: Request storage information| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_STORAGE_FORMAT = 526; /* Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage. |Storage ID (1 for first, 2 for second, etc.)| Format storage (and reset image log). 0: No action 1: Format storage| Reset Image Log (without formatting storage medium). This will reset CAMERA_CAPTURE_STATUS.image_count and CAMERA_IMAGE_CAPTURED.image_index. 0: No action 1: Reset Image Log| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527; /* Request camera capture status (CAMERA_CAPTURE_STATUS) |0: No Action 1: Request camera capture status| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528; /* Request flight information (FLIGHT_INFORMATION) |1: Request flight information| Reserved (all remaining params)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_RESET_CAMERA_SETTINGS = 529; /* Reset all camera settings to Factory Default |0: No Action 1: Reset all settings| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_SET_CAMERA_MODE = 530; /* Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming. |Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| Camera mode| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */
+ public static final int MAV_CMD_SET_CAMERA_ZOOM = 531; /* Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success). |Zoom type| Zoom value. The range of valid values depend on the zoom type.| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_SET_CAMERA_FOCUS = 532; /* Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success). |Focus type| Focus value| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_SET_STORAGE_USAGE = 533; /* Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).
+ There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.
+ If no flag is set the system should use its default storage.
+ A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.
+ A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED. |Storage ID (1 for first, 2 for second, etc.)| Usage flags| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_SET_CAMERA_SOURCE = 534; /* Set camera source. Changes the camera's active sources on cameras with multiple image sensors. |Component Id of camera to address or 1-6 for non-MAVLink cameras, 0 for all cameras.| Primary Source| Secondary Source. If non-zero the second source will be displayed as picture-in-picture.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_JUMP_TAG = 600; /* Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG. |Tag.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_DO_JUMP_TAG = 601; /* Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number. |Target tag to jump to.| Repeat count.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000; /* Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate. |Pitch angle (positive to pitch up, relative to vehicle for FOLLOW mode, relative to world horizon for LOCK mode).| Yaw angle (positive to yaw to the right, relative to vehicle for FOLLOW mode, absolute to North for LOCK mode).| Pitch rate (positive to pitch up).| Yaw rate (positive to yaw to the right).| Gimbal manager flags to use.| Reserved (default:0)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| */
+ public static final int MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001; /* Gimbal configuration to set which sysid/compid is in primary and secondary control. |Sysid for primary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Compid for primary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Sysid for secondary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Compid for secondary control (0: no one in control, -1: leave unchanged, -2: set itself in control (for missions where the own sysid is still unknown), -3: remove control if currently in control).| Reserved (default:0)| Reserved (default:0)| Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals).| */
+ public static final int MAV_CMD_IMAGE_START_CAPTURE = 2000; /* Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.
+
+ Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.
+ It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).
+ It is also needed to specify the target camera in missions.
+
+ When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).
+ If the param1 is 0 the autopilot should do both.
+
+ When sent in a command the target MAVLink address is set using target_component.
+ If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).
+ If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.
+ If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels.
+ |Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| Desired elapsed time between two consecutive pictures (in seconds). Minimum values depend on hardware (typically greater than 2 seconds).| Total number of images to capture. 0 to capture forever/until MAV_CMD_IMAGE_STOP_CAPTURE.| Capture sequence number starting from 1. This is only valid for single-capture (param3 == 1), otherwise set to 0. Increment the capture ID for each capture command to prevent double captures when a command is re-transmitted.| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */
+ public static final int MAV_CMD_IMAGE_STOP_CAPTURE = 2001; /* Stop image capture sequence.
+
+ Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.
+ It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).
+ It is also needed to specify the target camera in missions.
+
+ When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).
+ If the param1 is 0 the autopilot should do both.
+
+ When sent in a command the target MAVLink address is set using target_component.
+ If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).
+ If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.
+ If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels.
+ |Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */
+ public static final int MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002; /* Re-request a CAMERA_IMAGE_CAPTURED message. |Sequence number for missing CAMERA_IMAGE_CAPTURED message| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */
+ public static final int MAV_CMD_DO_TRIGGER_CONTROL = 2003; /* Enable or disable on-board camera triggering system. |Trigger enable/disable (0 for disable, 1 for start), -1 to ignore| 1 to reset the trigger sequence, -1 or 0 to ignore| 1 to pause triggering, but without switching the camera off or retracting it. -1 to ignore| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_CAMERA_TRACK_POINT = 2004; /* If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking. |Point to track x value (normalized 0..1, 0 is left, 1 is right).| Point to track y value (normalized 0..1, 0 is top, 1 is bottom).| Point radius (normalized 0..1, 0 is one pixel, 1 is full image width).| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005; /* If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking. |Top left corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).| Top left corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).| Bottom right corner of rectangle x value (normalized 0..1, 0 is left, 1 is right).| Bottom right corner of rectangle y value (normalized 0..1, 0 is top, 1 is bottom).| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_CAMERA_STOP_TRACKING = 2010; /* Stops ongoing tracking. |Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_VIDEO_START_CAPTURE = 2500; /* Starts video capture (recording). |Video Stream ID (0 for all streams)| Frequency CAMERA_CAPTURE_STATUS messages should be sent while recording (0 for no messages, otherwise frequency)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */
+ public static final int MAV_CMD_VIDEO_STOP_CAPTURE = 2501; /* Stop the current video capture (recording). |Video Stream ID (0 for all streams)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */
+ public static final int MAV_CMD_VIDEO_START_STREAMING = 2502; /* Start video streaming |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_VIDEO_STOP_STREAMING = 2503; /* Stop the given video stream |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Target camera ID. 7 to 255: MAVLink camera component id. 1 to 6 for cameras attached to the autopilot, which don't have a distinct component id. 0: all cameras. This is used to target specific autopilot-connected cameras. It is also used to target specific cameras when the MAV_CMD is used in a mission.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504; /* Request video stream information (VIDEO_STREAM_INFORMATION) |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505; /* Request video stream status (VIDEO_STREAM_STATUS) |Video Stream ID (0 for all streams, 1 for first, 2 for second, etc.)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_LOGGING_START = 2510; /* Request to start streaming logging data over MAVLink (see also LOGGING_DATA message) |Format: 0: ULog| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */
+ public static final int MAV_CMD_LOGGING_STOP = 2511; /* Request to stop streaming log data over MAVLink |Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */
+ public static final int MAV_CMD_AIRFRAME_CONFIGURATION = 2520; /* |Landing gear ID (default: 0, -1 for all)| Landing gear position (Down: 0, Up: 1, NaN for no change)| Reserved (default:NaN)| Reserved (default:NaN)| Reserved (default:0)| Reserved (default:0)| Reserved (default:NaN)| */
+ public static final int MAV_CMD_CONTROL_HIGH_LATENCY = 2600; /* Request to start/stop transmitting over the high latency telemetry |Control transmission over high latency telemetry (0: stop, 1: start)| Empty| Empty| Empty| Empty| Empty| Empty| */
+ public static final int MAV_CMD_PANORAMA_CREATE = 2800; /* Create a panorama at the current position |Viewing angle horizontal of the panorama (+- 0.5 the total angle)| Viewing angle vertical of panorama.| Speed of the horizontal rotation.| Speed of the vertical rotation.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_DO_VTOL_TRANSITION = 3000; /* Request VTOL transition |The target VTOL state. For normal transitions, only MAV_VTOL_STATE_MC and MAV_VTOL_STATE_FW can be used.| Force immediate transition to the specified MAV_VTOL_STATE. 1: Force immediate, 0: normal transition. Can be used, for example, to trigger an emergency "Quadchute". Caution: Can be dangerous/damage vehicle, depending on autopilot implementation of this command.| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001; /* Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request.
+ If approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds.
+ If the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON.
+ |Vehicle system id, this way ground station can request arm authorization on behalf of any vehicle| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000; /* This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes.
+ |Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| Reserved (default:0)| */
+ public static final int MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001; /* This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position.
+ |Radius of desired circle in CIRCLE_MODE| User defined| User defined| User defined| Target latitude of center of circle in CIRCLE_MODE| Target longitude of center of circle in CIRCLE_MODE| Reserved (default:0)| */
+ public static final int MAV_CMD_CONDITION_GATE = 4501; /* Delay mission state machine until gate has been reached. |Geometry: 0: orthogonal to path between previous and next waypoint.| Altitude: 0: ignore altitude| Empty| Empty| Latitude| Longitude| Altitude| */
+ public static final int MAV_CMD_NAV_FENCE_RETURN_POINT = 5000; /* Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead. |Reserved| Reserved| Reserved| Reserved| Latitude| Longitude| Altitude| */
+ public static final int MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001; /* Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.
+ The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon.
+ |Polygon vertex count. This is the number of vertices in the current polygon (all vertices will have the same number).| Vehicle must be inside ALL inclusion zones in a single group, vehicle must be inside at least one group, must be the same for all points in each polygon| Reserved| Reserved| Latitude| Longitude| Reserved| */
+ public static final int MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002; /* Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.
+ The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon.
+ |Polygon vertex count. This is the number of vertices in the current polygon (all vertices will have the same number).| Reserved| Reserved| Reserved| Latitude| Longitude| Reserved| */
+ public static final int MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003; /* Circular fence area. The vehicle must stay inside this area.
+ |Radius.| Vehicle must be inside ALL inclusion zones in a single group, vehicle must be inside at least one group| Reserved| Reserved| Latitude| Longitude| Reserved| */
+ public static final int MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004; /* Circular fence area. The vehicle must stay outside this area.
+ |Radius.| Reserved| Reserved| Reserved| Latitude| Longitude| Reserved| */
+ public static final int MAV_CMD_NAV_RALLY_POINT = 5100; /* Rally point. You can have multiple rally points defined.
+ |Reserved| Reserved| Reserved| Reserved| Latitude| Longitude| Altitude| */
+ public static final int MAV_CMD_UAVCAN_GET_NODE_INFO = 5200; /* Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages. |Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */
+ public static final int MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300; /* Change state of safety switch. |New safety switch state.| Empty.| Empty.| Empty| Empty.| Empty.| Empty.| */
+ public static final int MAV_CMD_DO_ADSB_OUT_IDENT = 10001; /* Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec. |Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| Reserved (set to 0)| */
+ public static final int MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001; /* Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity. |Operation mode. 0: prepare single payload deploy (overwriting previous requests), but do not execute it. 1: execute payload deploy immediately (rejecting further deploy commands during execution, but allowing abort). 2: add payload deploy to existing deployment list.| Desired approach vector in compass heading. A negative value indicates the system can define the approach vector at will.| Desired ground speed at release time. This can be overridden by the airframe in case it needs to meet minimum airspeed. A negative value indicates the system can define the ground speed at will.| Minimum altitude clearance to the release position. A negative value indicates the system can define the clearance at will.| Latitude.| Longitude.| Altitude (MSL)| */
+ public static final int MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002; /* Control the payload deployment. |Operation mode. 0: Abort deployment, continue normal mission. 1: switch to payload deployment mode. 100: delete first payload deployment request. 101: delete all payload deployment requests.| Reserved| Reserved| Reserved| Reserved| Reserved| Reserved| */
+ public static final int MAV_CMD_WAYPOINT_USER_1 = 31000; /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */
+ public static final int MAV_CMD_WAYPOINT_USER_2 = 31001; /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */
+ public static final int MAV_CMD_WAYPOINT_USER_3 = 31002; /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */
+ public static final int MAV_CMD_WAYPOINT_USER_4 = 31003; /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */
+ public static final int MAV_CMD_WAYPOINT_USER_5 = 31004; /* User defined waypoint item. Ground Station will show the Vehicle as flying through this item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */
+ public static final int MAV_CMD_SPATIAL_USER_1 = 31005; /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */
+ public static final int MAV_CMD_SPATIAL_USER_2 = 31006; /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */
+ public static final int MAV_CMD_SPATIAL_USER_3 = 31007; /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */
+ public static final int MAV_CMD_SPATIAL_USER_4 = 31008; /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */
+ public static final int MAV_CMD_SPATIAL_USER_5 = 31009; /* User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item. |User defined| User defined| User defined| User defined| Latitude unscaled| Longitude unscaled| Altitude (MSL)| */
+ public static final int MAV_CMD_USER_1 = 31010; /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */
+ public static final int MAV_CMD_USER_2 = 31011; /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */
+ public static final int MAV_CMD_USER_3 = 31012; /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */
+ public static final int MAV_CMD_USER_4 = 31013; /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */
+ public static final int MAV_CMD_USER_5 = 31014; /* User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item. |User defined| User defined| User defined| User defined| User defined| User defined| User defined| */
+ public static final int MAV_CMD_CAN_FORWARD = 32000; /* Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages |Bus number (0 to disable forwarding, 1 for first bus, 2 for 2nd bus, 3 for 3rd bus).| Empty.| Empty.| Empty.| Empty.| Empty.| Empty.| */
+ public static final int MAV_CMD_FIXED_MAG_CAL_YAW = 42006; /* Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location. |Yaw of vehicle in earth frame.| CompassMask, 0 for all.| Latitude.| Longitude.| Empty.| Empty.| Empty.| */
+ public static final int MAV_CMD_DO_WINCH = 42600; /* Command to operate winch. |Winch instance number.| Action to perform.| Length of line to release (negative to wind).| Release rate (negative to wind).| Empty.| Empty.| Empty.| */
+ public static final int MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003; /* Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link. |Timestamp that this message was sent as a time in the transmitters time domain. The sender should wrap this time back to zero based on required timing accuracy for the application and the limitations of a 32 bit float. For example, wrapping at 10 hours would give approximately 1ms accuracy. Recipient must handle time wrap in any timing jitter correction applied to this field. Wrap rollover time should not be at not more than 250 seconds, which would give approximately 10 microsecond accuracy.| The time spent in processing the sensor data that is the basis for this position. The recipient can use this to improve time alignment of the data. Set to zero if not known.| estimated one standard deviation accuracy of the measurement. Set to NaN if not known.| Empty| Latitude| Longitude| Altitude, not used. Should be sent as NaN. May be supported in a future version of this message.| */
+ public static final int MAV_CMD_ENUM_END = 43004; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_COLLISION_ACTION.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_COLLISION_ACTION.java
new file mode 100644
index 0000000..d9e4f51
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_COLLISION_ACTION.java
@@ -0,0 +1,21 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Possible actions an aircraft can take to avoid a collision.
+ */
+public class MAV_COLLISION_ACTION {
+ public static final int MAV_COLLISION_ACTION_NONE = 0; /* Ignore any potential collisions | */
+ public static final int MAV_COLLISION_ACTION_REPORT = 1; /* Report potential collision | */
+ public static final int MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2; /* Ascend or Descend to avoid threat | */
+ public static final int MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3; /* Move horizontally to avoid threat | */
+ public static final int MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4; /* Aircraft to move perpendicular to the collision's velocity vector | */
+ public static final int MAV_COLLISION_ACTION_RTL = 5; /* Aircraft to fly directly back to its launch point | */
+ public static final int MAV_COLLISION_ACTION_HOVER = 6; /* Aircraft to stop in place | */
+ public static final int MAV_COLLISION_ACTION_ENUM_END = 7; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_COLLISION_SRC.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_COLLISION_SRC.java
new file mode 100644
index 0000000..033823d
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_COLLISION_SRC.java
@@ -0,0 +1,16 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Source of information about this collision.
+ */
+public class MAV_COLLISION_SRC {
+ public static final int MAV_COLLISION_SRC_ADSB = 0; /* ID field references ADSB_VEHICLE packets | */
+ public static final int MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1; /* ID field references MAVLink SRC ID | */
+ public static final int MAV_COLLISION_SRC_ENUM_END = 2; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_COLLISION_THREAT_LEVEL.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_COLLISION_THREAT_LEVEL.java
new file mode 100644
index 0000000..4fc2f84
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_COLLISION_THREAT_LEVEL.java
@@ -0,0 +1,17 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Aircraft-rated danger from this threat.
+ */
+public class MAV_COLLISION_THREAT_LEVEL {
+ public static final int MAV_COLLISION_THREAT_LEVEL_NONE = 0; /* Not a threat | */
+ public static final int MAV_COLLISION_THREAT_LEVEL_LOW = 1; /* Craft is mildly concerned about this threat | */
+ public static final int MAV_COLLISION_THREAT_LEVEL_HIGH = 2; /* Craft is panicking, and may take actions to avoid threat | */
+ public static final int MAV_COLLISION_THREAT_LEVEL_ENUM_END = 3; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_COMPONENT.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_COMPONENT.java
new file mode 100644
index 0000000..b0b0534
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_COMPONENT.java
@@ -0,0 +1,152 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).
+ Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.
+ When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded.
+ */
+public class MAV_COMPONENT {
+ public static final int MAV_COMP_ID_ALL = 0; /* Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message. | */
+ public static final int MAV_COMP_ID_AUTOPILOT1 = 1; /* System flight controller component ("autopilot"). Only one autopilot is expected in a particular system. | */
+ public static final int MAV_COMP_ID_USER1 = 25; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER2 = 26; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER3 = 27; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER4 = 28; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER5 = 29; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER6 = 30; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER7 = 31; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER8 = 32; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER9 = 33; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER10 = 34; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER11 = 35; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER12 = 36; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER13 = 37; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER14 = 38; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER15 = 39; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER16 = 40; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER17 = 41; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER18 = 42; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER19 = 43; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER20 = 44; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER21 = 45; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER22 = 46; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER23 = 47; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER24 = 48; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER25 = 49; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER26 = 50; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER27 = 51; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER28 = 52; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER29 = 53; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER30 = 54; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER31 = 55; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER32 = 56; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER33 = 57; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER34 = 58; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER35 = 59; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER36 = 60; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER37 = 61; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER38 = 62; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER39 = 63; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER40 = 64; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER41 = 65; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER42 = 66; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER43 = 67; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_TELEMETRY_RADIO = 68; /* Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages). | */
+ public static final int MAV_COMP_ID_USER45 = 69; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER46 = 70; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER47 = 71; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER48 = 72; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER49 = 73; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER50 = 74; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER51 = 75; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER52 = 76; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER53 = 77; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER54 = 78; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER55 = 79; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER56 = 80; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER57 = 81; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER58 = 82; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER59 = 83; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER60 = 84; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER61 = 85; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER62 = 86; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER63 = 87; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER64 = 88; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER65 = 89; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER66 = 90; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER67 = 91; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER68 = 92; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER69 = 93; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER70 = 94; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER71 = 95; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER72 = 96; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER73 = 97; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER74 = 98; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_USER75 = 99; /* Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network. | */
+ public static final int MAV_COMP_ID_CAMERA = 100; /* Camera #1. | */
+ public static final int MAV_COMP_ID_CAMERA2 = 101; /* Camera #2. | */
+ public static final int MAV_COMP_ID_CAMERA3 = 102; /* Camera #3. | */
+ public static final int MAV_COMP_ID_CAMERA4 = 103; /* Camera #4. | */
+ public static final int MAV_COMP_ID_CAMERA5 = 104; /* Camera #5. | */
+ public static final int MAV_COMP_ID_CAMERA6 = 105; /* Camera #6. | */
+ public static final int MAV_COMP_ID_SERVO1 = 140; /* Servo #1. | */
+ public static final int MAV_COMP_ID_SERVO2 = 141; /* Servo #2. | */
+ public static final int MAV_COMP_ID_SERVO3 = 142; /* Servo #3. | */
+ public static final int MAV_COMP_ID_SERVO4 = 143; /* Servo #4. | */
+ public static final int MAV_COMP_ID_SERVO5 = 144; /* Servo #5. | */
+ public static final int MAV_COMP_ID_SERVO6 = 145; /* Servo #6. | */
+ public static final int MAV_COMP_ID_SERVO7 = 146; /* Servo #7. | */
+ public static final int MAV_COMP_ID_SERVO8 = 147; /* Servo #8. | */
+ public static final int MAV_COMP_ID_SERVO9 = 148; /* Servo #9. | */
+ public static final int MAV_COMP_ID_SERVO10 = 149; /* Servo #10. | */
+ public static final int MAV_COMP_ID_SERVO11 = 150; /* Servo #11. | */
+ public static final int MAV_COMP_ID_SERVO12 = 151; /* Servo #12. | */
+ public static final int MAV_COMP_ID_SERVO13 = 152; /* Servo #13. | */
+ public static final int MAV_COMP_ID_SERVO14 = 153; /* Servo #14. | */
+ public static final int MAV_COMP_ID_GIMBAL = 154; /* Gimbal #1. | */
+ public static final int MAV_COMP_ID_LOG = 155; /* Logging component. | */
+ public static final int MAV_COMP_ID_ADSB = 156; /* Automatic Dependent Surveillance-Broadcast (ADS-B) component. | */
+ public static final int MAV_COMP_ID_OSD = 157; /* On Screen Display (OSD) devices for video links. | */
+ public static final int MAV_COMP_ID_PERIPHERAL = 158; /* Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice. | */
+ public static final int MAV_COMP_ID_QX1_GIMBAL = 159; /* Gimbal ID for QX1. | */
+ public static final int MAV_COMP_ID_FLARM = 160; /* FLARM collision alert component. | */
+ public static final int MAV_COMP_ID_PARACHUTE = 161; /* Parachute component. | */
+ public static final int MAV_COMP_ID_WINCH = 169; /* Winch component. | */
+ public static final int MAV_COMP_ID_GIMBAL2 = 171; /* Gimbal #2. | */
+ public static final int MAV_COMP_ID_GIMBAL3 = 172; /* Gimbal #3. | */
+ public static final int MAV_COMP_ID_GIMBAL4 = 173; /* Gimbal #4 | */
+ public static final int MAV_COMP_ID_GIMBAL5 = 174; /* Gimbal #5. | */
+ public static final int MAV_COMP_ID_GIMBAL6 = 175; /* Gimbal #6. | */
+ public static final int MAV_COMP_ID_BATTERY = 180; /* Battery #1. | */
+ public static final int MAV_COMP_ID_BATTERY2 = 181; /* Battery #2. | */
+ public static final int MAV_COMP_ID_MAVCAN = 189; /* CAN over MAVLink client. | */
+ public static final int MAV_COMP_ID_MISSIONPLANNER = 190; /* Component that can generate/supply a mission flight plan (e.g. GCS or developer API). | */
+ public static final int MAV_COMP_ID_ONBOARD_COMPUTER = 191; /* Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on. | */
+ public static final int MAV_COMP_ID_ONBOARD_COMPUTER2 = 192; /* Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on. | */
+ public static final int MAV_COMP_ID_ONBOARD_COMPUTER3 = 193; /* Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on. | */
+ public static final int MAV_COMP_ID_ONBOARD_COMPUTER4 = 194; /* Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on. | */
+ public static final int MAV_COMP_ID_PATHPLANNER = 195; /* Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.). | */
+ public static final int MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196; /* Component that plans a collision free path between two points. | */
+ public static final int MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197; /* Component that provides position estimates using VIO techniques. | */
+ public static final int MAV_COMP_ID_PAIRING_MANAGER = 198; /* Component that manages pairing of vehicle and GCS. | */
+ public static final int MAV_COMP_ID_IMU = 200; /* Inertial Measurement Unit (IMU) #1. | */
+ public static final int MAV_COMP_ID_IMU_2 = 201; /* Inertial Measurement Unit (IMU) #2. | */
+ public static final int MAV_COMP_ID_IMU_3 = 202; /* Inertial Measurement Unit (IMU) #3. | */
+ public static final int MAV_COMP_ID_GPS = 220; /* GPS #1. | */
+ public static final int MAV_COMP_ID_GPS2 = 221; /* GPS #2. | */
+ public static final int MAV_COMP_ID_ODID_TXRX_1 = 236; /* Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet). | */
+ public static final int MAV_COMP_ID_ODID_TXRX_2 = 237; /* Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet). | */
+ public static final int MAV_COMP_ID_ODID_TXRX_3 = 238; /* Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet). | */
+ public static final int MAV_COMP_ID_UDP_BRIDGE = 240; /* Component to bridge MAVLink to UDP (i.e. from a UART). | */
+ public static final int MAV_COMP_ID_UART_BRIDGE = 241; /* Component to bridge to UART (i.e. from UDP). | */
+ public static final int MAV_COMP_ID_TUNNEL_NODE = 242; /* Component handling TUNNEL messages (e.g. vendor specific GUI of a component). | */
+ public static final int MAV_COMP_ID_ILLUMINATOR = 243; /* Illuminator | */
+ public static final int MAV_COMP_ID_SYSTEM_CONTROL = 250; /* Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.). | */
+ public static final int MAV_COMPONENT_ENUM_END = 251; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_DATA_STREAM.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_DATA_STREAM.java
new file mode 100644
index 0000000..35edd73
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_DATA_STREAM.java
@@ -0,0 +1,25 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * A data stream is not a fixed set of messages, but rather a
+ recommendation to the autopilot software. Individual autopilots may or may not obey
+ the recommended messages.
+ */
+public class MAV_DATA_STREAM {
+ public static final int MAV_DATA_STREAM_ALL = 0; /* Enable all data streams | */
+ public static final int MAV_DATA_STREAM_RAW_SENSORS = 1; /* Enable IMU_RAW, GPS_RAW, GPS_STATUS packets. | */
+ public static final int MAV_DATA_STREAM_EXTENDED_STATUS = 2; /* Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS | */
+ public static final int MAV_DATA_STREAM_RC_CHANNELS = 3; /* Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW | */
+ public static final int MAV_DATA_STREAM_RAW_CONTROLLER = 4; /* Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT. | */
+ public static final int MAV_DATA_STREAM_POSITION = 6; /* Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages. | */
+ public static final int MAV_DATA_STREAM_EXTRA1 = 10; /* Dependent on the autopilot | */
+ public static final int MAV_DATA_STREAM_EXTRA2 = 11; /* Dependent on the autopilot | */
+ public static final int MAV_DATA_STREAM_EXTRA3 = 12; /* Dependent on the autopilot | */
+ public static final int MAV_DATA_STREAM_ENUM_END = 13; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_DISTANCE_SENSOR.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_DISTANCE_SENSOR.java
new file mode 100644
index 0000000..83b7459
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_DISTANCE_SENSOR.java
@@ -0,0 +1,19 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Enumeration of distance sensor types
+ */
+public class MAV_DISTANCE_SENSOR {
+ public static final int MAV_DISTANCE_SENSOR_LASER = 0; /* Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units | */
+ public static final int MAV_DISTANCE_SENSOR_ULTRASOUND = 1; /* Ultrasound rangefinder, e.g. MaxBotix units | */
+ public static final int MAV_DISTANCE_SENSOR_INFRARED = 2; /* Infrared rangefinder, e.g. Sharp units | */
+ public static final int MAV_DISTANCE_SENSOR_RADAR = 3; /* Radar type, e.g. uLanding units | */
+ public static final int MAV_DISTANCE_SENSOR_UNKNOWN = 4; /* Broken or unknown type, e.g. analog units | */
+ public static final int MAV_DISTANCE_SENSOR_ENUM_END = 5; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_DO_REPOSITION_FLAGS.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_DO_REPOSITION_FLAGS.java
new file mode 100644
index 0000000..a387c91
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_DO_REPOSITION_FLAGS.java
@@ -0,0 +1,15 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Bitmap of options for the MAV_CMD_DO_REPOSITION
+ */
+public class MAV_DO_REPOSITION_FLAGS {
+ public static final int MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1; /* The aircraft should immediately transition into guided. This should not be set for follow me applications | */
+ public static final int MAV_DO_REPOSITION_FLAGS_ENUM_END = 2; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ESTIMATOR_TYPE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ESTIMATOR_TYPE.java
new file mode 100644
index 0000000..88e0638
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ESTIMATOR_TYPE.java
@@ -0,0 +1,23 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Enumeration of estimator types
+ */
+public class MAV_ESTIMATOR_TYPE {
+ public static final int MAV_ESTIMATOR_TYPE_UNKNOWN = 0; /* Unknown type of the estimator. | */
+ public static final int MAV_ESTIMATOR_TYPE_NAIVE = 1; /* This is a naive estimator without any real covariance feedback. | */
+ public static final int MAV_ESTIMATOR_TYPE_VISION = 2; /* Computer vision based estimate. Might be up to scale. | */
+ public static final int MAV_ESTIMATOR_TYPE_VIO = 3; /* Visual-inertial estimate. | */
+ public static final int MAV_ESTIMATOR_TYPE_GPS = 4; /* Plain GPS estimate. | */
+ public static final int MAV_ESTIMATOR_TYPE_GPS_INS = 5; /* Estimator integrating GPS and inertial sensing. | */
+ public static final int MAV_ESTIMATOR_TYPE_MOCAP = 6; /* Estimate from external motion capturing system. | */
+ public static final int MAV_ESTIMATOR_TYPE_LIDAR = 7; /* Estimator based on lidar sensor input. | */
+ public static final int MAV_ESTIMATOR_TYPE_AUTOPILOT = 8; /* Estimator on autopilot. | */
+ public static final int MAV_ESTIMATOR_TYPE_ENUM_END = 9; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_EVENT_CURRENT_SEQUENCE_FLAGS.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_EVENT_CURRENT_SEQUENCE_FLAGS.java
new file mode 100644
index 0000000..2ae45bc
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_EVENT_CURRENT_SEQUENCE_FLAGS.java
@@ -0,0 +1,15 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Flags for CURRENT_EVENT_SEQUENCE.
+ */
+public class MAV_EVENT_CURRENT_SEQUENCE_FLAGS {
+ public static final int MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1; /* A sequence reset has happened (e.g. vehicle reboot). | */
+ public static final int MAV_EVENT_CURRENT_SEQUENCE_FLAGS_ENUM_END = 2; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_EVENT_ERROR_REASON.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_EVENT_ERROR_REASON.java
new file mode 100644
index 0000000..ff715cb
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_EVENT_ERROR_REASON.java
@@ -0,0 +1,15 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Reason for an event error response.
+ */
+public class MAV_EVENT_ERROR_REASON {
+ public static final int MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0; /* The requested event is not available (anymore). | */
+ public static final int MAV_EVENT_ERROR_REASON_ENUM_END = 1; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_FRAME.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_FRAME.java
new file mode 100644
index 0000000..5977730
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_FRAME.java
@@ -0,0 +1,53 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.
+
+ Global frames use the following naming conventions:
+ - "GLOBAL": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.
+ The following modifiers may be used with "GLOBAL":
+ - "RELATIVE_ALT": Altitude is relative to the vehicle home position rather than MSL.
+ - "TERRAIN_ALT": Altitude is relative to ground level rather than MSL.
+ - "INT": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.
+
+ Local frames use the following naming conventions:
+ - "LOCAL": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator ("EKF").
+ - "BODY": Origin of local frame travels with the vehicle. NOTE, "BODY" does NOT indicate alignment of frame axis with vehicle attitude.
+ - "OFFSET": Deprecated synonym for "BODY" (origin travels with the vehicle). Not to be used for new frames.
+
+ Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED).
+
+ */
+public class MAV_FRAME {
+ public static final int MAV_FRAME_GLOBAL = 0; /* Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL). | */
+ public static final int MAV_FRAME_LOCAL_NED = 1; /* NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth. | */
+ public static final int MAV_FRAME_MISSION = 2; /* NOT a coordinate frame, indicates a mission command. | */
+ public static final int MAV_FRAME_GLOBAL_RELATIVE_ALT = 3; /*
+ Global (WGS84) coordinate frame + altitude relative to the home position.
+ | */
+ public static final int MAV_FRAME_LOCAL_ENU = 4; /* ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth. | */
+ public static final int MAV_FRAME_GLOBAL_INT = 5; /* Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL). | */
+ public static final int MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6; /* Global (WGS84) coordinate frame (scaled) + altitude relative to the home position. | */
+ public static final int MAV_FRAME_LOCAL_OFFSET_NED = 7; /* NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle. | */
+ public static final int MAV_FRAME_BODY_NED = 8; /* Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values. | */
+ public static final int MAV_FRAME_BODY_OFFSET_NED = 9; /* This is the same as MAV_FRAME_BODY_FRD. | */
+ public static final int MAV_FRAME_GLOBAL_TERRAIN_ALT = 10; /* Global (WGS84) coordinate frame with AGL altitude (altitude at ground level). | */
+ public static final int MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11; /* Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level). | */
+ public static final int MAV_FRAME_BODY_FRD = 12; /* FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle. | */
+ public static final int MAV_FRAME_RESERVED_13 = 13; /* MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up). | */
+ public static final int MAV_FRAME_RESERVED_14 = 14; /* MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down). | */
+ public static final int MAV_FRAME_RESERVED_15 = 15; /* MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up). | */
+ public static final int MAV_FRAME_RESERVED_16 = 16; /* MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down). | */
+ public static final int MAV_FRAME_RESERVED_17 = 17; /* MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up). | */
+ public static final int MAV_FRAME_RESERVED_18 = 18; /* MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down). | */
+ public static final int MAV_FRAME_RESERVED_19 = 19; /* MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up). | */
+ public static final int MAV_FRAME_LOCAL_FRD = 20; /* FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane. | */
+ public static final int MAV_FRAME_LOCAL_FLU = 21; /* FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane. | */
+ public static final int MAV_FRAME_ENUM_END = 22; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_FTP_ERR.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_FTP_ERR.java
new file mode 100644
index 0000000..492d9f4
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_FTP_ERR.java
@@ -0,0 +1,26 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * MAV FTP error codes (https://mavlink.io/en/services/ftp.html)
+ */
+public class MAV_FTP_ERR {
+ public static final int MAV_FTP_ERR_NONE = 0; /* None: No error | */
+ public static final int MAV_FTP_ERR_FAIL = 1; /* Fail: Unknown failure | */
+ public static final int MAV_FTP_ERR_FAILERRNO = 2; /* FailErrno: Command failed, Err number sent back in PayloadHeader.data[1].
+ This is a file-system error number understood by the server operating system. | */
+ public static final int MAV_FTP_ERR_INVALIDDATASIZE = 3; /* InvalidDataSize: Payload size is invalid | */
+ public static final int MAV_FTP_ERR_INVALIDSESSION = 4; /* InvalidSession: Session is not currently open | */
+ public static final int MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5; /* NoSessionsAvailable: All available sessions are already in use | */
+ public static final int MAV_FTP_ERR_EOF = 6; /* EOF: Offset past end of file for ListDirectory and ReadFile commands | */
+ public static final int MAV_FTP_ERR_UNKNOWNCOMMAND = 7; /* UnknownCommand: Unknown command / opcode | */
+ public static final int MAV_FTP_ERR_FILEEXISTS = 8; /* FileExists: File/directory already exists | */
+ public static final int MAV_FTP_ERR_FILEPROTECTED = 9; /* FileProtected: File/directory is write protected | */
+ public static final int MAV_FTP_ERR_FILENOTFOUND = 10; /* FileNotFound: File/directory not found | */
+ public static final int MAV_FTP_ERR_ENUM_END = 11; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_FTP_OPCODE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_FTP_OPCODE.java
new file mode 100644
index 0000000..8d1cfb0
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_FTP_OPCODE.java
@@ -0,0 +1,32 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * MAV FTP opcodes: https://mavlink.io/en/services/ftp.html
+ */
+public class MAV_FTP_OPCODE {
+ public static final int MAV_FTP_OPCODE_NONE = 0; /* None. Ignored, always ACKed | */
+ public static final int MAV_FTP_OPCODE_TERMINATESESSION = 1; /* TerminateSession: Terminates open Read session | */
+ public static final int MAV_FTP_OPCODE_RESETSESSION = 2; /* ResetSessions: Terminates all open read sessions | */
+ public static final int MAV_FTP_OPCODE_LISTDIRECTORY = 3; /* ListDirectory. List files and directories in path from offset | */
+ public static final int MAV_FTP_OPCODE_OPENFILERO = 4; /* OpenFileRO: Opens file at path for reading, returns session | */
+ public static final int MAV_FTP_OPCODE_READFILE = 5; /* ReadFile: Reads size bytes from offset in session | */
+ public static final int MAV_FTP_OPCODE_CREATEFILE = 6; /* CreateFile: Creates file at path for writing, returns session | */
+ public static final int MAV_FTP_OPCODE_WRITEFILE = 7; /* WriteFile: Writes size bytes to offset in session | */
+ public static final int MAV_FTP_OPCODE_REMOVEFILE = 8; /* RemoveFile: Remove file at path | */
+ public static final int MAV_FTP_OPCODE_CREATEDIRECTORY = 9; /* CreateDirectory: Creates directory at path | */
+ public static final int MAV_FTP_OPCODE_REMOVEDIRECTORY = 10; /* RemoveDirectory: Removes directory at path. The directory must be empty. | */
+ public static final int MAV_FTP_OPCODE_OPENFILEWO = 11; /* OpenFileWO: Opens file at path for writing, returns session | */
+ public static final int MAV_FTP_OPCODE_TRUNCATEFILE = 12; /* TruncateFile: Truncate file at path to offset length | */
+ public static final int MAV_FTP_OPCODE_RENAME = 13; /* Rename: Rename path1 to path2 | */
+ public static final int MAV_FTP_OPCODE_CALCFILECRC = 14; /* CalcFileCRC32: Calculate CRC32 for file at path | */
+ public static final int MAV_FTP_OPCODE_BURSTREADFILE = 15; /* BurstReadFile: Burst download session file | */
+ public static final int MAV_FTP_OPCODE_ACK = 128; /* ACK: ACK response | */
+ public static final int MAV_FTP_OPCODE_NAK = 129; /* NAK: NAK response | */
+ public static final int MAV_FTP_OPCODE_ENUM_END = 130; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_FUEL_TYPE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_FUEL_TYPE.java
new file mode 100644
index 0000000..34a9383
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_FUEL_TYPE.java
@@ -0,0 +1,17 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates.
+ */
+public class MAV_FUEL_TYPE {
+ public static final int MAV_FUEL_TYPE_UNKNOWN = 0; /* Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1). | */
+ public static final int MAV_FUEL_TYPE_LIQUID = 1; /* A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second. | */
+ public static final int MAV_FUEL_TYPE_GAS = 2; /* A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s). | */
+ public static final int MAV_FUEL_TYPE_ENUM_END = 3; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_GENERATOR_STATUS_FLAG.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_GENERATOR_STATUS_FLAG.java
new file mode 100644
index 0000000..333bac5
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_GENERATOR_STATUS_FLAG.java
@@ -0,0 +1,37 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly).
+ */
+public class MAV_GENERATOR_STATUS_FLAG {
+ public static final int MAV_GENERATOR_STATUS_FLAG_OFF = 1; /* Generator is off. | */
+ public static final int MAV_GENERATOR_STATUS_FLAG_READY = 2; /* Generator is ready to start generating power. | */
+ public static final int MAV_GENERATOR_STATUS_FLAG_GENERATING = 4; /* Generator is generating power. | */
+ public static final int MAV_GENERATOR_STATUS_FLAG_CHARGING = 8; /* Generator is charging the batteries (generating enough power to charge and provide the load). | */
+ public static final int MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16; /* Generator is operating at a reduced maximum power. | */
+ public static final int MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32; /* Generator is providing the maximum output. | */
+ public static final int MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64; /* Generator is near the maximum operating temperature, cooling is insufficient. | */
+ public static final int MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128; /* Generator hit the maximum operating temperature and shutdown. | */
+ public static final int MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256; /* Power electronics are near the maximum operating temperature, cooling is insufficient. | */
+ public static final int MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512; /* Power electronics hit the maximum operating temperature and shutdown. | */
+ public static final int MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024; /* Power electronics experienced a fault and shutdown. | */
+ public static final int MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048; /* The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening. | */
+ public static final int MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096; /* Generator controller having communication problems. | */
+ public static final int MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192; /* Power electronic or generator cooling system error. | */
+ public static final int MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384; /* Generator controller power rail experienced a fault. | */
+ public static final int MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768; /* Generator controller exceeded the overcurrent threshold and shutdown to prevent damage. | */
+ public static final int MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536; /* Generator controller detected a high current going into the batteries and shutdown to prevent battery damage. | */
+ public static final int MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072; /* Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating. | */
+ public static final int MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144; /* Batteries are under voltage (generator will not start). | */
+ public static final int MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288; /* Generator start is inhibited by e.g. a safety switch. | */
+ public static final int MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576; /* Generator requires maintenance. | */
+ public static final int MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152; /* Generator is not ready to generate yet. | */
+ public static final int MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304; /* Generator is idle. | */
+ public static final int MAV_GENERATOR_STATUS_FLAG_ENUM_END = 4194305; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_GOTO.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_GOTO.java
new file mode 100644
index 0000000..c699888
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_GOTO.java
@@ -0,0 +1,18 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution.
+ */
+public class MAV_GOTO {
+ public static final int MAV_GOTO_DO_HOLD = 0; /* Hold at the current position. | */
+ public static final int MAV_GOTO_DO_CONTINUE = 1; /* Continue with the next item in mission execution. | */
+ public static final int MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2; /* Hold at the current position of the system | */
+ public static final int MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3; /* Hold at the position specified in the parameters of the DO_HOLD action | */
+ public static final int MAV_GOTO_ENUM_END = 4; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_LANDED_STATE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_LANDED_STATE.java
new file mode 100644
index 0000000..2afa1c5
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_LANDED_STATE.java
@@ -0,0 +1,19 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Enumeration of landed detector states
+ */
+public class MAV_LANDED_STATE {
+ public static final int MAV_LANDED_STATE_UNDEFINED = 0; /* MAV landed state is unknown | */
+ public static final int MAV_LANDED_STATE_ON_GROUND = 1; /* MAV is landed (on ground) | */
+ public static final int MAV_LANDED_STATE_IN_AIR = 2; /* MAV is in air | */
+ public static final int MAV_LANDED_STATE_TAKEOFF = 3; /* MAV currently taking off | */
+ public static final int MAV_LANDED_STATE_LANDING = 4; /* MAV currently landing | */
+ public static final int MAV_LANDED_STATE_ENUM_END = 5; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_MISSION_RESULT.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_MISSION_RESULT.java
new file mode 100644
index 0000000..25ea22d
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_MISSION_RESULT.java
@@ -0,0 +1,30 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Result of mission operation (in a MISSION_ACK message).
+ */
+public class MAV_MISSION_RESULT {
+ public static final int MAV_MISSION_ACCEPTED = 0; /* mission accepted OK | */
+ public static final int MAV_MISSION_ERROR = 1; /* Generic error / not accepting mission commands at all right now. | */
+ public static final int MAV_MISSION_UNSUPPORTED_FRAME = 2; /* Coordinate frame is not supported. | */
+ public static final int MAV_MISSION_UNSUPPORTED = 3; /* Command is not supported. | */
+ public static final int MAV_MISSION_NO_SPACE = 4; /* Mission items exceed storage space. | */
+ public static final int MAV_MISSION_INVALID = 5; /* One of the parameters has an invalid value. | */
+ public static final int MAV_MISSION_INVALID_PARAM1 = 6; /* param1 has an invalid value. | */
+ public static final int MAV_MISSION_INVALID_PARAM2 = 7; /* param2 has an invalid value. | */
+ public static final int MAV_MISSION_INVALID_PARAM3 = 8; /* param3 has an invalid value. | */
+ public static final int MAV_MISSION_INVALID_PARAM4 = 9; /* param4 has an invalid value. | */
+ public static final int MAV_MISSION_INVALID_PARAM5_X = 10; /* x / param5 has an invalid value. | */
+ public static final int MAV_MISSION_INVALID_PARAM6_Y = 11; /* y / param6 has an invalid value. | */
+ public static final int MAV_MISSION_INVALID_PARAM7 = 12; /* z / param7 has an invalid value. | */
+ public static final int MAV_MISSION_INVALID_SEQUENCE = 13; /* Mission item received out of sequence | */
+ public static final int MAV_MISSION_DENIED = 14; /* Not accepting any mission commands from this communication partner. | */
+ public static final int MAV_MISSION_OPERATION_CANCELLED = 15; /* Current mission operation cancelled (e.g. mission upload, mission download). | */
+ public static final int MAV_MISSION_RESULT_ENUM_END = 16; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_MISSION_TYPE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_MISSION_TYPE.java
new file mode 100644
index 0000000..235232b
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_MISSION_TYPE.java
@@ -0,0 +1,18 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Type of mission items being requested/sent in mission protocol.
+ */
+public class MAV_MISSION_TYPE {
+ public static final int MAV_MISSION_TYPE_MISSION = 0; /* Items are mission commands for main mission. | */
+ public static final int MAV_MISSION_TYPE_FENCE = 1; /* Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items. | */
+ public static final int MAV_MISSION_TYPE_RALLY = 2; /* Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items. | */
+ public static final int MAV_MISSION_TYPE_ALL = 255; /* Only used in MISSION_CLEAR_ALL to clear all mission types. | */
+ public static final int MAV_MISSION_TYPE_ENUM_END = 256; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_MODE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_MODE.java
new file mode 100644
index 0000000..023ab13
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_MODE.java
@@ -0,0 +1,26 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it
+ simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override.
+ */
+public class MAV_MODE {
+ public static final int MAV_MODE_PREFLIGHT = 0; /* System is not ready to fly, booting, calibrating, etc. No flag is set. | */
+ public static final int MAV_MODE_MANUAL_DISARMED = 64; /* System is allowed to be active, under manual (RC) control, no stabilization | */
+ public static final int MAV_MODE_TEST_DISARMED = 66; /* UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only. | */
+ public static final int MAV_MODE_STABILIZE_DISARMED = 80; /* System is allowed to be active, under assisted RC control. | */
+ public static final int MAV_MODE_GUIDED_DISARMED = 88; /* System is allowed to be active, under autonomous control, manual setpoint | */
+ public static final int MAV_MODE_AUTO_DISARMED = 92; /* System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints) | */
+ public static final int MAV_MODE_MANUAL_ARMED = 192; /* System is allowed to be active, under manual (RC) control, no stabilization | */
+ public static final int MAV_MODE_TEST_ARMED = 194; /* UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only. | */
+ public static final int MAV_MODE_STABILIZE_ARMED = 208; /* System is allowed to be active, under assisted RC control. | */
+ public static final int MAV_MODE_GUIDED_ARMED = 216; /* System is allowed to be active, under autonomous control, manual setpoint | */
+ public static final int MAV_MODE_AUTO_ARMED = 220; /* System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints) | */
+ public static final int MAV_MODE_ENUM_END = 221; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_MODE_FLAG.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_MODE_FLAG.java
new file mode 100644
index 0000000..4cfb867
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_MODE_FLAG.java
@@ -0,0 +1,22 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * These flags encode the MAV mode.
+ */
+public class MAV_MODE_FLAG {
+ public static final int MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1; /* 0b00000001 Reserved for future use. | */
+ public static final int MAV_MODE_FLAG_TEST_ENABLED = 2; /* 0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations. | */
+ public static final int MAV_MODE_FLAG_AUTO_ENABLED = 4; /* 0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation. | */
+ public static final int MAV_MODE_FLAG_GUIDED_ENABLED = 8; /* 0b00001000 guided mode enabled, system flies waypoints / mission items. | */
+ public static final int MAV_MODE_FLAG_STABILIZE_ENABLED = 16; /* 0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around. | */
+ public static final int MAV_MODE_FLAG_HIL_ENABLED = 32; /* 0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational. | */
+ public static final int MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64; /* 0b01000000 remote control input is enabled. | */
+ public static final int MAV_MODE_FLAG_SAFETY_ARMED = 128; /* 0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state. | */
+ public static final int MAV_MODE_FLAG_ENUM_END = 129; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_MODE_FLAG_DECODE_POSITION.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_MODE_FLAG_DECODE_POSITION.java
new file mode 100644
index 0000000..5799a29
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_MODE_FLAG_DECODE_POSITION.java
@@ -0,0 +1,22 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not.
+ */
+public class MAV_MODE_FLAG_DECODE_POSITION {
+ public static final int MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1; /* Eighth bit: 00000001 | */
+ public static final int MAV_MODE_FLAG_DECODE_POSITION_TEST = 2; /* Seventh bit: 00000010 | */
+ public static final int MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4; /* Sixth bit: 00000100 | */
+ public static final int MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8; /* Fifth bit: 00001000 | */
+ public static final int MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16; /* Fourth bit: 00010000 | */
+ public static final int MAV_MODE_FLAG_DECODE_POSITION_HIL = 32; /* Third bit: 00100000 | */
+ public static final int MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64; /* Second bit: 01000000 | */
+ public static final int MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128; /* First bit: 10000000 | */
+ public static final int MAV_MODE_FLAG_DECODE_POSITION_ENUM_END = 129; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_MODE_PROPERTY.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_MODE_PROPERTY.java
new file mode 100644
index 0000000..91b1b31
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_MODE_PROPERTY.java
@@ -0,0 +1,25 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Mode properties.
+
+ */
+public class MAV_MODE_PROPERTY {
+ public static final int MAV_MODE_PROPERTY_ADVANCED = 1; /* If set, this mode is an advanced mode.
+ For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.
+ A GCS can optionally use this flag to configure the UI for its intended users.
+ | */
+ public static final int MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2; /* If set, this mode should not be added to the list of selectable modes.
+ The mode might still be selected by the FC directly (for example as part of a failsafe).
+ | */
+ public static final int MAV_MODE_PROPERTY_AUTO_MODE = 4; /* If set, this mode is automatically controlled (it may use but does not require a manual controller).
+ If unset the mode is a assumed to require user input (be a manual mode).
+ | */
+ public static final int MAV_MODE_PROPERTY_ENUM_END = 5; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_MOUNT_MODE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_MOUNT_MODE.java
new file mode 100644
index 0000000..658285a
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_MOUNT_MODE.java
@@ -0,0 +1,21 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages.
+ */
+public class MAV_MOUNT_MODE {
+ public static final int MAV_MOUNT_MODE_RETRACT = 0; /* Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization | */
+ public static final int MAV_MOUNT_MODE_NEUTRAL = 1; /* Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory. | */
+ public static final int MAV_MOUNT_MODE_MAVLINK_TARGETING = 2; /* Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization | */
+ public static final int MAV_MOUNT_MODE_RC_TARGETING = 3; /* Load neutral position and start RC Roll,Pitch,Yaw control with stabilization | */
+ public static final int MAV_MOUNT_MODE_GPS_POINT = 4; /* Load neutral position and start to point to Lat,Lon,Alt | */
+ public static final int MAV_MOUNT_MODE_SYSID_TARGET = 5; /* Gimbal tracks system with specified system ID | */
+ public static final int MAV_MOUNT_MODE_HOME_LOCATION = 6; /* Gimbal tracks home position | */
+ public static final int MAV_MOUNT_MODE_ENUM_END = 7; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_ARM_STATUS.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_ARM_STATUS.java
new file mode 100644
index 0000000..f6482b4
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_ARM_STATUS.java
@@ -0,0 +1,16 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ *
+ */
+public class MAV_ODID_ARM_STATUS {
+ public static final int MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0; /* Passing arming checks. | */
+ public static final int MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1; /* Generic arming failure, see error string for details. | */
+ public static final int MAV_ODID_ARM_STATUS_ENUM_END = 2; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_AUTH_TYPE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_AUTH_TYPE.java
new file mode 100644
index 0000000..5577fcb
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_AUTH_TYPE.java
@@ -0,0 +1,20 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ *
+ */
+public class MAV_ODID_AUTH_TYPE {
+ public static final int MAV_ODID_AUTH_TYPE_NONE = 0; /* No authentication type is specified. | */
+ public static final int MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1; /* Signature for the UAS (Unmanned Aircraft System) ID. | */
+ public static final int MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2; /* Signature for the Operator ID. | */
+ public static final int MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3; /* Signature for the entire message set. | */
+ public static final int MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4; /* Authentication is provided by Network Remote ID. | */
+ public static final int MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5; /* The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO. | */
+ public static final int MAV_ODID_AUTH_TYPE_ENUM_END = 6; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_CATEGORY_EU.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_CATEGORY_EU.java
new file mode 100644
index 0000000..e6bbf7e
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_CATEGORY_EU.java
@@ -0,0 +1,18 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ *
+ */
+public class MAV_ODID_CATEGORY_EU {
+ public static final int MAV_ODID_CATEGORY_EU_UNDECLARED = 0; /* The category for the UA, according to the EU specification, is undeclared. | */
+ public static final int MAV_ODID_CATEGORY_EU_OPEN = 1; /* The category for the UA, according to the EU specification, is the Open category. | */
+ public static final int MAV_ODID_CATEGORY_EU_SPECIFIC = 2; /* The category for the UA, according to the EU specification, is the Specific category. | */
+ public static final int MAV_ODID_CATEGORY_EU_CERTIFIED = 3; /* The category for the UA, according to the EU specification, is the Certified category. | */
+ public static final int MAV_ODID_CATEGORY_EU_ENUM_END = 4; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_CLASSIFICATION_TYPE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_CLASSIFICATION_TYPE.java
new file mode 100644
index 0000000..deec64c
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_CLASSIFICATION_TYPE.java
@@ -0,0 +1,16 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ *
+ */
+public class MAV_ODID_CLASSIFICATION_TYPE {
+ public static final int MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0; /* The classification type for the UA is undeclared. | */
+ public static final int MAV_ODID_CLASSIFICATION_TYPE_EU = 1; /* The classification type for the UA follows EU (European Union) specifications. | */
+ public static final int MAV_ODID_CLASSIFICATION_TYPE_ENUM_END = 2; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_CLASS_EU.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_CLASS_EU.java
new file mode 100644
index 0000000..7038542
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_CLASS_EU.java
@@ -0,0 +1,22 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ *
+ */
+public class MAV_ODID_CLASS_EU {
+ public static final int MAV_ODID_CLASS_EU_UNDECLARED = 0; /* The class for the UA, according to the EU specification, is undeclared. | */
+ public static final int MAV_ODID_CLASS_EU_CLASS_0 = 1; /* The class for the UA, according to the EU specification, is Class 0. | */
+ public static final int MAV_ODID_CLASS_EU_CLASS_1 = 2; /* The class for the UA, according to the EU specification, is Class 1. | */
+ public static final int MAV_ODID_CLASS_EU_CLASS_2 = 3; /* The class for the UA, according to the EU specification, is Class 2. | */
+ public static final int MAV_ODID_CLASS_EU_CLASS_3 = 4; /* The class for the UA, according to the EU specification, is Class 3. | */
+ public static final int MAV_ODID_CLASS_EU_CLASS_4 = 5; /* The class for the UA, according to the EU specification, is Class 4. | */
+ public static final int MAV_ODID_CLASS_EU_CLASS_5 = 6; /* The class for the UA, according to the EU specification, is Class 5. | */
+ public static final int MAV_ODID_CLASS_EU_CLASS_6 = 7; /* The class for the UA, according to the EU specification, is Class 6. | */
+ public static final int MAV_ODID_CLASS_EU_ENUM_END = 8; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_DESC_TYPE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_DESC_TYPE.java
new file mode 100644
index 0000000..87b6fa0
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_DESC_TYPE.java
@@ -0,0 +1,17 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ *
+ */
+public class MAV_ODID_DESC_TYPE {
+ public static final int MAV_ODID_DESC_TYPE_TEXT = 0; /* Optional free-form text description of the purpose of the flight. | */
+ public static final int MAV_ODID_DESC_TYPE_EMERGENCY = 1; /* Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY. | */
+ public static final int MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2; /* Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY. | */
+ public static final int MAV_ODID_DESC_TYPE_ENUM_END = 3; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_HEIGHT_REF.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_HEIGHT_REF.java
new file mode 100644
index 0000000..82c4c49
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_HEIGHT_REF.java
@@ -0,0 +1,16 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ *
+ */
+public class MAV_ODID_HEIGHT_REF {
+ public static final int MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0; /* The height field is relative to the take-off location. | */
+ public static final int MAV_ODID_HEIGHT_REF_OVER_GROUND = 1; /* The height field is relative to ground. | */
+ public static final int MAV_ODID_HEIGHT_REF_ENUM_END = 2; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_HOR_ACC.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_HOR_ACC.java
new file mode 100644
index 0000000..4444acc
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_HOR_ACC.java
@@ -0,0 +1,27 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ *
+ */
+public class MAV_ODID_HOR_ACC {
+ public static final int MAV_ODID_HOR_ACC_UNKNOWN = 0; /* The horizontal accuracy is unknown. | */
+ public static final int MAV_ODID_HOR_ACC_10NM = 1; /* The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km. | */
+ public static final int MAV_ODID_HOR_ACC_4NM = 2; /* The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km. | */
+ public static final int MAV_ODID_HOR_ACC_2NM = 3; /* The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km. | */
+ public static final int MAV_ODID_HOR_ACC_1NM = 4; /* The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km. | */
+ public static final int MAV_ODID_HOR_ACC_0_5NM = 5; /* The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m. | */
+ public static final int MAV_ODID_HOR_ACC_0_3NM = 6; /* The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m. | */
+ public static final int MAV_ODID_HOR_ACC_0_1NM = 7; /* The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m. | */
+ public static final int MAV_ODID_HOR_ACC_0_05NM = 8; /* The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m. | */
+ public static final int MAV_ODID_HOR_ACC_30_METER = 9; /* The horizontal accuracy is smaller than 30 meter. | */
+ public static final int MAV_ODID_HOR_ACC_10_METER = 10; /* The horizontal accuracy is smaller than 10 meter. | */
+ public static final int MAV_ODID_HOR_ACC_3_METER = 11; /* The horizontal accuracy is smaller than 3 meter. | */
+ public static final int MAV_ODID_HOR_ACC_1_METER = 12; /* The horizontal accuracy is smaller than 1 meter. | */
+ public static final int MAV_ODID_HOR_ACC_ENUM_END = 13; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_ID_TYPE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_ID_TYPE.java
new file mode 100644
index 0000000..2a8d0c7
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_ID_TYPE.java
@@ -0,0 +1,19 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ *
+ */
+public class MAV_ODID_ID_TYPE {
+ public static final int MAV_ODID_ID_TYPE_NONE = 0; /* No type defined. | */
+ public static final int MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1; /* Manufacturer Serial Number (ANSI/CTA-2063 format). | */
+ public static final int MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2; /* CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]. | */
+ public static final int MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3; /* UTM (Unmanned Traffic Management) assigned UUID (RFC4122). | */
+ public static final int MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4; /* A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO. | */
+ public static final int MAV_ODID_ID_TYPE_ENUM_END = 5; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_OPERATOR_ID_TYPE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_OPERATOR_ID_TYPE.java
new file mode 100644
index 0000000..f0296af
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_OPERATOR_ID_TYPE.java
@@ -0,0 +1,15 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ *
+ */
+public class MAV_ODID_OPERATOR_ID_TYPE {
+ public static final int MAV_ODID_OPERATOR_ID_TYPE_CAA = 0; /* CAA (Civil Aviation Authority) registered operator ID. | */
+ public static final int MAV_ODID_OPERATOR_ID_TYPE_ENUM_END = 1; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_OPERATOR_LOCATION_TYPE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_OPERATOR_LOCATION_TYPE.java
new file mode 100644
index 0000000..c44bcda
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_OPERATOR_LOCATION_TYPE.java
@@ -0,0 +1,17 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ *
+ */
+public class MAV_ODID_OPERATOR_LOCATION_TYPE {
+ public static final int MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0; /* The location/altitude of the operator is the same as the take-off location. | */
+ public static final int MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1; /* The location/altitude of the operator is dynamic. E.g. based on live GNSS data. | */
+ public static final int MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2; /* The location/altitude of the operator are fixed values. | */
+ public static final int MAV_ODID_OPERATOR_LOCATION_TYPE_ENUM_END = 3; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_SPEED_ACC.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_SPEED_ACC.java
new file mode 100644
index 0000000..e86cd83
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_SPEED_ACC.java
@@ -0,0 +1,19 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ *
+ */
+public class MAV_ODID_SPEED_ACC {
+ public static final int MAV_ODID_SPEED_ACC_UNKNOWN = 0; /* The speed accuracy is unknown. | */
+ public static final int MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1; /* The speed accuracy is smaller than 10 meters per second. | */
+ public static final int MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2; /* The speed accuracy is smaller than 3 meters per second. | */
+ public static final int MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3; /* The speed accuracy is smaller than 1 meters per second. | */
+ public static final int MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4; /* The speed accuracy is smaller than 0.3 meters per second. | */
+ public static final int MAV_ODID_SPEED_ACC_ENUM_END = 5; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_STATUS.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_STATUS.java
new file mode 100644
index 0000000..0a12002
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_STATUS.java
@@ -0,0 +1,19 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ *
+ */
+public class MAV_ODID_STATUS {
+ public static final int MAV_ODID_STATUS_UNDECLARED = 0; /* The status of the (UA) Unmanned Aircraft is undefined. | */
+ public static final int MAV_ODID_STATUS_GROUND = 1; /* The UA is on the ground. | */
+ public static final int MAV_ODID_STATUS_AIRBORNE = 2; /* The UA is in the air. | */
+ public static final int MAV_ODID_STATUS_EMERGENCY = 3; /* The UA is having an emergency. | */
+ public static final int MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4; /* The remote ID system is failing or unreliable in some way. | */
+ public static final int MAV_ODID_STATUS_ENUM_END = 5; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_TIME_ACC.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_TIME_ACC.java
new file mode 100644
index 0000000..21e41da
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_TIME_ACC.java
@@ -0,0 +1,30 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ *
+ */
+public class MAV_ODID_TIME_ACC {
+ public static final int MAV_ODID_TIME_ACC_UNKNOWN = 0; /* The timestamp accuracy is unknown. | */
+ public static final int MAV_ODID_TIME_ACC_0_1_SECOND = 1; /* The timestamp accuracy is smaller than or equal to 0.1 second. | */
+ public static final int MAV_ODID_TIME_ACC_0_2_SECOND = 2; /* The timestamp accuracy is smaller than or equal to 0.2 second. | */
+ public static final int MAV_ODID_TIME_ACC_0_3_SECOND = 3; /* The timestamp accuracy is smaller than or equal to 0.3 second. | */
+ public static final int MAV_ODID_TIME_ACC_0_4_SECOND = 4; /* The timestamp accuracy is smaller than or equal to 0.4 second. | */
+ public static final int MAV_ODID_TIME_ACC_0_5_SECOND = 5; /* The timestamp accuracy is smaller than or equal to 0.5 second. | */
+ public static final int MAV_ODID_TIME_ACC_0_6_SECOND = 6; /* The timestamp accuracy is smaller than or equal to 0.6 second. | */
+ public static final int MAV_ODID_TIME_ACC_0_7_SECOND = 7; /* The timestamp accuracy is smaller than or equal to 0.7 second. | */
+ public static final int MAV_ODID_TIME_ACC_0_8_SECOND = 8; /* The timestamp accuracy is smaller than or equal to 0.8 second. | */
+ public static final int MAV_ODID_TIME_ACC_0_9_SECOND = 9; /* The timestamp accuracy is smaller than or equal to 0.9 second. | */
+ public static final int MAV_ODID_TIME_ACC_1_0_SECOND = 10; /* The timestamp accuracy is smaller than or equal to 1.0 second. | */
+ public static final int MAV_ODID_TIME_ACC_1_1_SECOND = 11; /* The timestamp accuracy is smaller than or equal to 1.1 second. | */
+ public static final int MAV_ODID_TIME_ACC_1_2_SECOND = 12; /* The timestamp accuracy is smaller than or equal to 1.2 second. | */
+ public static final int MAV_ODID_TIME_ACC_1_3_SECOND = 13; /* The timestamp accuracy is smaller than or equal to 1.3 second. | */
+ public static final int MAV_ODID_TIME_ACC_1_4_SECOND = 14; /* The timestamp accuracy is smaller than or equal to 1.4 second. | */
+ public static final int MAV_ODID_TIME_ACC_1_5_SECOND = 15; /* The timestamp accuracy is smaller than or equal to 1.5 second. | */
+ public static final int MAV_ODID_TIME_ACC_ENUM_END = 16; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_UA_TYPE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_UA_TYPE.java
new file mode 100644
index 0000000..692a204
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_UA_TYPE.java
@@ -0,0 +1,30 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ *
+ */
+public class MAV_ODID_UA_TYPE {
+ public static final int MAV_ODID_UA_TYPE_NONE = 0; /* No UA (Unmanned Aircraft) type defined. | */
+ public static final int MAV_ODID_UA_TYPE_AEROPLANE = 1; /* Aeroplane/Airplane. Fixed wing. | */
+ public static final int MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2; /* Helicopter or multirotor. | */
+ public static final int MAV_ODID_UA_TYPE_GYROPLANE = 3; /* Gyroplane. | */
+ public static final int MAV_ODID_UA_TYPE_HYBRID_LIFT = 4; /* VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically. | */
+ public static final int MAV_ODID_UA_TYPE_ORNITHOPTER = 5; /* Ornithopter. | */
+ public static final int MAV_ODID_UA_TYPE_GLIDER = 6; /* Glider. | */
+ public static final int MAV_ODID_UA_TYPE_KITE = 7; /* Kite. | */
+ public static final int MAV_ODID_UA_TYPE_FREE_BALLOON = 8; /* Free Balloon. | */
+ public static final int MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9; /* Captive Balloon. | */
+ public static final int MAV_ODID_UA_TYPE_AIRSHIP = 10; /* Airship. E.g. a blimp. | */
+ public static final int MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11; /* Free Fall/Parachute (unpowered). | */
+ public static final int MAV_ODID_UA_TYPE_ROCKET = 12; /* Rocket. | */
+ public static final int MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13; /* Tethered powered aircraft. | */
+ public static final int MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14; /* Ground Obstacle. | */
+ public static final int MAV_ODID_UA_TYPE_OTHER = 15; /* Other type of aircraft not listed earlier. | */
+ public static final int MAV_ODID_UA_TYPE_ENUM_END = 16; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_VER_ACC.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_VER_ACC.java
new file mode 100644
index 0000000..7f410e0
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ODID_VER_ACC.java
@@ -0,0 +1,21 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ *
+ */
+public class MAV_ODID_VER_ACC {
+ public static final int MAV_ODID_VER_ACC_UNKNOWN = 0; /* The vertical accuracy is unknown. | */
+ public static final int MAV_ODID_VER_ACC_150_METER = 1; /* The vertical accuracy is smaller than 150 meter. | */
+ public static final int MAV_ODID_VER_ACC_45_METER = 2; /* The vertical accuracy is smaller than 45 meter. | */
+ public static final int MAV_ODID_VER_ACC_25_METER = 3; /* The vertical accuracy is smaller than 25 meter. | */
+ public static final int MAV_ODID_VER_ACC_10_METER = 4; /* The vertical accuracy is smaller than 10 meter. | */
+ public static final int MAV_ODID_VER_ACC_3_METER = 5; /* The vertical accuracy is smaller than 3 meter. | */
+ public static final int MAV_ODID_VER_ACC_1_METER = 6; /* The vertical accuracy is smaller than 1 meter. | */
+ public static final int MAV_ODID_VER_ACC_ENUM_END = 7; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_PARAM_EXT_TYPE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_PARAM_EXT_TYPE.java
new file mode 100644
index 0000000..7ec2582
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_PARAM_EXT_TYPE.java
@@ -0,0 +1,25 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Specifies the datatype of a MAVLink extended parameter.
+ */
+public class MAV_PARAM_EXT_TYPE {
+ public static final int MAV_PARAM_EXT_TYPE_UINT8 = 1; /* 8-bit unsigned integer | */
+ public static final int MAV_PARAM_EXT_TYPE_INT8 = 2; /* 8-bit signed integer | */
+ public static final int MAV_PARAM_EXT_TYPE_UINT16 = 3; /* 16-bit unsigned integer | */
+ public static final int MAV_PARAM_EXT_TYPE_INT16 = 4; /* 16-bit signed integer | */
+ public static final int MAV_PARAM_EXT_TYPE_UINT32 = 5; /* 32-bit unsigned integer | */
+ public static final int MAV_PARAM_EXT_TYPE_INT32 = 6; /* 32-bit signed integer | */
+ public static final int MAV_PARAM_EXT_TYPE_UINT64 = 7; /* 64-bit unsigned integer | */
+ public static final int MAV_PARAM_EXT_TYPE_INT64 = 8; /* 64-bit signed integer | */
+ public static final int MAV_PARAM_EXT_TYPE_REAL32 = 9; /* 32-bit floating-point | */
+ public static final int MAV_PARAM_EXT_TYPE_REAL64 = 10; /* 64-bit floating-point | */
+ public static final int MAV_PARAM_EXT_TYPE_CUSTOM = 11; /* Custom Type | */
+ public static final int MAV_PARAM_EXT_TYPE_ENUM_END = 12; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_PARAM_TYPE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_PARAM_TYPE.java
new file mode 100644
index 0000000..5559f05
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_PARAM_TYPE.java
@@ -0,0 +1,24 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Specifies the datatype of a MAVLink parameter.
+ */
+public class MAV_PARAM_TYPE {
+ public static final int MAV_PARAM_TYPE_UINT8 = 1; /* 8-bit unsigned integer | */
+ public static final int MAV_PARAM_TYPE_INT8 = 2; /* 8-bit signed integer | */
+ public static final int MAV_PARAM_TYPE_UINT16 = 3; /* 16-bit unsigned integer | */
+ public static final int MAV_PARAM_TYPE_INT16 = 4; /* 16-bit signed integer | */
+ public static final int MAV_PARAM_TYPE_UINT32 = 5; /* 32-bit unsigned integer | */
+ public static final int MAV_PARAM_TYPE_INT32 = 6; /* 32-bit signed integer | */
+ public static final int MAV_PARAM_TYPE_UINT64 = 7; /* 64-bit unsigned integer | */
+ public static final int MAV_PARAM_TYPE_INT64 = 8; /* 64-bit signed integer | */
+ public static final int MAV_PARAM_TYPE_REAL32 = 9; /* 32-bit floating-point | */
+ public static final int MAV_PARAM_TYPE_REAL64 = 10; /* 64-bit floating-point | */
+ public static final int MAV_PARAM_TYPE_ENUM_END = 11; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_POWER_STATUS.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_POWER_STATUS.java
new file mode 100644
index 0000000..e943f5e
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_POWER_STATUS.java
@@ -0,0 +1,20 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Power supply status flags (bitmask)
+ */
+public class MAV_POWER_STATUS {
+ public static final int MAV_POWER_STATUS_BRICK_VALID = 1; /* main brick power supply valid | */
+ public static final int MAV_POWER_STATUS_SERVO_VALID = 2; /* main servo power supply valid for FMU | */
+ public static final int MAV_POWER_STATUS_USB_CONNECTED = 4; /* USB power is connected | */
+ public static final int MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8; /* peripheral supply is in over-current state | */
+ public static final int MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16; /* hi-power peripheral supply is in over-current state | */
+ public static final int MAV_POWER_STATUS_CHANGED = 32; /* Power status has changed since boot | */
+ public static final int MAV_POWER_STATUS_ENUM_END = 33; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_PROTOCOL_CAPABILITY.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_PROTOCOL_CAPABILITY.java
new file mode 100644
index 0000000..bcdd7e8
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_PROTOCOL_CAPABILITY.java
@@ -0,0 +1,43 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability.
+ */
+public class MAV_PROTOCOL_CAPABILITY {
+ public static final int MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1; /* Autopilot supports the MISSION_ITEM float message type.
+ Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead.
+ | */
+ public static final int MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2; /* Autopilot supports the new param float message type. | */
+ public static final int MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4; /* Autopilot supports MISSION_ITEM_INT scaled integer message type.
+ Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated).
+ | */
+ public static final int MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8; /* Autopilot supports COMMAND_INT scaled integer message type. | */
+ public static final int MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16; /* Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: https://mavlink.io/en/services/parameter.html#parameter-encoding.
+ Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported.
+ | */
+ public static final int MAV_PROTOCOL_CAPABILITY_FTP = 32; /* Autopilot supports the File Transfer Protocol v1: https://mavlink.io/en/services/ftp.html. | */
+ public static final int MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64; /* Autopilot supports commanding attitude offboard. | */
+ public static final int MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128; /* Autopilot supports commanding position and velocity targets in local NED frame. | */
+ public static final int MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256; /* Autopilot supports commanding position and velocity targets in global scaled integers. | */
+ public static final int MAV_PROTOCOL_CAPABILITY_TERRAIN = 512; /* Autopilot supports terrain protocol / data handling. | */
+ public static final int MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024; /* Reserved for future use. | */
+ public static final int MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048; /* Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination). | */
+ public static final int MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096; /* Autopilot supports onboard compass calibration. | */
+ public static final int MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192; /* Autopilot supports MAVLink version 2. | */
+ public static final int MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384; /* Autopilot supports mission fence protocol. | */
+ public static final int MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768; /* Autopilot supports mission rally point protocol. | */
+ public static final int MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536; /* Reserved for future use. | */
+ public static final int MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072; /* Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: https://mavlink.io/en/services/parameter.html#parameter-encoding.
+ Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported.
+ | */
+ public static final int MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144; /* This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested.
+ | */
+ public static final int MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288; /* Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL). | */
+ public static final int MAV_PROTOCOL_CAPABILITY_ENUM_END = 524289; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_RESULT.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_RESULT.java
new file mode 100644
index 0000000..cfd452c
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_RESULT.java
@@ -0,0 +1,24 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Result from a MAVLink command (MAV_CMD)
+ */
+public class MAV_RESULT {
+ public static final int MAV_RESULT_ACCEPTED = 0; /* Command is valid (is supported and has valid parameters), and was executed. | */
+ public static final int MAV_RESULT_TEMPORARILY_REJECTED = 1; /* Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work. | */
+ public static final int MAV_RESULT_DENIED = 2; /* Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work. | */
+ public static final int MAV_RESULT_UNSUPPORTED = 3; /* Command is not supported (unknown). | */
+ public static final int MAV_RESULT_FAILED = 4; /* Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc. | */
+ public static final int MAV_RESULT_IN_PROGRESS = 5; /* Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation. | */
+ public static final int MAV_RESULT_CANCELLED = 6; /* Command has been cancelled (as a result of receiving a COMMAND_CANCEL message). | */
+ public static final int MAV_RESULT_COMMAND_LONG_ONLY = 7; /* Command is only accepted when sent as a COMMAND_LONG. | */
+ public static final int MAV_RESULT_COMMAND_INT_ONLY = 8; /* Command is only accepted when sent as a COMMAND_INT. | */
+ public static final int MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9; /* Command is invalid because a frame is required and the specified frame is not supported. | */
+ public static final int MAV_RESULT_ENUM_END = 10; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ROI.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ROI.java
new file mode 100644
index 0000000..cd8677d
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_ROI.java
@@ -0,0 +1,21 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * The ROI (region of interest) for the vehicle. This can be
+ be used by the vehicle for camera/vehicle attitude alignment (see
+ MAV_CMD_NAV_ROI).
+ */
+public class MAV_ROI {
+ public static final int MAV_ROI_NONE = 0; /* No region of interest. | */
+ public static final int MAV_ROI_WPNEXT = 1; /* Point toward next waypoint, with optional pitch/roll/yaw offset. | */
+ public static final int MAV_ROI_WPINDEX = 2; /* Point toward given waypoint. | */
+ public static final int MAV_ROI_LOCATION = 3; /* Point toward fixed location. | */
+ public static final int MAV_ROI_TARGET = 4; /* Point toward of given id. | */
+ public static final int MAV_ROI_ENUM_END = 5; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_SENSOR_ORIENTATION.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_SENSOR_ORIENTATION.java
new file mode 100644
index 0000000..aa98c0a
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_SENSOR_ORIENTATION.java
@@ -0,0 +1,56 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Enumeration of sensor orientation, according to its rotations
+ */
+public class MAV_SENSOR_ORIENTATION {
+ public static final int MAV_SENSOR_ROTATION_NONE = 0; /* Roll: 0, Pitch: 0, Yaw: 0 | */
+ public static final int MAV_SENSOR_ROTATION_YAW_45 = 1; /* Roll: 0, Pitch: 0, Yaw: 45 | */
+ public static final int MAV_SENSOR_ROTATION_YAW_90 = 2; /* Roll: 0, Pitch: 0, Yaw: 90 | */
+ public static final int MAV_SENSOR_ROTATION_YAW_135 = 3; /* Roll: 0, Pitch: 0, Yaw: 135 | */
+ public static final int MAV_SENSOR_ROTATION_YAW_180 = 4; /* Roll: 0, Pitch: 0, Yaw: 180 | */
+ public static final int MAV_SENSOR_ROTATION_YAW_225 = 5; /* Roll: 0, Pitch: 0, Yaw: 225 | */
+ public static final int MAV_SENSOR_ROTATION_YAW_270 = 6; /* Roll: 0, Pitch: 0, Yaw: 270 | */
+ public static final int MAV_SENSOR_ROTATION_YAW_315 = 7; /* Roll: 0, Pitch: 0, Yaw: 315 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_180 = 8; /* Roll: 180, Pitch: 0, Yaw: 0 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9; /* Roll: 180, Pitch: 0, Yaw: 45 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10; /* Roll: 180, Pitch: 0, Yaw: 90 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11; /* Roll: 180, Pitch: 0, Yaw: 135 | */
+ public static final int MAV_SENSOR_ROTATION_PITCH_180 = 12; /* Roll: 0, Pitch: 180, Yaw: 0 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13; /* Roll: 180, Pitch: 0, Yaw: 225 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14; /* Roll: 180, Pitch: 0, Yaw: 270 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15; /* Roll: 180, Pitch: 0, Yaw: 315 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_90 = 16; /* Roll: 90, Pitch: 0, Yaw: 0 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17; /* Roll: 90, Pitch: 0, Yaw: 45 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18; /* Roll: 90, Pitch: 0, Yaw: 90 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19; /* Roll: 90, Pitch: 0, Yaw: 135 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_270 = 20; /* Roll: 270, Pitch: 0, Yaw: 0 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21; /* Roll: 270, Pitch: 0, Yaw: 45 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22; /* Roll: 270, Pitch: 0, Yaw: 90 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23; /* Roll: 270, Pitch: 0, Yaw: 135 | */
+ public static final int MAV_SENSOR_ROTATION_PITCH_90 = 24; /* Roll: 0, Pitch: 90, Yaw: 0 | */
+ public static final int MAV_SENSOR_ROTATION_PITCH_270 = 25; /* Roll: 0, Pitch: 270, Yaw: 0 | */
+ public static final int MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26; /* Roll: 0, Pitch: 180, Yaw: 90 | */
+ public static final int MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27; /* Roll: 0, Pitch: 180, Yaw: 270 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28; /* Roll: 90, Pitch: 90, Yaw: 0 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29; /* Roll: 180, Pitch: 90, Yaw: 0 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30; /* Roll: 270, Pitch: 90, Yaw: 0 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31; /* Roll: 90, Pitch: 180, Yaw: 0 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32; /* Roll: 270, Pitch: 180, Yaw: 0 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33; /* Roll: 90, Pitch: 270, Yaw: 0 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34; /* Roll: 180, Pitch: 270, Yaw: 0 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35; /* Roll: 270, Pitch: 270, Yaw: 0 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36; /* Roll: 90, Pitch: 180, Yaw: 90 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37; /* Roll: 90, Pitch: 0, Yaw: 270 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38; /* Roll: 90, Pitch: 68, Yaw: 293 | */
+ public static final int MAV_SENSOR_ROTATION_PITCH_315 = 39; /* Pitch: 315 | */
+ public static final int MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40; /* Roll: 90, Pitch: 315 | */
+ public static final int MAV_SENSOR_ROTATION_CUSTOM = 100; /* Custom orientation | */
+ public static final int MAV_SENSOR_ORIENTATION_ENUM_END = 101; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_SEVERITY.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_SEVERITY.java
new file mode 100644
index 0000000..345f92e
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_SEVERITY.java
@@ -0,0 +1,22 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: http://www.kiwisyslog.com/kb/info:-syslog-message-levels/.
+ */
+public class MAV_SEVERITY {
+ public static final int MAV_SEVERITY_EMERGENCY = 0; /* System is unusable. This is a "panic" condition. | */
+ public static final int MAV_SEVERITY_ALERT = 1; /* Action should be taken immediately. Indicates error in non-critical systems. | */
+ public static final int MAV_SEVERITY_CRITICAL = 2; /* Action must be taken immediately. Indicates failure in a primary system. | */
+ public static final int MAV_SEVERITY_ERROR = 3; /* Indicates an error in secondary/redundant systems. | */
+ public static final int MAV_SEVERITY_WARNING = 4; /* Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning. | */
+ public static final int MAV_SEVERITY_NOTICE = 5; /* An unusual event has occurred, though not an error condition. This should be investigated for the root cause. | */
+ public static final int MAV_SEVERITY_INFO = 6; /* Normal operational messages. Useful for logging. No action is required for these messages. | */
+ public static final int MAV_SEVERITY_DEBUG = 7; /* Useful non-operational messages that can assist in debugging. These should not occur during normal operation. | */
+ public static final int MAV_SEVERITY_ENUM_END = 8; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_STANDARD_MODE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_STANDARD_MODE.java
new file mode 100644
index 0000000..66fb6ce
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_STANDARD_MODE.java
@@ -0,0 +1,74 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Standard modes with a well understood meaning across flight stacks and vehicle types.
+ For example, most flight stack have the concept of a "return" or "RTL" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.
+ The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.
+ The current mode is streamed in CURRENT_MODE.
+ See https://mavlink.io/en/services/standard_modes.html
+
+ */
+public class MAV_STANDARD_MODE {
+ public static final int MAV_STANDARD_MODE_NON_STANDARD = 0; /* Non standard mode.
+ This may be used when reporting the mode if the current flight mode is not a standard mode.
+ | */
+ public static final int MAV_STANDARD_MODE_POSITION_HOLD = 1; /* Position mode (manual).
+ Position-controlled and stabilized manual mode.
+ When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.
+ This mode can only be set by vehicles that can hold a fixed position.
+ Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.
+ Hybrid MC/FW ("VTOL") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.
+ Fixed-wing (FW) vehicles must not support this mode.
+ Other vehicle types must not support this mode (this may be revisited through the PR process).
+ | */
+ public static final int MAV_STANDARD_MODE_ORBIT = 2; /* Orbit (manual).
+ Position-controlled and stabilized manual mode.
+ The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.
+ Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.
+ Flight stacks may support the [MAV_CMD_DO_ORBIT](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT) for changing the orbit parameters.
+ MC and FW vehicles may support this mode.
+ Hybrid MC/FW ("VTOL") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.
+ Other vehicle types must not support this mode (this may be revisited through the PR process).
+ | */
+ public static final int MAV_STANDARD_MODE_CRUISE = 3; /* Cruise mode (manual).
+ Position-controlled and stabilized manual mode.
+ When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.
+ Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.
+ Hybrid MC/FW ("VTOL") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.
+ Multicopter (MC) vehicles must not support this mode.
+ Other vehicle types must not support this mode (this may be revisited through the PR process).
+ | */
+ public static final int MAV_STANDARD_MODE_ALTITUDE_HOLD = 4; /* Altitude hold (manual).
+ Altitude-controlled and stabilized manual mode.
+ When sticks are released vehicles return to their level-flight orientation and hold their altitude.
+ MC vehicles continue with existing momentum and may move with wind (or other external forces).
+ FW vehicles continue with current heading, but may be moved off-track by wind.
+ Hybrid MC/FW ("VTOL") vehicles behave according to their current configuration/mode (FW or MC).
+ Other vehicle types must not support this mode (this may be revisited through the PR process).
+ | */
+ public static final int MAV_STANDARD_MODE_SAFE_RECOVERY = 5; /* Safe recovery mode (auto).
+ Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.
+ This mode is more commonly referred to as RTL and/or or Smart RTL.
+ The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.
+ For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent.
+ | */
+ public static final int MAV_STANDARD_MODE_MISSION = 6; /* Mission mode (automatic).
+ Automatic mode that executes MAVLink missions.
+ Missions are executed from the current waypoint as soon as the mode is enabled.
+ | */
+ public static final int MAV_STANDARD_MODE_LAND = 7; /* Land mode (auto).
+ Automatic mode that lands the vehicle at the current location.
+ The precise landing behaviour depends on vehicle configuration and type.
+ | */
+ public static final int MAV_STANDARD_MODE_TAKEOFF = 8; /* Takeoff mode (auto).
+ Automatic takeoff mode.
+ The precise takeoff behaviour depends on vehicle configuration and type.
+ | */
+ public static final int MAV_STANDARD_MODE_ENUM_END = 9; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_STATE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_STATE.java
new file mode 100644
index 0000000..e547c27
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_STATE.java
@@ -0,0 +1,23 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ *
+ */
+public class MAV_STATE {
+ public static final int MAV_STATE_UNINIT = 0; /* Uninitialized system, state is unknown. | */
+ public static final int MAV_STATE_BOOT = 1; /* System is booting up. | */
+ public static final int MAV_STATE_CALIBRATING = 2; /* System is calibrating and not flight-ready. | */
+ public static final int MAV_STATE_STANDBY = 3; /* System is grounded and on standby. It can be launched any time. | */
+ public static final int MAV_STATE_ACTIVE = 4; /* System is active and might be already airborne. Motors are engaged. | */
+ public static final int MAV_STATE_CRITICAL = 5; /* System is in a non-normal flight mode (failsafe). It can however still navigate. | */
+ public static final int MAV_STATE_EMERGENCY = 6; /* System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down. | */
+ public static final int MAV_STATE_POWEROFF = 7; /* System just initialized its power-down sequence, will shut down now. | */
+ public static final int MAV_STATE_FLIGHT_TERMINATION = 8; /* System is terminating itself (failsafe or commanded). | */
+ public static final int MAV_STATE_ENUM_END = 9; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_SYS_STATUS_SENSOR.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_SYS_STATUS_SENSOR.java
new file mode 100644
index 0000000..a3d4598
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_SYS_STATUS_SENSOR.java
@@ -0,0 +1,46 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * These encode the sensors whose status is sent as part of the SYS_STATUS message.
+ */
+public class MAV_SYS_STATUS_SENSOR {
+ public static final int MAV_SYS_STATUS_SENSOR_3D_GYRO = 1; /* 0x01 3D gyro | */
+ public static final int MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2; /* 0x02 3D accelerometer | */
+ public static final int MAV_SYS_STATUS_SENSOR_3D_MAG = 4; /* 0x04 3D magnetometer | */
+ public static final int MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8; /* 0x08 absolute pressure | */
+ public static final int MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16; /* 0x10 differential pressure | */
+ public static final int MAV_SYS_STATUS_SENSOR_GPS = 32; /* 0x20 GPS | */
+ public static final int MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64; /* 0x40 optical flow | */
+ public static final int MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128; /* 0x80 computer vision position | */
+ public static final int MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256; /* 0x100 laser based position | */
+ public static final int MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512; /* 0x200 external ground truth (Vicon or Leica) | */
+ public static final int MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024; /* 0x400 3D angular rate control | */
+ public static final int MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048; /* 0x800 attitude stabilization | */
+ public static final int MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096; /* 0x1000 yaw position | */
+ public static final int MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192; /* 0x2000 z/altitude control | */
+ public static final int MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384; /* 0x4000 x/y position control | */
+ public static final int MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768; /* 0x8000 motor outputs / control | */
+ public static final int MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536; /* 0x10000 RC receiver | */
+ public static final int MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072; /* 0x20000 2nd 3D gyro | */
+ public static final int MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144; /* 0x40000 2nd 3D accelerometer | */
+ public static final int MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288; /* 0x80000 2nd 3D magnetometer | */
+ public static final int MAV_SYS_STATUS_GEOFENCE = 1048576; /* 0x100000 geofence | */
+ public static final int MAV_SYS_STATUS_AHRS = 2097152; /* 0x200000 AHRS subsystem health | */
+ public static final int MAV_SYS_STATUS_TERRAIN = 4194304; /* 0x400000 Terrain subsystem health | */
+ public static final int MAV_SYS_STATUS_REVERSE_MOTOR = 8388608; /* 0x800000 Motors are reversed | */
+ public static final int MAV_SYS_STATUS_LOGGING = 16777216; /* 0x1000000 Logging | */
+ public static final int MAV_SYS_STATUS_SENSOR_BATTERY = 33554432; /* 0x2000000 Battery | */
+ public static final int MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864; /* 0x4000000 Proximity | */
+ public static final int MAV_SYS_STATUS_SENSOR_SATCOM = 134217728; /* 0x8000000 Satellite Communication | */
+ public static final int MAV_SYS_STATUS_PREARM_CHECK = 268435456; /* 0x10000000 pre-arm check status. Always healthy when armed | */
+ public static final int MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912; /* 0x20000000 Avoidance/collision prevention | */
+ public static final int MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824; /* 0x40000000 propulsion (actuator, esc, motor or propellor) | */
+ public static final long MAV_SYS_STATUS_EXTENSION_USED = 2147483648L; /* 0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only) | */
+ public static final long MAV_SYS_STATUS_SENSOR_ENUM_END = 2147483649L; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_SYS_STATUS_SENSOR_EXTENDED.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_SYS_STATUS_SENSOR_EXTENDED.java
new file mode 100644
index 0000000..451a2c2
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_SYS_STATUS_SENSOR_EXTENDED.java
@@ -0,0 +1,15 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields.
+ */
+public class MAV_SYS_STATUS_SENSOR_EXTENDED {
+ public static final int MAV_SYS_STATUS_RECOVERY_SYSTEM = 1; /* 0x01 Recovery system (parachute, balloon, retracts etc) | */
+ public static final int MAV_SYS_STATUS_SENSOR_EXTENDED_ENUM_END = 2; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_TUNNEL_PAYLOAD_TYPE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_TUNNEL_PAYLOAD_TYPE.java
new file mode 100644
index 0000000..fd08ba6
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_TUNNEL_PAYLOAD_TYPE.java
@@ -0,0 +1,28 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ *
+ */
+public class MAV_TUNNEL_PAYLOAD_TYPE {
+ public static final int MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0; /* Encoding of payload unknown. | */
+ public static final int MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200; /* Registered for STorM32 gimbal controller. | */
+ public static final int MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201; /* Registered for STorM32 gimbal controller. | */
+ public static final int MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202; /* Registered for STorM32 gimbal controller. | */
+ public static final int MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203; /* Registered for STorM32 gimbal controller. | */
+ public static final int MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204; /* Registered for STorM32 gimbal controller. | */
+ public static final int MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205; /* Registered for STorM32 gimbal controller. | */
+ public static final int MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206; /* Registered for STorM32 gimbal controller. | */
+ public static final int MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207; /* Registered for STorM32 gimbal controller. | */
+ public static final int MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208; /* Registered for STorM32 gimbal controller. | */
+ public static final int MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209; /* Registered for STorM32 gimbal controller. | */
+ public static final int MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210; /* Registered for ModalAI remote OSD protocol. | */
+ public static final int MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211; /* Registered for ModalAI ESC UART passthru protocol. | */
+ public static final int MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212; /* Registered for ModalAI vendor use. | */
+ public static final int MAV_TUNNEL_PAYLOAD_TYPE_ENUM_END = 213; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_TYPE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_TYPE.java
new file mode 100644
index 0000000..06009c4
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_TYPE.java
@@ -0,0 +1,62 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA).
+ */
+public class MAV_TYPE {
+ public static final int MAV_TYPE_GENERIC = 0; /* Generic micro air vehicle | */
+ public static final int MAV_TYPE_FIXED_WING = 1; /* Fixed wing aircraft. | */
+ public static final int MAV_TYPE_QUADROTOR = 2; /* Quadrotor | */
+ public static final int MAV_TYPE_COAXIAL = 3; /* Coaxial helicopter | */
+ public static final int MAV_TYPE_HELICOPTER = 4; /* Normal helicopter with tail rotor. | */
+ public static final int MAV_TYPE_ANTENNA_TRACKER = 5; /* Ground installation | */
+ public static final int MAV_TYPE_GCS = 6; /* Operator control unit / ground control station | */
+ public static final int MAV_TYPE_AIRSHIP = 7; /* Airship, controlled | */
+ public static final int MAV_TYPE_FREE_BALLOON = 8; /* Free balloon, uncontrolled | */
+ public static final int MAV_TYPE_ROCKET = 9; /* Rocket | */
+ public static final int MAV_TYPE_GROUND_ROVER = 10; /* Ground rover | */
+ public static final int MAV_TYPE_SURFACE_BOAT = 11; /* Surface vessel, boat, ship | */
+ public static final int MAV_TYPE_SUBMARINE = 12; /* Submarine | */
+ public static final int MAV_TYPE_HEXAROTOR = 13; /* Hexarotor | */
+ public static final int MAV_TYPE_OCTOROTOR = 14; /* Octorotor | */
+ public static final int MAV_TYPE_TRICOPTER = 15; /* Tricopter | */
+ public static final int MAV_TYPE_FLAPPING_WING = 16; /* Flapping wing | */
+ public static final int MAV_TYPE_KITE = 17; /* Kite | */
+ public static final int MAV_TYPE_ONBOARD_CONTROLLER = 18; /* Onboard companion controller | */
+ public static final int MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19; /* Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR. | */
+ public static final int MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20; /* Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR. | */
+ public static final int MAV_TYPE_VTOL_TILTROTOR = 21; /* Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight. | */
+ public static final int MAV_TYPE_VTOL_FIXEDROTOR = 22; /* VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases. | */
+ public static final int MAV_TYPE_VTOL_TAILSITTER = 23; /* Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate. | */
+ public static final int MAV_TYPE_VTOL_TILTWING = 24; /* Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode. | */
+ public static final int MAV_TYPE_VTOL_RESERVED5 = 25; /* VTOL reserved 5 | */
+ public static final int MAV_TYPE_GIMBAL = 26; /* Gimbal | */
+ public static final int MAV_TYPE_ADSB = 27; /* ADSB system | */
+ public static final int MAV_TYPE_PARAFOIL = 28; /* Steerable, nonrigid airfoil | */
+ public static final int MAV_TYPE_DODECAROTOR = 29; /* Dodecarotor | */
+ public static final int MAV_TYPE_CAMERA = 30; /* Camera | */
+ public static final int MAV_TYPE_CHARGING_STATION = 31; /* Charging station | */
+ public static final int MAV_TYPE_FLARM = 32; /* FLARM collision avoidance system | */
+ public static final int MAV_TYPE_SERVO = 33; /* Servo | */
+ public static final int MAV_TYPE_ODID = 34; /* Open Drone ID. See https://mavlink.io/en/services/opendroneid.html. | */
+ public static final int MAV_TYPE_DECAROTOR = 35; /* Decarotor | */
+ public static final int MAV_TYPE_BATTERY = 36; /* Battery | */
+ public static final int MAV_TYPE_PARACHUTE = 37; /* Parachute | */
+ public static final int MAV_TYPE_LOG = 38; /* Log | */
+ public static final int MAV_TYPE_OSD = 39; /* OSD | */
+ public static final int MAV_TYPE_IMU = 40; /* IMU | */
+ public static final int MAV_TYPE_GPS = 41; /* GPS | */
+ public static final int MAV_TYPE_WINCH = 42; /* Winch | */
+ public static final int MAV_TYPE_GENERIC_MULTIROTOR = 43; /* Generic multirotor that does not fit into a specific type or whose type is unknown | */
+ public static final int MAV_TYPE_ILLUMINATOR = 44; /* Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light). | */
+ public static final int MAV_TYPE_SPACECRAFT_ORBITER = 45; /* Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification. | */
+ public static final int MAV_TYPE_GROUND_QUADRUPED = 46; /* A generic four-legged ground vehicle (e.g., a robot dog). | */
+ public static final int MAV_TYPE_VTOL_GYRODYNE = 47; /* VTOL hybrid of helicopter and autogyro. It has a main rotor for lift and separate propellers for forward flight. The rotor must be powered for hover but can autorotate in cruise flight. See: https://en.wikipedia.org/wiki/Gyrodyne | */
+ public static final int MAV_TYPE_ENUM_END = 48; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_VTOL_STATE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_VTOL_STATE.java
new file mode 100644
index 0000000..6dc5768
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_VTOL_STATE.java
@@ -0,0 +1,19 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Enumeration of VTOL states
+ */
+public class MAV_VTOL_STATE {
+ public static final int MAV_VTOL_STATE_UNDEFINED = 0; /* MAV is not configured as VTOL | */
+ public static final int MAV_VTOL_STATE_TRANSITION_TO_FW = 1; /* VTOL is in transition from multicopter to fixed-wing | */
+ public static final int MAV_VTOL_STATE_TRANSITION_TO_MC = 2; /* VTOL is in transition from fixed-wing to multicopter | */
+ public static final int MAV_VTOL_STATE_MC = 3; /* VTOL is in multicopter state | */
+ public static final int MAV_VTOL_STATE_FW = 4; /* VTOL is in fixed-wing state | */
+ public static final int MAV_VTOL_STATE_ENUM_END = 5; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_WINCH_STATUS_FLAG.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_WINCH_STATUS_FLAG.java
new file mode 100644
index 0000000..41420f7
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MAV_WINCH_STATUS_FLAG.java
@@ -0,0 +1,28 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Winch status flags used in WINCH_STATUS
+ */
+public class MAV_WINCH_STATUS_FLAG {
+ public static final int MAV_WINCH_STATUS_HEALTHY = 1; /* Winch is healthy | */
+ public static final int MAV_WINCH_STATUS_FULLY_RETRACTED = 2; /* Winch line is fully retracted | */
+ public static final int MAV_WINCH_STATUS_MOVING = 4; /* Winch motor is moving | */
+ public static final int MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8; /* Winch clutch is engaged allowing motor to move freely. | */
+ public static final int MAV_WINCH_STATUS_LOCKED = 16; /* Winch is locked by locking mechanism. | */
+ public static final int MAV_WINCH_STATUS_DROPPING = 32; /* Winch is gravity dropping payload. | */
+ public static final int MAV_WINCH_STATUS_ARRESTING = 64; /* Winch is arresting payload descent. | */
+ public static final int MAV_WINCH_STATUS_GROUND_SENSE = 128; /* Winch is using torque measurements to sense the ground. | */
+ public static final int MAV_WINCH_STATUS_RETRACTING = 256; /* Winch is returning to the fully retracted position. | */
+ public static final int MAV_WINCH_STATUS_REDELIVER = 512; /* Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING. | */
+ public static final int MAV_WINCH_STATUS_ABANDON_LINE = 1024; /* Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold. | */
+ public static final int MAV_WINCH_STATUS_LOCKING = 2048; /* Winch is engaging the locking mechanism. | */
+ public static final int MAV_WINCH_STATUS_LOAD_LINE = 4096; /* Winch is spooling on line. | */
+ public static final int MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192; /* Winch is loading a payload. | */
+ public static final int MAV_WINCH_STATUS_FLAG_ENUM_END = 8193; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MISSION_STATE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MISSION_STATE.java
new file mode 100644
index 0000000..9823377
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MISSION_STATE.java
@@ -0,0 +1,24 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ *
+ States of the mission state machine.
+ Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).
+ They may not all be relevant on all vehicles.
+
+ */
+public class MISSION_STATE {
+ public static final int MISSION_STATE_UNKNOWN = 0; /* The mission status reporting is not supported. | */
+ public static final int MISSION_STATE_NO_MISSION = 1; /* No mission on the vehicle. | */
+ public static final int MISSION_STATE_NOT_STARTED = 2; /* Mission has not started. This is the case after a mission has uploaded but not yet started executing. | */
+ public static final int MISSION_STATE_ACTIVE = 3; /* Mission is active, and will execute mission items when in auto mode. | */
+ public static final int MISSION_STATE_PAUSED = 4; /* Mission is paused when in auto mode. | */
+ public static final int MISSION_STATE_COMPLETE = 5; /* Mission has executed all mission items. | */
+ public static final int MISSION_STATE_ENUM_END = 6; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MOTOR_TEST_ORDER.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MOTOR_TEST_ORDER.java
new file mode 100644
index 0000000..e2fdf03
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MOTOR_TEST_ORDER.java
@@ -0,0 +1,17 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST.
+ */
+public class MOTOR_TEST_ORDER {
+ public static final int MOTOR_TEST_ORDER_DEFAULT = 0; /* Default autopilot motor test method. | */
+ public static final int MOTOR_TEST_ORDER_SEQUENCE = 1; /* Motor numbers are specified as their index in a predefined vehicle-specific sequence. | */
+ public static final int MOTOR_TEST_ORDER_BOARD = 2; /* Motor numbers are specified as the output as labeled on the board. | */
+ public static final int MOTOR_TEST_ORDER_ENUM_END = 3; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MOTOR_TEST_THROTTLE_TYPE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MOTOR_TEST_THROTTLE_TYPE.java
new file mode 100644
index 0000000..cc36b14
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/MOTOR_TEST_THROTTLE_TYPE.java
@@ -0,0 +1,18 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST.
+ */
+public class MOTOR_TEST_THROTTLE_TYPE {
+ public static final int MOTOR_TEST_THROTTLE_PERCENT = 0; /* Throttle as a percentage (0 ~ 100) | */
+ public static final int MOTOR_TEST_THROTTLE_PWM = 1; /* Throttle as an absolute PWM value (normally in range of 1000~2000). | */
+ public static final int MOTOR_TEST_THROTTLE_PILOT = 2; /* Throttle pass-through from pilot's transmitter. | */
+ public static final int MOTOR_TEST_COMPASS_CAL = 3; /* Per-motor compass calibration test. | */
+ public static final int MOTOR_TEST_THROTTLE_TYPE_ENUM_END = 4; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/NAV_VTOL_LAND_OPTIONS.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/NAV_VTOL_LAND_OPTIONS.java
new file mode 100644
index 0000000..1bea112
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/NAV_VTOL_LAND_OPTIONS.java
@@ -0,0 +1,19 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ *
+ */
+public class NAV_VTOL_LAND_OPTIONS {
+ public static final int NAV_VTOL_LAND_OPTIONS_DEFAULT = 0; /* Default autopilot landing behaviour. | */
+ public static final int NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1; /* Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.
+ The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.).
+ | */
+ public static final int NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2; /* Land in multicopter mode on reaching the landing coordinates (the whole landing is by "hover descent"). | */
+ public static final int NAV_VTOL_LAND_OPTIONS_ENUM_END = 3; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/ORBIT_YAW_BEHAVIOUR.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/ORBIT_YAW_BEHAVIOUR.java
new file mode 100644
index 0000000..417297b
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/ORBIT_YAW_BEHAVIOUR.java
@@ -0,0 +1,20 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Yaw behaviour during orbit flight.
+ */
+public class ORBIT_YAW_BEHAVIOUR {
+ public static final int ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0; /* Vehicle front points to the center (default). | */
+ public static final int ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1; /* Vehicle front holds heading when message received. | */
+ public static final int ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2; /* Yaw uncontrolled. | */
+ public static final int ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3; /* Vehicle front follows flight path (tangential to circle). | */
+ public static final int ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4; /* Yaw controlled by RC input. | */
+ public static final int ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5; /* Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded. | */
+ public static final int ORBIT_YAW_BEHAVIOUR_ENUM_END = 6; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/PARACHUTE_ACTION.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/PARACHUTE_ACTION.java
new file mode 100644
index 0000000..ab284d5
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/PARACHUTE_ACTION.java
@@ -0,0 +1,17 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Parachute actions. Trigger release and enable/disable auto-release.
+ */
+public class PARACHUTE_ACTION {
+ public static final int PARACHUTE_DISABLE = 0; /* Disable auto-release of parachute (i.e. release triggered by crash detectors). | */
+ public static final int PARACHUTE_ENABLE = 1; /* Enable auto-release of parachute. | */
+ public static final int PARACHUTE_RELEASE = 2; /* Release parachute and kill motors. | */
+ public static final int PARACHUTE_ACTION_ENUM_END = 3; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/PARAM_ACK.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/PARAM_ACK.java
new file mode 100644
index 0000000..32de255
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/PARAM_ACK.java
@@ -0,0 +1,18 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Result from PARAM_EXT_SET message.
+ */
+public class PARAM_ACK {
+ public static final int PARAM_ACK_ACCEPTED = 0; /* Parameter value ACCEPTED and SET | */
+ public static final int PARAM_ACK_VALUE_UNSUPPORTED = 1; /* Parameter value UNKNOWN/UNSUPPORTED | */
+ public static final int PARAM_ACK_FAILED = 2; /* Parameter failed to set | */
+ public static final int PARAM_ACK_IN_PROGRESS = 3; /* Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent. | */
+ public static final int PARAM_ACK_ENUM_END = 4; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/POSITION_TARGET_TYPEMASK.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/POSITION_TARGET_TYPEMASK.java
new file mode 100644
index 0000000..0f535d0
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/POSITION_TARGET_TYPEMASK.java
@@ -0,0 +1,26 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration.
+ */
+public class POSITION_TARGET_TYPEMASK {
+ public static final int POSITION_TARGET_TYPEMASK_X_IGNORE = 1; /* Ignore position x | */
+ public static final int POSITION_TARGET_TYPEMASK_Y_IGNORE = 2; /* Ignore position y | */
+ public static final int POSITION_TARGET_TYPEMASK_Z_IGNORE = 4; /* Ignore position z | */
+ public static final int POSITION_TARGET_TYPEMASK_VX_IGNORE = 8; /* Ignore velocity x | */
+ public static final int POSITION_TARGET_TYPEMASK_VY_IGNORE = 16; /* Ignore velocity y | */
+ public static final int POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32; /* Ignore velocity z | */
+ public static final int POSITION_TARGET_TYPEMASK_AX_IGNORE = 64; /* Ignore acceleration x | */
+ public static final int POSITION_TARGET_TYPEMASK_AY_IGNORE = 128; /* Ignore acceleration y | */
+ public static final int POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256; /* Ignore acceleration z | */
+ public static final int POSITION_TARGET_TYPEMASK_FORCE_SET = 512; /* Use force instead of acceleration | */
+ public static final int POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024; /* Ignore yaw | */
+ public static final int POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048; /* Ignore yaw rate | */
+ public static final int POSITION_TARGET_TYPEMASK_ENUM_END = 2049; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/PRECISION_LAND_MODE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/PRECISION_LAND_MODE.java
new file mode 100644
index 0000000..e8398ae
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/PRECISION_LAND_MODE.java
@@ -0,0 +1,17 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Precision land modes (used in MAV_CMD_NAV_LAND).
+ */
+public class PRECISION_LAND_MODE {
+ public static final int PRECISION_LAND_MODE_DISABLED = 0; /* Normal (non-precision) landing. | */
+ public static final int PRECISION_LAND_MODE_OPPORTUNISTIC = 1; /* Use precision landing if beacon detected when land command accepted, otherwise land normally. | */
+ public static final int PRECISION_LAND_MODE_REQUIRED = 2; /* Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found). | */
+ public static final int PRECISION_LAND_MODE_ENUM_END = 3; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/PREFLIGHT_STORAGE_MISSION_ACTION.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/PREFLIGHT_STORAGE_MISSION_ACTION.java
new file mode 100644
index 0000000..e22db61
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/PREFLIGHT_STORAGE_MISSION_ACTION.java
@@ -0,0 +1,20 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ *
+ Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.
+ (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)
+
+ */
+public class PREFLIGHT_STORAGE_MISSION_ACTION {
+ public static final int MISSION_READ_PERSISTENT = 0; /* Read current mission data from persistent storage | */
+ public static final int MISSION_WRITE_PERSISTENT = 1; /* Write current mission data to persistent storage | */
+ public static final int MISSION_RESET_DEFAULT = 2; /* Erase all mission data stored on the vehicle (both persistent and volatile storage) | */
+ public static final int PREFLIGHT_STORAGE_MISSION_ACTION_ENUM_END = 3; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/PREFLIGHT_STORAGE_PARAMETER_ACTION.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/PREFLIGHT_STORAGE_PARAMETER_ACTION.java
new file mode 100644
index 0000000..0394437
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/PREFLIGHT_STORAGE_PARAMETER_ACTION.java
@@ -0,0 +1,22 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ *
+ Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.
+ (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)
+
+ */
+public class PREFLIGHT_STORAGE_PARAMETER_ACTION {
+ public static final int PARAM_READ_PERSISTENT = 0; /* Read all parameters from persistent storage. Replaces values in volatile storage. | */
+ public static final int PARAM_WRITE_PERSISTENT = 1; /* Write all parameter values to persistent storage (flash/EEPROM) | */
+ public static final int PARAM_RESET_CONFIG_DEFAULT = 2; /* Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics. | */
+ public static final int PARAM_RESET_SENSOR_DEFAULT = 3; /* Reset only sensor calibration parameters to factory defaults (or firmware default if not available) | */
+ public static final int PARAM_RESET_ALL_DEFAULT = 4; /* Reset all parameters, including operation counters, to default values | */
+ public static final int PREFLIGHT_STORAGE_PARAMETER_ACTION_ENUM_END = 5; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/RC_SUB_TYPE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/RC_SUB_TYPE.java
new file mode 100644
index 0000000..fcc2162
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/RC_SUB_TYPE.java
@@ -0,0 +1,17 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE.
+ */
+public class RC_SUB_TYPE {
+ public static final int RC_SUB_TYPE_SPEKTRUM_DSM2 = 0; /* Spektrum DSM2 | */
+ public static final int RC_SUB_TYPE_SPEKTRUM_DSMX = 1; /* Spektrum DSMX | */
+ public static final int RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2; /* Spektrum DSMX8 | */
+ public static final int RC_SUB_TYPE_ENUM_END = 3; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/RC_TYPE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/RC_TYPE.java
new file mode 100644
index 0000000..73e2d31
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/RC_TYPE.java
@@ -0,0 +1,16 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * RC type. Used in MAV_CMD_START_RX_PAIR.
+ */
+public class RC_TYPE {
+ public static final int RC_TYPE_SPEKTRUM = 0; /* Spektrum | */
+ public static final int RC_TYPE_CRSF = 1; /* CRSF | */
+ public static final int RC_TYPE_ENUM_END = 2; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/REBOOT_SHUTDOWN_CONDITIONS.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/REBOOT_SHUTDOWN_CONDITIONS.java
new file mode 100644
index 0000000..0d27ba5
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/REBOOT_SHUTDOWN_CONDITIONS.java
@@ -0,0 +1,16 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted.
+ */
+public class REBOOT_SHUTDOWN_CONDITIONS {
+ public static final int REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0; /* Reboot/Shutdown only if allowed by safety checks, such as being landed. | */
+ public static final int REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226; /* Force reboot/shutdown of the autopilot/component regardless of system state. | */
+ public static final int REBOOT_SHUTDOWN_CONDITIONS_ENUM_END = 20190227; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/RTK_BASELINE_COORDINATE_SYSTEM.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/RTK_BASELINE_COORDINATE_SYSTEM.java
new file mode 100644
index 0000000..1580e7b
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/RTK_BASELINE_COORDINATE_SYSTEM.java
@@ -0,0 +1,16 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * RTK GPS baseline coordinate system, used for RTK corrections
+ */
+public class RTK_BASELINE_COORDINATE_SYSTEM {
+ public static final int RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0; /* Earth-centered, Earth-fixed | */
+ public static final int RTK_BASELINE_COORDINATE_SYSTEM_NED = 1; /* RTK basestation centered, north, east, down | */
+ public static final int RTK_BASELINE_COORDINATE_SYSTEM_ENUM_END = 2; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/SAFETY_SWITCH_STATE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/SAFETY_SWITCH_STATE.java
new file mode 100644
index 0000000..95b3991
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/SAFETY_SWITCH_STATE.java
@@ -0,0 +1,18 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ *
+ Possible safety switch states.
+
+ */
+public class SAFETY_SWITCH_STATE {
+ public static final int SAFETY_SWITCH_STATE_SAFE = 0; /* Safety switch is engaged and vehicle should be safe to approach. | */
+ public static final int SAFETY_SWITCH_STATE_DANGEROUS = 1; /* Safety switch is NOT engaged and motors, propellers and other actuators should be considered active. | */
+ public static final int SAFETY_SWITCH_STATE_ENUM_END = 2; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/SERIAL_CONTROL_DEV.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/SERIAL_CONTROL_DEV.java
new file mode 100644
index 0000000..d664cb8
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/SERIAL_CONTROL_DEV.java
@@ -0,0 +1,29 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * SERIAL_CONTROL device types
+ */
+public class SERIAL_CONTROL_DEV {
+ public static final int SERIAL_CONTROL_DEV_TELEM1 = 0; /* First telemetry port | */
+ public static final int SERIAL_CONTROL_DEV_TELEM2 = 1; /* Second telemetry port | */
+ public static final int SERIAL_CONTROL_DEV_GPS1 = 2; /* First GPS port | */
+ public static final int SERIAL_CONTROL_DEV_GPS2 = 3; /* Second GPS port | */
+ public static final int SERIAL_CONTROL_DEV_SHELL = 10; /* system shell | */
+ public static final int SERIAL_CONTROL_SERIAL0 = 100; /* SERIAL0 | */
+ public static final int SERIAL_CONTROL_SERIAL1 = 101; /* SERIAL1 | */
+ public static final int SERIAL_CONTROL_SERIAL2 = 102; /* SERIAL2 | */
+ public static final int SERIAL_CONTROL_SERIAL3 = 103; /* SERIAL3 | */
+ public static final int SERIAL_CONTROL_SERIAL4 = 104; /* SERIAL4 | */
+ public static final int SERIAL_CONTROL_SERIAL5 = 105; /* SERIAL5 | */
+ public static final int SERIAL_CONTROL_SERIAL6 = 106; /* SERIAL6 | */
+ public static final int SERIAL_CONTROL_SERIAL7 = 107; /* SERIAL7 | */
+ public static final int SERIAL_CONTROL_SERIAL8 = 108; /* SERIAL8 | */
+ public static final int SERIAL_CONTROL_SERIAL9 = 109; /* SERIAL9 | */
+ public static final int SERIAL_CONTROL_DEV_ENUM_END = 110; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/SERIAL_CONTROL_FLAG.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/SERIAL_CONTROL_FLAG.java
new file mode 100644
index 0000000..6834a4a
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/SERIAL_CONTROL_FLAG.java
@@ -0,0 +1,19 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * SERIAL_CONTROL flags (bitmask)
+ */
+public class SERIAL_CONTROL_FLAG {
+ public static final int SERIAL_CONTROL_FLAG_REPLY = 1; /* Set if this is a reply | */
+ public static final int SERIAL_CONTROL_FLAG_RESPOND = 2; /* Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message | */
+ public static final int SERIAL_CONTROL_FLAG_EXCLUSIVE = 4; /* Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set | */
+ public static final int SERIAL_CONTROL_FLAG_BLOCKING = 8; /* Block on writes to the serial port | */
+ public static final int SERIAL_CONTROL_FLAG_MULTI = 16; /* Send multiple replies until port is drained | */
+ public static final int SERIAL_CONTROL_FLAG_ENUM_END = 17; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/SET_FOCUS_TYPE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/SET_FOCUS_TYPE.java
new file mode 100644
index 0000000..490441d
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/SET_FOCUS_TYPE.java
@@ -0,0 +1,21 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Focus types for MAV_CMD_SET_CAMERA_FOCUS
+ */
+public class SET_FOCUS_TYPE {
+ public static final int FOCUS_TYPE_STEP = 0; /* Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity). | */
+ public static final int FOCUS_TYPE_CONTINUOUS = 1; /* Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range. | */
+ public static final int FOCUS_TYPE_RANGE = 2; /* Focus value as proportion of full camera focus range (a value between 0.0 and 100.0) | */
+ public static final int FOCUS_TYPE_METERS = 3; /* Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera). | */
+ public static final int FOCUS_TYPE_AUTO = 4; /* Focus automatically. | */
+ public static final int FOCUS_TYPE_AUTO_SINGLE = 5; /* Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S. | */
+ public static final int FOCUS_TYPE_AUTO_CONTINUOUS = 6; /* Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C. | */
+ public static final int SET_FOCUS_TYPE_ENUM_END = 7; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/SPEED_TYPE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/SPEED_TYPE.java
new file mode 100644
index 0000000..9ca1922
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/SPEED_TYPE.java
@@ -0,0 +1,18 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED
+ */
+public class SPEED_TYPE {
+ public static final int SPEED_TYPE_AIRSPEED = 0; /* Airspeed | */
+ public static final int SPEED_TYPE_GROUNDSPEED = 1; /* Groundspeed | */
+ public static final int SPEED_TYPE_CLIMB_SPEED = 2; /* Climb speed | */
+ public static final int SPEED_TYPE_DESCENT_SPEED = 3; /* Descent speed | */
+ public static final int SPEED_TYPE_ENUM_END = 4; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/STORAGE_STATUS.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/STORAGE_STATUS.java
new file mode 100644
index 0000000..01aca5b
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/STORAGE_STATUS.java
@@ -0,0 +1,18 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Flags to indicate the status of camera storage.
+ */
+public class STORAGE_STATUS {
+ public static final int STORAGE_STATUS_EMPTY = 0; /* Storage is missing (no microSD card loaded for example.) | */
+ public static final int STORAGE_STATUS_UNFORMATTED = 1; /* Storage present but unformatted. | */
+ public static final int STORAGE_STATUS_READY = 2; /* Storage present and ready. | */
+ public static final int STORAGE_STATUS_NOT_SUPPORTED = 3; /* Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored. | */
+ public static final int STORAGE_STATUS_ENUM_END = 4; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/STORAGE_TYPE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/STORAGE_TYPE.java
new file mode 100644
index 0000000..c2b3160
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/STORAGE_TYPE.java
@@ -0,0 +1,23 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Flags to indicate the type of storage.
+ */
+public class STORAGE_TYPE {
+ public static final int STORAGE_TYPE_UNKNOWN = 0; /* Storage type is not known. | */
+ public static final int STORAGE_TYPE_USB_STICK = 1; /* Storage type is USB device. | */
+ public static final int STORAGE_TYPE_SD = 2; /* Storage type is SD card. | */
+ public static final int STORAGE_TYPE_MICROSD = 3; /* Storage type is microSD card. | */
+ public static final int STORAGE_TYPE_CF = 4; /* Storage type is CFast. | */
+ public static final int STORAGE_TYPE_CFE = 5; /* Storage type is CFexpress. | */
+ public static final int STORAGE_TYPE_XQD = 6; /* Storage type is XQD. | */
+ public static final int STORAGE_TYPE_HD = 7; /* Storage type is HD mass storage type. | */
+ public static final int STORAGE_TYPE_OTHER = 254; /* Storage type is other, not listed type. | */
+ public static final int STORAGE_TYPE_ENUM_END = 255; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/STORAGE_USAGE_FLAG.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/STORAGE_USAGE_FLAG.java
new file mode 100644
index 0000000..09f77a5
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/STORAGE_USAGE_FLAG.java
@@ -0,0 +1,18 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE).
+ */
+public class STORAGE_USAGE_FLAG {
+ public static final int STORAGE_USAGE_FLAG_SET = 1; /* Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported). | */
+ public static final int STORAGE_USAGE_FLAG_PHOTO = 2; /* Storage for saving photos. | */
+ public static final int STORAGE_USAGE_FLAG_VIDEO = 4; /* Storage for saving videos. | */
+ public static final int STORAGE_USAGE_FLAG_LOGS = 8; /* Storage for saving logs. | */
+ public static final int STORAGE_USAGE_FLAG_ENUM_END = 9; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/TUNE_FORMAT.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/TUNE_FORMAT.java
new file mode 100644
index 0000000..4920c5e
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/TUNE_FORMAT.java
@@ -0,0 +1,16 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Tune formats (used for vehicle buzzer/tone generation).
+ */
+public class TUNE_FORMAT {
+ public static final int TUNE_FORMAT_QBASIC1_1 = 1; /* Format is QBasic 1.1 Play: https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm. | */
+ public static final int TUNE_FORMAT_MML_MODERN = 2; /* Format is Modern Music Markup Language (MML): https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML. | */
+ public static final int TUNE_FORMAT_ENUM_END = 3; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/UAVCAN_NODE_HEALTH.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/UAVCAN_NODE_HEALTH.java
new file mode 100644
index 0000000..8c7dbec
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/UAVCAN_NODE_HEALTH.java
@@ -0,0 +1,18 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Generalized UAVCAN node health
+ */
+public class UAVCAN_NODE_HEALTH {
+ public static final int UAVCAN_NODE_HEALTH_OK = 0; /* The node is functioning properly. | */
+ public static final int UAVCAN_NODE_HEALTH_WARNING = 1; /* A critical parameter went out of range or the node has encountered a minor failure. | */
+ public static final int UAVCAN_NODE_HEALTH_ERROR = 2; /* The node has encountered a major failure. | */
+ public static final int UAVCAN_NODE_HEALTH_CRITICAL = 3; /* The node has suffered a fatal malfunction. | */
+ public static final int UAVCAN_NODE_HEALTH_ENUM_END = 4; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/UAVCAN_NODE_MODE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/UAVCAN_NODE_MODE.java
new file mode 100644
index 0000000..b1f1979
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/UAVCAN_NODE_MODE.java
@@ -0,0 +1,19 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Generalized UAVCAN node mode
+ */
+public class UAVCAN_NODE_MODE {
+ public static final int UAVCAN_NODE_MODE_OPERATIONAL = 0; /* The node is performing its primary functions. | */
+ public static final int UAVCAN_NODE_MODE_INITIALIZATION = 1; /* The node is initializing; this mode is entered immediately after startup. | */
+ public static final int UAVCAN_NODE_MODE_MAINTENANCE = 2; /* The node is under maintenance. | */
+ public static final int UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3; /* The node is in the process of updating its software. | */
+ public static final int UAVCAN_NODE_MODE_OFFLINE = 7; /* The node is no longer available online. | */
+ public static final int UAVCAN_NODE_MODE_ENUM_END = 8; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/UTM_DATA_AVAIL_FLAGS.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/UTM_DATA_AVAIL_FLAGS.java
new file mode 100644
index 0000000..6437c4f
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/UTM_DATA_AVAIL_FLAGS.java
@@ -0,0 +1,22 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Flags for the global position report.
+ */
+public class UTM_DATA_AVAIL_FLAGS {
+ public static final int UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1; /* The field time contains valid data. | */
+ public static final int UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2; /* The field uas_id contains valid data. | */
+ public static final int UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4; /* The fields lat, lon and h_acc contain valid data. | */
+ public static final int UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8; /* The fields alt and v_acc contain valid data. | */
+ public static final int UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16; /* The field relative_alt contains valid data. | */
+ public static final int UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32; /* The fields vx and vy contain valid data. | */
+ public static final int UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64; /* The field vz contains valid data. | */
+ public static final int UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128; /* The fields next_lat, next_lon and next_alt contain valid data. | */
+ public static final int UTM_DATA_AVAIL_FLAGS_ENUM_END = 129; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/UTM_FLIGHT_STATE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/UTM_FLIGHT_STATE.java
new file mode 100644
index 0000000..df180cf
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/UTM_FLIGHT_STATE.java
@@ -0,0 +1,19 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Airborne status of UAS.
+ */
+public class UTM_FLIGHT_STATE {
+ public static final int UTM_FLIGHT_STATE_UNKNOWN = 1; /* The flight state can't be determined. | */
+ public static final int UTM_FLIGHT_STATE_GROUND = 2; /* UAS on ground. | */
+ public static final int UTM_FLIGHT_STATE_AIRBORNE = 3; /* UAS airborne. | */
+ public static final int UTM_FLIGHT_STATE_EMERGENCY = 16; /* UAS is in an emergency flight state. | */
+ public static final int UTM_FLIGHT_STATE_NOCTRL = 32; /* UAS has no active controls. | */
+ public static final int UTM_FLIGHT_STATE_ENUM_END = 33; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/VIDEO_STREAM_ENCODING.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/VIDEO_STREAM_ENCODING.java
new file mode 100644
index 0000000..8dba580
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/VIDEO_STREAM_ENCODING.java
@@ -0,0 +1,17 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Video stream encodings
+ */
+public class VIDEO_STREAM_ENCODING {
+ public static final int VIDEO_STREAM_ENCODING_UNKNOWN = 0; /* Stream encoding is unknown | */
+ public static final int VIDEO_STREAM_ENCODING_H264 = 1; /* Stream encoding is H.264 | */
+ public static final int VIDEO_STREAM_ENCODING_H265 = 2; /* Stream encoding is H.265 | */
+ public static final int VIDEO_STREAM_ENCODING_ENUM_END = 3; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/VIDEO_STREAM_STATUS_FLAGS.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/VIDEO_STREAM_STATUS_FLAGS.java
new file mode 100644
index 0000000..383e1e6
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/VIDEO_STREAM_STATUS_FLAGS.java
@@ -0,0 +1,17 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Stream status flags (Bitmap)
+ */
+public class VIDEO_STREAM_STATUS_FLAGS {
+ public static final int VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1; /* Stream is active (running) | */
+ public static final int VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2; /* Stream is thermal imaging | */
+ public static final int VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4; /* Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE). | */
+ public static final int VIDEO_STREAM_STATUS_FLAGS_ENUM_END = 5; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/VIDEO_STREAM_TYPE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/VIDEO_STREAM_TYPE.java
new file mode 100644
index 0000000..5b1b09b
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/VIDEO_STREAM_TYPE.java
@@ -0,0 +1,18 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Video stream types
+ */
+public class VIDEO_STREAM_TYPE {
+ public static final int VIDEO_STREAM_TYPE_RTSP = 0; /* Stream is RTSP | */
+ public static final int VIDEO_STREAM_TYPE_RTPUDP = 1; /* Stream is RTP UDP (URI gives the port number) | */
+ public static final int VIDEO_STREAM_TYPE_TCP_MPEG = 2; /* Stream is MPEG on TCP | */
+ public static final int VIDEO_STREAM_TYPE_MPEG_TS = 3; /* Stream is MPEG TS (URI gives the port number) | */
+ public static final int VIDEO_STREAM_TYPE_ENUM_END = 4; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/VTOL_TRANSITION_HEADING.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/VTOL_TRANSITION_HEADING.java
new file mode 100644
index 0000000..590e3be
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/VTOL_TRANSITION_HEADING.java
@@ -0,0 +1,19 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Direction of VTOL transition
+ */
+public class VTOL_TRANSITION_HEADING {
+ public static final int VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0; /* Respect the heading configuration of the vehicle. | */
+ public static final int VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1; /* Use the heading pointing towards the next waypoint. | */
+ public static final int VTOL_TRANSITION_HEADING_TAKEOFF = 2; /* Use the heading on takeoff (while sitting on the ground). | */
+ public static final int VTOL_TRANSITION_HEADING_SPECIFIED = 3; /* Use the specified heading in parameter 4. | */
+ public static final int VTOL_TRANSITION_HEADING_ANY = 4; /* Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active). | */
+ public static final int VTOL_TRANSITION_HEADING_ENUM_END = 5; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/WIFI_CONFIG_AP_MODE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/WIFI_CONFIG_AP_MODE.java
new file mode 100644
index 0000000..3efcb1e
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/WIFI_CONFIG_AP_MODE.java
@@ -0,0 +1,18 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * WiFi Mode.
+ */
+public class WIFI_CONFIG_AP_MODE {
+ public static final int WIFI_CONFIG_AP_MODE_UNDEFINED = 0; /* WiFi mode is undefined. | */
+ public static final int WIFI_CONFIG_AP_MODE_AP = 1; /* WiFi configured as an access point. | */
+ public static final int WIFI_CONFIG_AP_MODE_STATION = 2; /* WiFi configured as a station connected to an existing local WiFi network. | */
+ public static final int WIFI_CONFIG_AP_MODE_DISABLED = 3; /* WiFi disabled. | */
+ public static final int WIFI_CONFIG_AP_MODE_ENUM_END = 4; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/WIFI_CONFIG_AP_RESPONSE.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/WIFI_CONFIG_AP_RESPONSE.java
new file mode 100644
index 0000000..74d5e6a
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/WIFI_CONFIG_AP_RESPONSE.java
@@ -0,0 +1,20 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Possible responses from a WIFI_CONFIG_AP message.
+ */
+public class WIFI_CONFIG_AP_RESPONSE {
+ public static final int WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0; /* Undefined response. Likely an indicative of a system that doesn't support this request. | */
+ public static final int WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1; /* Changes accepted. | */
+ public static final int WIFI_CONFIG_AP_RESPONSE_REJECTED = 2; /* Changes rejected. | */
+ public static final int WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3; /* Invalid Mode. | */
+ public static final int WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4; /* Invalid SSID. | */
+ public static final int WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5; /* Invalid Password. | */
+ public static final int WIFI_CONFIG_AP_RESPONSE_ENUM_END = 6; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/WINCH_ACTIONS.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/WINCH_ACTIONS.java
new file mode 100644
index 0000000..2dca901
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/enums/WINCH_ACTIONS.java
@@ -0,0 +1,24 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.enums;
+
+/**
+ * Winch actions.
+ */
+public class WINCH_ACTIONS {
+ public static final int WINCH_RELAXED = 0; /* Allow motor to freewheel. | */
+ public static final int WINCH_RELATIVE_LENGTH_CONTROL = 1; /* Wind or unwind specified length of line, optionally using specified rate. | */
+ public static final int WINCH_RATE_CONTROL = 2; /* Wind or unwind line at specified rate. | */
+ public static final int WINCH_LOCK = 3; /* Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored. | */
+ public static final int WINCH_DELIVER = 4; /* Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored. | */
+ public static final int WINCH_HOLD = 5; /* Engage motor and hold current position. Only action and instance command parameters are used, others are ignored. | */
+ public static final int WINCH_RETRACT = 6; /* Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored. | */
+ public static final int WINCH_LOAD_LINE = 7; /* Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored. | */
+ public static final int WINCH_ABANDON_LINE = 8; /* Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored. | */
+ public static final int WINCH_LOAD_PAYLOAD = 9; /* Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored | */
+ public static final int WINCH_ACTIONS_ENUM_END = 10; /* | */
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/minimal/CRC.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/minimal/CRC.java
new file mode 100644
index 0000000..3a47e6e
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/minimal/CRC.java
@@ -0,0 +1,80 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.minimal;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * CRC-16/MCRF4XX calculation for MAVlink messages. The checksum must be
+ * initialized, updated with which field of the message, and then finished with
+ * the message id.
+ *
+ */
+public class CRC {
+ private static final Map MAVLINK_MESSAGE_CRCS;
+ private static final int CRC_INIT_VALUE = 0xffff;
+ private int crcValue;
+
+ static {
+ MAVLINK_MESSAGE_CRCS = new HashMap<>();
+ MAVLINK_MESSAGE_CRCS.put(0, 50);
+ MAVLINK_MESSAGE_CRCS.put(300, 217);
+
+ }
+
+ /**
+ * Accumulate the CRC by adding one char at a time.
+ *
+ * The checksum function adds the hash of one char at a time to the 16 bit
+ * checksum (uint16_t).
+ *
+ * @param data new char to hash
+ **/
+ public void update_checksum(int data) {
+ data = data & 0xff; //cast because we want an unsigned type
+ int tmp = data ^ (crcValue & 0xff);
+ tmp ^= (tmp << 4) & 0xff;
+ crcValue = ((crcValue >> 8) & 0xff) ^ (tmp << 8) ^ (tmp << 3) ^ ((tmp >> 4) & 0xf);
+ }
+
+ /**
+ * Finish the CRC calculation of a message, by running the CRC with the
+ * Magic Byte.
+ *
+ * @param msgid The message id number
+ * @return boolean True if the checksum was successfully finished. Otherwise false
+ */
+ public boolean finish_checksum(int msgid) {
+ if (MAVLINK_MESSAGE_CRCS.containsKey(msgid)) {
+ update_checksum(MAVLINK_MESSAGE_CRCS.get(msgid));
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Initialize the buffer for the CRC16/MCRF4XX
+ */
+ public void start_checksum() {
+ crcValue = CRC_INIT_VALUE;
+ }
+
+ public int getMSB() {
+ return ((crcValue >> 8) & 0xff);
+ }
+
+ public int getLSB() {
+ return (crcValue & 0xff);
+ }
+
+ public CRC() {
+ start_checksum();
+ }
+
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/minimal/msg_heartbeat.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/minimal/msg_heartbeat.java
new file mode 100644
index 0000000..dae08ad
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/minimal/msg_heartbeat.java
@@ -0,0 +1,211 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+// MESSAGE HEARTBEAT PACKING
+package com.example.longyi_groundstation.MAVLink.minimal;
+
+
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.Description;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload;
+import com.example.longyi_groundstation.MAVLink.Messages.Units;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+/**
+ * The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at https://mavlink.io/en/services/heartbeat.html
+ */
+public class msg_heartbeat extends MAVLinkMessage {
+
+ public static final int MAVLINK_MSG_ID_HEARTBEAT = 0;
+ public static final int MAVLINK_MSG_LENGTH = 9;
+ private static final long serialVersionUID = MAVLINK_MSG_ID_HEARTBEAT;
+
+
+ /**
+ * A bitfield for use for autopilot-specific flags
+ */
+ @Description("A bitfield for use for autopilot-specific flags")
+ @Units("")
+ public long custom_mode;
+
+ /**
+ * Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type.
+ */
+ @Description("Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type.")
+ @Units("")
+ public short type;
+
+ /**
+ * Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers.
+ */
+ @Description("Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers.")
+ @Units("")
+ public short autopilot;
+
+ /**
+ * System mode bitmap.
+ */
+ @Description("System mode bitmap.")
+ @Units("")
+ public short base_mode;
+
+ /**
+ * System status flag.
+ */
+ @Description("System status flag.")
+ @Units("")
+ public short system_status;
+
+ /**
+ * MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version
+ */
+ @Description("MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version")
+ @Units("")
+ public short mavlink_version;
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_HEARTBEAT;
+
+ packet.payload.putUnsignedInt(custom_mode);
+ packet.payload.putUnsignedByte(type);
+ packet.payload.putUnsignedByte(autopilot);
+ packet.payload.putUnsignedByte(base_mode);
+ packet.payload.putUnsignedByte(system_status);
+ packet.payload.putUnsignedByte(mavlink_version);
+
+ if (isMavlink2) {
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a heartbeat message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.custom_mode = payload.getUnsignedInt();
+ this.type = payload.getUnsignedByte();
+ this.autopilot = payload.getUnsignedByte();
+ this.base_mode = payload.getUnsignedByte();
+ this.system_status = payload.getUnsignedByte();
+ this.mavlink_version = payload.getUnsignedByte();
+
+ if (isMavlink2) {
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_heartbeat() {
+ this.msgid = MAVLINK_MSG_ID_HEARTBEAT;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_heartbeat( long custom_mode, short type, short autopilot, short base_mode, short system_status, short mavlink_version) {
+ this.msgid = MAVLINK_MSG_ID_HEARTBEAT;
+
+ this.custom_mode = custom_mode;
+ this.type = type;
+ this.autopilot = autopilot;
+ this.base_mode = base_mode;
+ this.system_status = system_status;
+ this.mavlink_version = mavlink_version;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_heartbeat( long custom_mode, short type, short autopilot, short base_mode, short system_status, short mavlink_version, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_HEARTBEAT;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.custom_mode = custom_mode;
+ this.type = type;
+ this.autopilot = autopilot;
+ this.base_mode = base_mode;
+ this.system_status = system_status;
+ this.mavlink_version = mavlink_version;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_heartbeat(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_HEARTBEAT;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Returns a string with the MSG name and data
+ */
+ @Override
+ public String toString() {
+ JSONObject jsonObject = new JSONObject();
+ try {
+ jsonObject.put("msgid",MAVLINK_MSG_ID_HEARTBEAT);
+ jsonObject.put("sysid",sysid);
+ jsonObject.put("compid",compid);
+ jsonObject.put("custom_mode",custom_mode);
+ jsonObject.put("type",type);
+ jsonObject.put("autopilot",autopilot);
+ jsonObject.put("base_mode",base_mode);
+ jsonObject.put("system_status",system_status);
+ jsonObject.put("mavlink_version",mavlink_version);
+ return jsonObject.toString();
+ } catch (JSONException e) {
+ return null;
+ }
+// return "MAVLINK_MSG_ID_HEARTBEAT - sysid:"+sysid
+// +" compid:"+compid
+// +" custom_mode:"+custom_mode
+// +" type:"+type
+// +" autopilot:"+autopilot
+// +" base_mode:"+base_mode
+// +" system_status:"+system_status
+// +" mavlink_version:"+mavlink_version+"";
+ }
+
+ /**
+ * Returns a human-readable string of the name of the message
+ */
+ @Override
+ public String name() {
+ return "MAVLINK_MSG_ID_HEARTBEAT";
+ }
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/minimal/msg_protocol_version.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/minimal/msg_protocol_version.java
new file mode 100644
index 0000000..5c4b36c
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/minimal/msg_protocol_version.java
@@ -0,0 +1,189 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+// MESSAGE PROTOCOL_VERSION PACKING
+package com.example.longyi_groundstation.MAVLink.minimal;
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload;
+import com.example.longyi_groundstation.MAVLink.Messages.Units;
+import com.example.longyi_groundstation.MAVLink.Messages.Description;
+
+/**
+ * Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly.
+ */
+public class msg_protocol_version extends MAVLinkMessage {
+
+ public static final int MAVLINK_MSG_ID_PROTOCOL_VERSION = 300;
+ public static final int MAVLINK_MSG_LENGTH = 22;
+ private static final long serialVersionUID = MAVLINK_MSG_ID_PROTOCOL_VERSION;
+
+
+ /**
+ * Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc.
+ */
+ @Description("Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc.")
+ @Units("")
+ public int version;
+
+ /**
+ * Minimum MAVLink version supported
+ */
+ @Description("Minimum MAVLink version supported")
+ @Units("")
+ public int min_version;
+
+ /**
+ * Maximum MAVLink version supported (set to the same value as version by default)
+ */
+ @Description("Maximum MAVLink version supported (set to the same value as version by default)")
+ @Units("")
+ public int max_version;
+
+ /**
+ * The first 8 bytes (not characters printed in hex!) of the git hash.
+ */
+ @Description("The first 8 bytes (not characters printed in hex!) of the git hash.")
+ @Units("")
+ public short spec_version_hash[] = new short[8];
+
+ /**
+ * The first 8 bytes (not characters printed in hex!) of the git hash.
+ */
+ @Description("The first 8 bytes (not characters printed in hex!) of the git hash.")
+ @Units("")
+ public short library_version_hash[] = new short[8];
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_PROTOCOL_VERSION;
+
+ packet.payload.putUnsignedShort(version);
+ packet.payload.putUnsignedShort(min_version);
+ packet.payload.putUnsignedShort(max_version);
+
+ for (int i = 0; i < spec_version_hash.length; i++) {
+ packet.payload.putUnsignedByte(spec_version_hash[i]);
+ }
+
+
+ for (int i = 0; i < library_version_hash.length; i++) {
+ packet.payload.putUnsignedByte(library_version_hash[i]);
+ }
+
+
+ if (isMavlink2) {
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a protocol_version message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.version = payload.getUnsignedShort();
+ this.min_version = payload.getUnsignedShort();
+ this.max_version = payload.getUnsignedShort();
+
+ for (int i = 0; i < this.spec_version_hash.length; i++) {
+ this.spec_version_hash[i] = payload.getUnsignedByte();
+ }
+
+
+ for (int i = 0; i < this.library_version_hash.length; i++) {
+ this.library_version_hash[i] = payload.getUnsignedByte();
+ }
+
+
+ if (isMavlink2) {
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_protocol_version() {
+ this.msgid = MAVLINK_MSG_ID_PROTOCOL_VERSION;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_protocol_version( int version, int min_version, int max_version, short[] spec_version_hash, short[] library_version_hash) {
+ this.msgid = MAVLINK_MSG_ID_PROTOCOL_VERSION;
+
+ this.version = version;
+ this.min_version = min_version;
+ this.max_version = max_version;
+ this.spec_version_hash = spec_version_hash;
+ this.library_version_hash = library_version_hash;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_protocol_version( int version, int min_version, int max_version, short[] spec_version_hash, short[] library_version_hash, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_PROTOCOL_VERSION;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.version = version;
+ this.min_version = min_version;
+ this.max_version = max_version;
+ this.spec_version_hash = spec_version_hash;
+ this.library_version_hash = library_version_hash;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_protocol_version(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_PROTOCOL_VERSION;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Returns a string with the MSG name and data
+ */
+ @Override
+ public String toString() {
+ return "MAVLINK_MSG_ID_PROTOCOL_VERSION - sysid:"+sysid+" compid:"+compid+" version:"+version+" min_version:"+min_version+" max_version:"+max_version+" spec_version_hash:"+spec_version_hash+" library_version_hash:"+library_version_hash+"";
+ }
+
+ /**
+ * Returns a human-readable string of the name of the message
+ */
+ @Override
+ public String name() {
+ return "MAVLINK_MSG_ID_PROTOCOL_VERSION";
+ }
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/paparazzi/CRC.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/paparazzi/CRC.java
new file mode 100644
index 0000000..d46a9a9
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/paparazzi/CRC.java
@@ -0,0 +1,312 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+package com.example.longyi_groundstation.MAVLink.paparazzi;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * CRC-16/MCRF4XX calculation for MAVlink messages. The checksum must be
+ * initialized, updated with which field of the message, and then finished with
+ * the message id.
+ *
+ */
+public class CRC {
+ private static final Map MAVLINK_MESSAGE_CRCS;
+ private static final int CRC_INIT_VALUE = 0xffff;
+ private int crcValue;
+
+ static {
+ MAVLINK_MESSAGE_CRCS = new HashMap<>();
+ MAVLINK_MESSAGE_CRCS.put(0, 50);
+ MAVLINK_MESSAGE_CRCS.put(1, 124);
+ MAVLINK_MESSAGE_CRCS.put(2, 137);
+ MAVLINK_MESSAGE_CRCS.put(4, 237);
+ MAVLINK_MESSAGE_CRCS.put(5, 217);
+ MAVLINK_MESSAGE_CRCS.put(6, 104);
+ MAVLINK_MESSAGE_CRCS.put(7, 119);
+ MAVLINK_MESSAGE_CRCS.put(8, 117);
+ MAVLINK_MESSAGE_CRCS.put(11, 89);
+ MAVLINK_MESSAGE_CRCS.put(20, 214);
+ MAVLINK_MESSAGE_CRCS.put(21, 159);
+ MAVLINK_MESSAGE_CRCS.put(22, 220);
+ MAVLINK_MESSAGE_CRCS.put(23, 168);
+ MAVLINK_MESSAGE_CRCS.put(24, 24);
+ MAVLINK_MESSAGE_CRCS.put(25, 23);
+ MAVLINK_MESSAGE_CRCS.put(26, 170);
+ MAVLINK_MESSAGE_CRCS.put(27, 144);
+ MAVLINK_MESSAGE_CRCS.put(28, 67);
+ MAVLINK_MESSAGE_CRCS.put(29, 115);
+ MAVLINK_MESSAGE_CRCS.put(30, 39);
+ MAVLINK_MESSAGE_CRCS.put(31, 246);
+ MAVLINK_MESSAGE_CRCS.put(32, 185);
+ MAVLINK_MESSAGE_CRCS.put(33, 104);
+ MAVLINK_MESSAGE_CRCS.put(34, 237);
+ MAVLINK_MESSAGE_CRCS.put(35, 244);
+ MAVLINK_MESSAGE_CRCS.put(36, 222);
+ MAVLINK_MESSAGE_CRCS.put(37, 212);
+ MAVLINK_MESSAGE_CRCS.put(38, 9);
+ MAVLINK_MESSAGE_CRCS.put(39, 254);
+ MAVLINK_MESSAGE_CRCS.put(40, 230);
+ MAVLINK_MESSAGE_CRCS.put(41, 28);
+ MAVLINK_MESSAGE_CRCS.put(42, 28);
+ MAVLINK_MESSAGE_CRCS.put(43, 132);
+ MAVLINK_MESSAGE_CRCS.put(44, 221);
+ MAVLINK_MESSAGE_CRCS.put(45, 232);
+ MAVLINK_MESSAGE_CRCS.put(46, 11);
+ MAVLINK_MESSAGE_CRCS.put(47, 153);
+ MAVLINK_MESSAGE_CRCS.put(48, 41);
+ MAVLINK_MESSAGE_CRCS.put(49, 39);
+ MAVLINK_MESSAGE_CRCS.put(50, 78);
+ MAVLINK_MESSAGE_CRCS.put(51, 196);
+ MAVLINK_MESSAGE_CRCS.put(54, 15);
+ MAVLINK_MESSAGE_CRCS.put(55, 3);
+ MAVLINK_MESSAGE_CRCS.put(61, 167);
+ MAVLINK_MESSAGE_CRCS.put(62, 183);
+ MAVLINK_MESSAGE_CRCS.put(63, 119);
+ MAVLINK_MESSAGE_CRCS.put(64, 191);
+ MAVLINK_MESSAGE_CRCS.put(65, 118);
+ MAVLINK_MESSAGE_CRCS.put(66, 148);
+ MAVLINK_MESSAGE_CRCS.put(67, 21);
+ MAVLINK_MESSAGE_CRCS.put(69, 243);
+ MAVLINK_MESSAGE_CRCS.put(70, 124);
+ MAVLINK_MESSAGE_CRCS.put(73, 38);
+ MAVLINK_MESSAGE_CRCS.put(74, 20);
+ MAVLINK_MESSAGE_CRCS.put(75, 158);
+ MAVLINK_MESSAGE_CRCS.put(76, 152);
+ MAVLINK_MESSAGE_CRCS.put(77, 143);
+ MAVLINK_MESSAGE_CRCS.put(80, 14);
+ MAVLINK_MESSAGE_CRCS.put(81, 106);
+ MAVLINK_MESSAGE_CRCS.put(82, 49);
+ MAVLINK_MESSAGE_CRCS.put(83, 22);
+ MAVLINK_MESSAGE_CRCS.put(84, 143);
+ MAVLINK_MESSAGE_CRCS.put(85, 140);
+ MAVLINK_MESSAGE_CRCS.put(86, 5);
+ MAVLINK_MESSAGE_CRCS.put(87, 150);
+ MAVLINK_MESSAGE_CRCS.put(89, 231);
+ MAVLINK_MESSAGE_CRCS.put(90, 183);
+ MAVLINK_MESSAGE_CRCS.put(91, 63);
+ MAVLINK_MESSAGE_CRCS.put(92, 54);
+ MAVLINK_MESSAGE_CRCS.put(93, 47);
+ MAVLINK_MESSAGE_CRCS.put(100, 175);
+ MAVLINK_MESSAGE_CRCS.put(101, 102);
+ MAVLINK_MESSAGE_CRCS.put(102, 158);
+ MAVLINK_MESSAGE_CRCS.put(103, 208);
+ MAVLINK_MESSAGE_CRCS.put(104, 56);
+ MAVLINK_MESSAGE_CRCS.put(105, 93);
+ MAVLINK_MESSAGE_CRCS.put(106, 138);
+ MAVLINK_MESSAGE_CRCS.put(107, 108);
+ MAVLINK_MESSAGE_CRCS.put(108, 32);
+ MAVLINK_MESSAGE_CRCS.put(109, 185);
+ MAVLINK_MESSAGE_CRCS.put(110, 84);
+ MAVLINK_MESSAGE_CRCS.put(111, 34);
+ MAVLINK_MESSAGE_CRCS.put(112, 174);
+ MAVLINK_MESSAGE_CRCS.put(113, 124);
+ MAVLINK_MESSAGE_CRCS.put(114, 237);
+ MAVLINK_MESSAGE_CRCS.put(115, 4);
+ MAVLINK_MESSAGE_CRCS.put(116, 76);
+ MAVLINK_MESSAGE_CRCS.put(117, 128);
+ MAVLINK_MESSAGE_CRCS.put(118, 56);
+ MAVLINK_MESSAGE_CRCS.put(119, 116);
+ MAVLINK_MESSAGE_CRCS.put(120, 134);
+ MAVLINK_MESSAGE_CRCS.put(121, 237);
+ MAVLINK_MESSAGE_CRCS.put(122, 203);
+ MAVLINK_MESSAGE_CRCS.put(123, 250);
+ MAVLINK_MESSAGE_CRCS.put(124, 87);
+ MAVLINK_MESSAGE_CRCS.put(125, 203);
+ MAVLINK_MESSAGE_CRCS.put(126, 220);
+ MAVLINK_MESSAGE_CRCS.put(127, 25);
+ MAVLINK_MESSAGE_CRCS.put(128, 226);
+ MAVLINK_MESSAGE_CRCS.put(129, 46);
+ MAVLINK_MESSAGE_CRCS.put(130, 29);
+ MAVLINK_MESSAGE_CRCS.put(131, 223);
+ MAVLINK_MESSAGE_CRCS.put(132, 85);
+ MAVLINK_MESSAGE_CRCS.put(133, 6);
+ MAVLINK_MESSAGE_CRCS.put(134, 229);
+ MAVLINK_MESSAGE_CRCS.put(135, 203);
+ MAVLINK_MESSAGE_CRCS.put(136, 1);
+ MAVLINK_MESSAGE_CRCS.put(137, 195);
+ MAVLINK_MESSAGE_CRCS.put(138, 109);
+ MAVLINK_MESSAGE_CRCS.put(139, 168);
+ MAVLINK_MESSAGE_CRCS.put(140, 181);
+ MAVLINK_MESSAGE_CRCS.put(141, 47);
+ MAVLINK_MESSAGE_CRCS.put(142, 72);
+ MAVLINK_MESSAGE_CRCS.put(143, 131);
+ MAVLINK_MESSAGE_CRCS.put(144, 127);
+ MAVLINK_MESSAGE_CRCS.put(146, 103);
+ MAVLINK_MESSAGE_CRCS.put(147, 154);
+ MAVLINK_MESSAGE_CRCS.put(148, 178);
+ MAVLINK_MESSAGE_CRCS.put(149, 200);
+ MAVLINK_MESSAGE_CRCS.put(162, 189);
+ MAVLINK_MESSAGE_CRCS.put(180, 231);
+ MAVLINK_MESSAGE_CRCS.put(181, 129);
+ MAVLINK_MESSAGE_CRCS.put(182, 115);
+ MAVLINK_MESSAGE_CRCS.put(183, 186);
+ MAVLINK_MESSAGE_CRCS.put(184, 40);
+ MAVLINK_MESSAGE_CRCS.put(192, 36);
+ MAVLINK_MESSAGE_CRCS.put(225, 208);
+ MAVLINK_MESSAGE_CRCS.put(230, 163);
+ MAVLINK_MESSAGE_CRCS.put(231, 105);
+ MAVLINK_MESSAGE_CRCS.put(232, 151);
+ MAVLINK_MESSAGE_CRCS.put(233, 35);
+ MAVLINK_MESSAGE_CRCS.put(234, 150);
+ MAVLINK_MESSAGE_CRCS.put(235, 179);
+ MAVLINK_MESSAGE_CRCS.put(241, 90);
+ MAVLINK_MESSAGE_CRCS.put(242, 104);
+ MAVLINK_MESSAGE_CRCS.put(243, 85);
+ MAVLINK_MESSAGE_CRCS.put(244, 95);
+ MAVLINK_MESSAGE_CRCS.put(245, 130);
+ MAVLINK_MESSAGE_CRCS.put(246, 184);
+ MAVLINK_MESSAGE_CRCS.put(247, 81);
+ MAVLINK_MESSAGE_CRCS.put(248, 8);
+ MAVLINK_MESSAGE_CRCS.put(249, 204);
+ MAVLINK_MESSAGE_CRCS.put(250, 49);
+ MAVLINK_MESSAGE_CRCS.put(251, 170);
+ MAVLINK_MESSAGE_CRCS.put(252, 44);
+ MAVLINK_MESSAGE_CRCS.put(253, 83);
+ MAVLINK_MESSAGE_CRCS.put(254, 46);
+ MAVLINK_MESSAGE_CRCS.put(256, 71);
+ MAVLINK_MESSAGE_CRCS.put(257, 131);
+ MAVLINK_MESSAGE_CRCS.put(258, 187);
+ MAVLINK_MESSAGE_CRCS.put(259, 92);
+ MAVLINK_MESSAGE_CRCS.put(260, 146);
+ MAVLINK_MESSAGE_CRCS.put(261, 179);
+ MAVLINK_MESSAGE_CRCS.put(262, 12);
+ MAVLINK_MESSAGE_CRCS.put(263, 133);
+ MAVLINK_MESSAGE_CRCS.put(264, 49);
+ MAVLINK_MESSAGE_CRCS.put(265, 26);
+ MAVLINK_MESSAGE_CRCS.put(266, 193);
+ MAVLINK_MESSAGE_CRCS.put(267, 35);
+ MAVLINK_MESSAGE_CRCS.put(268, 14);
+ MAVLINK_MESSAGE_CRCS.put(269, 109);
+ MAVLINK_MESSAGE_CRCS.put(270, 59);
+ MAVLINK_MESSAGE_CRCS.put(271, 22);
+ MAVLINK_MESSAGE_CRCS.put(275, 126);
+ MAVLINK_MESSAGE_CRCS.put(276, 18);
+ MAVLINK_MESSAGE_CRCS.put(277, 62);
+ MAVLINK_MESSAGE_CRCS.put(280, 70);
+ MAVLINK_MESSAGE_CRCS.put(281, 48);
+ MAVLINK_MESSAGE_CRCS.put(282, 123);
+ MAVLINK_MESSAGE_CRCS.put(283, 74);
+ MAVLINK_MESSAGE_CRCS.put(284, 99);
+ MAVLINK_MESSAGE_CRCS.put(285, 137);
+ MAVLINK_MESSAGE_CRCS.put(286, 210);
+ MAVLINK_MESSAGE_CRCS.put(287, 1);
+ MAVLINK_MESSAGE_CRCS.put(288, 20);
+ MAVLINK_MESSAGE_CRCS.put(290, 251);
+ MAVLINK_MESSAGE_CRCS.put(291, 10);
+ MAVLINK_MESSAGE_CRCS.put(299, 19);
+ MAVLINK_MESSAGE_CRCS.put(300, 217);
+ MAVLINK_MESSAGE_CRCS.put(301, 243);
+ MAVLINK_MESSAGE_CRCS.put(310, 28);
+ MAVLINK_MESSAGE_CRCS.put(311, 95);
+ MAVLINK_MESSAGE_CRCS.put(320, 243);
+ MAVLINK_MESSAGE_CRCS.put(321, 88);
+ MAVLINK_MESSAGE_CRCS.put(322, 243);
+ MAVLINK_MESSAGE_CRCS.put(323, 78);
+ MAVLINK_MESSAGE_CRCS.put(324, 132);
+ MAVLINK_MESSAGE_CRCS.put(330, 23);
+ MAVLINK_MESSAGE_CRCS.put(331, 91);
+ MAVLINK_MESSAGE_CRCS.put(332, 236);
+ MAVLINK_MESSAGE_CRCS.put(333, 231);
+ MAVLINK_MESSAGE_CRCS.put(334, 72);
+ MAVLINK_MESSAGE_CRCS.put(335, 225);
+ MAVLINK_MESSAGE_CRCS.put(336, 245);
+ MAVLINK_MESSAGE_CRCS.put(339, 199);
+ MAVLINK_MESSAGE_CRCS.put(340, 99);
+ MAVLINK_MESSAGE_CRCS.put(350, 232);
+ MAVLINK_MESSAGE_CRCS.put(360, 11);
+ MAVLINK_MESSAGE_CRCS.put(370, 75);
+ MAVLINK_MESSAGE_CRCS.put(371, 10);
+ MAVLINK_MESSAGE_CRCS.put(372, 26);
+ MAVLINK_MESSAGE_CRCS.put(373, 117);
+ MAVLINK_MESSAGE_CRCS.put(375, 251);
+ MAVLINK_MESSAGE_CRCS.put(380, 232);
+ MAVLINK_MESSAGE_CRCS.put(385, 147);
+ MAVLINK_MESSAGE_CRCS.put(386, 132);
+ MAVLINK_MESSAGE_CRCS.put(387, 4);
+ MAVLINK_MESSAGE_CRCS.put(388, 8);
+ MAVLINK_MESSAGE_CRCS.put(390, 156);
+ MAVLINK_MESSAGE_CRCS.put(395, 0);
+ MAVLINK_MESSAGE_CRCS.put(396, 50);
+ MAVLINK_MESSAGE_CRCS.put(397, 182);
+ MAVLINK_MESSAGE_CRCS.put(400, 110);
+ MAVLINK_MESSAGE_CRCS.put(401, 183);
+ MAVLINK_MESSAGE_CRCS.put(410, 160);
+ MAVLINK_MESSAGE_CRCS.put(411, 106);
+ MAVLINK_MESSAGE_CRCS.put(412, 33);
+ MAVLINK_MESSAGE_CRCS.put(413, 77);
+ MAVLINK_MESSAGE_CRCS.put(435, 134);
+ MAVLINK_MESSAGE_CRCS.put(436, 193);
+ MAVLINK_MESSAGE_CRCS.put(437, 30);
+ MAVLINK_MESSAGE_CRCS.put(440, 66);
+ MAVLINK_MESSAGE_CRCS.put(9000, 113);
+ MAVLINK_MESSAGE_CRCS.put(9005, 117);
+ MAVLINK_MESSAGE_CRCS.put(12900, 114);
+ MAVLINK_MESSAGE_CRCS.put(12901, 254);
+ MAVLINK_MESSAGE_CRCS.put(12902, 140);
+ MAVLINK_MESSAGE_CRCS.put(12903, 249);
+ MAVLINK_MESSAGE_CRCS.put(12904, 77);
+ MAVLINK_MESSAGE_CRCS.put(12905, 49);
+ MAVLINK_MESSAGE_CRCS.put(12915, 94);
+ MAVLINK_MESSAGE_CRCS.put(12918, 139);
+ MAVLINK_MESSAGE_CRCS.put(12919, 7);
+ MAVLINK_MESSAGE_CRCS.put(12920, 20);
+
+ }
+
+ /**
+ * Accumulate the CRC by adding one char at a time.
+ *
+ * The checksum function adds the hash of one char at a time to the 16 bit
+ * checksum (uint16_t).
+ *
+ * @param data new char to hash
+ **/
+ public void update_checksum(int data) {
+ data = data & 0xff; //cast because we want an unsigned type
+ int tmp = data ^ (crcValue & 0xff);
+ tmp ^= (tmp << 4) & 0xff;
+ crcValue = ((crcValue >> 8) & 0xff) ^ (tmp << 8) ^ (tmp << 3) ^ ((tmp >> 4) & 0xf);
+ }
+
+ /**
+ * Finish the CRC calculation of a message, by running the CRC with the
+ * Magic Byte.
+ *
+ * @param msgid The message id number
+ * @return boolean True if the checksum was successfully finished. Otherwise false
+ */
+ public boolean finish_checksum(int msgid) {
+ if (MAVLINK_MESSAGE_CRCS.containsKey(msgid)) {
+ update_checksum(MAVLINK_MESSAGE_CRCS.get(msgid));
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Initialize the buffer for the CRC16/MCRF4XX
+ */
+ public void start_checksum() {
+ crcValue = CRC_INIT_VALUE;
+ }
+
+ public int getMSB() {
+ return ((crcValue >> 8) & 0xff);
+ }
+
+ public int getLSB() {
+ return (crcValue & 0xff);
+ }
+
+ public CRC() {
+ start_checksum();
+ }
+
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/paparazzi/msg_script_count.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/paparazzi/msg_script_count.java
new file mode 100644
index 0000000..d892931
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/paparazzi/msg_script_count.java
@@ -0,0 +1,151 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+// MESSAGE SCRIPT_COUNT PACKING
+package com.example.longyi_groundstation.MAVLink.paparazzi;
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload;
+import com.example.longyi_groundstation.MAVLink.Messages.Units;
+import com.example.longyi_groundstation.MAVLink.Messages.Description;
+
+/**
+ * This message is emitted as response to SCRIPT_REQUEST_LIST by the MAV to get the number of mission scripts.
+ */
+public class msg_script_count extends MAVLinkMessage {
+
+ public static final int MAVLINK_MSG_ID_SCRIPT_COUNT = 183;
+ public static final int MAVLINK_MSG_LENGTH = 4;
+ private static final long serialVersionUID = MAVLINK_MSG_ID_SCRIPT_COUNT;
+
+
+ /**
+ * Number of script items in the sequence
+ */
+ @Description("Number of script items in the sequence")
+ @Units("")
+ public int count;
+
+ /**
+ * System ID
+ */
+ @Description("System ID")
+ @Units("")
+ public short target_system;
+
+ /**
+ * Component ID
+ */
+ @Description("Component ID")
+ @Units("")
+ public short target_component;
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_SCRIPT_COUNT;
+
+ packet.payload.putUnsignedShort(count);
+ packet.payload.putUnsignedByte(target_system);
+ packet.payload.putUnsignedByte(target_component);
+
+ if (isMavlink2) {
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a script_count message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.count = payload.getUnsignedShort();
+ this.target_system = payload.getUnsignedByte();
+ this.target_component = payload.getUnsignedByte();
+
+ if (isMavlink2) {
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_script_count() {
+ this.msgid = MAVLINK_MSG_ID_SCRIPT_COUNT;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_script_count( int count, short target_system, short target_component) {
+ this.msgid = MAVLINK_MSG_ID_SCRIPT_COUNT;
+
+ this.count = count;
+ this.target_system = target_system;
+ this.target_component = target_component;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_script_count( int count, short target_system, short target_component, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_SCRIPT_COUNT;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.count = count;
+ this.target_system = target_system;
+ this.target_component = target_component;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_script_count(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_SCRIPT_COUNT;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Returns a string with the MSG name and data
+ */
+ @Override
+ public String toString() {
+ return "MAVLINK_MSG_ID_SCRIPT_COUNT - sysid:"+sysid+" compid:"+compid+" count:"+count+" target_system:"+target_system+" target_component:"+target_component+"";
+ }
+
+ /**
+ * Returns a human-readable string of the name of the message
+ */
+ @Override
+ public String name() {
+ return "MAVLINK_MSG_ID_SCRIPT_COUNT";
+ }
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/paparazzi/msg_script_current.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/paparazzi/msg_script_current.java
new file mode 100644
index 0000000..870a8e6
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/paparazzi/msg_script_current.java
@@ -0,0 +1,129 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+// MESSAGE SCRIPT_CURRENT PACKING
+package com.example.longyi_groundstation.MAVLink.paparazzi;
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload;
+import com.example.longyi_groundstation.MAVLink.Messages.Units;
+import com.example.longyi_groundstation.MAVLink.Messages.Description;
+
+/**
+ * This message informs about the currently active SCRIPT.
+ */
+public class msg_script_current extends MAVLinkMessage {
+
+ public static final int MAVLINK_MSG_ID_SCRIPT_CURRENT = 184;
+ public static final int MAVLINK_MSG_LENGTH = 2;
+ private static final long serialVersionUID = MAVLINK_MSG_ID_SCRIPT_CURRENT;
+
+
+ /**
+ * Active Sequence
+ */
+ @Description("Active Sequence")
+ @Units("")
+ public int seq;
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_SCRIPT_CURRENT;
+
+ packet.payload.putUnsignedShort(seq);
+
+ if (isMavlink2) {
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a script_current message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.seq = payload.getUnsignedShort();
+
+ if (isMavlink2) {
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_script_current() {
+ this.msgid = MAVLINK_MSG_ID_SCRIPT_CURRENT;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_script_current( int seq) {
+ this.msgid = MAVLINK_MSG_ID_SCRIPT_CURRENT;
+
+ this.seq = seq;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_script_current( int seq, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_SCRIPT_CURRENT;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.seq = seq;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_script_current(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_SCRIPT_CURRENT;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Returns a string with the MSG name and data
+ */
+ @Override
+ public String toString() {
+ return "MAVLINK_MSG_ID_SCRIPT_CURRENT - sysid:"+sysid+" compid:"+compid+" seq:"+seq+"";
+ }
+
+ /**
+ * Returns a human-readable string of the name of the message
+ */
+ @Override
+ public String name() {
+ return "MAVLINK_MSG_ID_SCRIPT_CURRENT";
+ }
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MAVLink/paparazzi/msg_script_item.java b/app/src/main/java/com/example/longyi_groundstation/MAVLink/paparazzi/msg_script_item.java
new file mode 100644
index 0000000..68a6104
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MAVLink/paparazzi/msg_script_item.java
@@ -0,0 +1,199 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * java mavlink generator tool. It should not be modified by hand.
+ */
+
+// MESSAGE SCRIPT_ITEM PACKING
+package com.example.longyi_groundstation.MAVLink.paparazzi;
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkPayload;
+import com.example.longyi_groundstation.MAVLink.Messages.Units;
+import com.example.longyi_groundstation.MAVLink.Messages.Description;
+
+/**
+ * Message encoding a mission script item. This message is emitted upon a request for the next script item.
+ */
+public class msg_script_item extends MAVLinkMessage {
+
+ public static final int MAVLINK_MSG_ID_SCRIPT_ITEM = 180;
+ public static final int MAVLINK_MSG_LENGTH = 54;
+ private static final long serialVersionUID = MAVLINK_MSG_ID_SCRIPT_ITEM;
+
+
+ /**
+ * Sequence
+ */
+ @Description("Sequence")
+ @Units("")
+ public int seq;
+
+ /**
+ * System ID
+ */
+ @Description("System ID")
+ @Units("")
+ public short target_system;
+
+ /**
+ * Component ID
+ */
+ @Description("Component ID")
+ @Units("")
+ public short target_component;
+
+ /**
+ * The name of the mission script, NULL terminated.
+ */
+ @Description("The name of the mission script, NULL terminated.")
+ @Units("")
+ public byte name[] = new byte[50];
+
+
+ /**
+ * Generates the payload for a mavlink message for a message of this type
+ * @return
+ */
+ @Override
+ public MAVLinkPacket pack() {
+ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH,isMavlink2);
+ packet.sysid = sysid;
+ packet.compid = compid;
+ packet.msgid = MAVLINK_MSG_ID_SCRIPT_ITEM;
+
+ packet.payload.putUnsignedShort(seq);
+ packet.payload.putUnsignedByte(target_system);
+ packet.payload.putUnsignedByte(target_component);
+
+ for (int i = 0; i < name.length; i++) {
+ packet.payload.putByte(name[i]);
+ }
+
+
+ if (isMavlink2) {
+
+ }
+ return packet;
+ }
+
+ /**
+ * Decode a script_item message into this class fields
+ *
+ * @param payload The message to decode
+ */
+ @Override
+ public void unpack(MAVLinkPayload payload) {
+ payload.resetIndex();
+
+ this.seq = payload.getUnsignedShort();
+ this.target_system = payload.getUnsignedByte();
+ this.target_component = payload.getUnsignedByte();
+
+ for (int i = 0; i < this.name.length; i++) {
+ this.name[i] = payload.getByte();
+ }
+
+
+ if (isMavlink2) {
+
+ }
+ }
+
+ /**
+ * Constructor for a new message, just initializes the msgid
+ */
+ public msg_script_item() {
+ this.msgid = MAVLINK_MSG_ID_SCRIPT_ITEM;
+ }
+
+ /**
+ * Constructor for a new message, initializes msgid and all payload variables
+ */
+ public msg_script_item( int seq, short target_system, short target_component, byte[] name) {
+ this.msgid = MAVLINK_MSG_ID_SCRIPT_ITEM;
+
+ this.seq = seq;
+ this.target_system = target_system;
+ this.target_component = target_component;
+ this.name = name;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes everything
+ */
+ public msg_script_item( int seq, short target_system, short target_component, byte[] name, int sysid, int compid, boolean isMavlink2) {
+ this.msgid = MAVLINK_MSG_ID_SCRIPT_ITEM;
+ this.sysid = sysid;
+ this.compid = compid;
+ this.isMavlink2 = isMavlink2;
+
+ this.seq = seq;
+ this.target_system = target_system;
+ this.target_component = target_component;
+ this.name = name;
+
+ }
+
+ /**
+ * Constructor for a new message, initializes the message with the payload
+ * from a mavlink packet
+ *
+ */
+ public msg_script_item(MAVLinkPacket mavLinkPacket) {
+ this.msgid = MAVLINK_MSG_ID_SCRIPT_ITEM;
+
+ this.sysid = mavLinkPacket.sysid;
+ this.compid = mavLinkPacket.compid;
+ this.isMavlink2 = mavLinkPacket.isMavlink2;
+ unpack(mavLinkPacket.payload);
+ }
+
+
+ /**
+ * Sets the buffer of this message with a string, adds the necessary padding
+ */
+ public void setName(String str) {
+ int len = Math.min(str.length(), 50);
+ for (int i=0; i MAVLINK_MESSAGE_CRCS;
+ private static final int CRC_INIT_VALUE = 0xffff;
+ private int crcValue;
+
+ static {
+ MAVLINK_MESSAGE_CRCS = new HashMap<>();
+ MAVLINK_MESSAGE_CRCS.put(0, 50);
+ MAVLINK_MESSAGE_CRCS.put(300, 217);
+
+ }
+
+ /**
+ * Accumulate the CRC by adding one char at a time.
+ *
+ * The checksum function adds the hash of one char at a time to the 16 bit
+ * checksum (uint16_t).
+ *
+ * @param data new char to hash
+ **/
+ public void update_checksum(int data) {
+ data = data & 0xff; //cast because we want an unsigned type
+ int tmp = data ^ (crcValue & 0xff);
+ tmp ^= (tmp << 4) & 0xff;
+ crcValue = ((crcValue >> 8) & 0xff) ^ (tmp << 8) ^ (tmp << 3) ^ ((tmp >> 4) & 0xf);
+ }
+
+ /**
+ * Finish the CRC calculation of a message, by running the CRC with the
+ * Magic Byte.
+ *
+ * @param msgid The message id number
+ * @return boolean True if the checksum was successfully finished. Otherwise false
+ */
+ public boolean finish_checksum(int msgid) {
+ if (MAVLINK_MESSAGE_CRCS.containsKey(msgid)) {
+ update_checksum(MAVLINK_MESSAGE_CRCS.get(msgid));
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Initialize the buffer for the CRC16/MCRF4XX
+ */
+ public void start_checksum() {
+ crcValue = CRC_INIT_VALUE;
+ }
+
+ public int getMSB() {
+ return ((crcValue >> 8) & 0xff);
+ }
+
+ public int getLSB() {
+ return (crcValue & 0xff);
+ }
+
+ public CRC() {
+ start_checksum();
+ }
+
+}
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Activity/MainActivity.java b/app/src/main/java/com/example/longyi_groundstation/Main/Activity/MainActivity.java
new file mode 100644
index 0000000..abbaabd
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Main/Activity/MainActivity.java
@@ -0,0 +1,639 @@
+package com.example.longyi_groundstation.Main.Activity;
+
+import static android.view.View.GONE;
+import static android.view.View.VISIBLE;
+
+import static javax.xml.transform.OutputKeys.VERSION;
+
+import android.Manifest;
+import android.annotation.SuppressLint;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.ServiceConnection;
+import android.graphics.Color;
+import android.graphics.Outline;
+import android.os.Build;
+import android.os.Bundle;
+import android.os.IBinder;
+import android.util.Log;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewOutlineProvider;
+import android.view.WindowManager;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+
+import androidx.activity.EdgeToEdge;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.core.app.ActivityCompat;
+import androidx.core.graphics.Insets;
+import androidx.core.view.ViewCompat;
+import androidx.core.view.WindowInsetsCompat;
+
+import com.amap.api.location.AMapLocationClientOption;
+import com.amap.api.maps.AMap;
+import com.amap.api.maps.CameraUpdateFactory;
+import com.amap.api.maps.model.BitmapDescriptorFactory;
+import com.amap.api.maps.model.LatLng;
+import com.amap.api.maps.model.Marker;
+import com.amap.api.maps.model.MarkerOptions;
+import com.amap.api.maps.model.MyLocationStyle;
+import com.example.longyi_groundstation.Main.Adapter.LogAdapter;
+import com.example.longyi_groundstation.Main.Adapter.TypeAdapter;
+import com.example.longyi_groundstation.Main.Base.Msg;
+import com.example.longyi_groundstation.Main.Service.MyBoundService;
+import com.example.longyi_groundstation.Main.View.ErrorLogDialog;
+import com.example.longyi_groundstation.Main.View.FPV_Void;
+import com.example.longyi_groundstation.Main.Void.AllView;
+import com.example.longyi_groundstation.Main.Void.CoordinateConverter;
+import com.example.longyi_groundstation.Main.Void.FlyVoid;
+import com.example.longyi_groundstation.Main.Void.KeDaTTS;
+import com.example.longyi_groundstation.Main.Void.MapVoid;
+import com.example.longyi_groundstation.Main.Void.MyReceiver;
+import com.example.longyi_groundstation.Main.Void.MyTool;
+import com.example.longyi_groundstation.R;
+import com.google.android.flexbox.FlexDirection;
+import com.google.android.flexbox.FlexWrap;
+import com.google.android.flexbox.FlexboxLayoutManager;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Random;
+import java.util.stream.Collectors;
+
+
+public class MainActivity extends AppCompatActivity {
+ //打印标识
+ private String TAG = "cui";
+ //服务状态
+ private boolean isBound = false;
+ // 定义 ServiceConnection 接口的实现
+ private ServiceConnection serviceConnection = new ServiceConnection() {
+ @Override
+ public void onServiceConnected(ComponentName name, IBinder service) {
+ // 获取服务实例
+ MyBoundService.LocalBinder binder = (MyBoundService.LocalBinder) service;
+ isBound = true;
+ }
+
+ @Override
+ public void onServiceDisconnected(ComponentName name) {
+ isBound = false;
+ }
+ };
+ //地图方法
+ private MapVoid mapVoid;
+ //广播接收器
+ private MyReceiver myReceiver_ATTITUDE, myReceiver_GPS_RAW_INT, myReceiver_GLOBAL_POSITION_INT,
+ myReceiver_POWER_STATUS, myReceiver_SYS_STATUS, myReceiver_STATUSTEXT, myReceiver_HEARTBEAT;
+ //所有组件
+ private AllView allView;
+ private ArrayList typeList = new ArrayList<>();
+ private TypeAdapter typeAdapter;
+ private ErrorLogDialog errorLogDialog;
+ private ArrayList LogItemList = new ArrayList<>();
+ private FPV_Void fpvVoid = new FPV_Void();
+ private FPV_Void fpvVoid_s = new FPV_Void();
+ private int mainDisplay = 1;//1:Map 2:FPV
+ private Intent intent;
+ private Marker marker;
+ private FlyVoid flyVoid = new FlyVoid();
+ private boolean islocation = true;//是否第一次定位
+
+ private LatLng homeLatLng = null;
+
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ EdgeToEdge.enable(this);
+ setContentView(R.layout.activity_main);
+ ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
+ Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
+ v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
+ return insets;
+ });
+
+ View decorView = getWindow().getDecorView();
+ decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // 隐藏导航栏
+ | View.SYSTEM_UI_FLAG_FULLSCREEN // 隐藏状态栏
+ | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY // 启用沉浸式粘滞模式
+ );
+ getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
+
+ initData();
+ initView();
+ initOnClick();
+ KeDaTTS.init("初始化成功!");
+ //第一次定位并且诺到当前位置
+// new Thread(() -> {
+// while (islocation) {
+// try {
+// Thread.sleep(3000);
+// if (MyReceiver.GLOBAL_POSITION_INT_json.optDouble("lat", 0) / 10000000 != 0) {
+// // 移动视图到Marker点
+// mapVoid.aMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(
+// MyReceiver.GLOBAL_POSITION_INT_json.optDouble("lat", 0) / 10000000,
+// MyReceiver.GLOBAL_POSITION_INT_json.optDouble("lon", 0) / 10000000), 15)); // 15是缩放级别
+// marker.setVisible(true);
+// islocation = false;
+// //家的位置
+// double[] doubles = CoordinateConverter.wgs84ToGcj02(
+// (MyReceiver.GLOBAL_POSITION_INT_json.optDouble("lon", 0) / 10000000),
+// (MyReceiver.GLOBAL_POSITION_INT_json.optDouble("lat", 0) / 10000000));
+// homeLatLng = new LatLng(
+// doubles[1],
+// doubles[0]);
+// }
+// } catch (InterruptedException e) {
+// throw new RuntimeException(e);
+// }
+// }
+// }).start();
+ }
+
+ /**
+ * 方法:初始化数据
+ *
+ * @cuijingzhou
+ */
+ @SuppressLint("UnspecifiedRegisterReceiverFlag")
+ private void initData() {
+// data = PrefsUtil.getUserObject(this, User.class);
+ intent = getIntent();
+ //定位权限
+ ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION}, 1000);
+ AMapLocationClientOption option = new AMapLocationClientOption();
+ option.setLocationMode(AMapLocationClientOption.AMapLocationMode.Hight_Accuracy); // 设置为高精度模式
+ //开启广播监听-基础数据
+ myReceiver_ATTITUDE = new MyReceiver();
+ IntentFilter filter1 = new IntentFilter("Broadcast_ATTITUDE");
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ registerReceiver(myReceiver_ATTITUDE, filter1, Context.RECEIVER_EXPORTED);
+ } else {
+ registerReceiver(myReceiver_ATTITUDE, filter1);
+ }
+
+ //开启广播监听-GPS
+ myReceiver_GPS_RAW_INT = new MyReceiver();
+ IntentFilter filter2 = new IntentFilter("Broadcast_GPS_RAW_INT");
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ registerReceiver(myReceiver_GPS_RAW_INT, filter2, Context.RECEIVER_EXPORTED);
+ } else {
+ registerReceiver(myReceiver_GPS_RAW_INT, filter2);
+ }
+
+ //开启广播监听-位置
+ myReceiver_GLOBAL_POSITION_INT = new MyReceiver();
+ IntentFilter filter3 = new IntentFilter("Broadcast_GLOBAL_POSITION_INT");
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ registerReceiver(myReceiver_GLOBAL_POSITION_INT, filter3, Context.RECEIVER_EXPORTED);
+ } else {
+ registerReceiver(myReceiver_GLOBAL_POSITION_INT, filter3);
+ }
+
+ //开启广播监听-电量
+ myReceiver_POWER_STATUS = new MyReceiver();
+ IntentFilter filter4 = new IntentFilter("Broadcast_POWER_STATUS");
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ registerReceiver(myReceiver_POWER_STATUS, filter4, Context.RECEIVER_EXPORTED);
+ } else {
+ registerReceiver(myReceiver_POWER_STATUS, filter4);
+ }
+
+
+ //开启广播监听-系统位置
+ myReceiver_SYS_STATUS = new MyReceiver();
+ IntentFilter filter5 = new IntentFilter("Broadcast_SYS_STATUS");
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ registerReceiver(myReceiver_SYS_STATUS, filter5, Context.RECEIVER_EXPORTED);
+ } else {
+ registerReceiver(myReceiver_SYS_STATUS, filter5);
+ }
+
+
+ //开启广播监听-告警
+ myReceiver_STATUSTEXT = new MyReceiver();
+ IntentFilter filter6 = new IntentFilter("Broadcast_STATUSTEXT");
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ registerReceiver(myReceiver_STATUSTEXT, filter6, Context.RECEIVER_EXPORTED);
+ } else {
+ registerReceiver(myReceiver_STATUSTEXT, filter6);
+ }
+
+
+ //开启广播监听-飞行模式
+ myReceiver_HEARTBEAT = new MyReceiver();
+ IntentFilter filter7 = new IntentFilter("Broadcast_HEARTBEAT");
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ registerReceiver(myReceiver_HEARTBEAT, filter7, Context.RECEIVER_EXPORTED);
+ } else {
+ registerReceiver(myReceiver_HEARTBEAT, filter7);
+ }
+
+
+ // 初始化数据源
+ typeList = new ArrayList<>();
+ typeList.add(new Msg("relative_alt", "0", true));
+ typeList.add(new Msg("alt", "0", true));
+ typeList.add(new Msg("time_boot_ms", "0", true));
+ typeList.add(new Msg("lat", "0", true));
+ typeList.add(new Msg("lon", "0", true));
+
+
+// typeList.add(new Msg("relative_alt", MyReceiver.GLOBAL_POSITION_INT_json.optString("relative_alt"), true));
+// typeList.add(new Msg("alt", MyReceiver.GLOBAL_POSITION_INT_json.optString("alt"), true));
+// typeList.add(new Msg("time_boot_ms", MyReceiver.GLOBAL_POSITION_INT_json.optString("time_usec"), true));
+// typeList.add(new Msg("satellites_visible", "", false));
+// typeList.add(new Msg("data2", "", false));
+
+
+ }
+
+ /**
+ * 方法:初始化视图
+ *
+ * @cuijingzhou
+ */
+ private void initView() {
+ //所有组件
+ allView = new AllView(this);
+
+ //地图全局方法类
+ mapVoid = new MapVoid(MainActivity.this);
+ marker = mapVoid.aMap.addMarker(
+ new MarkerOptions()
+ .anchor(0.5f, 0.5f) // 设置锚点为图片中心
+ .title("飞机")
+ .snippet("型号"));
+ // 更换 Marker 图标
+ marker.setIcon(
+ BitmapDescriptorFactory
+ .fromResource(R.drawable.icon_fly)
+ );
+
+
+ // 绑定服务
+ Intent intents = new Intent(this, MyBoundService.class);
+ intents.putExtra("type", intent.getIntExtra("type", 0));
+ if (intent.getIntExtra("type", 0) != 0) {
+ intents.putExtra("port", intent.getStringExtra("port"));
+ }
+ bindService(intents, serviceConnection, Context.BIND_AUTO_CREATE);
+
+ FlexboxLayoutManager layoutManager = new FlexboxLayoutManager(this);
+ layoutManager.setFlexDirection(FlexDirection.ROW); // 横向排列
+ layoutManager.setFlexWrap(FlexWrap.WRAP); // 自动换行
+ allView.rv_type_list.setLayoutManager(layoutManager);
+ // 设置适配器
+ typeAdapter = new TypeAdapter(typeList);
+ allView.rv_type_list.setAdapter(typeAdapter);
+
+ // 设置视频路径
+ fpvVoid.setupFpvWidget(allView.fpvWidget, "rtsp://192.168.144.119/live");
+
+
+ //异常弹窗
+ errorLogDialog = new ErrorLogDialog(MainActivity.this);
+
+ //启用裁剪
+ allView.cll_layout.post(() -> {
+ allView.cll_layout.setOutlineProvider(new ViewOutlineProvider() {
+ @Override
+ public void getOutline(View view, Outline outline) {
+ int size = Math.min(view.getWidth(), view.getHeight());
+ outline.setRoundRect(0, 0, size, size, size / 2f);
+ }
+ });
+ allView.cll_layout.setClipToOutline(true); // 启用裁剪
+ });
+ }
+
+ /**
+ * 方法:初始化点击事件
+ *
+ * @cuijingzhou
+ */
+ @SuppressLint({"NotifyDataSetChanged", "SetTextI18n", "DefaultLocale"})
+ private void initOnClick() {
+
+ //广播接收-ATTITUDE
+ myReceiver_ATTITUDE.setATTITUDEListener(data -> {
+ // 这里可以更新 UI 或刷新数据
+ Log.d(TAG, "收到新数据ATTITUDE:" + data.toString());
+// allView.tv_connect.setText("已连接");
+
+ // 示例:更新 typeList 数据并刷新 RecyclerView
+ if (data != null) {
+ flyVoid.setAttitude(
+ getApplicationContext(),
+ allView,
+ MyReceiver.ATTITUDE_json.optDouble("roll"),
+ MyReceiver.ATTITUDE_json.optDouble("pitch"),
+ MyReceiver.ATTITUDE_json.optDouble("yaw")
+ );
+
+// allView.attitude_view.setAttitude(
+// (int) Math.round(MyReceiver.ATTITUDE_json.optDouble("pitch") * 51.7),
+// (int) Math.round(MyReceiver.ATTITUDE_json.optDouble("roll") * 51.7),
+// (int) Math.round(MyReceiver.ATTITUDE_json.optDouble("yaw") * 51.7));
+// // 添加更多字段...
+// typeAdapter.notifyDataSetChanged();
+// allView.tv_roll.setText((int) Math.round(MyReceiver.ATTITUDE_json.optDouble("roll") * 51.7) + "°");
+// allView.tv_pitch.setText((int) Math.round(MyReceiver.ATTITUDE_json.optDouble("pitch") * 51.7) + "°");
+// allView.tv_z.setText((int) Math.round(MyReceiver.ATTITUDE_json.optDouble("yaw") * 51.7) + "°");
+//
+// allView.iv_yaw.setRotation((int) Math.round(MyReceiver.ATTITUDE_json.optDouble("yaw") * 51.7));
+
+ }
+ //地图上飞机的朝向
+ marker.setRotateAngle((int) Math.round(MyReceiver.ATTITUDE_json.optDouble("yaw") * 51.7) * -1);
+
+ allView.tv_yaw.setText((int) Math.round(MyReceiver.ATTITUDE_json.optDouble("yaw") * 51.7) + "°");
+// marker.setVisible(true);
+ });
+
+ //广播接收-setGPSListener
+ myReceiver_GPS_RAW_INT.setGPSListener(data -> {
+ // 这里可以更新 UI 或刷新数据
+ Log.d(TAG, "收到新数据GPS:" + data.toString());
+ if (!MyReceiver.GPS_RAW_INT_json.optString("satellites_visible").equals("0")) {
+ allView.tv_satellite.setText(MyReceiver.GPS_RAW_INT_json.optString("satellites_visible") + " 3D");
+ }
+ allView.tv_vel.setText((MyReceiver.GPS_RAW_INT_json.optDouble("vel") / 100) + "m/s");
+ });
+
+ //广播接收-setGlobalPositionIntlistener
+ myReceiver_GLOBAL_POSITION_INT.setGlobalPositionIntlistener(data -> {
+ // 这里可以更新 UI 或刷新数据
+ Log.d(TAG, "收到新数据GLOBAL:" + data.toString());
+ double[] doubles = CoordinateConverter.wgs84ToGcj02(
+ (MyReceiver.GLOBAL_POSITION_INT_json.optDouble("lon", 0) / 10000000),
+ (MyReceiver.GLOBAL_POSITION_INT_json.optDouble("lat", 0) / 10000000));
+
+ // 示例:更新 typeList 数据并刷新 RecyclerView
+ if (data != null) {
+ typeList.clear();
+ typeList.add(0, new Msg("relative_alt", MyReceiver.GLOBAL_POSITION_INT_json.optString("relative_alt"), true));
+ typeList.add(1, new Msg("alt", MyReceiver.GLOBAL_POSITION_INT_json.optString("alt"), true));
+ typeList.add(2, new Msg("time_boot_ms", MyReceiver.GLOBAL_POSITION_INT_json.optString("time_boot_ms"), true));
+ typeList.add(3, new Msg("lat", doubles[1] + "", true));
+ typeList.add(4, new Msg("lon", doubles[0] + "", true));
+
+ // 添加更多字段...
+ typeAdapter.notifyDataSetChanged();
+ allView.tv_height.setText(
+ Math.round(
+ (MyReceiver.GLOBAL_POSITION_INT_json.optDouble("relative_alt") / 100) / 10.0) + "m");
+ }
+
+ if (doubles[1] != 0) {
+ if (doubles[1] != mapVoid.latLngss.get(mapVoid.latLngss.size()-1).latitude){
+ //实时更新飞机的线路,如果线路长度超过10个点,则删除最后一个点位
+ mapVoid.latLngss.add(new LatLng(
+ doubles[1],
+ doubles[0]));
+ }
+
+ }
+
+ if (mapVoid.latLngss.size() > 10) {
+ mapVoid.latLngss.remove(0);
+ String coordinates = mapVoid.latLngss.stream()
+ .map(latLng -> "(" + latLng.latitude + "," + latLng.longitude + ")")
+ .collect(Collectors.joining(", "));
+ Log.d("没用", coordinates);
+ }
+
+ //实时更新飞机的定位
+ marker.setPosition(
+ new LatLng(
+ doubles[1],
+ doubles[0]));
+
+ marker.setVisible(true);
+
+ });
+
+ //广播接收-setPowrStatuslistener
+ myReceiver_POWER_STATUS.setPowrStatuslistener(data -> {
+ // 这里可以更新 UI 或刷新数据
+ Log.d(TAG, "收到新数据POWER_STATUS:" + data.toString());
+// allView.tv_power.setText(
+// MyReceiver.POWER_STATUS_json.optDouble("Vcc") / 100
+// + " V");
+ });
+
+
+ //广播接收-setSysStatuslistener
+ myReceiver_SYS_STATUS.setSysStatuslistener(data -> {
+ // 这里可以更新 UI 或刷新数据
+ Log.d(TAG, "收到新数据SYS_STATUS:" + data.toString());
+ allView.tv_power.setText(String.format("%.1f", MyReceiver.SYS_STATUS_json.optDouble("voltage_battery") / 1000) + "V");
+ });
+
+ //广播接收-setStatustextlistener
+ myReceiver_STATUSTEXT.setStatustextlistener(data -> {
+ // 这里可以更新 UI 或刷新数据
+ allView.iv_error.setVisibility(VISIBLE);
+ LogItemList.add(0, new LogAdapter.LogItem(MyReceiver.STATUSTEXT_json.optString("text"), new Date()));
+ Log.d(TAG, "收到新数据STATUSTEXT:" + data.toString());
+ });
+
+ //广播接收-setHeartbeatlistener
+ myReceiver_HEARTBEAT.setHeartbeatlistener(data -> {
+ // 这里可以更新 UI 或刷新数据
+ switch (MyReceiver.HEARTBEAT_json.optInt("custom_mode")){
+ case 0:
+ allView.tv_connect.setText("手动模式");
+ break;
+ case 1:
+ allView.tv_connect.setText("高度控制模式");
+ break;
+ case 2:
+ allView.tv_connect.setText("位置控制模式");
+ break;
+ case 3:
+ allView.tv_connect.setText("自动任务模式");
+ break;
+ case 4:
+ allView.tv_connect.setText("自动悬停模式");
+ break;
+ case 5:
+ allView.tv_connect.setText("自动返航模式");
+ break;
+ case 6:
+ allView.tv_connect.setText("特技模式");
+ break;
+ case 7:
+ allView.tv_connect.setText("离板模式");
+ break;
+ case 8:
+ allView.tv_connect.setText("自稳模式");
+ break;
+ case 9:
+ allView.tv_connect.setText("自动起飞");
+ break;
+ case 10:
+ allView.tv_connect.setText("自动降落");
+ break;
+ default:
+ allView.tv_connect.setText("未知模式");
+ break;
+ }
+
+// allView.tv_connect.setText("位置保持");
+ Log.d(TAG, "收到新数据HEARTBEAT:" + data.toString());
+
+
+ });
+
+
+ allView.v_mainDisplay.setOnClickListener(v -> {
+ if (mainDisplay == 1) {
+ mainDisplay = 2;
+ MyTool.setViewWH(this, allView.map, 150, 95, 3);
+ MyTool.setViewWH(this, allView.fpvWidget, 1920, 1200, 0);
+ mapVoid.allView.map.setElevation(5f);
+ mapVoid.allView.fpvWidget.setElevation(1f);
+ allView.map.setBackgroundResource(R.drawable.x80202020_4round_3stroke_bg);
+ allView.fpvWidget.setBackgroundColor(Color.parseColor("#ffffff"));
+ allView.map.setPadding(6, 6, 6, 6);
+ allView.fpvWidget.setPadding(0, 0, 0, 0);
+// allView.map.setVisibility(GONE);
+// allView.map_s.setVisibility(VISIBLE);
+// allView.fpvWidget.setVisibility(VISIBLE);
+// allView.fpvWidget_s.setVisibility(GONE);
+ } else {
+ mainDisplay = 1;
+ MyTool.setViewWH(this, allView.fpvWidget, 150, 95, 3);
+ MyTool.setViewWH(this, allView.map, 1920, 1200, 0);
+ mapVoid.allView.fpvWidget.setElevation(5f);
+ mapVoid.allView.map.setElevation(1f);
+ allView.fpvWidget.setBackgroundResource(R.drawable.x80202020_4round_3stroke_bg);
+ allView.map.setBackgroundColor(Color.parseColor("#ffffff"));
+ allView.fpvWidget.setPadding(6, 6, 6, 6);
+ allView.map.setPadding(0, 0, 0, 0);
+// allView.map.setVisibility(GONE);
+// allView.map_s.setVisibility(VISIBLE);
+// allView.fpvWidget.setVisibility(VISIBLE);
+// allView.fpvWidget_s.setVisibility(GONE);
+ }
+ });
+
+
+ //点击异常窗口
+ allView.iv_error.setOnClickListener(v -> {
+ errorLogDialog.show();
+ errorLogDialog.adapter.setList(LogItemList);
+ allView.iv_error.setVisibility(GONE);
+ });
+
+ //点击定位到当前位置按钮
+ allView.iv_location_me.setOnClickListener(v -> {
+ if (MyReceiver.GLOBAL_POSITION_INT_json.optDouble("lat", 0) / 10000000 != 0) {
+ // 移动视图到Marker点
+ mapVoid.aMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(
+ MyReceiver.GLOBAL_POSITION_INT_json.optDouble("lat", 0) / 10000000,
+ MyReceiver.GLOBAL_POSITION_INT_json.optDouble("lon", 0) / 10000000), 15)); // 15是缩放级别
+ marker.setVisible(true);
+ }
+ });
+
+ //点击线路关闭开启
+ allView.ll_line_fly_layout.setOnClickListener(v -> {
+ mapVoid.showLine(!mapVoid.polyline.isVisible());
+ });
+
+ //todo 没用
+ allView.map.getMap().setOnMapClickListener(latLng -> {
+// Log.d("没用", latLng.toString());
+ mapVoid.latLngss.add(latLng);
+ });
+//
+// //todo 没用 设置POI点击监听器(替换null)
+// allView.map.getMap().setOnPOIClickListener(new AMap.OnPOIClickListener() {
+// @Override
+// public void onPOIClick(com.amap.api.maps.model.Poi poi) {
+// // poi对象包含坐标信息
+// LatLng latLng = poi.getCoordinate();
+// mapVoid.latLngss.add(latLng);
+// }
+// });
+ }
+
+
+ @Override
+ protected void onDestroy() {
+ super.onDestroy();
+ //在activity执行onDestroy时执行map.onDestroy(),销毁地图
+ mapVoid.allView.map.onDestroy();
+ // 解绑服务
+ if (isBound) {
+ unbindService(serviceConnection);
+ isBound = false;
+ }
+ //注销广播接收器(避免内存泄漏)
+ if (myReceiver_ATTITUDE.isReceiverRegistered) {
+ unregisterReceiver(myReceiver_ATTITUDE);
+ myReceiver_ATTITUDE.isReceiverRegistered = false;
+ }
+ //注销广播接收器(避免内存泄漏)
+ if (myReceiver_GPS_RAW_INT.isReceiverRegistered) {
+ unregisterReceiver(myReceiver_GPS_RAW_INT);
+ myReceiver_GPS_RAW_INT.isReceiverRegistered = false;
+ }
+ //注销广播接收器(避免内存泄漏)
+ if (myReceiver_GLOBAL_POSITION_INT.isReceiverRegistered) {
+ unregisterReceiver(myReceiver_GLOBAL_POSITION_INT);
+ myReceiver_GLOBAL_POSITION_INT.isReceiverRegistered = false;
+ }
+ //注销广播接收器(避免内存泄漏)
+ if (myReceiver_POWER_STATUS.isReceiverRegistered) {
+ unregisterReceiver(myReceiver_POWER_STATUS);
+ myReceiver_POWER_STATUS.isReceiverRegistered = false;
+ }
+ //注销广播接收器(避免内存泄漏)
+ if (myReceiver_SYS_STATUS.isReceiverRegistered) {
+ unregisterReceiver(myReceiver_SYS_STATUS);
+ myReceiver_SYS_STATUS.isReceiverRegistered = false;
+ }
+ //注销广播接收器(避免内存泄漏)
+ if (myReceiver_STATUSTEXT.isReceiverRegistered) {
+ unregisterReceiver(myReceiver_STATUSTEXT);
+ myReceiver_STATUSTEXT.isReceiverRegistered = false;
+ }
+ //注销广播接收器(避免内存泄漏)
+ if (myReceiver_HEARTBEAT.isReceiverRegistered) {
+ unregisterReceiver(myReceiver_HEARTBEAT);
+ myReceiver_HEARTBEAT.isReceiverRegistered = false;
+ }
+
+ fpvVoid.Fstop(allView.fpvWidget);
+ fpvVoid_s.Fstop(allView.fpvWidget);
+ }
+
+ @Override
+ protected void onResume() {
+ super.onResume();
+ //在activity执行onResume时执行map.onResume (),重新绘制加载地图
+ mapVoid.allView.map.onResume();
+ }
+
+ @Override
+ protected void onPause() {
+ super.onPause();
+ //在activity执行onPause时执行map.onPause (),暂停地图的绘制
+ mapVoid.allView.map.onPause();
+ }
+
+ @Override
+ protected void onSaveInstanceState(Bundle outState) {
+ super.onSaveInstanceState(outState);
+ //在activity执行onSaveInstanceState时执行map.onSaveInstanceState (outState),保存地图当前的状态
+ mapVoid.allView.map.onSaveInstanceState(outState);
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Adapter/LogAdapter.java b/app/src/main/java/com/example/longyi_groundstation/Main/Adapter/LogAdapter.java
new file mode 100644
index 0000000..784fd36
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Main/Adapter/LogAdapter.java
@@ -0,0 +1,96 @@
+package com.example.longyi_groundstation.Main.Adapter;
+
+import android.annotation.SuppressLint;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.example.longyi_groundstation.R;
+
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+
+public class LogAdapter extends RecyclerView.Adapter {
+
+ private List logItems = new ArrayList<>();
+ private final SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss", Locale.getDefault());
+
+ public void addLog(String message) {
+ LogItem item = new LogItem(message, new Date());
+ logItems.add(0, item); // 最新日志添加到顶部
+ notifyItemInserted(0);
+ }
+
+ @SuppressLint("NotifyDataSetChanged")
+ public void setList(List list) {
+ if (list.size() > 10){
+ logItems.clear();
+ logItems.addAll(list.subList(0, 10));
+ }else {
+ logItems.clear();
+ logItems.addAll(list);
+ }
+
+ notifyDataSetChanged();
+ }
+
+ public void clearLogs() {
+ logItems.clear();
+ notifyDataSetChanged();
+ }
+
+ @NonNull
+ @Override
+ public LogViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+ View view = LayoutInflater.from(parent.getContext())
+ .inflate(R.layout.adapter_log, parent, false);
+ return new LogViewHolder(view);
+ }
+
+ @Override
+ public void onBindViewHolder(@NonNull LogViewHolder holder, int position) {
+ LogItem item = logItems.get(position);
+ holder.messageText.setText(item.getMessage());
+ holder.timeText.setText(dateFormat.format(item.getTime()));
+ }
+
+ @Override
+ public int getItemCount() {
+ return logItems.size();
+ }
+
+ static class LogViewHolder extends RecyclerView.ViewHolder {
+ TextView messageText;
+ TextView timeText;
+
+ public LogViewHolder(@NonNull View itemView) {
+ super(itemView);
+ messageText = itemView.findViewById(R.id.tv_message);
+ timeText = itemView.findViewById(R.id.tv_time);
+ }
+ }
+
+ public static class LogItem {
+ private final String message;
+ private final Date time;
+
+ public LogItem(String message, Date time) {
+ this.message = message;
+ this.time = time;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public Date getTime() {
+ return time;
+ }
+ }
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Adapter/TypeAdapter.java b/app/src/main/java/com/example/longyi_groundstation/Main/Adapter/TypeAdapter.java
new file mode 100644
index 0000000..8a552ac
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Main/Adapter/TypeAdapter.java
@@ -0,0 +1,94 @@
+package com.example.longyi_groundstation.Main.Adapter;
+
+import static android.view.View.GONE;
+import static android.view.View.VISIBLE;
+
+import android.annotation.SuppressLint;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.example.longyi_groundstation.Main.Base.Msg;
+import com.example.longyi_groundstation.R;
+import com.example.longyi_groundstation.Util.Tool;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class TypeAdapter extends RecyclerView.Adapter {
+
+ private ArrayList dataList;
+
+ public TypeAdapter(ArrayList dataList) {
+ this.dataList = dataList;
+ }
+
+ @NonNull
+ @Override
+ public TypeViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+ View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.adapter_type_item, parent, false);
+ return new TypeViewHolder(view);
+ }
+
+ @SuppressLint("SetTextI18n")
+ @Override
+ public void onBindViewHolder(@NonNull TypeViewHolder holder, int position) {
+ Msg item = dataList.get(position);
+ switch (item.getKey()){
+
+ case "relative_alt":
+ holder.textView.setText("融合高度:" + (Integer.parseInt(item.getMsg()) / 1000) + " m");
+ break;
+
+ case "alt":
+ holder.textView.setText("海拔高度:" + (Integer.parseInt(item.getMsg()) / 1000) + " m");
+ break;
+
+ case "time_boot_ms":
+ holder.textView.setText("飞行时间:" + Tool.formatMillisecondsLong(Long.parseLong(item.getMsg())));
+ break;
+
+ case "lat":
+ holder.textView.setText("纬度:" + item.getMsg());
+ break;
+
+ case "lon":
+ holder.textView.setText("经度:" + item.getMsg());
+ break;
+
+ default:
+ holder.textView.setText("");
+ break;
+
+ }
+// holder.textView.setText(item.getMsg());
+ if (item.isShow()){
+ holder.ll_main.setVisibility(VISIBLE);
+ }else {
+ holder.ll_main.setVisibility(GONE);
+ }
+
+ }
+
+ @Override
+ public int getItemCount() {
+ return dataList.size();
+ }
+
+ static class TypeViewHolder extends RecyclerView.ViewHolder {
+ TextView textView;
+ LinearLayout ll_main;
+
+ public TypeViewHolder(@NonNull View itemView) {
+ super(itemView);
+ textView = itemView.findViewById(R.id.text);
+ ll_main = itemView.findViewById(R.id.ll_main);
+
+ }
+ }
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Base/MLData.java b/app/src/main/java/com/example/longyi_groundstation/Main/Base/MLData.java
new file mode 100644
index 0000000..eef6c40
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Main/Base/MLData.java
@@ -0,0 +1,28 @@
+package com.example.longyi_groundstation.Main.Base;
+
+public class MLData {
+
+ private boolean is_valid;//是否有变动
+ private String data;//数据
+
+ public MLData(boolean is_valid, String data) {
+ this.is_valid = is_valid;
+ this.data = data;
+ }
+
+ public boolean isIs_valid() {
+ return is_valid;
+ }
+
+ public void setIs_valid(boolean is_valid) {
+ this.is_valid = is_valid;
+ }
+
+ public String getData() {
+ return data;
+ }
+
+ public void setData(String data) {
+ this.data = data;
+ }
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Base/Msg.java b/app/src/main/java/com/example/longyi_groundstation/Main/Base/Msg.java
new file mode 100644
index 0000000..26a1709
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Main/Base/Msg.java
@@ -0,0 +1,38 @@
+package com.example.longyi_groundstation.Main.Base;
+
+public class Msg {
+
+ private String key;
+ private String msg;//消息
+ private boolean isShow;//是否显示
+
+ public Msg(String key, String msg, boolean isShow) {
+ this.key = key;
+ this.msg = msg;
+ this.isShow = isShow;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ public String getMsg() {
+ return msg;
+ }
+
+ public void setMsg(String msg) {
+ this.msg = msg;
+ }
+
+ public boolean isShow() {
+ return isShow;
+ }
+
+ public void setShow(boolean show) {
+ isShow = show;
+ }
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Service/MyBoundService.java b/app/src/main/java/com/example/longyi_groundstation/Main/Service/MyBoundService.java
new file mode 100644
index 0000000..ee03336
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Main/Service/MyBoundService.java
@@ -0,0 +1,270 @@
+package com.example.longyi_groundstation.Main.Service;
+
+import static com.example.longyi_groundstation.MAVLink.common.msg_attitude.MAVLINK_MSG_ID_ATTITUDE;
+import static com.example.longyi_groundstation.MAVLink.common.msg_global_position_int.MAVLINK_MSG_ID_GLOBAL_POSITION_INT;
+import static com.example.longyi_groundstation.MAVLink.common.msg_gps_raw_int.MAVLINK_MSG_ID_GPS_RAW_INT;
+import static com.example.longyi_groundstation.MAVLink.common.msg_power_status.MAVLINK_MSG_ID_POWER_STATUS;
+import static com.example.longyi_groundstation.MAVLink.common.msg_statustext.MAVLINK_MSG_ID_STATUSTEXT;
+import static com.example.longyi_groundstation.MAVLink.common.msg_sys_status.MAVLINK_MSG_ID_SYS_STATUS;
+import static com.example.longyi_groundstation.MAVLink.minimal.msg_heartbeat.MAVLINK_MSG_ID_HEARTBEAT;
+
+import android.app.Service;
+import android.content.Intent;
+import android.os.Binder;
+import android.os.IBinder;
+import android.util.Log;
+import android.widget.TextView;
+
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Parser;
+import com.example.longyi_groundstation.Main.Base.MLData;
+import com.example.longyi_groundstation.Main.Void.MyTool;
+import com.example.longyi_groundstation.Util.BroadcastUtil;
+import com.example.longyi_groundstation.Util.Tool;
+
+import java.io.IOException;
+import java.net.DatagramPacket;
+import java.net.DatagramSocket;
+import java.net.InetAddress;
+import java.net.SocketException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.IllegalFormatCodePointException;
+import java.util.Objects;
+
+import tp.xmaihh.serialport.SerialHelper;
+import tp.xmaihh.serialport.bean.ComBean;
+
+public class MyBoundService extends Service {
+
+ private ArrayList MsgList;
+ private int type = 0;//0串口 1UDP
+
+ //UDP
+ private static final String TAG = "UDPServer";
+ private TextView tv_text;
+ private DatagramSocket serverSocket;
+ private boolean isRunning = false;
+ private String serverPort = "14551"; // 服务端监听端口
+
+
+ // 定义一个 Binder 子类,用于返回本地服务实例
+ private final IBinder binder = new LocalBinder();
+
+ // 提供一个公共方法供绑定的Activity调用
+ public String getServiceStatus() {
+ return "Service is running";
+ }
+
+ // Binder 类用于返回服务实例
+ public class LocalBinder extends Binder {
+ public MyBoundService getService() {
+ return MyBoundService.this;
+ }
+ }
+
+ @Override
+ public int onStartCommand(Intent intent, int flags, int startId) {
+ return super.onStartCommand(intent, flags, startId);
+ }
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ }
+
+ private void initList(){
+ MsgList = new ArrayList<>();
+ for (int i = 0; i < 500; i++) {
+ MsgList.add(null);
+ }
+ }
+
+
+ private SerialHelper serialHelper;
+ private Parser parser = new Parser();
+ private MAVLinkMessage msgOld = null;
+ private void getData() {
+
+// serialPortFinder = new SerialPortFinder();
+ //判断打开方式0:串口 2:UDP
+ if (type == 0){
+ serialHelper = new SerialHelper("/dev/ttyHS0", 115200) {
+ @Override
+ protected void onDataReceived(final ComBean comBean) {
+// Log.d("cuijingzhou", Tool.bytesToHex(comBean.bRec));
+ // 接收数据
+ byte[] receivedData = comBean.bRec;
+ dataWork(receivedData,receivedData.length);
+ }
+ };
+ try {
+ serialHelper.open();
+// wordT1();
+ } catch (IOException e) {
+// throw new RuntimeException(e);
+ Log.d(TAG, e.toString());
+ }
+ }
+ //UDP
+ else {
+ new Thread(() -> {
+ try {
+ serverSocket = new DatagramSocket(Integer.parseInt(serverPort));
+ isRunning = true;
+ byte[] buffer = new byte[1024];
+ while (isRunning) {
+ try {
+ DatagramPacket packet = new DatagramPacket(buffer, buffer.length);
+ serverSocket.receive(packet);
+
+ // 获取客户端IP和端口
+// InetAddress clientAddress = packet.getAddress();
+// int clientPort = packet.getPort();
+
+ // 处理接收到的数据
+// String receivedData = MyTool.bytesToHex(packet.getData(), packet.getLength());
+// Log.e(TAG, receivedData);
+// Log.e("cuijingzhou-size", packet.getLength()+"");
+// String logMsg = "来自 " + clientAddress.getHostAddress() + ":" + clientPort + " 的消息: " + receivedData;
+ dataWork(packet.getData(),packet.getLength());
+
+ // 可以在这里添加回复逻辑
+// sendResponse(clientAddress, clientPort, "ACK");
+
+ } catch (Exception e) {
+ Log.e(TAG, "接收数据错误: " + e.getMessage());
+
+ }
+ }
+ } catch (SocketException e) {
+ Log.e(TAG, "启动服务端失败: " + e.getMessage());
+
+ } finally {
+ stopUdpServer();
+ }
+ }).start();
+ }
+ wordT();
+ }
+
+ /**
+ * 方法:处理返回的mavlink协议(byte[])
+ * receivedData:字节[]
+ * length:字节实际长度
+ *
+ * @cuijingzhou
+ */
+ private void dataWork(byte[] receivedData,int length){
+
+ for (int i = 0; i < length; i++) {
+ MAVLinkPacket mavLinkPacket = parser.mavlink_parse_char(receivedData[i]);
+ if (mavLinkPacket != null) {
+ MAVLinkMessage msg = mavLinkPacket.unpack();
+ //判断当前索引下的数据是否有变动,如过没有变动,就不储存,用一个判断增加性能
+ if (!msg.toString().equals(MsgList.get(msg.msgid))){
+// Log.d("cuijigzhou_msg_all", msg.toString());
+
+ MsgList.set(msg.msgid,msg.toString());
+ if (msgOld == null){
+ MsgList.set(msg.msgid,msg.toString());
+ msgOld = msg;
+ }else {
+ //主要是应对STATUSTEXT(253)这样的特殊数据
+ wordT1(msg);
+ msgOld = msg;
+ }
+
+
+
+ }
+ }
+ }
+ }
+
+ /**
+ * 方法:工作线程 定时150毫秒
+ *
+ * @cuijingzhou
+ */
+ private void wordT(){
+ new Thread(() -> {
+ try {
+ while (binder.isBinderAlive()){
+// Log.e("cuijingzhou", );
+ if (MsgList.get(MAVLINK_MSG_ID_ATTITUDE) != null){
+ BroadcastUtil.Broadcast_ATTITUDE(getApplication(),MsgList.get(MAVLINK_MSG_ID_ATTITUDE));
+ }
+ if (MsgList.get(MAVLINK_MSG_ID_GPS_RAW_INT) != null){
+ BroadcastUtil.Broadcast_GPS_RAW_INT(getApplication(),MsgList.get(MAVLINK_MSG_ID_GPS_RAW_INT));
+ }
+ if (MsgList.get(MAVLINK_MSG_ID_GLOBAL_POSITION_INT) != null){
+ BroadcastUtil.Broadcast_GLOBAL_POSITION_INT(getApplication(),MsgList.get(MAVLINK_MSG_ID_GLOBAL_POSITION_INT));
+ }
+ if (MsgList.get(MAVLINK_MSG_ID_POWER_STATUS) != null){
+ BroadcastUtil.Broadcast_POWER_STATUS(getApplication(),MsgList.get(MAVLINK_MSG_ID_POWER_STATUS));
+ }
+ if (MsgList.get(MAVLINK_MSG_ID_SYS_STATUS) != null){
+ BroadcastUtil.Broadcast_SYS_STATUS(getApplication(),MsgList.get(MAVLINK_MSG_ID_SYS_STATUS));
+ }
+ if (MsgList.get(MAVLINK_MSG_ID_HEARTBEAT) != null){
+ BroadcastUtil.Broadcast_HEARTBEAT(getApplication(),MsgList.get(MAVLINK_MSG_ID_HEARTBEAT));
+ }
+
+ Thread.sleep(50);
+ }
+
+ }catch (Exception e){
+ Log.e("cuijingzhou", e.toString());
+ }
+ }).start();
+ }
+
+ /**
+ * 方法:收到消息就发,正常不发
+ *
+ * @cuijingzhou
+ */
+ private void wordT1(MAVLinkMessage msg){
+ switch (msg.msgid){
+ case MAVLINK_MSG_ID_STATUSTEXT:
+ MsgList.set(msg.msgid,msg.toString());
+ BroadcastUtil.Broadcast_STATUSTEXT(getApplication(),MsgList.get(MAVLINK_MSG_ID_STATUSTEXT));
+ default:
+// Log.d("cuijigzhou_msg_all_id", "不做处理:"+msg.msgid);
+ }
+ }
+
+
+
+ @Override
+ public IBinder onBind(Intent intent) {
+ type = intent.getIntExtra("type", 0);
+ if (type == 1){
+ serverPort = intent.getStringExtra("port");
+ }
+ // 初始化服务逻辑
+ initList();
+ getData();
+ return binder;
+ }
+
+ // 停止服务端
+ private void stopUdpServer() {
+ isRunning = false;
+ if (serverSocket != null && !serverSocket.isClosed()) {
+ serverSocket.close();
+ serverSocket = null;
+ }
+ }
+
+ @Override
+ public void onDestroy() {
+ super.onDestroy();
+ // 清理资源
+ stopUdpServer();
+ }
+
+
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Setting/Activity/SettingActivity.java b/app/src/main/java/com/example/longyi_groundstation/Main/Setting/Activity/SettingActivity.java
new file mode 100644
index 0000000..c842d0e
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Main/Setting/Activity/SettingActivity.java
@@ -0,0 +1,30 @@
+package com.example.longyi_groundstation.Main.Setting.Activity;
+
+import android.os.Bundle;
+
+import androidx.activity.EdgeToEdge;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.core.graphics.Insets;
+import androidx.core.view.ViewCompat;
+import androidx.core.view.WindowInsetsCompat;
+
+import com.example.longyi_groundstation.R;
+
+public class SettingActivity extends AppCompatActivity {
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ EdgeToEdge.enable(this);
+ setContentView(R.layout.activity_setting);
+ ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
+ Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
+ v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
+ return insets;
+ });
+
+
+ }
+
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Setting/Void/AllView.java b/app/src/main/java/com/example/longyi_groundstation/Main/Setting/Void/AllView.java
new file mode 100644
index 0000000..3b9f986
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Main/Setting/Void/AllView.java
@@ -0,0 +1,28 @@
+package com.example.longyi_groundstation.Main.Setting.Void;
+
+import android.app.Activity;
+import android.widget.EditText;
+import android.widget.RadioButton;
+import android.widget.RadioGroup;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+import com.example.longyi_groundstation.R;
+
+public class AllView {
+
+ public RelativeLayout main;
+
+ public Activity activity;
+
+
+ public AllView(Activity activity) {
+ this.activity = activity;
+ init();
+ }
+
+ public void init() {
+// et_port = activity.findViewById(R.id.et_port);
+
+ }
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/View/AttitudeIndicatorView.java b/app/src/main/java/com/example/longyi_groundstation/Main/View/AttitudeIndicatorView.java
new file mode 100644
index 0000000..ec5c2e0
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Main/View/AttitudeIndicatorView.java
@@ -0,0 +1,183 @@
+package com.example.longyi_groundstation.Main.View;
+
+import android.content.Context;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.graphics.BitmapShader;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.Paint;
+import android.graphics.Path;
+import android.graphics.RectF;
+import android.graphics.Shader;
+import android.util.AttributeSet;
+import android.view.View;
+
+import com.example.longyi_groundstation.R;
+
+public class AttitudeIndicatorView extends View {
+ private static final int MIN_SIZE_DP = 100;
+ private Paint paint;
+ private RectF bounds;
+
+ // 姿态参数
+ private float pitch = 0; // 俯仰角 (-90到90)
+ private float roll = 0; // 滚转角 (-180到180)
+ private float yaw = 0; // 偏航角 (0到360)
+
+ // 颜色定义
+ private int skyColor = Color.parseColor("#87CEEB");
+ private int groundColor = Color.parseColor("#8B4513");
+ private int scaleColor = Color.parseColor("#F0EEEE");
+ private int zLinsColor = Color.parseColor("#F0DC25");
+ private int indicatorColor = Color.parseColor("#E42E2E");
+
+ public AttitudeIndicatorView(Context context) {
+ super(context);
+ init();
+ }
+
+ public AttitudeIndicatorView(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ init();
+ }
+
+ private void init() {
+ paint = new Paint(Paint.ANTI_ALIAS_FLAG);
+// paint.setStyle(Paint.Style.STROKE);
+ paint.setTextSize(dpToPx(7));
+ bounds = new RectF();
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ int minSize = (int) dpToPx(MIN_SIZE_DP);
+ int width = resolveSize(minSize, widthMeasureSpec);
+ int height = resolveSize(minSize, heightMeasureSpec);
+ setMeasuredDimension(width, height);
+ }
+
+ @Override
+ protected void onDraw(Canvas canvas) {
+ super.onDraw(canvas);
+
+ int width = getWidth();
+ int height = getHeight();
+ float centerX = width / 2f;
+ float centerY = height / 2f;
+ float radius = Math.min(width, height) / 2f * 0.9f;
+
+ bounds.set(centerX - radius, centerY - radius,
+ centerX + radius, centerY + radius);
+
+ // 1. 绘制滚转背景(天空和地面)
+// drawRollBackground(canvas, centerX, centerY, radius);
+
+ // 2. 绘制俯仰刻度
+ drawPitchScale(canvas, centerX, centerY, radius);
+
+
+ // 5. 绘制中心十字线
+ drawCenterCross(canvas, centerX, centerY, radius);
+ }
+
+ private void drawRollBackground(Canvas canvas, float centerX, float centerY, float radius) {
+ // 保存画布状态
+ canvas.save();
+
+ // 应用滚转旋转
+ canvas.rotate(-roll, centerX, centerY);
+
+ // 计算天空和地面的分界线
+ float pitchOffset = pitch * radius / 90;
+
+ // 绘制天空(上半部分)
+ paint.setColor(skyColor);
+// paint.setStyle(Paint.Style.FILL);
+ canvas.drawArc(bounds, 180, 180, true, paint);
+
+ // 绘制地面(下半部分)
+ paint.setColor(groundColor);
+ canvas.drawArc(bounds, 0, 180, true, paint);
+
+ // 恢复画布状态
+ canvas.restore();
+ }
+
+ private void drawPitchScale(Canvas canvas, float centerX, float centerY, float radius) {
+ paint.setColor(scaleColor);
+// paint.setStyle(Paint.Style.STROKE);
+ paint.setStrokeWidth(dpToPx(1)/3);
+
+ int pitchRange = 90; // ±30度
+ float pitchStep = 30; // 每15度一条线
+ float lineLength = radius * 0.3f;
+
+ for (float angle = -pitchRange; angle <= pitchRange; angle += pitchStep) {
+ float yOffset = (angle - pitch) * radius / 90 ;
+
+ if (angle != 0) {
+ paint.setColor(scaleColor);
+ int width = (90 - (int) Math.abs(angle)) / 10 * 3;
+ // 水平线
+ canvas.drawLine(
+ centerX - lineLength - width, centerY + yOffset,
+ centerX + lineLength + width, centerY + yOffset,
+ paint);
+ } else {
+ paint.setColor(zLinsColor);
+ // 中间水平线
+ canvas.drawLine(
+ centerX - lineLength - 36, centerY + yOffset,
+ centerX + lineLength + 36, centerY + yOffset,
+ paint);
+ }
+
+ }
+ }
+
+
+
+ private void drawCenterCross(Canvas canvas, float centerX, float centerY, float radius) {
+// paint.setColor(indicatorColor);
+//// paint.setStyle(Paint.Style.STROKE);
+// paint.setStrokeWidth(dpToPx(2));
+// float crossSize = radius * 0.1f;
+
+
+ // 从资源中加载图片
+ Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.mipmap.icon_uav);
+// bitmap.setWidth((int)dpToPx(20));
+// bitmap.setHeight((int)dpToPx(3));
+
+ canvas.rotate(-roll, centerX, centerY);
+ // 获取画布的宽高
+ int canvasWidth = canvas.getWidth();
+ int canvasHeight = canvas.getHeight();
+
+ // 获取图片的宽高
+ int bitmapWidth = bitmap.getWidth();
+ int bitmapHeight = bitmap.getHeight();
+
+ // 计算图片左上角的坐标,使其居中
+ float x = (canvasWidth - bitmapWidth) / 2f;
+ float y = (canvasHeight - bitmapHeight) / 2f;
+
+ // 绘制图片到Canvas上
+ canvas.drawBitmap(bitmap, x, y, paint);
+
+
+ }
+
+ public float dpToPx(float dp) {
+ return dp * getResources().getDisplayMetrics().density;
+ }
+
+ // 设置姿态参数
+ public void setAttitude(float pitch, float roll, float yaw) {
+ this.pitch = pitch;
+ this.roll = roll;
+ this.yaw = yaw;
+ invalidate();
+ }
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/View/CircularLinearLayout.java b/app/src/main/java/com/example/longyi_groundstation/Main/View/CircularLinearLayout.java
new file mode 100644
index 0000000..c3e82d1
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Main/View/CircularLinearLayout.java
@@ -0,0 +1,44 @@
+package com.example.longyi_groundstation.Main.View;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.Path;
+import android.util.AttributeSet;
+import android.widget.LinearLayout;
+
+public class CircularLinearLayout extends LinearLayout {
+ private Paint paint;
+ private Path clipPath;
+
+ public CircularLinearLayout(Context context) {
+ super(context);
+ init();
+ }
+
+ public CircularLinearLayout(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ init();
+ }
+
+ private void init() {
+ paint = new Paint();
+ paint.setAntiAlias(true);
+ clipPath = new Path();
+ setWillNotDraw(false); // 允许绘制
+ }
+
+ @Override
+ protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+ super.onSizeChanged(w, h, oldw, oldh);
+ // 创建圆形裁剪路径(假设是正方形)
+ float radius = Math.min(w, h) / 2f;
+ clipPath.addCircle(w / 2f, h / 2f, radius, Path.Direction.CW);
+ }
+
+ @Override
+ protected void dispatchDraw(Canvas canvas) {
+ canvas.clipPath(clipPath); // 裁剪为圆形
+ super.dispatchDraw(canvas);
+ }
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/View/DragResizeLayout.java b/app/src/main/java/com/example/longyi_groundstation/Main/View/DragResizeLayout.java
new file mode 100644
index 0000000..931fe1c
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Main/View/DragResizeLayout.java
@@ -0,0 +1,105 @@
+package com.example.longyi_groundstation.Main.View;
+
+import android.content.Context;
+import android.util.AttributeSet;
+import android.view.MotionEvent;
+import android.widget.FrameLayout;
+
+public class DragResizeLayout extends FrameLayout {
+ private static final int TOUCH_AREA_SIZE_DP = 30; // 拖拽区域大小
+ private static final float MIN_SCALE = 0.5f; // 最小缩放比例
+ private static final float MAX_SCALE = 2.0f; // 最大缩放比例
+
+ private float touchAreaSizePx;
+ private boolean isResizing = false;
+ private float lastX, lastY;
+ private float initialAspectRatio; // 初始宽高比
+
+ public DragResizeLayout(Context context) {
+ super(context);
+ init();
+ }
+
+ public DragResizeLayout(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ init();
+ }
+
+ public DragResizeLayout(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ init();
+ }
+
+ private void init() {
+ touchAreaSizePx = dpToPx(TOUCH_AREA_SIZE_DP);
+ }
+
+ @Override
+ protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+ super.onSizeChanged(w, h, oldw, oldh);
+ if (w > 0 && h > 0) {
+ initialAspectRatio = (float) w / h;
+ }
+ }
+
+ @Override
+ public boolean onInterceptTouchEvent(MotionEvent event) {
+ float x = event.getX();
+ float y = event.getY();
+
+ // 检查是否点击在右上角的拖拽区域
+ if (x >= getWidth() - touchAreaSizePx && y <= touchAreaSizePx) {
+ return true;
+ }
+ return super.onInterceptTouchEvent(event);
+ }
+
+ @Override
+ public boolean onTouchEvent(MotionEvent event) {
+ float x = event.getX();
+ float y = event.getY();
+
+ switch (event.getAction()) {
+ case MotionEvent.ACTION_DOWN:
+ if (x >= getWidth() - touchAreaSizePx && y <= touchAreaSizePx) {
+ isResizing = true;
+ lastX = x;
+ lastY = y;
+ return true;
+ }
+ break;
+
+ case MotionEvent.ACTION_MOVE:
+ if (isResizing) {
+ float dx = x - lastX;
+ float dy = y - lastY;
+
+ // 计算新的宽度和高度(保持原始宽高比)
+ float scaleFactor = 1 + dx / getWidth();
+ float newScale = Math.max(MIN_SCALE, Math.min(MAX_SCALE, scaleFactor));
+
+ // 更新布局参数
+ FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) getLayoutParams();
+ params.width = (int) (getWidth() * newScale);
+ params.height = (int) (params.width / initialAspectRatio);
+ setLayoutParams(params);
+
+ lastX = x;
+ lastY = y;
+ return true;
+ }
+ break;
+
+ case MotionEvent.ACTION_UP:
+ case MotionEvent.ACTION_CANCEL:
+ isResizing = false;
+ break;
+ }
+
+ return super.onTouchEvent(event);
+ }
+
+ private float dpToPx(float dp) {
+ return dp * getResources().getDisplayMetrics().density;
+ }
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/View/ErrorLogDialog.java b/app/src/main/java/com/example/longyi_groundstation/Main/View/ErrorLogDialog.java
new file mode 100644
index 0000000..d667f64
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Main/View/ErrorLogDialog.java
@@ -0,0 +1,94 @@
+package com.example.longyi_groundstation.Main.View;
+
+import android.annotation.SuppressLint;
+import android.app.AlertDialog;
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.Window;
+import android.view.WindowManager;
+import android.widget.TextView;
+
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.example.longyi_groundstation.Main.Adapter.LogAdapter;
+import com.example.longyi_groundstation.Main.Void.MyTool;
+import com.example.longyi_groundstation.R;
+
+public class ErrorLogDialog {
+
+ private final Context context;
+ private String title;
+ private String message;
+ private String positiveButtonText;
+ public LogAdapter adapter;
+
+
+ public ErrorLogDialog(Context context) {
+ this.context = context;
+ this.title = "错误日志";
+ this.message = "";
+ this.positiveButtonText = "确定";
+ }
+
+ // 设置弹窗标题
+ public ErrorLogDialog setTitle(String title) {
+ this.title = title;
+ return this;
+ }
+
+ // 设置弹窗内容
+ public ErrorLogDialog setMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ // 设置确认按钮文字
+ public ErrorLogDialog setPositiveButtonText(String text) {
+ this.positiveButtonText = text;
+ return this;
+ }
+
+ // 显示弹窗
+ public void show() {
+ AlertDialog.Builder builder = new AlertDialog.Builder(context);
+
+ // 使用自定义布局
+ View view = LayoutInflater.from(context).inflate(R.layout.dialog_error_log, null);
+ @SuppressLint({"MissingInflatedId", "LocalSuppress"}) TextView tvMessage = view.findViewById(R.id.tv_message);
+ RecyclerView recyclerView = view.findViewById(R.id.rv_list);
+ recyclerView.setLayoutManager(new LinearLayoutManager(context));
+ adapter = new LogAdapter();
+ recyclerView.setAdapter(adapter);
+ // 添加日志
+// adapter.addLog("这是一个错误日志");
+ builder.setView(view)
+// .setTitle(title)
+// .setPositiveButton(positiveButtonText, new DialogInterface.OnClickListener() {
+// @Override
+// public void onClick(DialogInterface dialog, int which) {
+// dialog.dismiss();
+// }
+// })
+ ;
+ AlertDialog dialog = builder.create();
+ dialog.show();
+
+ // 设置宽高
+ Window window = dialog.getWindow();
+ if (window != null) {
+ WindowManager.LayoutParams layoutParams = window.getAttributes();
+ layoutParams.width = MyTool.dpToPx(context,300); // 或具体像素值
+ layoutParams.height = ViewGroup.LayoutParams.WRAP_CONTENT; // 或具体像素值
+ window.setAttributes(layoutParams);
+ window.setBackgroundDrawableResource(R.drawable.ffffffff_4round_bg);
+ }
+
+ tvMessage.setOnClickListener(v -> {
+ dialog.dismiss();
+ });
+ }
+
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/View/FPV_Void.kt b/app/src/main/java/com/example/longyi_groundstation/Main/View/FPV_Void.kt
new file mode 100644
index 0000000..2d2b06d
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Main/View/FPV_Void.kt
@@ -0,0 +1,25 @@
+package com.example.longyi_groundstation.Main.View
+
+import com.skydroid.fpvplayer.PlayerType
+import com.skydroid.fpvplayer.RtspTransport
+
+class FPV_Void {
+
+
+ fun setupFpvWidget(fpvWidget: com.skydroid.fpvplayer.FPVWidget, url: String) {
+ fpvWidget.url = url
+ fpvWidget.stop()
+ //使用硬解
+ fpvWidget.usingMediaCodec = true
+ fpvWidget.rtspTranstype = RtspTransport.AUTO
+ fpvWidget.playerType = PlayerType.ONLY_SKY //
+ //开始播放
+ fpvWidget.start()
+ }
+
+ fun Fstop(fpvWidget: com.skydroid.fpvplayer.FPVWidget) {
+ fpvWidget.stop()
+ }
+
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Void/AllView.java b/app/src/main/java/com/example/longyi_groundstation/Main/Void/AllView.java
new file mode 100644
index 0000000..a054a2e
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Main/Void/AllView.java
@@ -0,0 +1,73 @@
+package com.example.longyi_groundstation.Main.Void;
+
+import android.app.Activity;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+import android.widget.VideoView;
+
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.amap.api.maps.MapView;
+import com.example.longyi_groundstation.Main.View.AttitudeIndicatorView;
+import com.example.longyi_groundstation.Main.View.CircularLinearLayout;
+import com.example.longyi_groundstation.R;
+import com.skydroid.fpvplayer.FPVWidget;
+
+public class AllView {
+
+ public Activity activity;
+ public MapView map;
+ public LinearLayout ll_title;
+ public RecyclerView rv_type_list;
+
+ public RelativeLayout main;
+ public FPVWidget fpvWidget;
+
+ public TextView tv_height;
+ public TextView tv_satellite;
+ public TextView tv_vel;
+ public TextView tv_power;
+ public TextView tv_connect;
+ public ImageView iv_error;
+ public LinearLayout ll_line_fly_layout;
+ public LinearLayout ll_pitch;
+ public CircularLinearLayout cll_layout;
+ public ImageView iv_yaw;
+ public View v_welkin;
+ public TextView tv_yaw;
+ public View v_mainDisplay;
+ public ImageView iv_location_me;
+// public ImageView iv_line_fly;
+
+ public AllView(Activity activity) {
+ this.activity = activity;
+ init();
+ }
+
+ public void init() {
+ ll_title = activity.findViewById(R.id.ll_title);
+ rv_type_list = activity.findViewById(R.id.rv_type_list);
+ main = activity.findViewById(R.id.main);
+ map = activity.findViewById(R.id.map);
+// map_s = activity.findViewById(R.id.map_s);
+ fpvWidget = activity.findViewById(R.id.fpvWidget);
+ tv_height = activity.findViewById(R.id.tv_height);
+ tv_satellite = activity.findViewById(R.id.tv_satellite);
+ tv_vel = activity.findViewById(R.id.tv_vel);
+ tv_power = activity.findViewById(R.id.tv_power);
+ tv_connect = activity.findViewById(R.id.tv_connect);
+ iv_error = activity.findViewById(R.id.iv_error);
+ ll_line_fly_layout = activity.findViewById(R.id.ll_line_fly_layout);
+ ll_pitch = activity.findViewById(R.id.ll_pitch);
+ cll_layout = activity.findViewById(R.id.cll_layout);
+ iv_yaw = activity.findViewById(R.id.iv_yaw);
+ v_welkin = activity.findViewById(R.id.v_welkin);
+ tv_yaw = activity.findViewById(R.id.tv_yaw);
+ v_mainDisplay = activity.findViewById(R.id.v_mainDisplay);
+ iv_location_me = activity.findViewById(R.id.iv_location_me);
+// iv_line_fly = activity.findViewById(R.id.iv_line_fly);
+ }
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Void/CoordinateConverter.java b/app/src/main/java/com/example/longyi_groundstation/Main/Void/CoordinateConverter.java
new file mode 100644
index 0000000..664a09c
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Main/Void/CoordinateConverter.java
@@ -0,0 +1,59 @@
+package com.example.longyi_groundstation.Main.Void;
+
+
+/**
+ * 方法:高德地图和谷歌地图坐标转换
+ *
+ * @cuijingzhou
+ */
+public class CoordinateConverter {
+ private static final double PI = 3.1415926535897932384626;
+ private static final double A = 6378245.0;
+ private static final double EE = 0.00669342162296594323;
+
+ // 高德(GCJ02)转谷歌(WGS84)
+ public static double[] gcj02ToWgs84(double lng, double lat) {
+ if (outOfChina(lng, lat)) {
+ return new double[]{lng, lat};
+ }
+ double[] gcj = wgs84ToGcj02(lng, lat);
+ return new double[]{lng * 2 - gcj[0], lat * 2 - gcj[1]};
+ }
+
+ // 谷歌(WGS84)转高德(GCJ02)
+ public static double[] wgs84ToGcj02(double lng, double lat) {
+ if (outOfChina(lng, lat)) {
+ return new double[]{lng, lat};
+ }
+ double dlat = transformLat(lng - 105.0, lat - 35.0);
+ double dlng = transformLng(lng - 105.0, lat - 35.0);
+ double radlat = lat / 180.0 * PI;
+ double magic = Math.sin(radlat);
+ magic = 1 - EE * magic * magic;
+ double sqrtmagic = Math.sqrt(magic);
+ dlat = (dlat * 180.0) / ((A * (1 - EE)) / (magic * sqrtmagic) * PI);
+ dlng = (dlng * 180.0) / (A / sqrtmagic * Math.cos(radlat) * PI);
+ return new double[]{lng + dlng, lat + dlat};
+ }
+
+ private static boolean outOfChina(double lng, double lat) {
+ return lng < 72.004 || lng > 137.8347 || lat < 0.8293 || lat > 55.8271;
+ }
+
+ private static double transformLat(double x, double y) {
+ double ret = -100.0 + 2.0 * x + 3.0 * y + 0.2 * y * y + 0.1 * x * y;
+ ret += 0.2 * Math.sqrt(Math.abs(x));
+ ret += (20.0 * Math.sin(6.0 * x * PI) + 20.0 * Math.sin(2.0 * x * PI)) * 2.0 / 3.0;
+ ret += (20.0 * Math.sin(y * PI) + 40.0 * Math.sin(y / 3.0 * PI)) * 2.0 / 3.0;
+ ret += (160.0 * Math.sin(y / 12.0 * PI) + 320 * Math.sin(y * PI / 30.0)) * 2.0 / 3.0;
+ return ret;
+ }
+
+ private static double transformLng(double x, double y) {
+ double ret = 300.0 + x + 2.0 * y + 0.1 * x * x + 0.1 * x * y + 0.1 * Math.sqrt(Math.abs(x));
+ ret += (20.0 * Math.sin(6.0 * x * PI) + 20.0 * Math.sin(2.0 * x * PI)) * 2.0 / 3.0;
+ ret += (20.0 * Math.sin(x * PI) + 40.0 * Math.sin(x / 3.0 * PI)) * 2.0 / 3.0;
+ ret += (150.0 * Math.sin(x / 12.0 * PI) + 300.0 * Math.sin(x / 30.0 * PI)) * 2.0 / 3.0;
+ return ret;
+ }
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Void/FlyVoid.java b/app/src/main/java/com/example/longyi_groundstation/Main/Void/FlyVoid.java
new file mode 100644
index 0000000..b52718b
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Main/Void/FlyVoid.java
@@ -0,0 +1,33 @@
+package com.example.longyi_groundstation.Main.Void;
+
+import android.content.Context;
+import android.view.ViewGroup;
+
+import com.amap.api.services.auto.ListData;
+
+/**
+ * 方法:控制姿态仪表盘方法
+ *
+ * @cuijingzhou
+ */
+public class FlyVoid {
+
+ public void setAttitude(Context content, AllView allView, double roll, double pitch, double yaw) {
+ //设置偏航
+ allView.iv_yaw.setRotation((int) Math.round(yaw * 51.7));
+ //设置翻滚
+ allView.cll_layout.setRotation((int) Math.round(roll * 51.7)*-1);
+ //设置俯仰
+ ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) allView.ll_pitch.getLayoutParams();
+ params.topMargin = MyTool.dpToPx(content,(int) Math.round(pitch * 51.7)) / 2; // 设置上边距(像素单位)
+ allView.ll_pitch.setLayoutParams(params);
+
+
+ allView.v_welkin.getLayoutParams().height = MyTool.dpToPx(content,41+(int) Math.round(pitch * 51.7));
+ // 最后必须应用参数
+ allView.v_welkin.requestLayout(); // 或 view.setLayoutParams(view.getLayoutParams());
+ }
+
+
+
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Void/KeDaTTS.java b/app/src/main/java/com/example/longyi_groundstation/Main/Void/KeDaTTS.java
new file mode 100644
index 0000000..5cb5f71
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Main/Void/KeDaTTS.java
@@ -0,0 +1,30 @@
+package com.example.longyi_groundstation.Main.Void;
+
+import android.app.Activity;
+import android.util.Log;
+
+import com.iflytek.aikit.core.AiHandle;
+import com.iflytek.aikit.core.AiHelper;
+import com.iflytek.aikit.core.AiRequest;
+
+public class KeDaTTS {
+
+
+ public static void init(String string) {
+ AiRequest.Builder paramBuilder = AiRequest.builder();
+ paramBuilder.param("vcn", "xiaoyan:");
+ paramBuilder.param("language",1);
+//paramBuilder.param("pitch", 50);
+//paramBuilder.param("volume", 50);
+//paramBuilder.param("speed", 50);
+//paramBuilder.param("reg", 0);
+//paramBuilder.param("rdn", 0);
+ paramBuilder.param("textEncoding", "UTF-8");
+ AiHandle handle = AiHelper.getInst().start(string,paramBuilder.build(),null);
+ if (!handle.isSuccess()) {
+ Log.d("cuijingzhou_error", "init: ");
+ return;
+ }
+ }
+
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Void/MapVoid.java b/app/src/main/java/com/example/longyi_groundstation/Main/Void/MapVoid.java
new file mode 100644
index 0000000..c7855c4
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Main/Void/MapVoid.java
@@ -0,0 +1,119 @@
+package com.example.longyi_groundstation.Main.Void;
+
+import android.app.Activity;
+import android.graphics.Color;
+import android.location.Location;
+import android.os.Bundle;
+import android.util.Log;
+
+import com.amap.api.maps.AMap;
+import com.amap.api.maps.AMapUtils;
+import com.amap.api.maps.MapView;
+import com.amap.api.maps.MapsInitializer;
+import com.amap.api.maps.model.LatLng;
+import com.amap.api.maps.model.MyLocationStyle;
+import com.amap.api.maps.model.Polyline;
+import com.amap.api.maps.model.PolylineOptions;
+import com.example.longyi_groundstation.R;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class MapVoid {
+ private String TAG = "cui";
+
+ private Activity activity;
+
+ public AllView allView;
+
+ private Bundle savedInstanceState;
+ //初始化地图控制器对象
+ public AMap aMap = null;
+ //初始化地图控制器对象
+ //画线
+ public Polyline polyline;
+ //画线
+ public List latLngss;
+
+ public MapVoid(Activity activity) {
+ this.activity = activity;
+ init();
+ }
+
+ public void init() {
+ //高德地图用户协议不能删除
+ MapsInitializer.updatePrivacyShow(activity, true, true);
+ MapsInitializer.updatePrivacyAgree(activity, true);
+ allView = new AllView(activity);
+ //在activity执行onCreate时执行mMapView.onCreate(savedInstanceState),创建地图
+ allView.map.onCreate(savedInstanceState);
+ aMap = allView.map.getMap();
+ // 禁用POI点击
+ aMap.setMapType(AMap.MAP_TYPE_SATELLITE);// 设置卫星地图模式,aMap是地图控制器对象。
+ aMap.getUiSettings().setZoomControlsEnabled(false);// 隐藏地图上的缩放控件(+ 和 - 按钮)
+ MyLocationStyle myLocationStyle;
+ myLocationStyle = new MyLocationStyle();//初始化定位蓝点样式类
+ myLocationStyle.myLocationType(MyLocationStyle.LOCATION_TYPE_LOCATE);//定位一次,且将视角移动到地图中心点。
+ aMap.setMyLocationStyle(myLocationStyle);//设置定位蓝点的Style
+ aMap.setMyLocationEnabled(false);// 设置为true表示启动显示定位蓝点,false表示隐藏定位蓝点并不进行定位,默认是false。
+ aMap.setOnMyLocationChangeListener(new AMap.OnMyLocationChangeListener() {
+ @Override
+ public void onMyLocationChange(Location location) {
+// Log.d(TAG, location.toString());
+ }
+ });
+
+
+ //画大地图飞行线
+ polyline = aMap.addPolyline(new PolylineOptions()
+ .width(10)
+ .color(
+ Color.argb(255, 1, 1, 1))
+ );
+ polyline.setVisible(true);
+ latLngss = new ArrayList<>();
+ upLine();
+ }
+
+ /**
+ * 方法:更新线路的线程
+ *
+ * @cuijingzhou
+ */
+ public void upLine() {
+ new Thread(new Runnable() {
+ @Override
+ public void run() {
+ while (aMap != null){
+ try {
+// List latLngs = ;
+ polyline.setPoints(latLngss);
+ Thread.sleep(500);
+// polyline.setVisible(true);
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }).start();
+ }
+
+ public void showLine(boolean isShow) {
+ polyline.setVisible(isShow);
+ }
+
+
+
+ /**
+ * 计算两个坐标点之间的直线距离(单位:米)
+ * @param latLng1 第一个坐标点
+ * @param latLng2 第二个坐标点
+ * @return 距离(米)
+ */
+ public static double calculateDistance(LatLng latLng1, LatLng latLng2) {
+ if (latLng1 == null || latLng2 == null) {
+ return 0;
+ }
+ return AMapUtils.calculateLineDistance(latLng1, latLng2);
+ }
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Void/MyReceiver.java b/app/src/main/java/com/example/longyi_groundstation/Main/Void/MyReceiver.java
new file mode 100644
index 0000000..e0150b0
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Main/Void/MyReceiver.java
@@ -0,0 +1,218 @@
+package com.example.longyi_groundstation.Main.Void;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.util.Log;
+
+import org.json.JSONObject;
+
+public class MyReceiver extends BroadcastReceiver {
+ public MyReceiver myReceiver;
+ public boolean isReceiverRegistered = false;
+ public static JSONObject ATTITUDE_json = null;//基础
+ public static JSONObject GPS_RAW_INT_json = null;//GPS
+ public static JSONObject GLOBAL_POSITION_INT_json = null;//整体位置
+ public static JSONObject POWER_STATUS_json = null;//电量状态
+ public static JSONObject SYS_STATUS_json = null;//系统状态
+ public static JSONObject STATUSTEXT_json = null;//告警
+ public static JSONObject HEARTBEAT_json = null;//飞机基础飞行模式
+
+
+ //ATTITUDE
+ public interface OnATTITUDEListener {
+ void onATTITUDE(JSONObject data);
+ }
+ private OnATTITUDEListener ATTITUDElistener;
+
+ //GPS
+ public interface OnGPSListener {
+ void onGPS(JSONObject data);
+ }
+ private OnGPSListener GPSlistener;
+
+ //GLOBAL_POSITION_INT
+ public interface OnGlobalPositionIntListener {
+ void onGlobalPositionInt(JSONObject data);
+ }
+ private OnGlobalPositionIntListener GlobalPositionIntlistener;
+
+ //POWER_STATUS
+ public interface OnPowrStatusListener {
+ void onPowrStatus(JSONObject data);
+ }
+ private OnPowrStatusListener PowrStatuslistener;
+
+ //SYS_STATUS
+ public interface OnSysStatusListener {
+ void onSysStatus(JSONObject data);
+ }
+ private OnSysStatusListener SysStatuslistener;
+
+ //STATUSTEXT
+ public interface OnStatustextListener {
+ void onStatustext(JSONObject data);
+ }
+ private OnStatustextListener Statustextlistener;
+
+ //HEARTBEAT
+ public interface OnHeartbeatListener {
+ void onHeartbeat(JSONObject data);
+ }
+ private OnHeartbeatListener Heartbeatlistener;
+
+ public void setATTITUDEListener(OnATTITUDEListener listener) {
+ this.ATTITUDElistener = listener;
+ }
+ public void setGPSListener(OnGPSListener listener) {
+ this.GPSlistener = listener;
+ }
+ public void setGlobalPositionIntlistener(OnGlobalPositionIntListener listener) {
+ this.GlobalPositionIntlistener = listener;
+ }
+ public void setPowrStatuslistener(OnPowrStatusListener listener) {
+ this.PowrStatuslistener = listener;
+ }
+ public void setSysStatuslistener(OnSysStatusListener listener) {
+ this.SysStatuslistener = listener;
+ }
+ public void setStatustextlistener(OnStatustextListener listener) {
+ this. Statustextlistener = listener;
+ }
+ public void setHeartbeatlistener(OnHeartbeatListener listener) {
+ this.Heartbeatlistener = listener;
+ }
+
+
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ if ("Broadcast_ATTITUDE".equals(intent.getAction())) {
+ try {
+ String receivedData = intent.getStringExtra("data");
+ if (receivedData != null) {
+ ATTITUDE_json = new JSONObject(receivedData);
+ ATTITUDE_json.optString("jsonObject");
+ Log.d("cuijingzhou", "onReceive: " + receivedData);
+ // 触发回调
+ if (ATTITUDElistener != null) {
+ ATTITUDElistener.onATTITUDE(ATTITUDE_json);
+ }
+ }
+
+ } catch (Exception e) {
+ Log.e("cuijingzhou-e", e.toString());
+ }
+
+ }
+
+ if ("Broadcast_GPS_RAW_INT".equals(intent.getAction())) {
+ try {
+ String receivedData = intent.getStringExtra("data");
+ if (receivedData != null) {
+ GPS_RAW_INT_json = new JSONObject(receivedData);
+ GPS_RAW_INT_json.optString("jsonObject");
+ Log.d("cuijingzhou", "onReceive: " + receivedData);
+ // 触发回调
+ if (GPSlistener != null) {
+ GPSlistener.onGPS(GPS_RAW_INT_json);
+ }
+ }
+
+ } catch (Exception e) {
+ Log.e("cuijingzhou-e", e.toString());
+ }
+
+ }
+ if ("Broadcast_GLOBAL_POSITION_INT".equals(intent.getAction())) {
+ try {
+ String receivedData = intent.getStringExtra("data");
+ if (receivedData != null) {
+ GLOBAL_POSITION_INT_json = new JSONObject(receivedData);
+ GLOBAL_POSITION_INT_json.optString("jsonObject");
+ Log.d("cuijingzhou", "onReceive: " + receivedData);
+ // 触发回调
+ if (GlobalPositionIntlistener != null) {
+ GlobalPositionIntlistener.onGlobalPositionInt(GLOBAL_POSITION_INT_json);
+ }
+ }
+
+ } catch (Exception e) {
+ Log.e("cuijingzhou-e", e.toString());
+ }
+ }
+
+ if ("Broadcast_POWER_STATUS".equals(intent.getAction())) {
+ try {
+ String receivedData = intent.getStringExtra("data");
+ if (receivedData != null) {
+ POWER_STATUS_json = new JSONObject(receivedData);
+ POWER_STATUS_json.optString("jsonObject");
+ Log.d("cuijingzhou", "onReceive: " + receivedData);
+ // 触发回调
+ if (PowrStatuslistener != null) {
+ PowrStatuslistener.onPowrStatus(POWER_STATUS_json);
+ }
+ }
+
+ } catch (Exception e) {
+ Log.e("cuijingzhou-e", e.toString());
+ }
+
+ }
+
+ if ("Broadcast_SYS_STATUS".equals(intent.getAction())) {
+ try {
+ String receivedData = intent.getStringExtra("data");
+ if (receivedData != null) {
+ SYS_STATUS_json = new JSONObject(receivedData);
+ SYS_STATUS_json.optString("jsonObject");
+ Log.d("cuijingzhou", "onReceive: " + receivedData);
+ // 触发回调
+ if (SysStatuslistener != null) {
+ SysStatuslistener.onSysStatus(SYS_STATUS_json);
+ }
+ }
+
+ } catch (Exception e) {
+ Log.e("cuijingzhou-e", e.toString());
+ }
+ }
+
+ if ("Broadcast_STATUSTEXT".equals(intent.getAction())) {
+ try {
+ String receivedData = intent.getStringExtra("data");
+ if (receivedData != null) {
+ STATUSTEXT_json = new JSONObject(receivedData);
+ STATUSTEXT_json.optString("jsonObject");
+ Log.d("cuijingzhou", "onReceive: " + receivedData);
+ // 触发回调
+ if (Statustextlistener != null) {
+ Statustextlistener.onStatustext(STATUSTEXT_json);
+ }
+ }
+
+ } catch (Exception e) {
+ Log.e("cuijingzhou-e", e.toString());
+ }
+ }
+
+ if ("Broadcast_HEARTBEAT".equals(intent.getAction())) {
+ try {
+ String receivedData = intent.getStringExtra("data");
+ if (receivedData != null) {
+ HEARTBEAT_json = new JSONObject(receivedData);
+ HEARTBEAT_json.optString("jsonObject");
+ Log.d("cuijingzhou", "onReceive: " + receivedData);
+ // 触发回调
+ if (Heartbeatlistener != null) {
+ Heartbeatlistener.onHeartbeat(HEARTBEAT_json);
+ }
+ }
+
+ } catch (Exception e) {
+ Log.e("cuijingzhou-e", e.toString());
+ }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Void/MyTool.java b/app/src/main/java/com/example/longyi_groundstation/Main/Void/MyTool.java
new file mode 100644
index 0000000..735848d
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Main/Void/MyTool.java
@@ -0,0 +1,48 @@
+package com.example.longyi_groundstation.Main.Void;
+
+import android.content.Context;
+import android.util.TypedValue;
+import android.view.View;
+import android.view.ViewGroup;
+
+public class MyTool {
+
+ /**
+ * 方法:设置视图的宽高
+ *
+ * @cuijingzhou
+ */
+ public static void setViewWH(Context context,View view, int width, int height,int margin) {
+ ViewGroup.LayoutParams params = view.getLayoutParams();
+ params.width = dpToPx(context,width); // 设置宽度为 200px
+ params.height = dpToPx(context,height); // 设置高度为 300px
+ view.setLayoutParams(params);
+ ViewGroup.MarginLayoutParams paramsm = (ViewGroup.MarginLayoutParams) view.getLayoutParams();
+ paramsm.setMargins(
+ dpToPx(context,margin),
+ dpToPx(context,margin),
+ dpToPx(context,margin),
+ dpToPx(context,margin));// 边距 px
+ view.setLayoutParams(params);
+ }
+
+ /**
+ * 方法:dp转px
+ *
+ * @cuijingzhou
+ */
+ public static int dpToPx(Context context, float dp) {
+ return (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, context.getResources().getDisplayMetrics());
+ }
+
+ // byte数组转16进制字符串
+ public static String bytesToHex(byte[] bytes, int length) {
+ StringBuilder sb = new StringBuilder();
+ for (int i = 0; i < length; i++) {
+ sb.append(String.format("%02X", bytes[i] & 0xFF));
+ }
+ return sb.toString();
+ }
+
+
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/Main/Void/UdpClient.java b/app/src/main/java/com/example/longyi_groundstation/Main/Void/UdpClient.java
new file mode 100644
index 0000000..dbc31cf
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Main/Void/UdpClient.java
@@ -0,0 +1,59 @@
+package com.example.longyi_groundstation.Main.Void;
+
+import java.io.IOException;
+import java.net.DatagramPacket;
+import java.net.DatagramSocket;
+import java.net.InetAddress;
+import java.net.SocketException;
+import java.net.UnknownHostException;
+
+public class UdpClient {
+ public DatagramSocket socket;
+ private InetAddress address;
+ private int port;
+
+ public UdpClient(String host, int port) throws SocketException, UnknownHostException {
+ this.port = port;
+ socket = new DatagramSocket();
+ address = InetAddress.getByName(host); // 服务器的IP地址或域名
+ }
+
+ public void send(String message) throws IOException {
+ byte[] sendData = hexStringToByteArray(message);
+// byte[] sendData = message.getBytes();
+// byte[] sendData = hexStr2bytes(message);
+ DatagramPacket sendPacket = new DatagramPacket(sendData, sendData.length, address, port);
+ socket.send(sendPacket);
+// System.out.println("SENT: " + message);
+ }
+
+ public String receive(int bufferSize) throws IOException {
+ byte[] receiveData = new byte[bufferSize];
+ DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);
+ socket.receive(receivePacket);
+ return byteArrayToHexString(receiveData);
+ }
+
+ private String byteArrayToHexString(byte[] bytes) {
+ StringBuilder sb = new StringBuilder();
+ for (byte b : bytes) {
+ sb.append(String.format("%02X", b));
+ }
+ return sb.toString();
+ }
+
+
+
+ //字符串转字节数组
+ private byte[] hexStringToByteArray(String s) {
+ int len = s.length();
+ byte[] data = new byte[len / 2];
+ for (int i = 0; i < len; i += 2) {
+ data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4)
+ + Character.digit(s.charAt(i + 1), 16));
+ }
+ return data;
+ }
+
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MainActivity2.java b/app/src/main/java/com/example/longyi_groundstation/MainActivity2.java
new file mode 100644
index 0000000..4035837
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MainActivity2.java
@@ -0,0 +1,101 @@
+package com.example.longyi_groundstation;
+
+import android.annotation.SuppressLint;
+import android.os.Bundle;
+import android.os.Message;
+import android.util.Log;
+import android.widget.TextView;
+
+import androidx.activity.EdgeToEdge;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.core.graphics.Insets;
+import androidx.core.view.ViewCompat;
+import androidx.core.view.WindowInsetsCompat;
+
+import com.example.longyi_groundstation.MAVLink.MAVLinkPacket;
+import com.example.longyi_groundstation.MAVLink.Messages.MAVLinkMessage;
+import com.example.longyi_groundstation.MAVLink.Parser;
+import com.example.longyi_groundstation.Util.Serial.SerialPortUtil;
+import com.example.longyi_groundstation.Util.Tool;
+import com.example.longyi_groundstation.Util.UdpClient;
+
+import java.io.IOException;
+import java.net.DatagramPacket;
+import java.net.DatagramSocket;
+import java.net.InetAddress;
+import java.net.SocketException;
+import java.net.UnknownHostException;
+
+import tp.xmaihh.serialport.SerialHelper;
+import tp.xmaihh.serialport.bean.ComBean;
+
+public class MainActivity2 extends AppCompatActivity {
+
+ private static final String TAG = "UDPServer";
+ private TextView tv_text;
+ private DatagramSocket serverSocket;
+ private boolean isRunning = true;
+ private int serverPort = 14550; // 服务端监听端口
+
+ private UdpClient udpClient;
+
+ @SuppressLint("MissingInflatedId")
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ EdgeToEdge.enable(this);
+ setContentView(R.layout.activity_main2);
+ ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
+ Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
+ v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
+ return insets;
+ });
+
+ tv_text = findViewById(R.id.tv_text);
+
+ try {
+ udpClient = new UdpClient("127.0.0.1", 14551); // 服务器的IP地址和端口号
+ isRunning = true;
+ udpClient.send("AA01");
+ getDataTR();
+
+ } catch (SocketException | UnknownHostException e) {
+// throw new RuntimeException(e);
+ Log.d(TAG, e + "");
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+
+
+ }
+
+ //接收数据线程
+ private void getDataTR() {
+ new Thread(() -> {
+ byte[] buffer = new byte[1024];
+ while (true) {
+ DatagramPacket packet = new DatagramPacket(buffer, buffer.length);
+ try {
+ if (udpClient != null) {
+ udpClient.socket.receive(packet);
+ //转成Hex
+ String receivedData = Tool.bytesToHex(packet.getData());
+ Log.d(TAG, receivedData);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ Log.d(TAG, "getDataTR: stop");
+// Log.e(TAG, " "+ e );
+ }
+
+ }
+ }).start();
+ }
+
+
+ @Override
+ protected void onDestroy() {
+ super.onDestroy();
+ isRunning = false;
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/MyApp.java b/app/src/main/java/com/example/longyi_groundstation/MyApp.java
new file mode 100644
index 0000000..3251038
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/MyApp.java
@@ -0,0 +1,56 @@
+package com.example.longyi_groundstation;
+
+import android.app.Application;
+import android.util.Log;
+
+import com.iflytek.aikit.core.AiHelper;
+import com.iflytek.aikit.core.AuthListener;
+import com.iflytek.aikit.core.ErrType;
+
+public class MyApp extends Application {
+ private static final String TAG = "MyApp";
+
+ @Override
+ public void onCreate() {
+ super.onCreate();
+
+// //配置应用信息
+// SparkChainConfig config = SparkChainConfig.builder()
+// .appID("c698888d")
+// .apiKey("340cad829099b2bfa073733a3c8344f9")
+// .apiSecret("NmEzNjhhMjg5NjMzNzA5MTVkYWYzNWJm");
+// int ret = SparkChain.getInst().init(getApplicationContext(), config);
+// Log.d("cuijingzhou-app-kdxf", ret+"");
+
+ // 初始化参数构建
+ AiHelper.Params params = AiHelper.Params.builder()
+ .appId("c698888d")
+ .apiKey("340cad829099b2bfa073733a3c8344f9")
+ .apiSecret("NmEzNjhhMjg5NjMzNzA5MTVkYWYzNWJm")
+ .ability(null)
+ .workDir("/sdcard/iflytek/aikit")//SDK工作路径,这里为绝对路径,此处仅为示例
+ .build();
+ // 初始化
+ AiHelper.getInst().init(this, params);
+ AiHelper.getInst().registerListener(new AuthListener() {
+ @Override
+ public void onAuthStateChange(ErrType errType, int code) {
+ Log.i(TAG, "core listener code:" + code);
+ switch (errType) {
+ case AUTH:
+ Log.i(TAG,"SDK状态:授权结果码" + code);
+ break;
+ case HTTP:
+ Log.i(TAG,"SDK状态:HTTP认证结果" + code);
+ break;
+ default:
+ Log.i(TAG,"SDK状态:其他错误");
+ }
+ }
+ });// 注册SDK 初始化状态监听 AiHelper.getInst().registerListener("e2e44feff", aiRespListener);// 注册能力结果监听
+
+ }
+
+
+
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/Util/BroadcastUtil.java b/app/src/main/java/com/example/longyi_groundstation/Util/BroadcastUtil.java
new file mode 100644
index 0000000..738a4a0
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Util/BroadcastUtil.java
@@ -0,0 +1,97 @@
+package com.example.longyi_groundstation.Util;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.util.Log;
+
+public class BroadcastUtil {
+
+ /**
+ * 飞行姿态
+ *
+ * @param context 上下文
+ * @param data 数据-json
+ */
+ public static void Broadcast_ATTITUDE(Context context, String data) {
+ Intent intent = new Intent("Broadcast_ATTITUDE");
+ intent.putExtra("data", data);
+ context.sendBroadcast(intent);
+ }
+
+ /**
+ * GPS
+ *
+ * @param context 上下文
+ * @param data 数据-json
+ */
+ public static void Broadcast_GPS_RAW_INT(Context context, String data) {
+ Intent intent = new Intent("Broadcast_GPS_RAW_INT");
+ intent.putExtra("data", data);
+ context.sendBroadcast(intent);
+ }
+
+ /**
+ * MAVLINK_MSG_ID_GLOBAL_POSITION_INT
+ *
+ * @param context 上下文
+ * @param data 数据-json
+ */
+ public static void Broadcast_GLOBAL_POSITION_INT(Context context, String data) {
+ Intent intent = new Intent("Broadcast_GLOBAL_POSITION_INT");
+ intent.putExtra("data", data);
+ context.sendBroadcast(intent);
+ }
+
+ /**
+ * MAVLINK_MSG_ID_POWER_STATUS
+ *
+ * @param context 上下文
+ * @param data 数据-json
+ */
+ public static void Broadcast_POWER_STATUS(Context context, String data) {
+ Intent intent = new Intent("Broadcast_POWER_STATUS");
+ intent.putExtra("data", data);
+ context.sendBroadcast(intent);
+ }
+
+ /**
+ * MAVLINK_MSG_ID_POWER_STATUS
+ *
+ * @param context 上下文
+ * @param data 数据-json
+ */
+ public static void Broadcast_SYS_STATUS(Context context, String data) {
+ Intent intent = new Intent("Broadcast_SYS_STATUS");
+ intent.putExtra("data", data);
+ context.sendBroadcast(intent);
+ }
+
+ /**
+ * MAVLINK_MSG_ID_STATUSTEXT
+ *
+ * @param context 上下文
+ * @param data 数据-json
+ */
+ public static void Broadcast_STATUSTEXT(Context context, String data) {
+ Intent intent = new Intent("Broadcast_STATUSTEXT");
+ intent.putExtra("data", data);
+ context.sendBroadcast(intent);
+ intent.clone();
+ }
+
+ /**
+ * MAVLINK_MSG_ID_HEARTBEAT
+ *
+ * @param context 上下文
+ * @param data 数据-json
+ */
+ public static void Broadcast_HEARTBEAT(Context context, String data) {
+ Intent intent = new Intent("Broadcast_HEARTBEAT");
+ intent.putExtra("data", data);
+ context.sendBroadcast(intent);
+ intent.clone();
+ }
+
+
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/Util/PrefsUtil.java b/app/src/main/java/com/example/longyi_groundstation/Util/PrefsUtil.java
new file mode 100644
index 0000000..cefbd88
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Util/PrefsUtil.java
@@ -0,0 +1,39 @@
+package com.example.longyi_groundstation.Util;
+
+import android.content.Context;
+import android.content.SharedPreferences;
+import com.google.gson.Gson;
+
+public class PrefsUtil {
+ private static final String PREFS_NAME = "AppPrefs";
+ private static final String KEY_USER_DATA = "user_data_json";
+
+ private static SharedPreferences getPrefs(Context context) {
+ return context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);
+ }
+
+ // 保存登录返回的JSON字符串
+ public static void saveUserJson(Context context, String json) {
+ getPrefs(context).edit()
+ .putString(KEY_USER_DATA, json)
+ .apply();
+ }
+
+ // 获取存储的用户JSON数据
+ public static String getUserJson(Context context) {
+ return getPrefs(context).getString(KEY_USER_DATA, null);
+ }
+
+ // 将JSON转换为对象(需传入具体类)
+ public static T getUserObject(Context context, Class clazz) {
+ String json = getUserJson(context);
+ return new Gson().fromJson(json, clazz);
+ }
+
+ // 清除用户数据
+ public static void clearUserData(Context context) {
+ getPrefs(context).edit()
+ .remove(KEY_USER_DATA)
+ .apply();
+ }
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/Util/Serial/SerialPortUtil.java b/app/src/main/java/com/example/longyi_groundstation/Util/Serial/SerialPortUtil.java
new file mode 100644
index 0000000..e71e626
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Util/Serial/SerialPortUtil.java
@@ -0,0 +1,39 @@
+package com.example.longyi_groundstation.Util.Serial;
+
+import android.serialport.SerialPort;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+public class SerialPortUtil {
+ private SerialPort serialPort;
+ private InputStream inputStream;
+ private OutputStream outputStream;
+
+ public SerialPortUtil(String path, int baudrate) throws IOException {
+ serialPort = new SerialPort(new File(path), baudrate);
+ inputStream = serialPort.getInputStream();
+ outputStream = serialPort.getOutputStream();
+ }
+
+ public void sendData(byte[] data) throws IOException {
+ outputStream.write(data);
+ }
+
+ public byte[] receiveData() throws IOException {
+ byte[] buffer = new byte[1024];
+ int size = inputStream.read(buffer);
+ if (size > 0) {
+ return buffer;
+ }
+ return null;
+ }
+
+ public void close() throws IOException {
+ if (serialPort != null) {
+ serialPort.close();
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/Util/Tool.java b/app/src/main/java/com/example/longyi_groundstation/Util/Tool.java
new file mode 100644
index 0000000..e7bec58
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Util/Tool.java
@@ -0,0 +1,60 @@
+package com.example.longyi_groundstation.Util;
+
+
+
+import java.text.SimpleDateFormat;
+
+public class Tool {
+
+ public static String bytesToHex(byte[] bytes) {
+ StringBuilder sb = new StringBuilder();
+ for (byte b : bytes) {
+ sb.append(String.format("%02X", b));
+ }
+ return sb.toString();
+ }
+
+
+
+ public static String getTime() {
+ long time = System.currentTimeMillis();
+ SimpleDateFormat formatter = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
+ String dateString = formatter.format(time);
+ return dateString;
+ }
+
+
+
+ // int 转 byte[]
+
+ // 16进制转10进制
+
+ public static byte[] intToBytes(int value, boolean isBigEndian) {
+ byte[] bytes = new byte[4]; // 明确数组大小为4
+ if (isBigEndian) {
+ bytes[0] = (byte) ((value >> 24) & 0xFF); // 高位字节
+ bytes[1] = (byte) ((value >> 16) & 0xFF);
+ bytes[2] = (byte) ((value >> 8) & 0xFF);
+ bytes[3] = (byte) (value & 0xFF); // 低位字节
+ } else {
+ bytes[3] = (byte) ((value >> 24) & 0xFF); // 高位字节放末尾
+ bytes[2] = (byte) ((value >> 16) & 0xFF);
+ bytes[1] = (byte) ((value >> 8) & 0xFF);
+ bytes[0] = (byte) (value & 0xFF); // 低位字节放开头
+ }
+ return bytes;
+ }
+
+ // 或者如果需要处理超过24小时的情况:
+ public static String formatMillisecondsLong(long milliseconds) {
+ long totalSeconds = milliseconds / 1000;
+ long seconds = totalSeconds % 60;
+ long totalMinutes = totalSeconds / 60;
+ long minutes = totalMinutes % 60;
+ long hours = totalMinutes / 60;
+
+ return String.format("%02d:%02d:%02d", hours, minutes, seconds);
+ }
+
+
+}
diff --git a/app/src/main/java/com/example/longyi_groundstation/Util/UdpClient.java b/app/src/main/java/com/example/longyi_groundstation/Util/UdpClient.java
new file mode 100644
index 0000000..5425d2e
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Util/UdpClient.java
@@ -0,0 +1,45 @@
+package com.example.longyi_groundstation.Util;
+
+import java.io.IOException;
+import java.net.DatagramPacket;
+import java.net.DatagramSocket;
+import java.net.InetAddress;
+import java.net.SocketException;
+import java.net.UnknownHostException;
+
+public class UdpClient {
+ public DatagramSocket socket;
+ private InetAddress address;
+ private int port;
+
+ public UdpClient(String host, int port) throws SocketException, UnknownHostException {
+ this.port = port;
+ socket = new DatagramSocket();
+ address = InetAddress.getByName(host); // 服务器的IP地址或域名
+ }
+
+ public void send(String message) throws IOException {
+ byte[] sendData = hexStringToByteArray(message);
+// byte[] sendData = message.getBytes();
+// byte[] sendData = hexStr2bytes(message);
+ DatagramPacket sendPacket = new DatagramPacket(sendData, sendData.length, address, port);
+ socket.send(sendPacket);
+// System.out.println("SENT: " + message);
+ }
+
+
+
+
+ //字符串转字节数组
+ private byte[] hexStringToByteArray(String s) {
+ int len = s.length();
+ byte[] data = new byte[len / 2];
+ for (int i = 0; i < len; i += 2) {
+ data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4)
+ + Character.digit(s.charAt(i + 1), 16));
+ }
+ return data;
+ }
+
+
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/longyi_groundstation/Util/UdpUtil.java b/app/src/main/java/com/example/longyi_groundstation/Util/UdpUtil.java
new file mode 100644
index 0000000..24ca9fd
--- /dev/null
+++ b/app/src/main/java/com/example/longyi_groundstation/Util/UdpUtil.java
@@ -0,0 +1,81 @@
+package com.example.longyi_groundstation.Util;
+
+import android.util.Log;
+import java.io.IOException;
+import java.net.DatagramPacket;
+import java.net.DatagramSocket;
+import java.net.InetAddress;
+import java.net.SocketException;
+import java.net.UnknownHostException;
+
+public class UdpUtil {
+ private static final String TAG = "UdpUtil";
+ private DatagramSocket socket;
+ private InetAddress serverAddress;
+ private int serverPort;
+
+ // 初始化UDP客户端
+ public UdpUtil(String serverIp, int serverPort) {
+ try {
+ this.serverAddress = InetAddress.getByName(serverIp);
+ this.serverPort = serverPort;
+ this.socket = new DatagramSocket();
+ } catch (UnknownHostException | SocketException e) {
+ Log.e(TAG, "Udp初始化失败", e);
+ }
+ }
+
+ // 发送UDP数据
+ public void sendData(byte[] data) {
+ new Thread(() -> {
+ try {
+ DatagramPacket packet = new DatagramPacket(
+ data,
+ data.length,
+ serverAddress,
+ serverPort
+ );
+ socket.send(packet);
+ Log.d(TAG, "UDP数据发送成功");
+ } catch (IOException e) {
+ Log.e(TAG, "UDP数据发送失败", e);
+ }
+ }).start();
+ }
+
+ // 接收UDP数据
+ public void startReceiving(DataReceivedListener listener) {
+ new Thread(() -> {
+ byte[] buffer = new byte[1024];
+ while (!socket.isClosed()) {
+ try {
+ DatagramPacket packet = new DatagramPacket(buffer, buffer.length);
+ socket.receive(packet);
+ byte[] receivedData = new byte[packet.getLength()];
+ System.arraycopy(buffer, 0, receivedData, 0, packet.getLength());
+
+ // 回调接收到的数据
+ if (listener != null) {
+ listener.onDataReceived(receivedData);
+ }
+ } catch (IOException e) {
+ if (!socket.isClosed()) {
+ Log.e(TAG, "UDP接收数据异常", e);
+ }
+ }
+ }
+ }).start();
+ }
+
+ // 关闭UDP连接
+ public void close() {
+ if (socket != null && !socket.isClosed()) {
+ socket.close();
+ }
+ }
+
+ // 数据接收回调接口
+ public interface DataReceivedListener {
+ void onDataReceived(byte[] data);
+ }
+}
diff --git a/app/src/main/res/drawable/b2101010_4round_1stroke.xml b/app/src/main/res/drawable/b2101010_4round_1stroke.xml
new file mode 100644
index 0000000..f15a0ab
--- /dev/null
+++ b/app/src/main/res/drawable/b2101010_4round_1stroke.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/b2101010_4round_1stroke_bg.xml b/app/src/main/res/drawable/b2101010_4round_1stroke_bg.xml
new file mode 100644
index 0000000..53b5c2f
--- /dev/null
+++ b/app/src/main/res/drawable/b2101010_4round_1stroke_bg.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/b2ffffff_4round_1stroke_bg.xml b/app/src/main/res/drawable/b2ffffff_4round_1stroke_bg.xml
new file mode 100644
index 0000000..9c8282d
--- /dev/null
+++ b/app/src/main/res/drawable/b2ffffff_4round_1stroke_bg.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/b6909090_2round_bg.xml b/app/src/main/res/drawable/b6909090_2round_bg.xml
new file mode 100644
index 0000000..74b8457
--- /dev/null
+++ b/app/src/main/res/drawable/b6909090_2round_bg.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/eb51518b_4round_bg.xml b/app/src/main/res/drawable/eb51518b_4round_bg.xml
new file mode 100644
index 0000000..21a7e8b
--- /dev/null
+++ b/app/src/main/res/drawable/eb51518b_4round_bg.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/ellipse_shape.xml b/app/src/main/res/drawable/ellipse_shape.xml
new file mode 100644
index 0000000..62ae1dd
--- /dev/null
+++ b/app/src/main/res/drawable/ellipse_shape.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/ff5067ef_or_80000000_0round_bg.xml b/app/src/main/res/drawable/ff5067ef_or_80000000_0round_bg.xml
new file mode 100644
index 0000000..9e3efa8
--- /dev/null
+++ b/app/src/main/res/drawable/ff5067ef_or_80000000_0round_bg.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/ffffffff_4round_bg.xml b/app/src/main/res/drawable/ffffffff_4round_bg.xml
new file mode 100644
index 0000000..c288fbf
--- /dev/null
+++ b/app/src/main/res/drawable/ffffffff_4round_bg.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 0000000..07d5da9
--- /dev/null
+++ b/app/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml b/app/src/main/res/drawable/ic_launcher_foreground.xml
new file mode 100644
index 0000000..2b068d1
--- /dev/null
+++ b/app/src/main/res/drawable/ic_launcher_foreground.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/icon_fly.png b/app/src/main/res/drawable/icon_fly.png
new file mode 100644
index 0000000..7af97cf
Binary files /dev/null and b/app/src/main/res/drawable/icon_fly.png differ
diff --git a/app/src/main/res/drawable/x80000000_4round_bg.xml b/app/src/main/res/drawable/x80000000_4round_bg.xml
new file mode 100644
index 0000000..c8cc311
--- /dev/null
+++ b/app/src/main/res/drawable/x80000000_4round_bg.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/x80202020_4round_3stroke_bg.xml b/app/src/main/res/drawable/x80202020_4round_3stroke_bg.xml
new file mode 100644
index 0000000..60e8e85
--- /dev/null
+++ b/app/src/main/res/drawable/x80202020_4round_3stroke_bg.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/x94555f75_16round_bg.xml b/app/src/main/res/drawable/x94555f75_16round_bg.xml
new file mode 100644
index 0000000..c8c6a6e
--- /dev/null
+++ b/app/src/main/res/drawable/x94555f75_16round_bg.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/x94555f75_4round_bg.xml b/app/src/main/res/drawable/x94555f75_4round_bg.xml
new file mode 100644
index 0000000..0871e3e
--- /dev/null
+++ b/app/src/main/res/drawable/x94555f75_4round_bg.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/x94555f75_8round_bg.xml b/app/src/main/res/drawable/x94555f75_8round_bg.xml
new file mode 100644
index 0000000..4976d1c
--- /dev/null
+++ b/app/src/main/res/drawable/x94555f75_8round_bg.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/xbb303030_4round_bg.xml b/app/src/main/res/drawable/xbb303030_4round_bg.xml
new file mode 100644
index 0000000..1cad521
--- /dev/null
+++ b/app/src/main/res/drawable/xbb303030_4round_bg.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_funcation.xml b/app/src/main/res/layout/activity_funcation.xml
new file mode 100644
index 0000000..f355a4c
--- /dev/null
+++ b/app/src/main/res/layout/activity_funcation.xml
@@ -0,0 +1,186 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml
new file mode 100644
index 0000000..dc278a9
--- /dev/null
+++ b/app/src/main/res/layout/activity_login.xml
@@ -0,0 +1,171 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..be92cdb
--- /dev/null
+++ b/app/src/main/res/layout/activity_main.xml
@@ -0,0 +1,761 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_main2.xml b/app/src/main/res/layout/activity_main2.xml
new file mode 100644
index 0000000..e223fb0
--- /dev/null
+++ b/app/src/main/res/layout/activity_main2.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_setting.xml b/app/src/main/res/layout/activity_setting.xml
new file mode 100644
index 0000000..5e585e9
--- /dev/null
+++ b/app/src/main/res/layout/activity_setting.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/adapter_log.xml b/app/src/main/res/layout/adapter_log.xml
new file mode 100644
index 0000000..a7d23da
--- /dev/null
+++ b/app/src/main/res/layout/adapter_log.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/adapter_type_item.xml b/app/src/main/res/layout/adapter_type_item.xml
new file mode 100644
index 0000000..7c9456b
--- /dev/null
+++ b/app/src/main/res/layout/adapter_type_item.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/dialog_error_log.xml b/app/src/main/res/layout/dialog_error_log.xml
new file mode 100644
index 0000000..e878dec
--- /dev/null
+++ b/app/src/main/res/layout/dialog_error_log.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..6f3b755
--- /dev/null
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 0000000..6f3b755
--- /dev/null
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/app/src/main/res/mipmap-hdpi/ic_launcher.webp
new file mode 100644
index 0000000..c209e78
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..b2dfe3d
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/app/src/main/res/mipmap-mdpi/ic_launcher.webp
new file mode 100644
index 0000000..4f0f1d6
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..62b611d
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
new file mode 100644
index 0000000..948a307
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..1b9a695
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_add.png b/app/src/main/res/mipmap-xhdpi/icon_add.png
new file mode 100644
index 0000000..84650c7
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_add.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_antenna.png b/app/src/main/res/mipmap-xhdpi/icon_antenna.png
new file mode 100644
index 0000000..d74e748
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_antenna.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_big_fly.png b/app/src/main/res/mipmap-xhdpi/icon_big_fly.png
new file mode 100644
index 0000000..2267520
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_big_fly.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_clear.png b/app/src/main/res/mipmap-xhdpi/icon_clear.png
new file mode 100644
index 0000000..27e64be
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_clear.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_data1.png b/app/src/main/res/mipmap-xhdpi/icon_data1.png
new file mode 100644
index 0000000..2dad281
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_data1.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_data2.png b/app/src/main/res/mipmap-xhdpi/icon_data2.png
new file mode 100644
index 0000000..91778f1
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_data2.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_data3.png b/app/src/main/res/mipmap-xhdpi/icon_data3.png
new file mode 100644
index 0000000..98c6156
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_data3.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_error.png b/app/src/main/res/mipmap-xhdpi/icon_error.png
new file mode 100644
index 0000000..e3cb5e4
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_error.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_fly.png b/app/src/main/res/mipmap-xhdpi/icon_fly.png
new file mode 100644
index 0000000..7af97cf
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_fly.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_function.png b/app/src/main/res/mipmap-xhdpi/icon_function.png
new file mode 100644
index 0000000..2c79989
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_function.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_height_fly.png b/app/src/main/res/mipmap-xhdpi/icon_height_fly.png
new file mode 100644
index 0000000..6567557
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_height_fly.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_instrument_bg.9.png b/app/src/main/res/mipmap-xhdpi/icon_instrument_bg.9.png
new file mode 100644
index 0000000..f5673af
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_instrument_bg.9.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_instrument_fly.png b/app/src/main/res/mipmap-xhdpi/icon_instrument_fly.png
new file mode 100644
index 0000000..9d6af3e
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_instrument_fly.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_instrument_pitch_z.png b/app/src/main/res/mipmap-xhdpi/icon_instrument_pitch_z.png
new file mode 100644
index 0000000..16a6dd4
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_instrument_pitch_z.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_instrument_roll.png b/app/src/main/res/mipmap-xhdpi/icon_instrument_roll.png
new file mode 100644
index 0000000..a0c4865
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_instrument_roll.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_instrument_yaw.png b/app/src/main/res/mipmap-xhdpi/icon_instrument_yaw.png
new file mode 100644
index 0000000..bc9b5ea
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_instrument_yaw.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_land.png b/app/src/main/res/mipmap-xhdpi/icon_land.png
new file mode 100644
index 0000000..65373af
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_land.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_left_bottom.png b/app/src/main/res/mipmap-xhdpi/icon_left_bottom.png
new file mode 100644
index 0000000..20bbdae
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_left_bottom.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_lift_off.png b/app/src/main/res/mipmap-xhdpi/icon_lift_off.png
new file mode 100644
index 0000000..45521fa
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_lift_off.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_line_fly.png b/app/src/main/res/mipmap-xhdpi/icon_line_fly.png
new file mode 100644
index 0000000..8cad55f
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_line_fly.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_location.png b/app/src/main/res/mipmap-xhdpi/icon_location.png
new file mode 100644
index 0000000..6f40043
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_location.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_location_me.png b/app/src/main/res/mipmap-xhdpi/icon_location_me.png
new file mode 100644
index 0000000..23dbd84
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_location_me.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_login_admin.png b/app/src/main/res/mipmap-xhdpi/icon_login_admin.png
new file mode 100644
index 0000000..c5dee3c
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_login_admin.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_login_bg.png b/app/src/main/res/mipmap-xhdpi/icon_login_bg.png
new file mode 100644
index 0000000..d447892
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_login_bg.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_login_password.png b/app/src/main/res/mipmap-xhdpi/icon_login_password.png
new file mode 100644
index 0000000..b63e571
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_login_password.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_map.png b/app/src/main/res/mipmap-xhdpi/icon_map.png
new file mode 100644
index 0000000..ea64d86
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_map.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_menu.png b/app/src/main/res/mipmap-xhdpi/icon_menu.png
new file mode 100644
index 0000000..f2f276c
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_menu.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_network.png b/app/src/main/res/mipmap-xhdpi/icon_network.png
new file mode 100644
index 0000000..4c4a6b3
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_network.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_other.png b/app/src/main/res/mipmap-xhdpi/icon_other.png
new file mode 100644
index 0000000..6c0d7ed
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_other.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_pointer.png b/app/src/main/res/mipmap-xhdpi/icon_pointer.png
new file mode 100644
index 0000000..7fea81a
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_pointer.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_power.png b/app/src/main/res/mipmap-xhdpi/icon_power.png
new file mode 100644
index 0000000..0d5c7cd
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_power.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_satellite.png b/app/src/main/res/mipmap-xhdpi/icon_satellite.png
new file mode 100644
index 0000000..8ef9449
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_satellite.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_select_no.png b/app/src/main/res/mipmap-xhdpi/icon_select_no.png
new file mode 100644
index 0000000..ca10fb5
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_select_no.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_select_yes.png b/app/src/main/res/mipmap-xhdpi/icon_select_yes.png
new file mode 100644
index 0000000..f6b20cb
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_select_yes.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_setting.png b/app/src/main/res/mipmap-xhdpi/icon_setting.png
new file mode 100644
index 0000000..3dee03f
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_setting.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_speed.png b/app/src/main/res/mipmap-xhdpi/icon_speed.png
new file mode 100644
index 0000000..12617cd
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_speed.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_turn_back.png b/app/src/main/res/mipmap-xhdpi/icon_turn_back.png
new file mode 100644
index 0000000..fa537a2
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_turn_back.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_uav.png b/app/src/main/res/mipmap-xhdpi/icon_uav.png
new file mode 100644
index 0000000..3350238
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_uav.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_user.png b/app/src/main/res/mipmap-xhdpi/icon_user.png
new file mode 100644
index 0000000..01f27b1
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_user.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_user_set.png b/app/src/main/res/mipmap-xhdpi/icon_user_set.png
new file mode 100644
index 0000000..603dd8c
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_user_set.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_user_too.png b/app/src/main/res/mipmap-xhdpi/icon_user_too.png
new file mode 100644
index 0000000..3617ee0
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_user_too.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_video.png b/app/src/main/res/mipmap-xhdpi/icon_video.png
new file mode 100644
index 0000000..9c36fdf
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_video.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_wifi.png b/app/src/main/res/mipmap-xhdpi/icon_wifi.png
new file mode 100644
index 0000000..28e9015
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_wifi.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_word.png b/app/src/main/res/mipmap-xhdpi/icon_word.png
new file mode 100644
index 0000000..2bbe0c6
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_word.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/icon_z.png b/app/src/main/res/mipmap-xhdpi/icon_z.png
new file mode 100644
index 0000000..4387c7e
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/icon_z.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/img.png b/app/src/main/res/mipmap-xhdpi/img.png
new file mode 100644
index 0000000..c67e5c5
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/img.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/logo.png b/app/src/main/res/mipmap-xhdpi/logo.png
new file mode 100644
index 0000000..fa63f9a
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/logo.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/logo_w.png b/app/src/main/res/mipmap-xhdpi/logo_w.png
new file mode 100644
index 0000000..c41eaa9
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/logo_w.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
new file mode 100644
index 0000000..28d4b77
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..9287f50
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
new file mode 100644
index 0000000..aa7d642
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..9126ae3
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml
new file mode 100644
index 0000000..4319a6c
--- /dev/null
+++ b/app/src/main/res/values-night/themes.xml
@@ -0,0 +1,16 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..f8c6127
--- /dev/null
+++ b/app/src/main/res/values/colors.xml
@@ -0,0 +1,10 @@
+
+
+ #FFBB86FC
+ #FF6200EE
+ #FF3700B3
+ #FF03DAC5
+ #FF018786
+ #FF000000
+ #FFFFFFFF
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..7367dbf
--- /dev/null
+++ b/app/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+
+ LongYi-GroundStation
+
\ No newline at end of file
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
new file mode 100644
index 0000000..3bfc631
--- /dev/null
+++ b/app/src/main/res/values/themes.xml
@@ -0,0 +1,16 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/xml/backup_rules.xml b/app/src/main/res/xml/backup_rules.xml
new file mode 100644
index 0000000..4df9255
--- /dev/null
+++ b/app/src/main/res/xml/backup_rules.xml
@@ -0,0 +1,13 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/xml/data_extraction_rules.xml b/app/src/main/res/xml/data_extraction_rules.xml
new file mode 100644
index 0000000..9ee9997
--- /dev/null
+++ b/app/src/main/res/xml/data_extraction_rules.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/test/java/com/example/longyi_groundstation/ExampleUnitTest.java b/app/src/test/java/com/example/longyi_groundstation/ExampleUnitTest.java
new file mode 100644
index 0000000..a1c8fc7
--- /dev/null
+++ b/app/src/test/java/com/example/longyi_groundstation/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+package com.example.longyi_groundstation;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see Testing documentation
+ */
+public class ExampleUnitTest {
+ @Test
+ public void addition_isCorrect() {
+ assertEquals(4, 2 + 2);
+ }
+}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..5bec31d
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,5 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+plugins {
+alias(libs.plugins.android.application) apply false
+ alias(libs.plugins.kotlin.android) apply false
+}
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000..4387edc
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,21 @@
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. For more details, visit
+# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
+# org.gradle.parallel=true
+# AndroidX package structure to make it clearer which packages are bundled with the
+# Android operating system, and which are packaged with your app's APK
+# https://developer.android.com/topic/libraries/support-library/androidx-rn
+android.useAndroidX=true
+# Enables namespacing of each library's R class so that its R class includes only the
+# resources declared in the library itself and none from the library's dependencies,
+# thereby reducing the size of the R class for that library
+android.nonTransitiveRClass=true
\ No newline at end of file
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
new file mode 100644
index 0000000..c6dd354
--- /dev/null
+++ b/gradle/libs.versions.toml
@@ -0,0 +1,26 @@
+[versions]
+agp = "8.10.0"
+junit = "4.13.2"
+junitVersion = "1.1.5"
+espressoCore = "3.5.1"
+appcompat = "1.6.1"
+material = "1.10.0"
+activity = "1.8.0"
+constraintlayout = "2.1.4"
+kotlin = "2.0.21"
+coreKtx = "1.10.1"
+
+[libraries]
+junit = { group = "junit", name = "junit", version.ref = "junit" }
+ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
+espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
+appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
+material = { group = "com.google.android.material", name = "material", version.ref = "material" }
+activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
+constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
+core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
+
+[plugins]
+android-application = { id = "com.android.application", version.ref = "agp" }
+kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
+
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..e708b1c
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..d11f0f6
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Tue May 27 16:01:29 CST 2025
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
new file mode 100644
index 0000000..4f906e0
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,185 @@
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=`expr $i + 1`
+ done
+ case $i in
+ 0) set -- ;;
+ 1) set -- "$args0" ;;
+ 2) set -- "$args0" "$args1" ;;
+ 3) set -- "$args0" "$args1" "$args2" ;;
+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=`save "$@"`
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..107acd3
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,89 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/key.jks b/key.jks
new file mode 100644
index 0000000..73d3017
Binary files /dev/null and b/key.jks differ
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..f9fc3c2
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,23 @@
+pluginManagement {
+ repositories {
+ google {
+ content {
+ includeGroupByRegex("com\\.android.*")
+ includeGroupByRegex("com\\.google.*")
+ includeGroupByRegex("androidx.*")
+ }
+ }
+ mavenCentral()
+ gradlePluginPortal()
+ }
+}
+dependencyResolutionManagement {
+ repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
+rootProject.name = "LongYi-GroundStation"
+include ':app'