yzt
2023-05-26 2f70f6727314edd84d8ec2bfe3ce832803f1ea77
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { Iau2000Orientation } from "../../Source/Cesium.js";
import { JulianDate } from "../../Source/Cesium.js";
import { TimeStandard } from "../../Source/Cesium.js";
 
describe("Core/Iau2000Orientation", function () {
  it("compute moon", function () {
    var date = new JulianDate(2451545.0, -32.184, TimeStandard.TAI);
    var param = Iau2000Orientation.ComputeMoon(date);
 
    // expected results taken from STK Components:
    //    Iau2000Orientation.ComputeMoon(TimeConstants.J2000);
    var expectedRightAscension = 4.6575460830237914;
    var expectedDeclination = 1.1456533675897986;
    var expectedRotation = 0.71899299269222972;
    var expectedRotationRate = 0.0000026518066425764541;
 
    expect(param.rightAscension).toEqual(expectedRightAscension);
    expect(param.declination).toEqual(expectedDeclination);
    expect(param.rotation).toEqual(expectedRotation);
    expect(param.rotationRate).toEqual(expectedRotationRate);
  });
});