AS微信界面设计

<LinearLayout
        android:id="@+id/linearlayout1"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:orientation="vertical">
 
        <ImageView
            android:id="@+id/View1"
            android:layout_width="match_parent"
            android:layout_height="86dp"
            app:srcCompat="@drawable/pic1" />
 
        <TextView
            android:id="@+id/weixin"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:gravity="center"
            android:text="微信" />

 top.xml

<TextView
        android:id="@+id/ViewA"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="top"
        android:layout_weight="1"
        android:background="@color/purple_200"
        android:gravity="center"
        android:text="类微信界面"
        android:textSize="25dp" />

fragment.java部分代码:

import android.os.Bundle;
 
import androidx.fragment.app.Fragment;
 
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
 
public class Fragment1 extends Fragment {
 
    // TODO: Rename parameter arguments, choose names that match
    // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
 
 
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.fragment_1, container, false);
    }
}

 

 

<include
        android:id="@+id/include1"
        layout="@layout/top"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />
 
    <FrameLayout
        android:id="@+id/framelayout1"
        android:layout_width="414dp"
        android:layout_height="696dp"
        app:layout_constraintBottom_toBottomOf="@+id/include2"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintStart_toStartOf="parent"
 
        app:layout_constraintTop_toBottomOf="@+id/include1"
        app:layout_constraintVertical_bias="0.0">
 
    </FrameLayout>
 
    <include
        android:id="@+id/include2"
        layout="@layout/bottom"
        android:layout_width="408dp"
        android:layout_height="110dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentTransaction;
import android.view.View;
 
import android.os.Bundle;
 
import android.widget.LinearLayout;
import android.widget.TextView;
 
public class MainActivity extends AppCompatActivity implements View.OnClickListener {
    private Fragment Fragment1,Fragment2,Fragment3,Fragment4;
    private LinearLayout linearlayout1,linearlayout2,linearlayout3,linearlayout4;
    private FragmentManager manager;
 
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Fragment1=new Fragment1();
        Fragment2=new Fragment2();
        Fragment3=new Fragment3();
        Fragment4=new Fragment4();
        manager=getSupportFragmentManager();
        FragmentTransaction transaction=manager.beginTransaction()
                .add(R.id.framelayout1,Fragment1)
                //            .add(R.id.framelayout1,Fragment2)
                //            .add(R.id.framelayout1,Fragment3)
                //            .add(R.id.framelayout1,Fragment4)
                ;
        transaction.commit();
        linearlayout1=findViewById(R.id.linearlayout1);
        linearlayout2=findViewById(R.id.linearlayout2);
        linearlayout3=findViewById(R.id.linearlayout3);
        linearlayout4=findViewById(R.id.linearlayout4);
        linearlayout1.setOnClickListener(this);
        linearlayout2.setOnClickListener(this);
        linearlayout3.setOnClickListener(this);
        linearlayout4.setOnClickListener(this);
    }
 
    private void select(int i){
        FragmentTransaction transaction=manager.beginTransaction();
        transaction.setCustomAnimations(android.R.anim.fade_in, android.R.anim.slide_out_right);
        switch (i){
            case 1:
                transaction.replace(R.id.framelayout1,Fragment1).commit();
                break;
            case 2:
                transaction.replace(R.id.framelayout1,Fragment2).commit();
                break;
            case 3:
                transaction.replace(R.id.framelayout1,Fragment3).commit();
                break;
            case 4:
                transaction.replace(R.id.framelayout1,Fragment4).commit();
                break;
 
 
        }
 
    }
    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.linearlayout1:
                select(1);
                break;
            case R.id.linearlayout2:
                select(2);
                break;
            case R.id.linearlayout3:
                select(3);
                break;
            case R.id.linearlayout4:
                select(4);
                break;
 
        }
 
    }
 
}

 

 

 

 

### GNSS 中多普勒、载波相位的概念及应用 #### 1. 多普勒效应及其在GNSS中的意义 在卫星导航系统中,载波多普勒指的是由于相对运动引起的接收到的载波频率的变化。这种变化能够反映用户相对于卫星的速度。具体而言,当用户设备与卫星之间存在相对运动时,接收端检测到的载波频率会发生偏移,该现象被称为载波多普勒效应[^1]。 #### 2. 定义及其重要性 是指从地面站到空间飞行器之间的几何路径长度加上各种误差成分的结果。它本质上是通过测量信号传输时间并乘以光速来估算的离值。然而,实际操作过程中,这个数值包含了多种因素造成的偏差,比如大气延迟、钟差等。尽管如此,在没有其他更精准数据的情况下,仍然是确定位置的关键参数之一。 #### 3. 载波相位测量的特点 相比于基于C/A码或P(Y)码测定的粗略离——即所谓的“”,载波相位提供了更为精细的位置信息。这是因为载波波长远小于扩频码周期,从而使得其对应的测精度更高。不过,使用这种方法面临的主要挑战在于如何解决整周模糊度问题,也就是不知道确切有多少完整的波长存在于两地间。一旦解决了这个问题,就能显著提高定位准确性[^2]。 #### 4. 组合技术:相位平滑的应用 为了克服单一方法存在的局限性,工程师们开发出了结合两者优点的技术方案—相位平滑。这项技术充分利用了载波相位较高的分辨率以及易于获取的优势,经过适当处理后可以获得更加可靠且准确的位置估计。特别是对于动态环境下的快速收敛和平稳跟踪具有重要意义[^3]。 ```python def phase_smoothed_pseudorange(pseudo_range, carrier_phase): """ 计算相位平滑 参数: pseudo_range (float): 初始测量值 carrier_phase (float): 同步时间段内的累积载波相位变化 返回: float: 平滑后的 """ smoothed_value = pseudo_range + carrier_phase / wavelength return smoothed_value ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值