AnalyticalGraphicsInc / czml-writer

A library for writing CZML content for use with Cesium.
Other
395 stars 142 forks source link

There is not writeEpoch in OrientationCesiumWriter #153

Closed LZS1991 closed 5 years ago

LZS1991 commented 5 years ago

When i want to create a sensor, i need to set the orientation peoperty,and the result shuld be like that "orientation":{ "interpolationAlgorithm":"LINEAR", "interpolationDegree":1, "epoch":"2012-03-14T16:00:00Z", "unitQuaternion":[ 0,0.5442469787907219,-0.3930414943582269,0.6791273595332279,0.29681583401707096, 60,0.5568574961878456,-0.3795119068692525,0.6694276502158563,0.31264526641282253, 120,0.5690856027377934,-0.3657216971011263,0.6592682247294563,0.32825999586928906, 180,0.5809229010307843,-0.3516803352070495,0.6486560598580954,0.3436492992805397, 240,0.5923612620368607,-0.33739746381396746,0.637598443295639,0.3588026083475122, 300,0.603392830688339,-0.3228828914006865,0.6261029686410711,0.3737095168355816, 360,0.614010031274122,-0.3081465855620958,0.6141775301837412,0.38835978772083696, 420,0.6242055726421669,-0.2931986661641189,0.6018303174821175,0.402743360220153, 480,0.633972453206541,-0.2780493983940966,0.5890698097397695,0.41685035670023496, 540,0.6433039657556208,-0.262709185711373,0.5759047699824437,0.4306710894608867, 600,0.6521937020581379,-0.24718856270292594,0.5623442390402289,0.4441960673878469 ] }

but when i use czml-writer to create the orientation property, there is no way to write the epoch

shunter commented 5 years ago

Sampled properties are written using the overload taking a list of dates and a list of times. The epoch is computed automatically.

See this example of writing orientation:

https://github.com/AnalyticalGraphicsInc/czml-writer/blob/master/DotNet/CesiumLanguageWriterTests/TestOrientationCesiumWriter.cs#L78

LZS1991 commented 5 years ago

OK,I got it ,thank you very much