Skip to content

Commit

Permalink
Merge pull request #48 from N0BOY/dev
Browse files Browse the repository at this point in the history
Dev 0.89 -> Release
  • Loading branch information
N0BOY authored Jul 9, 2023
2 parents 3a6d07f + 65c3857 commit 0eae082
Show file tree
Hide file tree
Showing 537 changed files with 8,842 additions and 1,602 deletions.
Binary file added FT8CN快速手册0.88版.pdf
Binary file not shown.
Binary file removed FT8CN软件设计初衷及使用说明0.88版.pdf
Binary file not shown.
Empty file modified ft8CN/app/.gitignore
100755 → 100644
Empty file.
12 changes: 2 additions & 10 deletions ft8CN/app/build.gradle
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
id 'com.android.application'
}

def currentTime = getCurrentTime();
def currentTime = getCurrentTime()

static def getCurrentTime() {
DateFormat df = new SimpleDateFormat("yyyy-MM-dd")
Expand All @@ -22,7 +22,7 @@ android {
minSdk 23
targetSdk 33
versionCode 1
versionName '0.87'
versionName '0.89'

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
dataBinding{
Expand All @@ -35,14 +35,6 @@ android {

}
}
ndk{
abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
}
sourceSets{
main{
jniLibs.srcDirs=['libs']
}
}
signingConfig signingConfigs.debug
}

Expand Down
Binary file modified ft8CN/app/libs/arm64-v8a/libft8cn.so
100755 → 100644
Binary file not shown.
Binary file modified ft8CN/app/libs/armeabi-v7a/libft8cn.so
100755 → 100644
Binary file not shown.
Binary file modified ft8CN/app/libs/x86/libft8cn.so
100755 → 100644
Binary file not shown.
Binary file modified ft8CN/app/libs/x86_64/libft8cn.so
100755 → 100644
Binary file not shown.
Empty file modified ft8CN/app/proguard-rules.pro
100755 → 100644
Empty file.

This file was deleted.

Empty file modified ft8CN/app/src/libs/MPAndroidChartv_3.1.0.jar
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/libs/nanohttpd-2.2.0-javadoc.jar
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/libs/nanohttpd-2.2.0-sources.jar
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/libs/nanohttpd-2.2.0.jar
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/libs/osmdroid-android-6.1.14-javadoc.jar
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/libs/osmdroid-android-6.1.14-sources.jar
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/libs/osmdroid-android-6.1.14.aar
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/AndroidManifest.xml
100755 → 100644
Empty file.
5 changes: 5 additions & 0 deletions ft8CN/app/src/main/assets/audio_output_help.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
关于音频输出设置

采样位深:也称采样精度,FT8CN只有16位整型和32位浮点可选。采样位数是表示声音强度量化后的精细程度,它的数值越大,波动幅度的分辨率也就越高,所发出声音的能力越强。

采样率:也称取样频率, 指每秒钟取得声音样本的次数。采样频率越高,声音的质量也就越好,但占的资源也多。
5 changes: 5 additions & 0 deletions ft8CN/app/src/main/assets/audio_output_help_en.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Audio Output Setting

Bit depth: Choose 16-bit int or 32-bit float. Bit depth dictates the number of possible amplitude values of audio sample. A higher bit depth will produce a higher resolution audio.

Sample rate: Sample rate refers to the number of samples that are present within one second of digital audio. Higher sample rate provides more accurate audio waveform, but consume more system resources.
Empty file modified ft8CN/app/src/main/assets/auto_follow_help.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/auto_follow_help_en.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/bands.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/callsign.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/callsign_en.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/civ_help.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/civ_help_en.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/clear_cache_data.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/clear_cache_data_en.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/connectMode.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/connectMode_en.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/controlMode.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/controlMode_en.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/country_en2cn.dat
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/country_en2cn.old
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/country_en2hk.dat
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/cqzone.json
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/cty.dat
100755 → 100644
Empty file.
4 changes: 4 additions & 0 deletions ft8CN/app/src/main/assets/decode_help.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
关于解码模式
快速解码:沿用原来FT8CN的解码,对接收到的音频做一次性的解码。
多次解码:在快速解码的基础上,再做多次的解码,增加迭代的次数,并尝试解码频率有叠加的信号。
注:多次解码增加的运算量,总的解码时间会变长,会缩短设备的续航时间。
4 changes: 4 additions & 0 deletions ft8CN/app/src/main/assets/decode_help_en.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Decode mode:
Fast decode: Default mode, one decoding pass on received audio.
Deep decode: Recursive decoding that process received audio in multiple passes .
* Note: Deep decoding requires longer decoding time and more battery consumption.
Empty file modified ft8CN/app/src/main/assets/dxcc_list.json
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/excludeCallsign.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/excludeCallsign_en.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/frequency.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/frequency_en.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/ituzone.json
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/launch_supervision_en.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/launch_supervision_help.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/maidenhead.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/maidenhead_en.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/nightUSGS4Layer.sqlite
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/no_response_help.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/no_response_help_en.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/operationBand.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/operationBand_en.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/pttdelay.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/pttdelay_en.txt
100755 → 100644
Empty file.
11 changes: 11 additions & 0 deletions ft8CN/app/src/main/assets/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ Please click "FAQ" if you have good suggestions or questions .
BG7YOZ
2022-07-01


2023-07-08(0.89)
1.增加多重解码功能,在多重解码模式下,提高解码深度,尝试解码叠加的信号。
2.解决导入ADI后通联过的分区没有及时更新的问题。
3.解决iCom电台在网络模式下,发射音频会出现破音的情况。
4.解决在某些情况下RR73卡死的问题。
5.提高解码稳定性。
6.改正解码消息的comment字段有时不正确显示的问题。
7.修改导出日志的提示。


2023-05-02(0.88 Patch 2)
1.增加音频输出设置(位深、采样率)。
2.增加日志可以按条件查询并导出。
Expand Down
Empty file modified ft8CN/app/src/main/assets/rig_model_help.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/rig_model_help_en.txt
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion ft8CN/app/src/main/assets/rigaddress.txt
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ YAESU FT-DX Other series,00,4800,3
KENWOOD(建伍) TK-90,00,9600,5
KENWOOD(建伍) TS-480,00,9600,7
KENWOOD(建伍) TS-590,00,9600,7
KENWOOD(建伍) TS-2000,00,9600,7
KENWOOD(建伍) TS-2000,00,9600,14
KN990,00,38400,1
Elecraft K3S\K3\KX3\KX2,00,38400,10
mcHF-QRP sdr,00,4800,1
Expand Down
Empty file modified ft8CN/app/src/main/assets/swlMode.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/swlMode_en.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/timeoffset.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/timeoffset_en.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/transDelay.txt
100755 → 100644
Empty file.
Empty file modified ft8CN/app/src/main/assets/transDelay_en.txt
100755 → 100644
Empty file.
69 changes: 69 additions & 0 deletions ft8CN/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@

# For more information about using CMake with Android Studio, read the
# documentation: https://d.android.com/studio/projects/add-native-code.html

# Sets the minimum version of CMake required to build the native library.

cmake_minimum_required(VERSION 3.18.1)

# Declares and names the project.

project("ft8cn")

# Creates and names a library, sets it as either STATIC
# or SHARED, and provides the relative paths to its source code.
# You can define multiple libraries, and CMake builds them for you.
# Gradle automatically packages shared libraries with your APK.

add_library( # Sets the name of the library.
ft8cn

# Sets the library as a shared library.
SHARED

# Provides a relative path to your source file(s).

generate_ft8.cpp
ft8Listener.cpp
ft8Spectrum.cpp
fft/kiss_fftr.c
fft/kiss_fft.c

ft8/decode.c
ft8/crc.c
ft8/constants.c
ft8/ldpc.c
ft8/unpack.c
ft8/text.c
ft8/hash22.c
ft8/encode.c
ft8/pack.c
monitor_opr.c
ft8Decoder.c
ft8Encoder.c
spectrum_data.c
)

# Searches for a specified prebuilt library and stores the path as a
# variable. Because CMake includes system libraries in the search path by
# default, you only need to specify the name of the public NDK library
# you want to add. CMake verifies that the library exists before
# completing its build.

find_library( # Sets the name of the path variable.
log-lib

# Specifies the name of the NDK library that
# you want CMake to locate.
log )

# Specifies libraries CMake should link to your target library. You
# can link multiple libraries, such as libraries you define in this
# build script, prebuilt third-party libraries, or system libraries.

target_link_libraries( # Specifies the target library.
ft8cn

# Links the target library to the log library
# included in the NDK.
${log-lib} )
11 changes: 11 additions & 0 deletions ft8CN/app/src/main/cpp/common/comm_str.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//
// Created by jmsmf on 2022/4/22.
//

#ifndef NATIVEC_COMM_STR_H
#define NATIVEC_COMM_STR_H

#endif //NATIVEC_COMM_STR_H
const char ERROR_FILE_NAME_IS_NULL[] = "error:wav_path is null!!!";
const char ERROR_OPEN_FILE_FAILED[] ="Error : the content of the file does not meet the requirements.";
const char INFO_DECODE_OK[] ="decode OK!!!";
3 changes: 3 additions & 0 deletions ft8CN/app/src/main/cpp/common/common.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
24 changes: 24 additions & 0 deletions ft8CN/app/src/main/cpp/common/debug.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#pragma once

#include <stdio.h>

#include<android/log.h>

#define LOG_DEBUG 0
#define LOG_INFO 1
#define LOG_WARN 2
#define LOG_ERROR 3
#define LOG_FATAL 4
#define LOG_LEVEL LOG_DEBUG
//#define LOG_LEVEL LOG_INFO

//#define LOG(level, ...) if (level >= LOG_LEVEL) fprintf(stderr, __VA_ARGS__)
#define TAG "FT8_DECODER" // 这个是自定义的LOG的标识
#define LOG(level, ...) if (level >= LOG_LEVEL) __android_log_print(ANDROID_LOG_INFO,TAG ,__VA_ARGS__)
#define LOG_PRINTF(...) __android_log_print(ANDROID_LOG_INFO,TAG ,__VA_ARGS__)

#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,TAG ,__VA_ARGS__) // 定义LOGD类型
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,TAG ,__VA_ARGS__) // 定义LOGI类型
#define LOGW(...) __android_log_print(ANDROID_LOG_WARN,TAG ,__VA_ARGS__) // 定义LOGW类型
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,TAG ,__VA_ARGS__) // 定义LOGE类型
#define LOGF(...) __android_log_print(ANDROID_LOG_FATAL,TAG ,__VA_ARGS__) // 定义LOGF类型
131 changes: 131 additions & 0 deletions ft8CN/app/src/main/cpp/common/wave.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
#include "wave.h"

#include <stdlib.h>
#include <string.h>
#include <stdio.h>

#include <stdint.h>

// Save signal in floating point format (-1 .. +1) as a WAVE file using 16-bit signed integers.
void save_wav(const float* signal, int num_samples, int sample_rate, const char* path)
{
char subChunk1ID[4] = { 'f', 'm', 't', ' ' };
uint32_t subChunk1Size = 16; // 16 for PCM
uint16_t audioFormat = 1; // PCM = 1
uint16_t numChannels = 1;
uint16_t bitsPerSample = 16;
uint32_t sampleRate = sample_rate;
uint16_t blockAlign = numChannels * bitsPerSample / 8;
uint32_t byteRate = sampleRate * blockAlign;

char subChunk2ID[4] = { 'd', 'a', 't', 'a' };
uint32_t subChunk2Size = num_samples * blockAlign;

char chunkID[4] = { 'R', 'I', 'F', 'F' };
uint32_t chunkSize = 4 + (8 + subChunk1Size) + (8 + subChunk2Size);
char format[4] = { 'W', 'A', 'V', 'E' };

int16_t* raw_data = (int16_t*)malloc(num_samples * blockAlign);
for (int i = 0; i < num_samples; i++)
{
float x = signal[i];
if (x > 1.0)
x = 1.0;
else if (x < -1.0)
x = -1.0;
raw_data[i] = (int)(x * 32767.0);
}

FILE* f = fopen(path, "wb");

// NOTE: works only on little-endian architecture
fwrite(chunkID, sizeof(chunkID), 1, f);
fwrite(&chunkSize, sizeof(chunkSize), 1, f);
fwrite(format, sizeof(format), 1, f);

fwrite(subChunk1ID, sizeof(subChunk1ID), 1, f);
fwrite(&subChunk1Size, sizeof(subChunk1Size), 1, f);
fwrite(&audioFormat, sizeof(audioFormat), 1, f);
fwrite(&numChannels, sizeof(numChannels), 1, f);
fwrite(&sampleRate, sizeof(sampleRate), 1, f);
fwrite(&byteRate, sizeof(byteRate), 1, f);
fwrite(&blockAlign, sizeof(blockAlign), 1, f);
fwrite(&bitsPerSample, sizeof(bitsPerSample), 1, f);

fwrite(subChunk2ID, sizeof(subChunk2ID), 1, f);
fwrite(&subChunk2Size, sizeof(subChunk2Size), 1, f);

fwrite(raw_data, blockAlign, num_samples, f);

fclose(f);

free(raw_data);
}

// Load signal in floating point format (-1 .. +1) as a WAVE file using 16-bit signed integers.
int load_wav(float* signal, int* num_samples, int* sample_rate, const char* path)
{
char subChunk1ID[4]; // = {'f', 'm', 't', ' '};
uint32_t subChunk1Size; // = 16; // 16 for PCM
uint16_t audioFormat; // = 1; // PCM = 1
uint16_t numChannels; // = 1;
uint16_t bitsPerSample; // = 16;
uint32_t sampleRate;
uint16_t blockAlign; // = numChannels * bitsPerSample / 8;
uint32_t byteRate; // = sampleRate * blockAlign;

char subChunk2ID[4]; // = {'d', 'a', 't', 'a'};
uint32_t subChunk2Size; // = num_samples * blockAlign;

char chunkID[4]; // = {'R', 'I', 'F', 'F'};
uint32_t chunkSize; // = 4 + (8 + subChunk1Size) + (8 + subChunk2Size);
char format[4]; // = {'W', 'A', 'V', 'E'};

FILE* f = fopen(path, "rb");
if (f==NULL){
return -1;
}

// NOTE: works only on little-endian architecture
fread((void*)chunkID, sizeof(chunkID), 1, f);
fread((void*)&chunkSize, sizeof(chunkSize), 1, f);
fread((void*)format, sizeof(format), 1, f);

fread((void*)subChunk1ID, sizeof(subChunk1ID), 1, f);
fread((void*)&subChunk1Size, sizeof(subChunk1Size), 1, f);
if (subChunk1Size != 16)
return -1;

fread((void*)&audioFormat, sizeof(audioFormat), 1, f);
fread((void*)&numChannels, sizeof(numChannels), 1, f);
fread((void*)&sampleRate, sizeof(sampleRate), 1, f);
fread((void*)&byteRate, sizeof(byteRate), 1, f);
fread((void*)&blockAlign, sizeof(blockAlign), 1, f);
fread((void*)&bitsPerSample, sizeof(bitsPerSample), 1, f);

if (audioFormat != 1 || numChannels != 1 || bitsPerSample != 16)
return -1;

fread((void*)subChunk2ID, sizeof(subChunk2ID), 1, f);
fread((void*)&subChunk2Size, sizeof(subChunk2Size), 1, f);

if (subChunk2Size / blockAlign > *num_samples)
return -2;

*num_samples = subChunk2Size / blockAlign;
*sample_rate = sampleRate;

int16_t* raw_data = (int16_t*)malloc(*num_samples * blockAlign);

fread((void*)raw_data, blockAlign, *num_samples, f);
for (int i = 0; i < *num_samples; i++)
{
signal[i] = raw_data[i] / 32768.0f;
}

free(raw_data);

fclose(f);

return 0;
}
10 changes: 10 additions & 0 deletions ft8CN/app/src/main/cpp/common/wave.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#ifndef _INCLUDE_WAVE_H_
#define _INCLUDE_WAVE_H_

// Save signal in floating point format (-1 .. +1) as a WAVE file using 16-bit signed integers.
void save_wav(const float* signal, int num_samples, int sample_rate, const char* path);

// Load signal in floating point format (-1 .. +1) as a WAVE file using 16-bit signed integers.
int load_wav(float* signal, int* num_samples, int* sample_rate, const char* path);

#endif // _INCLUDE_WAVE_H_
Loading

0 comments on commit 0eae082

Please sign in to comment.